-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
object:refactor data encode error #5426
Conversation
hey @schomatis, when i reading the ipfs repo,i have found some coding not very elegant.And i have do modify some code.Can you help me review this? |
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
core/commands/object/object.go
Outdated
@@ -43,6 +40,12 @@ type Object struct { | |||
Links []Link `json:"Links,omitempty"` | |||
} | |||
|
|||
var ( | |||
// ErrObjectTooLarge is returned when too much data was read from stdin. current limit 2m | |||
ErrObjectTooLarge = errors.New("input object was too large. limit is 2mbytes") |
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 isn't actually used, can probably just remove it
@magik6k remove it ,please help me review it.Thx |
core/commands/object/object.go
Outdated
@@ -43,6 +40,10 @@ type Object struct { | |||
Links []Link `json:"Links,omitempty"` | |||
} | |||
|
|||
var ( | |||
ErrDataEncoding = errors.New("unkown data field encoding") |
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.
go fmt ./...
dde8d9c
to
7c08a22
Compare
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
Hello @magik6k ,i have fmt code .But it still did not pass. can you help me look at this wrong ci.Maybe it has some wrong about ci. |
@magik6k thx for restarting ci.And the pr has passed required checks.Please help me review it.thank u 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
License: MIT
Signed-off-by: Kejie Zhang [email protected]