We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bd484b commit 2843abeCopy full SHA for 2843abe
gytes/README.md
@@ -33,11 +33,21 @@ fmt.Println(gytes.Format(1323))
33
34
### New intance
35
36
+#### Decimal prefix
37
+
38
```go
39
g := New()
-// g.BinaryPrefix(true)
40
fmt.Println(g.Format(13231323))
41
```
42
43
`13.23 MB`
44
45
+#### Binary prefix
46
47
+```go
48
+g := New()
49
+g.BinaryPrefix(true)
50
+fmt.Println(g.Format(13231323))
51
+```
52
53
+`12.62 MiB`
gytes/gytes_test.go
@@ -39,6 +39,7 @@ func TestNew(t *testing.T) {
// Binary prefix
g.BinaryPrefix(true)
+ println(g.Format(13231323))
b = Format(1323132313231323)
if b != "1.18 PiB" {
t.Errorf("expected `1.18 PiB`, got %s", b)
0 commit comments