forked from TrueCloudLab/frostfs-api-go
[#168] pkg/object: Fix lint error on attribute receiver
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
55948c2ab1
commit
f886d75560
1 changed files with 8 additions and 8 deletions
|
@ -48,30 +48,30 @@ func (a *Attribute) ToV2() *object.Attribute {
|
||||||
//
|
//
|
||||||
// Buffer is allocated when the argument is empty.
|
// Buffer is allocated when the argument is empty.
|
||||||
// Otherwise, the first buffer is used.
|
// Otherwise, the first buffer is used.
|
||||||
func (d *Attribute) Marshal(b ...[]byte) ([]byte, error) {
|
func (a *Attribute) Marshal(b ...[]byte) ([]byte, error) {
|
||||||
var buf []byte
|
var buf []byte
|
||||||
if len(b) > 0 {
|
if len(b) > 0 {
|
||||||
buf = b[0]
|
buf = b[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
return (*object.Attribute)(d).
|
return (*object.Attribute)(a).
|
||||||
StableMarshal(buf)
|
StableMarshal(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unmarshal unmarshals protobuf binary representation of Attribute.
|
// Unmarshal unmarshals protobuf binary representation of Attribute.
|
||||||
func (d *Attribute) Unmarshal(data []byte) error {
|
func (a *Attribute) Unmarshal(data []byte) error {
|
||||||
return (*object.Attribute)(d).
|
return (*object.Attribute)(a).
|
||||||
Unmarshal(data)
|
Unmarshal(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalJSON encodes Attribute to protobuf JSON format.
|
// MarshalJSON encodes Attribute to protobuf JSON format.
|
||||||
func (d *Attribute) MarshalJSON() ([]byte, error) {
|
func (a *Attribute) MarshalJSON() ([]byte, error) {
|
||||||
return (*object.Attribute)(d).
|
return (*object.Attribute)(a).
|
||||||
MarshalJSON()
|
MarshalJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalJSON decodes Attribute from protobuf JSON format.
|
// UnmarshalJSON decodes Attribute from protobuf JSON format.
|
||||||
func (d *Attribute) UnmarshalJSON(data []byte) error {
|
func (a *Attribute) UnmarshalJSON(data []byte) error {
|
||||||
return (*object.Attribute)(d).
|
return (*object.Attribute)(a).
|
||||||
UnmarshalJSON(data)
|
UnmarshalJSON(data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue