mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
spf13/pflag: replace deprecated ParseErrorsWhitelist
Use ParseErrorsAllowlist instead, should still work the exact same. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -358,7 +358,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
||||
remainingCmd := info.CreateCommand[index:]
|
||||
// Presence check for certain flags/options.
|
||||
fs := pflag.NewFlagSet("args", pflag.ContinueOnError)
|
||||
fs.ParseErrorsWhitelist.UnknownFlags = true
|
||||
fs.ParseErrorsAllowlist.UnknownFlags = true
|
||||
fs.Usage = func() {}
|
||||
fs.SetInterspersed(false)
|
||||
fs.BoolP("detach", "d", false, "")
|
||||
|
||||
@@ -339,7 +339,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
|
||||
|
||||
// Presence check for certain flags/options.
|
||||
fs := pflag.NewFlagSet("args", pflag.ContinueOnError)
|
||||
fs.ParseErrorsWhitelist.UnknownFlags = true
|
||||
fs.ParseErrorsAllowlist.UnknownFlags = true
|
||||
fs.Usage = func() {}
|
||||
fs.SetInterspersed(false)
|
||||
fs.String("name", "", "")
|
||||
|
||||
Reference in New Issue
Block a user