Documentation ¶
Overview ¶
Package config is repsonsible for setting and returning the current state of the shell in regards to configuration flags and mode options
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alias ¶
type Alias struct { Name string Description string `json:"description"` Command string `json:"command"` }
Alias is the struct used to allow abstracted commands
type Config ¶
type Config struct { DebugEnabled bool `json:"debugEnabled"` APIDriver string `json:"apiDriver"` Experimental bool `json:"experimental"` PrintMode PrintModeEnum `json:"printMode"` Aliases map[string]Alias `json:"aliases"` }
Config is the struct containing the application state
func (*Config) RemoveAlias ¶
RemoveAlias an alias in the config
func (*Config) SetPrintMode ¶
func (config *Config) SetPrintMode(printMode PrintModeEnum)
SetPrintMode assigns .PrintMode on the current config struct
type PrintModeEnum ¶
type PrintModeEnum string
PrintModeEnum is a type to ensure SetPrintMode recieves a valid enum
const ( PrintJSON PrintModeEnum = "json" PrintLine PrintModeEnum = "line" PrintPretty PrintModeEnum = "pretty" )
PrintModeEnum constants enum
Click to show internal directories.
Click to hide internal directories.