fix(QF1003): Convert if/else-if chain to tagged switch
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@ -116,10 +116,9 @@ linters:
|
||||
staticcheck:
|
||||
checks:
|
||||
- all
|
||||
- -QF1003 # FIXME Convert if/else-if chain to tagged switch
|
||||
- -QF1008 # FIXME Omit embedded fields from selector expression
|
||||
- -ST1020 # FIXME The documentation of an exported function should start with the function’s name
|
||||
- -ST1022 # FIXME The documentation of an exported variable or constant should start with variable’s name
|
||||
- -QF1008 # Omit embedded fields from selector expression
|
||||
- -ST1020 # The documentation of an exported function should start with the function’s name
|
||||
- -ST1022 # The documentation of an exported variable or constant should start with variable’s name
|
||||
|
||||
revive:
|
||||
rules:
|
||||
|
||||
@ -129,9 +129,10 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options createOptions
|
||||
Availability: volume.Availability(options.availability),
|
||||
}
|
||||
|
||||
if options.accessType == "mount" {
|
||||
switch options.accessType {
|
||||
case "mount":
|
||||
volOpts.ClusterVolumeSpec.AccessMode.MountVolume = &volume.TypeMount{}
|
||||
} else if options.accessType == "block" {
|
||||
case "block":
|
||||
volOpts.ClusterVolumeSpec.AccessMode.BlockVolume = &volume.TypeBlock{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user