MCPcopy
hub / github.com/github/git-sizer / Format

Method Format

counts/human.go:98–105  ·  view source on GitHub ↗

Format formats values, aligned, in `len(unit) + 10` or fewer characters (except for extremely large numbers). It returns strings representing the numeral and the unit string.

(value Humanable, unit string)

Source from the content-addressed store, hash-verified

96// characters (except for extremely large numbers). It returns strings
97// representing the numeral and the unit string.
98func (h *Humaner) Format(value Humanable, unit string) (numeral string, unitString string) {
99 n, overflow := value.ToUint64()
100 if overflow {
101 return "∞", unit
102 }
103
104 return h.FormatNumber(n, unit)
105}

Callers 5

TestMetricFunction · 0.80
TestBinaryFunction · 0.80
TestLimits32Function · 0.80
TestLimits64Function · 0.80
EmitMethod · 0.80

Calls 2

FormatNumberMethod · 0.95
ToUint64Method · 0.65

Tested by 4

TestMetricFunction · 0.64
TestBinaryFunction · 0.64
TestLimits32Function · 0.64
TestLimits64Function · 0.64