MCPcopy
hub / github.com/kopia/kopia / BytesStringBase10

Function BytesStringBase10

internal/units/units.go:48–51  ·  view source on GitHub ↗

BytesStringBase10 formats the given value as bytes with the appropriate base-10 suffix (KB, MB, GB, ...)

(b T)

Source from the content-addressed store, hash-verified

46
47// BytesStringBase10 formats the given value as bytes with the appropriate base-10 suffix (KB, MB, GB, ...)
48func BytesStringBase10[T realNumber](b T) string {
49 //nolint:mnd
50 return toDecimalUnitString(b, 1000, base10UnitPrefixes, "B")
51}
52
53// BytesStringBase2 formats the given value as bytes with the appropriate base-2 suffix (KiB, MiB, GiB, ...)
54func BytesStringBase2[T realNumber](b T) string {

Callers 2

TestBytesStringBase10Function · 0.85
BytesStringFunction · 0.85

Calls 1

toDecimalUnitStringFunction · 0.85

Tested by 1

TestBytesStringBase10Function · 0.68