summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaga Santagostino <jagasantagostino@gmail.com>2021-07-27 13:23:36 +0200
committerJaga Santagostino <jagasantagostino@gmail.com>2021-07-27 13:23:36 +0200
commit44b29de462a4c40848be57fc065d1d87e9ee6aa4 (patch)
tree96ebe43682518f3f3674e6b3c37971161452c5af
parent788bd9fc8e468eca757b1ec03732ffb763a7a713 (diff)
fix printed default path in mac
-rw-r--r--cmd/config.go10
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"))
}