Skip to content

Commit 54efe29

Browse files
committed
fix(QF1003): Convert if/else-if chain to tagged switch
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent c80675b commit 54efe29

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.golangci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ linters:
116116
staticcheck:
117117
checks:
118118
- all
119-
- -QF1003 # FIXME Convert if/else-if chain to tagged switch
120-
- -QF1008 # FIXME Omit embedded fields from selector expression
121-
- -ST1020 # FIXME The documentation of an exported function should start with the function’s name
122-
- -ST1022 # FIXME The documentation of an exported variable or constant should start with variable’s name
119+
- -QF1008 # Omit embedded fields from selector expression
120+
- -ST1020 # The documentation of an exported function should start with the function’s name
121+
- -ST1022 # The documentation of an exported variable or constant should start with variable’s name
123122

124123
revive:
125124
rules:

cli/command/volume/create.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options createOptions
129129
Availability: volume.Availability(options.availability),
130130
}
131131

132-
if options.accessType == "mount" {
132+
switch options.accessType {
133+
case "mount":
133134
volOpts.ClusterVolumeSpec.AccessMode.MountVolume = &volume.TypeMount{}
134-
} else if options.accessType == "block" {
135+
case "block":
135136
volOpts.ClusterVolumeSpec.AccessMode.BlockVolume = &volume.TypeBlock{}
136137
}
137138

0 commit comments

Comments
 (0)