From f886d7556085e90d113875d3cd1bbd41838ae258 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 13 Nov 2020 18:04:03 +0300 Subject: [PATCH] [#168] pkg/object: Fix lint error on attribute receiver Signed-off-by: Alex Vanin --- pkg/object/attribute.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/object/attribute.go b/pkg/object/attribute.go index 6af3d21..dbedf69 100644 --- a/pkg/object/attribute.go +++ b/pkg/object/attribute.go @@ -48,30 +48,30 @@ func (a *Attribute) ToV2() *object.Attribute { // // Buffer is allocated when the argument is empty. // 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 if len(b) > 0 { buf = b[0] } - return (*object.Attribute)(d). + return (*object.Attribute)(a). StableMarshal(buf) } // Unmarshal unmarshals protobuf binary representation of Attribute. -func (d *Attribute) Unmarshal(data []byte) error { - return (*object.Attribute)(d). +func (a *Attribute) Unmarshal(data []byte) error { + return (*object.Attribute)(a). Unmarshal(data) } // MarshalJSON encodes Attribute to protobuf JSON format. -func (d *Attribute) MarshalJSON() ([]byte, error) { - return (*object.Attribute)(d). +func (a *Attribute) MarshalJSON() ([]byte, error) { + return (*object.Attribute)(a). MarshalJSON() } // UnmarshalJSON decodes Attribute from protobuf JSON format. -func (d *Attribute) UnmarshalJSON(data []byte) error { - return (*object.Attribute)(d). +func (a *Attribute) UnmarshalJSON(data []byte) error { + return (*object.Attribute)(a). UnmarshalJSON(data) }