diff options
author | Jordan <me@jordan.im> | 2021-12-22 12:48:41 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2021-12-22 12:48:41 -0700 |
commit | 9b28b7df9897353b5921dd13e2d6e07b016ac70a (patch) | |
tree | b74a758c504dd3b4c0afad5bdb9ab80d66ca8c50 | |
parent | b8cd19d3ccba302a8f45467bff6a1cd7841a3ef2 (diff) | |
download | keep-9b28b7df9897353b5921dd13e2d6e07b016ac70a.tar.gz keep-9b28b7df9897353b5921dd13e2d6e07b016ac70a.zip |
keep, readme: config -> path CLI param
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | keep.go | 14 |
2 files changed, 9 insertions, 9 deletions
@@ -19,6 +19,6 @@ of processed URLs can be found at `127.0.0.1:9099`. ``` Usage of ./keep: - -config string - path to configuration file (default "~/.keep/keep.json") + -path string + path to data directory (default "~/.keep") ``` @@ -47,18 +47,18 @@ var ( func main() { - // ~/.keep directory stores db cache and json config + // Directory (default ~/.keep) containing configuration and DB cache user, err := user.Current() if err != nil { log.Fatal(err) } - keepDir := path.Join(user.HomeDir, ".keep") - - // Default config location: ~/.keep/keep.json - var configPath string - flag.StringVar(&configPath, "config", path.Join(keepDir, "keep.json"), - "path to configuration file") + var keepDir string + flag.StringVar(&keepDir, "path", path.Join(user.HomeDir, ".keep"), + "path to data directory") flag.Parse() + + // See ./keep.json for set of supported parameters/values + configPath := path.Join(keepDir, "keep.json") conf, err := ioutil.ReadFile(configPath) if err != nil { log.Fatal(err) |