cmdmod

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CleanCmd = &cobra.Command{

	Use: "clean",

	Short: "clean hof's module cache",

	Long: cleanLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		err = CleanRun(args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var GetCmd = &cobra.Command{

	Use: "get <module>",

	Short: "add a new dependency to the current module",

	Long: getLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'module'")
			cmd.Usage()
			os.Exit(1)
		}

		var module string

		if 0 < len(args) {

			module = args[0]

		}

		err = GetRun(module)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var InitCmd = &cobra.Command{

	Use: "init <module>",

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

	Long: initLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'module'")
			cmd.Usage()
			os.Exit(1)
		}

		var module string

		if 0 < len(args) {

			module = args[0]

		}

		err = InitRun(module)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var LinkCmd = &cobra.Command{

	Use: "link",

	Short: "symlink dependencies to cue.mod/pkg",

	Long: linkLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		err = LinkRun(args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var PublishCmd = &cobra.Command{
	Use: "publish <module>",

	Short: "publish a module",

	Long: publishLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'module'")
			cmd.Usage()
			os.Exit(1)
		}

		var module string

		if 0 < len(args) {
			module = args[0]
		}

		err = PublishRun(module)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var TidyCmd = &cobra.Command{

	Use: "tidy",

	Short: "recalculate dependencies and update mod files",

	Long: tidyLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		err = TidyRun(args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var VendorCmd = &cobra.Command{

	Use: "vendor",

	Short: "copy dependencies to cue.mod/pkg",

	Long: vendorLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		err = VendorRun(args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var VerifyCmd = &cobra.Command{

	Use: "verify",

	Short: "verify integrity of dependencies",

	Long: verifyLong,

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

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		err = VerifyRun(args)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}

Functions

func CleanRun added in v0.6.8

func CleanRun(args []string) (err error)

func GetRun added in v0.6.8

func GetRun(module string) (err error)

func InitRun

func InitRun(module string) (err error)

func LinkRun added in v0.6.8

func LinkRun(args []string) (err error)

func PublishRun added in v0.6.8

func PublishRun(module string) (err error)

func TidyRun

func TidyRun(args []string) (err error)

func VendorRun

func VendorRun(args []string) (err error)

func VerifyRun

func VerifyRun(args []string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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