Skip to content

Commit

Permalink
Use net.IP.Equal instead of bytes.Equal (#49)
Browse files Browse the repository at this point in the history
As suggested by go-staticcheck.
  • Loading branch information
theory authored Nov 6, 2023
1 parent 06f9b47 commit fc2f84a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sonyflake_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package sonyflake

import (
"bytes"
"errors"
"fmt"
"net"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fc2f84a

Please sign in to comment.