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)
| 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. |
| 81 | func 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 |
no test coverage detected