Created
March 5, 2022 05:10
-
-
Save polynomialspace/4331e6be821abe0dc0fa2fb7ec4f4fcb 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
// You can edit this code! | |
// Click here and start typing. | |
package byteunits | |
const ( | |
_ = iota | |
KB = 1 << (10 * iota) | |
MB | |
GB | |
TB | |
PB | |
EB | |
//overflow | |
// ZB | |
// YB | |
) | |
const ( | |
SI_KB int = 1e3 | |
SI_MB int = 1e6 | |
SI_GB int = 1e9 | |
SI_TB int = 1e12 | |
SI_PB int = 1e15 | |
SI_EB int = 1e18 | |
//overflow | |
// SI_ZB int = 1e21 | |
// SI_YB int = 1e24 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment