Created
March 5, 2022 05:10
-
-
Save polynomialspace/4331e6be821abe0dc0fa2fb7ec4f4fcb to your computer and use it in GitHub Desktop.
Revisions
-
polynomialspace created this gist
Mar 5, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // 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 )