commit
fc8a3c52bc
|
@ -46,7 +46,7 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
|
||||||
github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d
|
github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d
|
||||||
github.com/docker/distribution 30578ca32960a4d368bf6db67b0a33c2a1f3dc6f
|
github.com/docker/distribution 30578ca32960a4d368bf6db67b0a33c2a1f3dc6f
|
||||||
|
|
||||||
github.com/tonistiigi/units 29de085e9400559bd68aea2e7bc21566e7b8281d
|
github.com/tonistiigi/units 6950e57a87eaf136bbe44ef2ec8e75b9e3569de2
|
||||||
github.com/docker/cli 99576756eb3303b7af8102c502f21a912e3c1af6 https://github.com/tonistiigi/docker-cli.git
|
github.com/docker/cli 99576756eb3303b7af8102c502f21a912e3c1af6 https://github.com/tonistiigi/docker-cli.git
|
||||||
github.com/docker/docker-credential-helpers d68f9aeca33f5fd3f08eeae5e9d175edf4e731d1
|
github.com/docker/docker-credential-helpers d68f9aeca33f5fd3f08eeae5e9d175edf4e731d1
|
||||||
github.com/docker/libnetwork 822e5b59d346b7ad0735df2c8e445e9787320e67
|
github.com/docker/libnetwork 822e5b59d346b7ad0735df2c8e445e9787320e67
|
||||||
|
|
|
@ -67,7 +67,7 @@ func (b Bytes) Format(f fmt.State, c rune) {
|
||||||
case 'f', 'g':
|
case 'f', 'g':
|
||||||
fv, unit, ok := b.floatValue(f.Flag('#'))
|
fv, unit, ok := b.floatValue(f.Flag('#'))
|
||||||
if !ok {
|
if !ok {
|
||||||
b.formatInt(f, 'd', true)
|
b.formatInt(&noPrecision{f}, 'd', true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
big.NewFloat(fv).Format(f, c)
|
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
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue