diff --git a/config.go b/config.go index 7830b8a..eb748cd 100644 --- a/config.go +++ b/config.go @@ -7,14 +7,15 @@ import ( ) func DefaultConfig() Config { - return Config{ - DB: "./sgot.db", + c := Config{ + RootPath: "./", APIkey: "thisIsNotASecretTokenNow", Host: "localhost", Port: "6889", Title: "Sgot", - RootPath: "./", } + c.DB = c.RootPath + "shrty.go" + return c } type Config struct { diff --git a/config_test.go b/config_test.go index 9bb8bac..4f50816 100644 --- a/config_test.go +++ b/config_test.go @@ -24,7 +24,7 @@ func TestConfig_ReadConfig(t *testing.T){ "--title=title", "--apikey=apikey", "--domain=domain", - "--root=root" + "--root=root", } expected := &Config{