feat: load explicit configuration references and remove implicit env overlays
This commit is contained in:
@@ -17,8 +17,15 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
path := flag.String("config", "etc/config.yaml", "configuration file; empty uses defaults and environment")
|
||||
path := flag.String("config", "etc/config.yaml", "configuration file; empty uses only Default()")
|
||||
check := flag.Bool("check-config", false, "validate configuration and exit without starting dependencies")
|
||||
flag.Parse()
|
||||
if *check {
|
||||
if _, err := config.Load(*path); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
if err := run(ctx, *path); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user