-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add binary marshaler interface #1030
Conversation
return swag.WriteJSON(m) | ||
} | ||
|
||
func (m *Item) UnmarshalBinary(b []byte) error { |
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.
exported method Item.UnmarshalBinary should have comment or be unexported
@@ -54,3 +55,19 @@ func (m *Item) validateDescription(formats strfmt.Registry) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func (m *Item) MarshalBinary() ([]byte, error) { |
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.
exported method Item.MarshalBinary should have comment or be unexported
return swag.WriteJSON(m) | ||
} | ||
|
||
func (m *Error) UnmarshalBinary(b []byte) error { |
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.
exported method Error.UnmarshalBinary should have comment or be unexported
@@ -45,3 +46,19 @@ func (m *Error) validateMessage(formats strfmt.Registry) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func (m *Error) MarshalBinary() ([]byte, error) { |
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.
exported method Error.MarshalBinary should have comment or be unexported
return swag.WriteJSON(m) | ||
} | ||
|
||
func (m *Item) UnmarshalBinary(b []byte) error { |
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.
exported method Item.UnmarshalBinary should have comment or be unexported
@@ -45,3 +46,19 @@ func (m *Error) validateMessage(formats strfmt.Registry) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func (m *Error) MarshalBinary() ([]byte, error) { |
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.
exported method Error.MarshalBinary should have comment or be unexported
examples/todo-list/models/item.go
Outdated
return swag.WriteJSON(m) | ||
} | ||
|
||
func (m *Item) UnmarshalBinary(b []byte) error { |
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.
exported method Item.UnmarshalBinary should have comment or be unexported
examples/todo-list/models/item.go
Outdated
@@ -54,3 +55,19 @@ func (m *Item) validateDescription(formats strfmt.Registry) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func (m *Item) MarshalBinary() ([]byte, error) { |
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.
exported method Item.MarshalBinary should have comment or be unexported
examples/todo-list/models/error.go
Outdated
return swag.WriteJSON(m) | ||
} | ||
|
||
func (m *Error) UnmarshalBinary(b []byte) error { |
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.
exported method Error.UnmarshalBinary should have comment or be unexported
examples/todo-list/models/error.go
Outdated
@@ -45,3 +46,19 @@ func (m *Error) validateMessage(formats strfmt.Registry) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func (m *Error) MarshalBinary() ([]byte, error) { |
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.
exported method Error.MarshalBinary should have comment or be unexported
Codecov Report
@@ Coverage Diff @@
## master #1030 +/- ##
==========================================
- Coverage 72.4% 72.38% -0.02%
==========================================
Files 21 21
Lines 6073 6073
==========================================
- Hits 4397 4396 -1
- Misses 1207 1208 +1
Partials 469 469
Continue to review full report at Codecov.
|
I'm curious why you implemented this interface. Is it used somewhere? |
yeah it's used when the handlers are returning errors and the content type is application/octet-stream |
No description provided.