Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Filename = "~/.gh-shorthand.yml"
Filename is the default file location for gh-shorthand config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // shorthand configs RepoMap map[string]string `yaml:"repos"` UserMap map[string]string `yaml:"users"` DefaultRepo string `yaml:"default_repo"` // RPC configs APIToken string `yaml:"api_token"` SocketPath string `yaml:"socket_path"` // project configs ProjectDirs []string `yaml:"project_dirs"` Editor string `yaml:"editor"` EditorScript string `yaml:"editor_script"` }
Config is a shorthand configuration, read from a yaml file
func LoadFromDefault ¶
LoadFromDefault loads and validates a config.
This is a convenience for the server subcommands. Exits with an error if config can't be loaded.
func LoadFromFile ¶
LoadFromFile attempts to load a Config from a given yaml file. This always returns an empty config.
func MustLoadFromDefault ¶
func MustLoadFromDefault() Config
MustLoadFromDefault loads from the default config location, and exits if there's an error.
func (Config) OpenEditorScript ¶
func (Config) RPCEnabled ¶
Click to show internal directories.
Click to hide internal directories.