Skip to content

Commit

Permalink
time.Compare is a go 1.20 function
Browse files Browse the repository at this point in the history
I'm using go 1.20 locally for testing while CI is using go 1.19.10.
This version does not have Time.Compare.
  • Loading branch information
endorama committed Jun 23, 2023
1 parent 0e4f8ef commit 808563b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/modelpb/event.pb.json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestEventToModelJSON(t *testing.T) {
tc.proto.toModelJSON(&out)
diff := cmp.Diff(*tc.expected, out,
cmp.Comparer(func(a modeljson.Time, b modeljson.Time) bool {
return time.Time(a).Compare(time.Time(b)) == 0
return time.Time(a).Equal(time.Time(b))
}))
require.Empty(t, diff)
})
Expand Down

0 comments on commit 808563b

Please sign in to comment.