From c4d3b24e5c12caecfc8200e3a2b1428882110d8e Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Wed, 10 Oct 2018 20:09:20 -0600 Subject: [PATCH] Default to $MNT for db path --- .gitignore | 1 + config/config.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4441dce..ac9e0f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.key rssmon2 db +*.db vendor *.crt 2do diff --git a/config/config.go b/config/config.go index 882efea..49ec21c 100644 --- a/config/config.go +++ b/config/config.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" "os" + "path" "strings" ) @@ -17,7 +18,7 @@ type Config struct { func New() *Config { lookups := make(map[string]*string) - add(cdbpath, "./db", lookups) + add(cdbpath, path.Join(os.Getenv("MNT"), "db.db"), lookups) add(port, ":9101", lookups) flag.Parse() return &Config{