Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
717
func
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
cmdSchemas
Function · 0.85
TestCmdSchemas
Function · 0.85
Calls
no outgoing calls
Tested by
1
TestCmdSchemas
Function · 0.68