-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfake.patch
More file actions
26 lines (24 loc) · 830 Bytes
/
fake.patch
File metadata and controls
26 lines (24 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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,