Skip to content

Commit 2843abe

Browse files
committed
Updated readme
Signed-off-by: Vishal Rana <[email protected]>
1 parent 7bd484b commit 2843abe

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

gytes/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,21 @@ fmt.Println(gytes.Format(1323))
3333

3434
### New intance
3535

36+
#### Decimal prefix
37+
3638
```go
3739
g := New()
38-
// g.BinaryPrefix(true)
3940
fmt.Println(g.Format(13231323))
4041
```
4142

4243
`13.23 MB`
4344

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func TestNew(t *testing.T) {
3939

4040
// Binary prefix
4141
g.BinaryPrefix(true)
42+
println(g.Format(13231323))
4243
b = Format(1323132313231323)
4344
if b != "1.18 PiB" {
4445
t.Errorf("expected `1.18 PiB`, got %s", b)

0 commit comments

Comments
 (0)