-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Hey @Stebalien , the pr is used for ipfs issue,can you help me review it?Thx a lot |
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.
Thanks!
parse.go
Outdated
@@ -52,7 +54,9 @@ func parseRabinString(r io.Reader, chunker string) (Splitter, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
|
|||
if min < 16 { | |||
return nil,ErrRabinMin |
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.
needs go fmt ./...
parse_test.go
Outdated
} | ||
_, err = parseRabinString(r, chk2) | ||
if err == nil || err.Error() != ErrRabinMin.Error() { | ||
t.Errorf("it should be a ErrRabinMin here.") |
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.
By convention error strings shouldn't end with a .
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.
Also, you should be able to just do err == ErrRabinMin
.
Hello @magik6k , i have update the pr.please help me review it.Thx a lot |
In general, it's easier for people to parse positive statements.
I want to fix bug in ipfs,so i need to update code in chunker.