// Before returns true if this id comes before the provided id. Ordering is defined as first ordering
// by the timestamp, then by the bucket, and lastly by the sequence. While there is a defined global
// ordering of ids, the primary requirement for ordering is that there is ordering of time and then
// sequence for a bucket. Bucket ordering may not be entirely accurate due to clock skew between
// generators.
Before returns true if this id comes before the provided id. Ordering is defined as first ordering
by the timestamp, then by the bucket, and lastly by the sequence. While there is a defined global
ordering of ids, the primary requirement for ordering is that there is ordering of time and then
sequence for a bucket. Bucket ordering may not be entirely accurate due to clock skew between
generators.
// Before returns true if this id comes before the provided id . Ordering is defined as first ordering // by the timestamp then by the bucket and lastly by the sequence . While there is a defined global // ordering of ids the primary requirement for ordering is that there is ordering of time and then // sequence for a bucket . Bucket ordering may not be entirely accurate due to clock skew between // generators .
func (f ID) Before(o ID) bool {
	fTime, oTime := f.Time(), o.Time()
	if fTime.Equal(oTime) {
		fBucket, oBucket := f.Bucket(), o.Bucket()
		if fBucket == oBucket {
			return f.Sequence() < o.Sequence()
		}
		return fBucket < oBucket
	}
	return fTime.Before(oTime)
}
func ( f ID ) Before ( o ID ) bool { fTime , oTime := f . Time ( ) , o . Time ( ) if fTime . Equal ( oTime ) { fBucket , oBucket := f . Bucket ( ) , o . Bucket ( ) if fBucket == oBucket { return f . Sequence ( ) < o . Sequence ( ) } return fBucket < oBucket } return fTime . Before ( oTime ) }
Before returns true if this id comes before the provided id.
Before returns true if this id comes before the provided id .