mod

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

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,

	Run: func(cmd *cobra.Command, args []string) {

		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 := lib.Convert(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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.ProcessLangs("graph", 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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.Hack("", 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,

	Run: func(cmd *cobra.Command, args []string) {

		var lang string

		if 0 < len(args) {

			lang = args[0]

		}

		msg, err := lib.LangInfo(lang)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		fmt.Println(msg)

	},
}
View Source
var InitCmd = &cobra.Command{

	Use: "init <lang> <module>",

	Short: "initialize a new module in the current directory",

	Long: initLong,

	Run: func(cmd *cobra.Command, args []string) {

		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 := lib.Init(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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.ProcessLangs("status", 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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.ProcessLangs("tidy", 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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.ProcessLangs("vendor", 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,

	Run: func(cmd *cobra.Command, args []string) {

		err := lib.ProcessLangs("verify", args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}

	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL