Go

Go

Made by DeepSource

Found time.Now().Sub(t) instead of time.Since(t) SCC-S1012

Anti-pattern
Major
Autofix

The time.Since(t) helper has the same effect as using time.Now().Sub(t).

time.Since(t) returns the time elapsed since t. It is shorthand for time.Now().Sub(t).

Bad practice

time.Now().Sub(x)

Recommended

time.Since(x)