Documentation ¶
Index ¶
Constants ¶
const ( Text = iota Json )
type of output format for commands
const ( Mercurial = iota Source Binary )
possible installation sources
Variables ¶
var Commands map[string]*Command = map[string]*Command{}
commands map, useful for the help command
var ErrNotInstalled = errors.New("Go version not installed")
error used when Go version used for mkenv is not installed yet
Functions ¶
func IsNotInstalledError ¶
determine if the given error is of ErrNotInstalled type
Types ¶
type BriefJSON ¶
type BriefJSON struct { Installed []string `json:"installed,omitempty"` Available []string `json:"available,omitempty"` }
json brief output structure
type Command ¶ added in v1.1.1
type Command struct { Name string // command name Usage string // short line that contains the usage help Short string // short description Long string // long description Execute commandFunc // run the command Flag flag.FlagSet // set of flags for this command }
command structure
func (*Command) DisplayUsageAndExit ¶ added in v1.1.1
func (cmd *Command) DisplayUsageAndExit()
display the usage and exit
type EnvironmentsJSON ¶
type EnvironmentsList ¶
type EnvironmentsList struct {
DisplayAs int
}
EnvironmentsList command
func NewEnvironmentsList ¶
func NewEnvironmentsList(options ...func(*EnvironmentsList)) *EnvironmentsList
Create a new lsenv adn returns back it's address
func (*EnvironmentsList) Run ¶
func (e *EnvironmentsList) Run() (string, error)
implements the Runner interface returning back a list of available environments in text or json format depending on the given options
type Export ¶
type Export struct { Environment string Name string Force bool Prettify bool // contains filtered or unexported fields }
export command
func (*Export) LoadEnvironment ¶
func (e *Export) LoadEnvironment() (*env.Environment, error)
load environment using the activate environment script, return an error if the operation can't be completed
type Install ¶
type Install struct { Force bool Source int Version string DisplayAs int Verbose bool NoCGO bool BootStrap string }
install command
func NewInstall ¶
Create a new install command and return back it's address