There are two dates of type time. Time; How to compare? In the standard package I do not see such a function and just special. characters "<", ">" do not work

    2 answers 2

    In the standard package I do not see such a function.

    Poor see :-)

      You can subtract one date from another, and get the difference in int64 nanoseconds ( https://golang.org/pkg/time/#Duration )

       if t1.Sub(t0) > 0 {...}