-
Notifications
You must be signed in to change notification settings - Fork 45
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
Issue 6 buffer problem #9
Conversation
@@ -64,6 +67,11 @@ func NewExiftool(opts ...func(*Exiftool) error) (*Exiftool, error) { | |||
return &e, nil | |||
} | |||
|
|||
// SetBufferSize changes the buffer size | |||
func (e *Exiftool) SetBufferSize(size int) { |
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.
I think that the buffer size specification should rather be specified as a functionnal options.
The thing that bothers me with this implementation (a method on the ExifTool
struct) is that users could think that the buffer size could be set after ExifTool
initiatialization, but it doesn't.
Could you please change your implementation to fit a functionnal option (func WithBufferSize func(*Exiftool) error { ... }
) ? The NewExifTool
function already accepts functionnal options.
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.
I don't mention unit-tests and the update of the documentation :)
@asannikov > Hi, I've reviewed your PR, I have some suggestions. |
@asannikov > do you want me to do the changes ? |
yes please. i do not really understand how to implement that in your way. |
I integrated your change "manually", see issue #6 |
An error
nothing on stdout
is occurred in case the token buffer is overflowed.This error comes form this part of the code:
And in core it comes from this part of the code:
https://github.com/golang/go/blob/master/src/bufio/scan.go#L193