cmd

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SetCmd = &cobra.Command{
	Use:     "set <environment name>",
	Aliases: []string{"switch", "use"},
	Short:   "Switch to another environment",
	Long: `Switch to another environment.

Environments may be one of those: dev(elopment), stg/staging, prod(uction) or etc.`,
	Run: func(cmd *cobra.Command, args []string) {
		if err := env.Set(args[0]); err != nil {
			panic(err)
		}

		env, err := env.Get()
		if err != nil {
			panic(err)
		}
		fmt.Printf("Environment is now: %s", env)
	},
}

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