diff --git a/vendor.conf b/vendor.conf index b587f9cb9a..7266f577b3 100755 --- a/vendor.conf +++ b/vendor.conf @@ -92,5 +92,5 @@ k8s.io/kubernetes v1.8.14 k8s.io/kube-openapi 0c329704159e3b051aafac400b15baacf2a94a04 vbom.ml/util 928aaa586d7718c70f4090ddf83f2b34c16fdc8d github.com/containerd/console 5d1b48d6114b8c9666f0c8b916f871af97b0a761 -github.com/tonistiigi/units 29de085e9400559bd68aea2e7bc21566e7b8281d +github.com/tonistiigi/units 6950e57a87eaf136bbe44ef2ec8e75b9e3569de2 github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716 diff --git a/vendor/github.com/tonistiigi/units/bytes.go b/vendor/github.com/tonistiigi/units/bytes.go index 14a20fad8b..5a82fc1b34 100644 --- a/vendor/github.com/tonistiigi/units/bytes.go +++ b/vendor/github.com/tonistiigi/units/bytes.go @@ -67,7 +67,7 @@ func (b Bytes) Format(f fmt.State, c rune) { case 'f', 'g': fv, unit, ok := b.floatValue(f.Flag('#')) if !ok { - b.formatInt(f, 'd', true) + b.formatInt(&noPrecision{f}, 'd', true) return } big.NewFloat(fv).Format(f, c) @@ -115,3 +115,11 @@ func (b Bytes) floatValue(binary bool) (float64, string, bool) { return float64(b) / math.Abs(float64(baseUnit)), units[binary][i], true } } + +type noPrecision struct { + fmt.State +} + +func (*noPrecision) Precision() (prec int, ok bool) { + return 0, false +}