Skip to content

Commit 9f7ed0d

Browse files
committed
go fmt readme
1 parent 199a0cc commit 9f7ed0d

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tmp/

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ go get github.com/teeworlds-go/huffman@master
2121
package main
2222

2323
import (
24-
"fmt"
25-
"github.com/teeworlds-go/huffman"
24+
"fmt"
25+
"github.com/teeworlds-go/huffman"
2626
)
2727

2828
func main() {
29-
data, err := huffman.Compress([]byte("hello world"))
30-
if err != nil {
31-
panic(err)
32-
}
33-
// data: [174 149 19 92 9 87 194 22 177 86 220 218 34 56 185 18 156 168 184 1]
34-
fmt.Printf("data: %v\n", data)
35-
36-
data, err = huffman.Decompress([]byte{174, 149, 19, 92, 9, 87, 194, 22, 177, 86, 220, 218, 34, 56, 185, 18, 156, 168, 184, 1})
37-
if err != nil {
38-
panic(err)
39-
}
40-
// data: hello world
41-
fmt.Printf("data: %v\n", string(data))
29+
data, err := huffman.Compress([]byte("hello world"))
30+
if err != nil {
31+
panic(err)
32+
}
33+
// data: [174 149 19 92 9 87 194 22 177 86 220 218 34 56 185 18 156 168 184 1]
34+
fmt.Printf("data: %v\n", data)
35+
36+
data, err = huffman.Decompress([]byte{174, 149, 19, 92, 9, 87, 194, 22, 177, 86, 220, 218, 34, 56, 185, 18, 156, 168, 184, 1})
37+
if err != nil {
38+
panic(err)
39+
}
40+
// data: hello world
41+
fmt.Printf("data: %v\n", string(data))
4242
}
4343
```

0 commit comments

Comments
 (0)