MCPcopy Create free account
hub / github.com/algolia/cli / FindFreePlan

Function FindFreePlan

pkg/cmd/shared/apputil/plan.go:105–112  ·  view source on GitHub ↗

FindFreePlan returns the free-tier plan, or nil if none is present.

(plans []dashboard.Plan)

Source from the content-addressed store, hash-verified

103
104// FindFreePlan returns the free-tier plan, or nil if none is present.
105func FindFreePlan(plans []dashboard.Plan) *dashboard.Plan {
106 for i := range plans {
107 if plans[i].IsFree() {
108 return &plans[i]
109 }
110 }
111 return nil
112}
113
114// PickPlan shows an interactive selector over the candidate plans.
115func PickPlan(candidates []dashboard.Plan) (*dashboard.Plan, error) {

Callers 2

selectPlanFunction · 0.92
ResolvePlanFunction · 0.85

Calls 1

IsFreeMethod · 0.80

Tested by

no test coverage detected