Skip to content

time-value-equality

Default severity: warning

The == and != operators compare every field of time.Time, including monotonic-clock and location representation details. Time.Equal compares the represented instants.

if first == second {
match()
}
if first.Equal(second) {
match()
}