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