Documentation
¶
Index ¶
- func ConfigDir() string
- func ConfigPath() string
- func MaskSecret(s string) string
- func PromptInput(reader *bufio.Reader, label, defaultVal string) string
- func PromptSecret(reader *bufio.Reader, label, defaultVal string) string
- func Resolve(flagVal, envKey string, configVal string) string
- type Config
- type Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the absolute directory raff stores config in. Falls back to the current working directory when $HOME is unset (some minimal Docker base images don't set it for the root user) so the printed path is always absolute and copy-pasteable.
func ConfigPath ¶
func ConfigPath() string
func MaskSecret ¶ added in v0.6.1
MaskSecret keeps the first 9 characters ("raff_737e") and hides the rest.
func PromptSecret ¶ added in v0.6.1
PromptInput reads a line from stdin with an optional default value shown in brackets. PromptSecret is PromptInput for a secret: the stored value is shown only by its first characters, so a configured key never appears on screen.
Types ¶
Click to show internal directories.
Click to hide internal directories.