Skip to content

Commit 1bf703e

Browse files
committed
Apply lint
1 parent 1a1c5c6 commit 1bf703e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

github/util_rules.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func expandRepositoryPropertyConditions(v []any) *github.RepositoryRulesetReposi
274274
}
275275
property := &github.RepositoryRulesetRepositoryPropertyTargetParameters{
276276
Name: propertyMap["name"].(string),
277-
Source: github.Ptr(propertyMap["source"].(string)),
277+
Source: new(propertyMap["source"].(string)),
278278
PropertyValues: propertyValues,
279279
}
280280
include = append(include, property)
@@ -292,7 +292,7 @@ func expandRepositoryPropertyConditions(v []any) *github.RepositoryRulesetReposi
292292
}
293293
property := &github.RepositoryRulesetRepositoryPropertyTargetParameters{
294294
Name: propertyMap["name"].(string),
295-
Source: github.Ptr(propertyMap["source"].(string)),
295+
Source: new(propertyMap["source"].(string)),
296296
PropertyValues: propertyValues,
297297
}
298298
exclude = append(exclude, property)

github/util_rules_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,12 +1070,12 @@ func TestFlattenRulesetRepositoryPropertyTargetParameters(t *testing.T) {
10701070
input := []*github.RepositoryRulesetRepositoryPropertyTargetParameters{
10711071
{
10721072
Name: "env",
1073-
Source: github.Ptr("custom"),
1073+
Source: new("custom"),
10741074
PropertyValues: []string{"prod", "staging"},
10751075
},
10761076
{
10771077
Name: "tier",
1078-
Source: github.Ptr("system"),
1078+
Source: new("system"),
10791079
PropertyValues: []string{"premium"},
10801080
},
10811081
}
@@ -1108,7 +1108,7 @@ func TestFlattenRulesetRepositoryPropertyTargetParameters_EmptySource(t *testing
11081108
input := []*github.RepositoryRulesetRepositoryPropertyTargetParameters{
11091109
{
11101110
Name: "env",
1111-
Source: github.Ptr(""),
1111+
Source: new(""),
11121112
PropertyValues: []string{"prod"},
11131113
},
11141114
}
@@ -1209,7 +1209,7 @@ func TestFlattenRulesetRepositoryPropertyTargetParameters_SingleProperty(t *test
12091209
input := []*github.RepositoryRulesetRepositoryPropertyTargetParameters{
12101210
{
12111211
Name: "env",
1212-
Source: github.Ptr("system"),
1212+
Source: new("system"),
12131213
PropertyValues: []string{"prod", "staging"},
12141214
},
12151215
}
@@ -1259,7 +1259,7 @@ func TestFlattenRulesetRepositoryPropertyTargetParameters_EmptyPropertyValues(t
12591259
input := []*github.RepositoryRulesetRepositoryPropertyTargetParameters{
12601260
{
12611261
Name: "env",
1262-
Source: github.Ptr("custom"),
1262+
Source: new("custom"),
12631263
PropertyValues: []string{},
12641264
},
12651265
}
@@ -1280,7 +1280,7 @@ func TestFlattenRulesetRepositoryPropertyTargetParameters_NilPropertyValues(t *t
12801280
input := []*github.RepositoryRulesetRepositoryPropertyTargetParameters{
12811281
{
12821282
Name: "env",
1283-
Source: github.Ptr("custom"),
1283+
Source: new("custom"),
12841284
PropertyValues: nil,
12851285
},
12861286
}

0 commit comments

Comments
 (0)