[#243] Fix ineffassign linter errors

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-01-11 19:32:37 +03:00 committed by Alex Vanin
parent 8a82400451
commit 43c579f670
5 changed files with 9 additions and 11 deletions

View file

@ -36,7 +36,7 @@ func (d *Decimal) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = protoutil.UInt32Marshal(decimalPrecisionField, buf[offset:], d.prec)
_, err = protoutil.UInt32Marshal(decimalPrecisionField, buf[offset:], d.prec)
if err != nil {
return nil, err
}

View file

@ -132,7 +132,7 @@ func (a *DataAuditResult) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = proto.RepeatedBytesMarshal(failNodesFNum, buf[offset:], a.failNodes)
_, err = proto.RepeatedBytesMarshal(failNodesFNum, buf[offset:], a.failNodes)
if err != nil {
return nil, err
}

View file

@ -159,7 +159,7 @@ func (s *Selector) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = protoutil.StringMarshal(filterSelectorField, buf[offset:], s.filter)
_, err = protoutil.StringMarshal(filterSelectorField, buf[offset:], s.filter)
if err != nil {
return nil, err
}
@ -209,7 +209,7 @@ func (r *Replica) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
_, err = protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
if err != nil {
return nil, err
}
@ -418,7 +418,7 @@ func (ni *NodeInfo) StableMarshal(buf []byte) ([]byte, error) {
offset += n
}
n, err = protoutil.EnumMarshal(stateNodeInfoField, buf[offset:], int32(ni.state))
_, err = protoutil.EnumMarshal(stateNodeInfoField, buf[offset:], int32(ni.state))
if err != nil {
return nil, err
}

View file

@ -168,7 +168,7 @@ func (h *ShortHeader) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = proto.NestedStructureMarshal(shortHdrHomoHashField, buf[offset:], h.homoHash)
_, err = proto.NestedStructureMarshal(shortHdrHomoHashField, buf[offset:], h.homoHash)
if err != nil {
return nil, err
}
@ -485,13 +485,11 @@ func (h *HeaderWithSignature) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = proto.NestedStructureMarshal(hdrWithSigSignatureField, buf[offset:], h.signature)
_, err = proto.NestedStructureMarshal(hdrWithSigSignatureField, buf[offset:], h.signature)
if err != nil {
return nil, err
}
offset += n
return buf, nil
}
@ -840,7 +838,7 @@ func (r *PutObjectPartInit) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = proto.UInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
_, err = proto.UInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
if err != nil {
return nil, err
}

View file

@ -51,7 +51,7 @@ func (s *StorageGroup) StableMarshal(buf []byte) ([]byte, error) {
offset += n
n, err = refs.ObjectIDNestedListMarshal(objectIDsField, buf[offset:], s.members)
_, err = refs.ObjectIDNestedListMarshal(objectIDsField, buf[offset:], s.members)
if err != nil {
return nil, err
}