Documentation ¶
Index ¶
- Variables
- func ConvertRun(lang string, filename string) (err error)
- func GraphRun(args []string) (err error)
- func HackRun(args []string) (err error)
- func InfoRun(lang string) (err error)
- func InitRun(lang string, module string) (err error)
- func StatusRun(args []string) (err error)
- func TidyRun(args []string) (err error)
- func VendorRun(args []string) (err error)
- func VerifyRun(args []string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ConvertCmd = &cobra.Command{ Use: "convert <lang> <file>", Short: "convert another package system to MVS.", Long: convertLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, 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: 'Filename'") cmd.Usage() os.Exit(1) } var filename string if 1 < len(args) { filename = args[1] } err = ConvertRun(lang, filename) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var GraphCmd = &cobra.Command{ Use: "graph", Short: "print module requirement graph", Long: graphLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = GraphRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var HackCmd = &cobra.Command{ Use: "hack", Hidden: true, Short: "dev command", Long: hackLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = HackRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var InfoCmd = &cobra.Command{ Use: "info [language]", Short: "print info about languages and modders known to mvs", Long: infoLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, 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) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, 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 StatusCmd = &cobra.Command{ Use: "status", Short: "print module dependencies status", Long: statusLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = StatusRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var TidyCmd = &cobra.Command{ Use: "tidy [langs...]", Short: "add missinad and remove unused modules", Long: tidyLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = TidyRun(args) 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) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = VendorRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var VerifyCmd = &cobra.Command{ Use: "verify [langs...]", Short: "verify dependencies have expected content", Long: verifyLong, PreRun: func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") ga.SendGaEvent(c, "<omit>", 0) }, Run: func(cmd *cobra.Command, args []string) { var err error err = VerifyRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
Functions ¶
func ConvertRun ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.