Skip to content

Commit b9d9caa

Browse files
committed
dictionaryexample line endings fix issue #7
1 parent 37df513 commit b9d9caa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

example/dictionaryexample.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ func main() {
4747
}
4848
Words := make([]string, 0)
4949
Values := make([]interface{}, 0)
50-
for _, Vals := range bytes.Split(Data, []byte("\r\n")) {
50+
for _, Vals := range bytes.Split(Data, []byte("\n")) {
51+
Vals = bytes.TrimSpace(Vals)
5152
WordFreq := bytes.Split(Vals, []byte(" "))
5253
if len(WordFreq) != 2 {
5354
continue

0 commit comments

Comments
 (0)