Go

Go

By DeepSource

Simplify Before or After call of time.Time GO-C4011

Style

Some calls of Before or After for time.Time can be simplified and it is recommended as well because the code will look simple and idiomatic.

Examples

Bad practice

x := !t.Before(t0)

Recommended

x := t.After(t0)