remove command function

This commit is contained in:
zhiqiang feng
2020-12-22 10:57:45 +08:00
parent 594f1e6778
commit 6f00ed6029
3 changed files with 11 additions and 4 deletions
+4 -2
View File
@@ -36,7 +36,9 @@ and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: start,
Run: func(cmd *cobra.Command, args []string) {
start()
},
}
var run bool
@@ -55,7 +57,7 @@ func init() {
// startCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
func start(cmd *cobra.Command, args []string) {
func start() {
// Go signal notification works by sending `os.Signal`
// values on a channel. We'll create a channel to
// receive these notifications (we'll also make one to