Flags of root command (listen, log, headless) should be inherited by all the child commands
This commit is contained in:
parent
ae1076ec39
commit
18a6124833
@ -40,9 +40,9 @@ evaluating variables, and providing information of thread / goroutine state, CPU
|
|||||||
The goal of this tool is to provide a simple yet powerful interface for debugging Go programs.
|
The goal of this tool is to provide a simple yet powerful interface for debugging Go programs.
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
rootCommand.Flags().StringVarP(&Addr, "listen", "l", "localhost:0", "Debugging server listen address.")
|
rootCommand.PersistentFlags().StringVarP(&Addr, "listen", "l", "localhost:0", "Debugging server listen address.")
|
||||||
rootCommand.Flags().BoolVarP(&Log, "log", "", false, "Enable debugging server logging.")
|
rootCommand.PersistentFlags().BoolVarP(&Log, "log", "", false, "Enable debugging server logging.")
|
||||||
rootCommand.Flags().BoolVarP(&Headless, "headless", "", false, "Run debug server only, in headless mode.")
|
rootCommand.PersistentFlags().BoolVarP(&Headless, "headless", "", false, "Run debug server only, in headless mode.")
|
||||||
|
|
||||||
// 'version' subcommand.
|
// 'version' subcommand.
|
||||||
versionCommand := &cobra.Command{
|
versionCommand := &cobra.Command{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user