工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
481 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "git.ouxuan.net/tommy/hasaki-ctl/servicegen"
  5. "github.com/spf13/cobra"
  6. )
  7. func main() {
  8. rootCmd := &cobra.Command{Use: "hasaki-ctl"}
  9. version := &cobra.Command{
  10. Use: "version",
  11. Short: "version for hasaki-ctl",
  12. Long: "version for hasaki-ctl",
  13. Run: func(cmd *cobra.Command, args []string) {
  14. fmt.Println("version 1.0.1")
  15. },
  16. }
  17. rootCmd.AddCommand(version, servicegen.Command())
  18. err := rootCmd.Execute()
  19. if err != nil {
  20. panic(err)
  21. }
  22. }