thedevsaddam / gojsonq

A simple Go package to Query over JSON/YAML/XML/CSV Data
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.17k stars 140 forks source link

Package has no way to clear errors #80

Closed middelink closed 4 years ago

middelink commented 4 years ago

Greetings,

When using the package to fetch various fields (user supplied paths) in sequence, I noticed that after the first error, ALL Find()'s fail with the same error. Looking through the code, it seems j.errors gets appended, but never reset.

Should it not be part of Reset()? Or if that is not appropriate, have it as a side effect of the Error() or Errors() function?