Skip to content

Commit 70919f8

Browse files
authored
fix: Rename template variable 'r' to more indicative 'parent' (#5109)
#### Summary Required for autogenerating relational tables. <!-- Explain what problem this PR addresses --> <!--
1 parent abd9bb8 commit 70919f8

39 files changed

Lines changed: 39 additions & 39 deletions

plugins/source/gcp/codegen/templates/newapi_get.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
2020
return &schema.Table{{template "table.go.tpl" .Table}}
2121
}
2222

23-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, res chan<- interface{}) error {
23+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2424
c := meta.(*client.Client)
2525
req := &pb.{{.RequestStructName}}{
2626
{{if .RequestStructFields}}{{.RequestStructFields}}{{end}}

plugins/source/gcp/codegen/templates/newapi_list.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
2323
}
2424

2525
{{if not .SkipFetch}}
26-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, res chan<- interface{}) error {
26+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2727
c := meta.(*client.Client)
2828
req := &pb.{{.RequestStructName}}{
2929
{{if .RequestStructFields}}{{.RequestStructFields}}{{end}}

plugins/source/gcp/codegen/templates/resource_agg_list.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
1616
return &schema.Table{{template "table.go.tpl" .Table}}
1717
}
1818

19-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, res chan<- interface{}) error {
19+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2020
c := meta.(*client.Client)
2121
nextPageToken := ""
2222
for {

plugins/source/gcp/codegen/templates/resource_get.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
1616
return &schema.Table{{template "table.go.tpl" .Table}}
1717
}
1818

19-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- interface{}) error {
19+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2020
c := meta.(*client.Client)
2121
output, err := {{.ListFunction}}
2222
if err != nil {

plugins/source/gcp/codegen/templates/resource_list.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
1717
return &schema.Table{{template "table.go.tpl" .Table}}
1818
}
1919

20-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, res chan<- interface{}) error {
20+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2121
c := meta.(*client.Client)
2222
nextPageToken := ""
2323
for {

plugins/source/gcp/codegen/templates/resource_list_one.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func {{.SubService | ToCamel}}() *schema.Table {
1616
return &schema.Table{{template "table.go.tpl" .Table}}
1717
}
1818

19-
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, res chan<- interface{}) error {
19+
func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
2020
c := meta.(*client.Client)
2121
output, err := {{.ListFunction}}
2222
if err != nil {

plugins/source/gcp/resources/services/apikeys/keys.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/gcp/resources/services/billing/billing_accounts.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/gcp/resources/services/billing/services.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/gcp/resources/services/compute/addresses.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)