提交 48f3db82 编写于 作者: D Derek Parker

Rename 'run' subcommand to 'debug'.

This renaming avoids confusion with the 'run' subcommand in the go tool.
The 'run' subcommand in Delve is now deprecated. It is still there,
however simply prints a deprecation notice and exits.
上级 96dd44bd
......@@ -54,9 +54,20 @@ The goal of this tool is to provide a simple yet powerful interface for debuggin
}
rootCommand.AddCommand(versionCommand)
// 'run' subcommand.
// Deprecated 'run' subcommand.
runCommand := &cobra.Command{
Use: "run",
Short: "Deprecated command. Use 'debug' instead.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("This command is deprecated, please use 'debug' instead.")
os.Exit(0)
},
}
rootCommand.AddCommand(runCommand)
// 'debug' subcommand.
debugCommand := &cobra.Command{
Use: "debug",
Short: "Compile and begin debugging program.",
Long: `Compiles your program with optimizations disabled,
starts and attaches to it, and enables you to immediately begin debugging your program.`,
......@@ -82,7 +93,7 @@ starts and attaches to it, and enables you to immediately begin debugging your p
os.Exit(status)
},
}
rootCommand.AddCommand(runCommand)
rootCommand.AddCommand(debugCommand)
// 'trace' subcommand.
var traceAttachPid int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册