Skip to content

Commit

Permalink
fix(cmd/cupd): set options on subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeMac committed Aug 3, 2023
1 parent fc1caf4 commit 31e5141
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/cupd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ func main() {
ShortUsage: "cupd serve [flags]",
ShortHelp: "Run the cupd server",
FlagSet: cfg.FlagSet(),
Options: []ff.Option{
ff.WithEnvVarPrefix("CUPD"),
ff.WithConfigFileParser((&ffyaml.ParseConfig{
Delimiter: "-",
}).Parse),
ff.WithConfigFileFlag("config"),
},
Exec: func(ctx context.Context, args []string) error {
return serve(ctx, cfg)
},
Expand Down

0 comments on commit 31e5141

Please sign in to comment.