forked from TrueCloudLab/frostfs-node
[#615] blobovnicza: Simplify byte size stringer
Make `stringifyByteSize` to return number of bytes as string. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
08b5f29e16
commit
cc81723b01
3 changed files with 2 additions and 5 deletions
1
go.mod
1
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
|
||||
|
|
2
go.sum
2
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=
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue