Age | Commit message (Collapse) | Author |
|
Instead of loading the config file I've been testing with in the local
project directory, load the real one from XDG_CONFIG_HOME.
|
|
Put these constructed paths into reusable functions for easier usage.
|
|
I figured it would be a good idea to make this function and
`loadConfig()` consistent. Since `loadConfig()` is private, make this
one private also.
|
|
Now that we have a 'config.go' file, it makes more sense for these two
to live in that file.
Change `loadConfig()` to return an error instead of printing it to the
log.
|
|
If no existing config file is found, write a sample config file to
XDG_CONFIG_HOME/timetasker/config.toml.
|
|
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.
|