Conversation
| docType := docValue.Type() | ||
| docKind := docType.Kind() | ||
| if docKind == reflect.Map { | ||
| switch docKind { |
There was a problem hiding this comment.
Does the linter require switch statement instead of if else block? I feel both style should be valid.
| if err != nil { | ||
| var commandErr mongo.CommandError | ||
| if !(errors.As(err, &commandErr) && commandErr.Code == 26) { | ||
| if !errors.As(err, &commandErr) || commandErr.Code != 26 { |
There was a problem hiding this comment.
Does the linter require always use one style of boolean logic? I feel either way should be fine but would not mind enforcing this from now on.
| imp.InputOptions.UseArrayIndexFields, | ||
| ), nil | ||
| } | ||
| return NewJSONInputReader( |
There was a problem hiding this comment.
nit since it is not related to linter change, I feel this should be in the else statement to be more readable.
zhenxuanjameszhang
left a comment
There was a problem hiding this comment.
LGTM. Thanks for doing this work to make our code base quality better!
I have a few questions, it would be great if you can answer them.
Could you please also summarize the lint rule change in the PR DESCRIPTION? I got some idea by reviewing but think it would be nice to have it for reference.
This includes code updates to satisfy the new (more stringent) linter rules.