go_c

package
v0.0.0-...-0e3b330 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Go = &cobra.Command{
	Use: "go",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		golang.VerifyPaths()
	},
}
View Source
var Scan = &cobra.Command{
	Use:   "scan",
	Short: "Scan for go projects",
	Run: func(cmd *cobra.Command, args []string) {
		directory := shell.CurrentDirectory()
		clog.UnderlineF("Scanning {{%s|green}} projects under {{%s|blue}}", "go", directory)
		golang.Scan(directory)
	},
}
View Source
var Update = &cobra.Command{
	Use:     "update",
	Aliases: []string{"up"},
	Short:   "Update go project",
	Run: func(cmd *cobra.Command, args []string) {
		all, err := cmd.Flags().GetBool("all")
		xerr.ExitIfError(err)

		if all {
			configuration := cfg.Configuration()
			for path, _ := range configuration.Golang {
				clog.Underline("Checking", path)
				golang.UpdateGo(path)
			}
		}

		path := shell.CurrentDirectory()
		golang.UpdateGo(path)
	},
}

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