Browse Source

bug: fix

master
小黄 4 years ago
parent
commit
da538b5637
  1. 13
      main.go

13
main.go

@ -1,13 +1,22 @@
package main
import (
"fmt"
"git.ouxuan.net/tommy/hasaki-ctl/servicegen"
"github.com/spf13/cobra"
)
func main() {
rootCmd := cobra.Command{Use: "hskctl"}
rootCmd.AddCommand(servicegen.Command())
rootCmd := &cobra.Command{Use: "hasaki-ctl"}
version := &cobra.Command{
Use: "version",
Short: "version for hasaki-ctl",
Long: "version for hasaki-ctl",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("version 1.0.1")
},
}
rootCmd.AddCommand(version, servicegen.Command())
err := rootCmd.Execute()
if err != nil {
panic(err)

Loading…
Cancel
Save