func validateTimestamp(ts *timestamppb.Timestamp) error {
	if ts == nil {
		return errors.New("timestamp: nil Timestamp")
	}
	if ts.Seconds < minValidSeconds {
		return fmt.Errorf("timestamp: %v before 0001-01-01", ts)
	}
	if ts.Seconds >= maxValidSeconds {
		return fmt.Errorf("timestamp: %v after 10000-01-01", ts)
	}
	if ts.Nanos < 0 || ts.Nanos >= 1e9 {
		return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts)
	}
	return nil
}
// validateTimestamp determines whether a Timestamp is valid.
// A valid timestamp represents a time in the range [0001-01-01, 10000-01-01)
// and has a Nanos field in the range [0, 1e9).
//
// If the Timestamp is valid, validateTimestamp returns nil.
// Otherwise, it returns an error that describes the problem.
//
// Every valid Timestamp can be represented by a time.Time,
// but the converse is not true.
validateTimestamp determines whether a Timestamp is valid.
A valid timestamp represents a time in the range [0001-01-01, 10000-01-01)
and has a Nanos field in the range [0, 1e9).

If the Timestamp is valid, validateTimestamp returns nil.
Otherwise, it returns an error that describes the problem.

Every valid Timestamp can be represented by a time.Time,
but the converse is not true.
// validateTimestamp determines whether a Timestamp is valid . // A valid timestamp represents a time in the range [ 0001 - 01 - 01 10000 - 01 - 01 ) // and has a Nanos field in the range [ 0 1e9 ) . // // If the Timestamp is valid validateTimestamp returns nil . // Otherwise it returns an error that describes the problem . // // Every valid Timestamp can be represented by a time . Time // but the converse is not true .
func validateTimestamp(ts *timestamppb.Timestamp) error {
	if ts == nil {
		return errors.New("timestamp: nil Timestamp")
	}
	if ts.Seconds < minValidSeconds {
		return fmt.Errorf("timestamp: %v before 0001-01-01", ts)
	}
	if ts.Seconds >= maxValidSeconds {
		return fmt.Errorf("timestamp: %v after 10000-01-01", ts)
	}
	if ts.Nanos < 0 || ts.Nanos >= 1e9 {
		return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts)
	}
	return nil
}
func validateTimestamp ( ts * timestamppb . Timestamp ) error { if ts == nil { return errors . New ( " " ) } if ts . Seconds < minValidSeconds { return fmt . Errorf ( " " , ts ) } if ts . Seconds >= maxValidSeconds { return fmt . Errorf ( " " , ts ) } if ts . Nanos < 0 || ts . Nanos >= 1e9 { return fmt . Errorf ( " " , ts ) } return nil }
validateTimestamp determines whether a Timestamp is valid.
validateTimestamp determines whether a Timestamp is valid .