Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "gows", Short: "Go Workspace / Environment Manager, to easily manage the Go Workspace during development.", Long: `Go Workspace / Environment Manager, to easily manage the Go Workspace during development. Work in isolated (development) environment when you're working on your Go projects. No cross-project dependency version missmatch, no more packages left out from vendor/. No need for initializing a go workspace either, your project can be located anywhere, not just in a predefined $GOPATH workspace. gows will take care about crearing the (per-project isolated) workspace directory structure, no matter where your project is located. gows works perfectly with other Go tools, all it does is it ensures that every project gets it's own, isolated Go workspace and sets $GOPATH accordingly. Sync Mode can be set in the .gows.user.yml config file, or through the $GOWS_SYNC_MODE environment variable.`, DisableFlagParsing: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { initLogFormatter() if loglevelFlag == "" { if loglevelEnv := os.Getenv("GOWS_LOGLEVEL"); loglevelEnv != "" { loglevelFlag = loglevelEnv } else { loglevelFlag = "info" } } level, err := log.ParseLevel(loglevelFlag) if err != nil { return err } log.SetLevel(level) return nil }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func PrepareEnvironmentAndRunCommand ¶
func PrepareEnvironmentAndRunCommand(userConfig config.UserConfigModel, cmdName string, cmdArgs ...string) (int, error)
PrepareEnvironmentAndRunCommand ... Returns the exit code of the command and any error occured in the function
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.