Skip to content

Commit e55797e

Browse files
committed
fix(orgs): rename plan 'hobby' -> 'personal'
1 parent a34723a commit e55797e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

axiom/orgs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ type Plan uint8
2121
const (
2222
emptyPlan Plan = iota //
2323

24-
Hobby // hobby
24+
Personal // personal
2525
Basic // basic
26-
Team // team
26+
Team // teamMonthly
2727
Enterprise // enterprise
2828
Comped // comped
2929
)
@@ -32,8 +32,8 @@ func planFromString(s string) (plan Plan, err error) {
3232
switch s {
3333
case emptyPlan.String():
3434
plan = emptyPlan
35-
case Hobby.String():
36-
plan = Hobby
35+
case Personal.String():
36+
plan = Personal
3737
case Basic.String():
3838
plan = Basic
3939
case Team.String():

axiom/orgs_string.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

axiom/orgs_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ func TestOrganizationsService_Get(t *testing.T) {
196196

197197
func TestPlan_Marshal(t *testing.T) {
198198
exp := `{
199-
"plan": "hobby"
199+
"plan": "personal"
200200
}`
201201

202202
b, err := json.Marshal(struct {
203203
Plan Plan `json:"plan"`
204204
}{
205-
Plan: Hobby,
205+
Plan: Personal,
206206
})
207207
require.NoError(t, err)
208208
require.NotEmpty(t, b)
@@ -214,10 +214,10 @@ func TestPlan_Unmarshal(t *testing.T) {
214214
var act struct {
215215
Plan Plan `json:"plan"`
216216
}
217-
err := json.Unmarshal([]byte(`{ "plan": "hobby" }`), &act)
217+
err := json.Unmarshal([]byte(`{ "plan": "personal" }`), &act)
218218
require.NoError(t, err)
219219

220-
assert.Equal(t, Hobby, act.Plan)
220+
assert.Equal(t, Personal, act.Plan)
221221
}
222222

223223
func TestPlan_String(t *testing.T) {
@@ -227,15 +227,15 @@ func TestPlan_String(t *testing.T) {
227227
assert.Equal(t, emptyPlan, Plan(0))
228228
assert.Contains(t, (Comped + 1).String(), "Plan(")
229229

230-
for p := Hobby; p <= Comped; p++ {
230+
for p := Personal; p <= Comped; p++ {
231231
s := p.String()
232232
assert.NotEmpty(t, s)
233233
assert.NotContains(t, s, "Plan(")
234234
}
235235
}
236236

237237
func TestPlanFromString(t *testing.T) {
238-
for plan := Hobby; plan <= Comped; plan++ {
238+
for plan := Personal; plan <= Comped; plan++ {
239239
s := plan.String()
240240

241241
parsedPlan, err := planFromString(s)
@@ -301,7 +301,7 @@ func TestPaymentStatusFromString(t *testing.T) {
301301
func TestLicense(t *testing.T) {
302302
exp := License{
303303
ID: "98baf1f7-0b51-403f-abc1-2ee91972a225",
304-
Plan: Hobby,
304+
Plan: Personal,
305305
MaxUsers: 50,
306306
MaxTeams: 10,
307307
MaxDatasets: 25,

0 commit comments

Comments
 (0)