diff options
author | Matthieu Cneude <Phantas0s@users.noreply.github.com> | 2021-07-31 14:41:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 14:41:57 +0000 |
commit | 2c426814b8294cc004814d8da0754b04ca24e22b (patch) | |
tree | 96ebe43682518f3f3674e6b3c37971161452c5af | |
parent | 788bd9fc8e468eca757b1ec03732ffb763a7a713 (diff) | |
parent | 44b29de462a4c40848be57fc065d1d87e9ee6aa4 (diff) |
Merge pull request #23 from kandros/fix-default-config-mac-path
Nice :) thanks for that (and sorry if you spent a lot of time on it)
-rw-r--r-- | cmd/config.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/config.go b/cmd/config.go index a0cbe90..fa814d3 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -175,7 +175,7 @@ func dashPath() string { func mapConfig(cfgFile string) (config, string) { if cfgFile == "" { cfgFile = "default.yml" - createConfig(dashPath(), cfgFile, defaultConfig()) + createConfig(dashPath(), cfgFile, defaultConfig(dashPath())) } // viper.AddConfigPath(home) @@ -283,8 +283,8 @@ func (c config) KEdit() string { return kEdit } -func defaultConfig() string { - return `--- +func defaultConfig(dashPath string) string { + return fmt.Sprintf(`--- general: refresh: 600 keys: @@ -293,7 +293,7 @@ general: projects: - - name: Default dashboard located at $HOME/.config/devdash/default.yml + - name: Default dashboard located at %s services: monitor: address: "https://thevaluable.dev" @@ -305,5 +305,5 @@ projects: - name: mon.box_availability options: title: " thevaluable.dev status " - color: yellow` + color: yellow`, filepath.Join(dashPath, "default.yml")) } |