add rootpath to config

master
kreativmonkey 7 years ago
parent 6acc5619e7
commit ec4dfd6d43

@ -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 {

@ -24,7 +24,7 @@ func TestConfig_ReadConfig(t *testing.T){
"--title=title",
"--apikey=apikey",
"--domain=domain",
"--root=root"
"--root=root",
}
expected := &Config{

Loading…
Cancel
Save