Use net.IP.Equal instead of bytes.Equal (#49)

As suggested by go-staticcheck.
This commit is contained in:
David E. Wheeler
2023-11-06 00:32:46 -05:00
committed by GitHub
parent 06f9b47996
commit fc2f84a086
+1 -2
View File
@@ -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)