Created
February 26, 2017 11:16
-
-
Save l-vitaly/15c71c028c0d08275ade392ee5f77602 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ByteSize float64 | |
const ( | |
_ = iota // ignore first value by assigning to blank identifier | |
KB ByteSize = 1 << (10 * iota) // 1 << (10*1) | |
MB // 1 << (10*2) | |
GB // 1 << (10*3) | |
TB // 1 << (10*4) | |
PB // 1 << (10*5) | |
EB // 1 << (10*6) | |
ZB // 1 << (10*7) | |
YB // 1 << (10*8) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment