aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 18:55:51 +0200
committerTeddy Wing2017-06-03 18:55:51 +0200
commit12ef5ad5d62297af90e7a4c819bd5c2835a00a05 (patch)
tree2464926a405cd6963b446973a50c93bd7c011e32 /main.go
parentb0858ffc7b79f3baf6d1f15962ab90a35275707e (diff)
downloadtimetasker-12ef5ad5d62297af90e7a4c819bd5c2835a00a05.tar.bz2
Add `MaybeWriteConfig()`
A new function that will write a new config.toml file to the XDG_CONFIG_HOME directory. Currently it checks to see whether our config file is present. If not and our config directory isn't present, it creates it. Still need to get this to actually write the config file. Also, we won't want to call it by default in main() like we're doing now. Will likely want to hide it behind a `--write-config` flag.
Diffstat (limited to 'main.go')
-rw-r--r--main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.go b/main.go
index eaef1fc..0c8a8e9 100644
--- a/main.go
+++ b/main.go
@@ -29,6 +29,7 @@ var config Config
func main() {
var err error
+ MaybeWriteConfig()
loadConfig()
// Parse command line arguments