Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsTime ¶
func AsTime(ts *timestamppb.Timestamp) time.Time
AsTime returns the time.Time value of the timestamp. It works like timestamppb.Timestamp.AsTime, but it treats an empty timestamp as a zero time. Please note that it doesn't support "1970-01-01 00:00:00" and returns time.Time{} instead.
func IsZero ¶
func IsZero(ts *timestamppb.Timestamp) bool
IsZero returns true if the timestamp is zero or the time is zero.
func IsZeroTime ¶
func IsZeroTime(ts *timestamppb.Timestamp) bool
IsZeroTime returns true if the time is zero. Use IsZero instead if you don't have a specific reason.
func IsZeroTimestamp ¶
func IsZeroTimestamp(ts *timestamppb.Timestamp) bool
IsZeroTimestamp returns true if the timestamp is zero. Use IsZero instead if you don't have a specific reason.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.