diff options
author | Dawid Dziurla <dawidd0811@gmail.com> | 2018-08-26 10:42:25 +0200 |
---|---|---|
committer | Dawid Dziurla <dawidd0811@gmail.com> | 2018-08-26 17:31:28 +0200 |
commit | b7f6bcb3caa45ecb516670704513110a7d2f6a74 (patch) | |
tree | 633e0de5de8cfe2ae60033997ffd27d3f628d7b0 /pkg/config | |
parent | 93ab892bdd1226f9a519a938c8b28590e71e54f3 (diff) |
add config flag
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/app_config.go | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index aa56365e3..d49ddd4d5 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -101,7 +101,7 @@ func LoadUserConfig() (*viper.Viper, error) { // LoadDefaultConfig loads in the defaults defined in this file func LoadDefaultConfig(v *viper.Viper) error { - defaults := getDefaultConfig() + defaults := GetDefaultConfig() return v.ReadConfig(bytes.NewBuffer(defaults)) } @@ -139,24 +139,23 @@ func (c *AppConfig) InsertToUserConfig(key, value string) error { return v.WriteConfig() } -func getDefaultConfig() []byte { - return []byte(` - gui: - ## stuff relating to the UI - scrollHeight: 2 - theme: - activeBorderColor: - - white - - bold - inactiveBorderColor: - - white - optionsTextColor: - - blue - git: - # stuff relating to git - os: - # stuff relating to the OS - +func GetDefaultConfig() []byte { + return []byte( +`gui: + # stuff relating to the UI + scrollHeight: 2 + theme: + activeBorderColor: + - white + - bold + inactiveBorderColor: + - white + optionsTextColor: + - blue +git: + # stuff relating to git +os: + # stuff relating to the OS `) } |