github.com/telepresenceio/telepresence/v2@v2.20.0-pro.6.0.20240517030216-236ea954e789/pkg/client/cli/global/flags.go (about) 1 package global 2 3 import ( 4 "github.com/spf13/pflag" 5 ) 6 7 const ( 8 FlagDocker = "docker" 9 FlagContext = "context" 10 FlagUse = "use" 11 FlagOutput = "output" 12 FlagNoReport = "no-report" 13 ) 14 15 func Flags(hasKubeFlags bool) *pflag.FlagSet { 16 flags := pflag.NewFlagSet("", 0) 17 if !hasKubeFlags { 18 // Add deprecated global connect and docker flags. 19 flags.String(FlagContext, "", "The name of the kubeconfig context to use") 20 flags.Lookup(FlagContext).Hidden = true 21 flags.Bool(FlagDocker, false, "Start, or connect to, daemon in a docker container") 22 flags.Lookup(FlagDocker).Hidden = true 23 } 24 flags.Bool(FlagNoReport, false, "Turn off anonymous crash reports and log submission on failure") 25 flags.String(FlagUse, "", "Match expression that uniquely identifies the daemon container") 26 flags.String(FlagOutput, "default", "Set the output format, supported values are 'json', 'yaml', and 'default'") 27 return flags 28 }