Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InfoCmd = &cobra.Command{ Use: "info [language]", Short: "print info about languages and modders known to hof mod", Long: infoLong, PreRun: func(cmd *cobra.Command, args []string) { }, Run: func(cmd *cobra.Command, args []string) { var err error var lang string if 0 < len(args) { lang = args[0] } err = InfoRun(lang) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var InitCmd = &cobra.Command{ Use: "init <lang> <module>", Short: "initialize a new module in the current directory", Long: initLong, PreRun: func(cmd *cobra.Command, args []string) { }, Run: func(cmd *cobra.Command, args []string) { var err error if 0 >= len(args) { fmt.Println("missing required argument: 'lang'") cmd.Usage() os.Exit(1) } var lang string if 0 < len(args) { lang = args[0] } if 1 >= len(args) { fmt.Println("missing required argument: 'module'") cmd.Usage() os.Exit(1) } var module string if 1 < len(args) { module = args[1] } err = InitRun(lang, module) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var VendorCmd = &cobra.Command{ Use: "vendor [langs...]", Short: "make a vendored copy of dependencies", Long: vendorLong, PreRun: func(cmd *cobra.Command, args []string) { }, Run: func(cmd *cobra.Command, args []string) { var err error err = VendorRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.