diff options
-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) |