mirror of
https://github.com/sony/sonyflake.git
synced 2026-07-22 06:22:18 +00:00
Use net.IP.Equal instead of bytes.Equal (#49)
As suggested by go-staticcheck.
This commit is contained in:
+1
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user