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