-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR to #21 #23
base: main
Are you sure you want to change the base?
PR to #21 #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to update the documentation as well by adding the following sentence where relevant:
If fn returns true, <FuncName> immediately stops and returns ErrorCodeCallback.
Should those be in docstrings or distributed across the code by itself? |
In the doc comments of the individual functions/methods, like: // ScanOne calls fn for every encountered value including objects and arrays.
// When an object or array is encountered fn will also be called for each of its
// member and element values.
// If fn returns true, ScanOne immediately stops and returns ErrorCodeCallback.
//
// ... |
Any updates? |
@@ -2,7 +2,7 @@ package jsonnum | |||
|
|||
// ReadNumber returns the index of the end of the number value | |||
// and err=true if a syntax error was encountered. | |||
func ReadNumber[S ~string | ~[]byte](s S) (trailing S, err bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This boolean actually indicates whether there was an error, please don't change it in internal/jsonnum
Co-authored-by: Roman Sharkov <roman.scharkov@gmail.com>
renamed walker closure's named return value to
exit
instead oferr
, as considered in #21