mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 13:05:17 +00:00
026055a0b7
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.3.0 to 2.27.1. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/urfave/cli/compare/v2.3.0...v2.27.1) --- updated-dependencies: - dependency-name: github.com/urfave/cli/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
49 lines
711 B
Go
49 lines
711 B
Go
package cli
|
|
|
|
import "flag"
|
|
|
|
type extFlag struct {
|
|
f *flag.Flag
|
|
}
|
|
|
|
func (e *extFlag) Apply(fs *flag.FlagSet) error {
|
|
fs.Var(e.f.Value, e.f.Name, e.f.Usage)
|
|
return nil
|
|
}
|
|
|
|
func (e *extFlag) Names() []string {
|
|
return []string{e.f.Name}
|
|
}
|
|
|
|
func (e *extFlag) IsSet() bool {
|
|
return false
|
|
}
|
|
|
|
func (e *extFlag) String() string {
|
|
return FlagStringer(e)
|
|
}
|
|
|
|
func (e *extFlag) IsVisible() bool {
|
|
return true
|
|
}
|
|
|
|
func (e *extFlag) TakesValue() bool {
|
|
return false
|
|
}
|
|
|
|
func (e *extFlag) GetUsage() string {
|
|
return e.f.Usage
|
|
}
|
|
|
|
func (e *extFlag) GetValue() string {
|
|
return e.f.Value.String()
|
|
}
|
|
|
|
func (e *extFlag) GetDefaultText() string {
|
|
return e.f.DefValue
|
|
}
|
|
|
|
func (e *extFlag) GetEnvVars() []string {
|
|
return nil
|
|
}
|