mirror of
https://github.com/sony/sonyflake.git
synced 2026-11-15 15:26:32 +00:00
Use net.IP.Equal instead of bytes.Equal (#49)
As suggested by go-staticcheck.
This commit is contained in:
1 parent
06f9b47996
commit
fc2f84a086
1 file changed
+1
-2
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
package sonyflake
|
package sonyflake
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
@@ -259,7 +258,7 @@ func TestPrivateIPv4(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if bytes.Equal(actual, tc.expected) {
|
if net.IP.Equal(actual, tc.expected) {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
t.Errorf("error: expected: %s, but got: %s", tc.expected, actual)
|
t.Errorf("error: expected: %s, but got: %s", tc.expected, actual)
|
||||||
|
|||||||
Reference in new issue
Block a user