MCPcopy Index your code
hub / github.com/coder/coder / Capable

Method Capable

codersdk/deployment.go:492–497  ·  view source on GitHub ↗

Capable is a helper function that returns if a given feature has a limit that is greater than or equal to the actual. If this condition is not true, then the feature is not capable of being used since the limit is not high enough.

()

Source from the content-addressed store, hash-verified

490// If this condition is not true, then the feature is not capable of being used
491// since the limit is not high enough.
492func (f Feature) Capable() bool {
493 if f.Limit != nil && f.Actual != nil {
494 return *f.Limit >= *f.Actual
495 }
496 return true
497}
498
499type Entitlements struct {
500 Features map[FeatureName]Feature `json:"features"`

Callers 1

CompareMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected