diff options
author | Teddy Wing | 2017-06-03 18:55:51 +0200 |
---|---|---|
committer | Teddy Wing | 2017-06-03 18:55:51 +0200 |
commit | 12ef5ad5d62297af90e7a4c819bd5c2835a00a05 (patch) | |
tree | 2464926a405cd6963b446973a50c93bd7c011e32 /main.go | |
parent | b0858ffc7b79f3baf6d1f15962ab90a35275707e (diff) | |
download | timetasker-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.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -29,6 +29,7 @@ var config Config func main() { var err error + MaybeWriteConfig() loadConfig() // Parse command line arguments |