33 lines
683 B
Go
33 lines
683 B
Go
package etc
|
|
|
|
import (
|
|
"git.sr.ht/~cco/go-scopes/app"
|
|
"git.sr.ht/~cco/go-scopes/config"
|
|
"git.sr.ht/~cco/go-scopes/lib"
|
|
"git.sr.ht/~cco/go-scopes/logging"
|
|
)
|
|
|
|
func Config() lib.Config {
|
|
ovr := Overrides().Use
|
|
b := config.Base
|
|
cfg := app.Cfg{
|
|
BaseCfg: b("dummy", app.Start),
|
|
Home: ovr(".", HOME),
|
|
AppType: "standard",
|
|
Logging: &logging.Cfg{
|
|
Logfile: ovr("log/scopes.log", LOGFILE),
|
|
},
|
|
}
|
|
cfg.Add(config.Cfg{
|
|
BaseCfg: b("config", config.Start),
|
|
ConfigFormat: "etc",
|
|
})
|
|
return &cfg
|
|
}
|
|
|
|
// collect here the names of fields that may be overridden via
|
|
// explicit Override() or SCOPES_* environment settings.
|
|
const (
|
|
HOME = "home"
|
|
LOGFILE = "logfile"
|
|
)
|