diff --git a/fake.go b/fake.go index 239d050..e581214 100644 --- a/fake.go +++ b/fake.go @@ -25,9 +25,9 @@ import ( "github.snooguts.net/reddit/reddit-service-authentication-go/thrift/reddit/sso" ) -var configPath = flag.String("config", "", "Path to the config file to use.") - type config struct { + baseplate.Config `yaml:",inline"` + Authentication authenticationsvc.Config `yaml:"authentication"` Sso ssosvc.Config `yaml:"sso"` OAuth oauthsvc.Config `yaml:"oauth"` @@ -37,6 +37,9 @@ func main() { flag.Parse() var cfg config + if err := baseplate.ParseConfigYAML(&cfg); err != nil { + log.Fatalf("parsing config: %s", err) + } ctx, bp, err := baseplate.New(context.Background(), baseplate.NewArgs{ ConfigPath: *configPath, ServiceCfg: &cfg,