diff --git a/conf.go b/conf.go index 4234bcd..098d77b 100644 --- a/conf.go +++ b/conf.go @@ -20,3 +20,15 @@ func get_backend_dsn(c *goconfig.ConfigFile) (dsn string, err error) { } return dsn, nil } + +func get_read_user(c *goconfig.ConfigFile) (user string, pass string, err error) { + user, err = c.GetString("onlineread", "user") + if err != nil { + return "", "", err + } + pass, err = c.GetString("onlineread", "pass") + if err != nil { + return user, "", err + } + return user, pass, nil +}