errchkjson
errchkjson copied to clipboard
Allow to exclude the structure object if all fields are not filled in
trafficstars
Go often uses the return-from-function approach of the form: (Type, bool) instead of (*Type)
Now linter knows how to detect when an empty object is returned along with a non-empty error, but the same doesn't work for returning a bool second parameter return
I propose to add two exception parameters:
exclude-type-boolto return an empty value from a function in the format (Type, bool)exclude-empty-valuefor any return of an empty value (all fields of the structure are not filled)
Hi @Raneddo Sorry for my slow response. I am not sure I can follow your proposal. Can you please give a code example with a description what you expect to see and what you see instead. Thanks.