Skip to content

Commit 98542a3

Browse files
committed
Replace cli.StringSlice with []string
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent 0353955 commit 98542a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/config-manager/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type Flags struct {
6868
ConfigFileSrcdir string
6969
ConfigFileDst string
7070
DefaultConfig string
71-
FallbackStrategies cli.StringSlice
71+
FallbackStrategies []string
7272
SendSignal bool
7373
Signal int
7474
ProcessToSignal string
@@ -365,8 +365,8 @@ func updateConfigName(config string, f *Flags) (string, error) {
365365
}
366366

367367
// Otherwise, if no explicit default is set, step through the configured fallbacks.
368-
klog.Infof("No value set and no default set. Attempting fallback strategies: %v", f.FallbackStrategies.Value())
369-
for _, fallback := range f.FallbackStrategies.Value() {
368+
klog.Infof("No value set and no default set. Attempting fallback strategies: %v", f.FallbackStrategies)
369+
for _, fallback := range f.FallbackStrategies {
370370
switch fallback {
371371
case FallbackStrategyNamedConfig:
372372
klog.Infof("Attempting to find config named: %v", NamedConfigFallback)

cmd/nvidia-device-plugin/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func main() {
9090
},
9191
&cli.StringSliceFlag{
9292
Name: "device-list-strategy",
93-
Value: cli.NewStringSlice(string(spec.DeviceListStrategyEnvVar)),
93+
Value: []string{string(spec.DeviceListStrategyEnvVar)},
9494
Usage: "the desired strategy for passing the device list to the underlying runtime:\n\t\t[envvar | volume-mounts | cdi-annotations]",
9595
Sources: cli.EnvVars("DEVICE_LIST_STRATEGY"),
9696
},

0 commit comments

Comments
 (0)