-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable errcheck
linter
#4462
Enable errcheck
linter
#4462
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,8 @@ func (l *Map) Set(key string, value interface{}) { | |
// koanf doesn't offer a direct setting mechanism so merging is required. | ||
merged := koanf.New(KeyDelimiter) | ||
_ = merged.Load(confmap.Provider(map[string]interface{}{key: value}, KeyDelimiter), nil) | ||
l.k.Merge(merged) | ||
// Ignore error for now; it only fails with strict merge when the types are different | ||
_ = l.k.Merge(merged) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should Koanf decide to return an error for a different reason we would have no way to report the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems there's at least a couple of calls that could trigger an error in this func with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened #4467 for this, I want to keep this PR for non-breaking changes |
||
} | ||
|
||
// IsSet checks to see if the key has been set in any of the data locations. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this on #2881 (comment)