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

Function PlanTelemetryID

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

PlanTelemetryID returns the plan identifier used in telemetry properties: the user-facing "free" for the free tier (whose underlying template id is not fixed and can be "build"), the plan id otherwise.

(p dashboard.Plan)

Source from the content-addressed store, hash-verified

79// the user-facing "free" for the free tier (whose underlying template id is
80// not fixed and can be "build"), the plan id otherwise.
81func PlanTelemetryID(p dashboard.Plan) string {
82 if p.IsFree() {
83 return dashboard.PlanTypeFree
84 }
85 return p.ID
86}
87
88// SelectablePlans returns the plans a user may choose from. When hideNonFree is
89// true (no payment method on file) only the free plan(s) are offered, because

Callers 3

changePlanFunction · 0.92
currentPlanTelemetryIDFunction · 0.92
createApplicationFunction · 0.92

Calls 1

IsFreeMethod · 0.80

Tested by

no test coverage detected