Skip to content

Commit

Permalink
refactor: WithConfigFiles and WithImmutables now append
Browse files Browse the repository at this point in the history
They no longer replace the values but append them.
  • Loading branch information
aeneasr committed Jan 8, 2021
1 parent 598cae3 commit 00d6771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configx/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ func WithContext(ctx context.Context) OptionModifier {

func WithConfigFiles(files ...string) OptionModifier {
return func(p *Provider) {
p.files = files
p.files = append(p.files, files...)
}
}

func WithImmutables(immutables ...string) OptionModifier {
return func(p *Provider) {
p.immutables = immutables
p.immutables = append(p.immutables, immutables...)
}
}

Expand Down

0 comments on commit 00d6771

Please sign in to comment.