Open ccoVeille opened 7 months ago
This is a draft as I need to check every single changes I made to respect what you said here https://github.com/itchyny/gojq/pull/249#issuecomment-2038445048
Here is a new version where I only used errors.Is
/errors.As
for external errors.
I followed your recommendation
This is meaningless change applying unthoughtful best practices. The errors are controlled in the package and errors.Is is reasonable only when the error comes from another package, also I don't like for performance reasons. Return statement in else is intentional, not to catch unexpected failure of forgetting return in previous branches, possibly caused by nested branches. The first commit about useless receivers is the only one I can merge in the changes.