You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering to use this library to mock our custom wrapper around go-github. Would you consider removing the github.com/go-kit/log dependency, e.g., just print using fmt or the std lib logger?
I'm also not sure about the rationale for using the github.com/buger/jsonparser. Could the std lib json parser be used instead?
Why? Well, I've looked at the code, and the logger and json parser is only used by the command line tool. Hence, it is unfortunate that users of the mock part must bring in extra (indirect) dependencies that aren't needed for their use case.
PS: You may be interested in the v2 json-experiment that may come in a future Go release.
The text was updated successfully, but these errors were encountered:
Would you consider removing the github.com/go-kit/log dependency, e.g., just print using fmt or the std lib logger?
The go-kit/log would be the easiest to get rid of. Using either the native logger or fmt is probably good enough.
I'm also not sure about the rationale for using the github.com/buger/jsonparser. Could the std lib json parser be used instead?
The case for the jsonparser is different. It's used to provide a dynamic parsing for the Github OpenApiSchema. Without it, although technically possible, one would have to juggle a multi-level map[string]any and given the structure, that would become messy. I'm happy to review a contributiion if you're interested to give it a shot.
PS: You may be interested in the v2 json-experiment that may come in a future Go release.
I'm considering to use this library to mock our custom wrapper around go-github. Would you consider removing the
github.com/go-kit/log
dependency, e.g., just print usingfmt
or the std lib logger?I'm also not sure about the rationale for using the
github.com/buger/jsonparser
. Could the std lib json parser be used instead?Why? Well, I've looked at the code, and the logger and json parser is only used by the command line tool. Hence, it is unfortunate that users of the mock part must bring in extra (indirect) dependencies that aren't needed for their use case.
PS: You may be interested in the v2 json-experiment that may come in a future Go release.
The text was updated successfully, but these errors were encountered: