30 lines
635 B
Go
30 lines
635 B
Go
package etc
|
|
|
|
import (
|
|
"git.sr.ht/~cco/go-scopes"
|
|
"git.sr.ht/~cco/go-scopes/config"
|
|
)
|
|
|
|
func Config() config.Config {
|
|
b := config.MakeBase
|
|
cfg := scopes.Cfg{
|
|
BaseConfig: b("dummy"),
|
|
AppType: "standard",
|
|
}
|
|
cfg.Add(config.Cfg{b("config"), "etc"})
|
|
return &cfg
|
|
}
|
|
|
|
// collect here the names of fields that may be overridden via
|
|
// explicit Override() or SCOPES_* environment settings.
|
|
const (
|
|
NAME = "name"
|
|
)
|
|
|
|
// in a production scenario this should be put in separate
|
|
// file `settings.go` that should not be stored in code repository.
|
|
func Override() map[string]string {
|
|
return map[string]string{
|
|
NAME: "overridden",
|
|
}
|
|
}
|