diff --git a/algorithm/algorithm_test.go b/algorithm/algorithm_test.go index dab1e61..e438308 100644 --- a/algorithm/algorithm_test.go +++ b/algorithm/algorithm_test.go @@ -7,8 +7,8 @@ import ( ) func TestCompressLZW(t *testing.T) { - str := CompressLZW("Australia") - expected := []int{65, 117, 115, 116, 114, 97, 108, 105, 97} + str := CompressLZW("Australia") + expected := []int{65, 117, 115, 116, 114, 97, 108, 105, 97} - assert.Equal(t, expected, str) + assert.Equal(t, expected, str) } diff --git a/algorithm/lzw-compression.go b/algorithm/lzw-compression.go index cd2ffb6..4192970 100644 --- a/algorithm/lzw-compression.go +++ b/algorithm/lzw-compression.go @@ -2,7 +2,7 @@ package algorithm func CompressLZW(str string) []int { code := 256 - dict := make(map[string]int) + dict := make(map[string]int) for i := 0; i < 256; i++ { dict[string(rune(i))] = i }