Skip to content

Commit

Permalink
fix(reader): default force lowercase to true
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Aug 26, 2024
1 parent d439804 commit ebff231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions reader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Settings struct {
// key, and defaults to a no-op function.
HandleDeprecatedKey func(source, deprecatedKey, currentKey string)
// DefaultOptions are the default options to use for every method call.
// They default to ForceLowercase(false), AcceptEmpty(false).
// They default to ForceLowercase(true), AcceptEmpty(false).
DefaultOptions []Option
}

Expand All @@ -60,5 +60,5 @@ func (s *Settings) setDefaults() {
s.HandleDeprecatedKey = func(source, deprecatedKey, currentKey string) {}
}
s.DefaultOptions = gosettings.DefaultSlice(s.DefaultOptions,
[]Option{ForceLowercase(false), AcceptEmpty(false)})
[]Option{ForceLowercase(true), AcceptEmpty(false)})
}
2 changes: 1 addition & 1 deletion reader/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Test_New(t *testing.T) {
expectedReader := &Reader{
sources: []parse.Source{testSourceA, testSourceB},
defaultReadSettings: settings{
forceLowercase: ptrTo(false),
forceLowercase: ptrTo(true),
acceptEmpty: ptrTo(false),
},
}
Expand Down

0 comments on commit ebff231

Please sign in to comment.