Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
23 lines
619 B
Go
23 lines
619 B
Go
package ratelimit
|
|
|
|
import "time"
|
|
|
|
// A Deadline is a time instant when a rate limit expires.
|
|
type Deadline time.Time
|
|
|
|
// After reports whether the deadline d is after other.
|
|
func (d Deadline) After(other Deadline) bool {
|
|
return time.Time(d).After(time.Time(other))
|
|
}
|
|
|
|
// Equal reports whether d and e represent the same deadline.
|
|
func (d Deadline) Equal(e Deadline) bool {
|
|
return time.Time(d).Equal(time.Time(e))
|
|
}
|
|
|
|
// String returns the deadline formatted for debugging.
|
|
func (d Deadline) String() string {
|
|
// Like time.Time.String, but without the monotonic clock reading.
|
|
return time.Time(d).Round(0).String()
|
|
}
|