MCPcopy Create free account
hub / github.com/cli/cli / formatSize

Function formatSize

script/ghmock/schemacmd.go:717–722  ·  view source on GitHub ↗
(n int64)

Source from the content-addressed store, hash-verified

715}
716
717func formatSize(n int64) string {
718 if n < 1<<20 {
719 return fmt.Sprintf("%.1f KB", float64(n)/(1<<10))
720 }
721 return fmt.Sprintf("%.1f MB", float64(n)/(1<<20))
722}

Callers 2

cmdSchemasFunction · 0.85
TestCmdSchemasFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCmdSchemasFunction · 0.68