From fc2f84a086d25d207a91768bc47edfb84972fef5 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" <46604+theory@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:32:46 -0500 Subject: [PATCH] Use net.IP.Equal instead of bytes.Equal (#49) As suggested by go-staticcheck. --- sonyflake_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sonyflake_test.go b/sonyflake_test.go index 0a7aa4f..98f8552 100644 --- a/sonyflake_test.go +++ b/sonyflake_test.go @@ -1,7 +1,6 @@ package sonyflake import ( - "bytes" "errors" "fmt" "net" @@ -259,7 +258,7 @@ func TestPrivateIPv4(t *testing.T) { return } - if bytes.Equal(actual, tc.expected) { + if net.IP.Equal(actual, tc.expected) { return } else { t.Errorf("error: expected: %s, but got: %s", tc.expected, actual)