Skip to content

Commit

Permalink
chore(tools/create-resource): improving resource gen
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 4, 2025
1 parent cc5548a commit fd912a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/create-resource/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func init() {
type {{.Combined}}Lister struct{}
func (l *{{.Combined}}Lister) List(_ context.Context, o interface{}) ([]resource.Resource, error) {
func (l *{{.Combined}}Lister) List(ctx context.Context, o interface{}) ([]resource.Resource, error) {
opts := o.(*nuke.ListerOpts)
svc := {{.Service}}.NewFromConfig(*opts.Config)
var resources []resource.Resource
Expand All @@ -50,10 +50,10 @@ func (l *{{.Combined}}Lister) List(_ context.Context, o interface{}) ([]resource
return nil, err
}
for _, p := range res.{{.ResourceTypeTitle}}s {
for _, p := range res.{{.ResourceTypeTitle}}sList {
resources = append(resources, &{{.Combined}}{
svc: svc,
ID: p.Id,
ID: p.{{.ResourceTypeTitle}}Id,
Tags: p.Tags,
})
}
Expand Down

0 comments on commit fd912a0

Please # to comment.