]> Cypherpunks repositories - gostls13.git/commitdiff
fix up YB and add ZB, EB in example
authorRob Pike <r@golang.org>
Sun, 3 Jan 2010 20:36:39 +0000 (07:36 +1100)
committerRob Pike <r@golang.org>
Sun, 3 Jan 2010 20:36:39 +0000 (07:36 +1100)
R=rsc
CC=golang-dev
https://golang.org/cl/183107

doc/effective_go.html

index 2932709502331ad24f997222e395fc6745ece52d..ab9e3a8c3d85a3ba0eac42a62dedc674385ce0cf 100644 (file)
@@ -1360,6 +1360,8 @@ const (
     GB
     TB
     PB
+    EB
+    ZB
     YB
 )
 </pre>
@@ -1373,6 +1375,10 @@ func (b ByteSize) String() string {
     switch {
     case b &gt;= YB:
         return fmt.Sprintf("%.2fYB", b/YB)
+    case b &gt;= ZB:
+        return fmt.Sprintf("%.2fZB", b/ZB)
+    case b &gt;= EB:
+        return fmt.Sprintf("%.2fEB", b/EB)
     case b &gt;= PB:
         return fmt.Sprintf("%.2fPB", b/PB)
     case b &gt;= TB: