From 44f0fd653e2fa0fd2e0a4d067a335bba2cd21525 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 5 Sep 2020 10:39:46 -0400 Subject: lib: update HammingDistance lib/hamming.go (HammingDistance): Change type of arguments to []byte. --- lib/hamming.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/hamming.go b/lib/hamming.go index b2c46e9..1e53d54 100644 --- a/lib/hamming.go +++ b/lib/hamming.go @@ -9,7 +9,7 @@ func init() { rand.Seed(42) } -func HammingDistance(a, b string) int { +func HammingDistance(a, b []byte) int { if len(a) != len(b) { return -1 // Fail. } -- cgit v1.2.3