forked from TrueCloudLab/frostfs-node
[#1598] golangci: Enable unconvert linters
To drop unnecessary conversions. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
a9f27e074b
commit
4d5ae59a52
13 changed files with 17 additions and 16 deletions
|
@ -136,6 +136,6 @@ func (w *genericWriter) removeWithCounter(p string, size uint64) error {
|
|||
if err := os.Remove(p); err != nil {
|
||||
return err
|
||||
}
|
||||
w.fileCounter.Dec(uint64(size))
|
||||
w.fileCounter.Dec(size)
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ func (w *linuxWriter) removeFile(p string, size uint64) error {
|
|||
return logicerr.Wrap(new(apistatus.ObjectNotFound))
|
||||
}
|
||||
if err == nil {
|
||||
w.fileCounter.Dec(uint64(size))
|
||||
w.fileCounter.Dec(size)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -133,11 +133,11 @@ func (s *memstoreImpl) Iterate(_ context.Context, req common.IteratePrm) (common
|
|||
elem := common.IterationElement{
|
||||
ObjectData: v,
|
||||
}
|
||||
if err := elem.Address.DecodeString(string(k)); err != nil {
|
||||
if err := elem.Address.DecodeString(k); err != nil {
|
||||
if req.IgnoreErrors {
|
||||
continue
|
||||
}
|
||||
return common.IterateRes{}, logicerr.Wrap(fmt.Errorf("(%T) decoding address string %q: %v", s, string(k), err))
|
||||
return common.IterateRes{}, logicerr.Wrap(fmt.Errorf("(%T) decoding address string %q: %v", s, k, err))
|
||||
}
|
||||
var err error
|
||||
if elem.ObjectData, err = s.compression.Decompress(elem.ObjectData); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue