From cc81723b01983504694135ae33c0cefe5fcfea21 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 16 Jun 2021 11:58:38 +0300 Subject: [PATCH] [#615] blobovnicza: Simplify byte size stringer Make `stringifyByteSize` to return number of bytes as string. Signed-off-by: Leonard Lyubich --- go.mod | 1 - go.sum | 2 -- pkg/local_object_storage/blobovnicza/sizes.go | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 391d3b204..34aa88678 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/nspcc-dev/neofs-node go 1.14 require ( - code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.1 github.com/hashicorp/golang-lru v0.5.4 diff --git a/go.sum b/go.sum index 7975e266b..61af2abcb 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 h1:/EMHruHCFXR9xClkGV/t0rmHrdhX4+trQUcBqjwc9xE= -code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= diff --git a/pkg/local_object_storage/blobovnicza/sizes.go b/pkg/local_object_storage/blobovnicza/sizes.go index cecdb3f0e..027018a50 100644 --- a/pkg/local_object_storage/blobovnicza/sizes.go +++ b/pkg/local_object_storage/blobovnicza/sizes.go @@ -3,8 +3,8 @@ package blobovnicza import ( "encoding/binary" "fmt" + "strconv" - "code.cloudfoundry.org/bytefmt" "go.etcd.io/bbolt" ) @@ -18,7 +18,7 @@ func stringifyBounds(lower, upper uint64) string { } func stringifyByteSize(sz uint64) string { - return bytefmt.ByteSize(sz) + return strconv.FormatUint(sz, 10) } func bucketKeyFromBounds(upperBound uint64) []byte {