Skip to content

Commit a84080d

Browse files
committed
0.4.6 staticcheck
1 parent f9474fa commit a84080d

File tree

18 files changed

+93
-93
lines changed

18 files changed

+93
-93
lines changed

.codegen/api.go.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (a *{{.Service.Name}}API) {{.PascalName}}(ctx context.Context{{if .Request}
205205
getItems,
206206
{{if .Pagination.MultiRequest}}getNextReq{{else}}nil{{end}})
207207
{{ if .NeedsOffsetDedupe -}}
208-
dedupedIterator := listing.NewDedupeIterator[{{ template "type" .Pagination.Entity }}, {{ template "type" .IdentifierField.Entity }}](
208+
dedupedIterator := listing.NewDedupeIterator(
209209
iterator,
210210
func(item {{ template "type" .Pagination.Entity }}) {{ template "type" .IdentifierField.Entity }} {
211211
return item{{ template "field-path" .IdFieldPath }}
@@ -222,9 +222,9 @@ func (a *{{.Service.Name}}API) {{.PascalName}}(ctx context.Context{{if .Request}
222222
func (a *{{.Service.Name}}API) {{.PascalName}}All(ctx context.Context{{if .Request}}, request {{.Request.PascalName}}{{end}}) ([]{{ template "type" .Pagination.Entity }}, error) {
223223
iterator := a.{{.PascalName}}(ctx{{if .Request}}, request{{end}})
224224
{{ if .Pagination.Limit -}}
225-
return listing.ToSliceN[{{ template "type" .Pagination.Entity }}, {{ template "type" .Pagination.Limit.Entity }}](ctx, iterator, request.{{.Pagination.Limit.PascalName}})
225+
return listing.ToSliceN(ctx, iterator, request.{{.Pagination.Limit.PascalName}})
226226
{{ else -}}
227-
return listing.ToSlice[{{ template "type" .Pagination.Entity }}](ctx, iterator)
227+
return listing.ToSlice(ctx, iterator)
228228
{{- end }}
229229
}
230230
{{end}}{{if .NamedIdMap}}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fmt:
1212

1313
lint: vendor
1414
@echo "✓ Linting source code with https://staticcheck.io/ ..."
15-
@go run honnef.co/go/tools/cmd/[email protected].0 ./...
15+
@go run honnef.co/go/tools/cmd/[email protected].6 ./...
1616

1717
test: lint
1818
@echo "✓ Running tests ..."

service/billing/api.go

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

service/catalog/api.go

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

service/compute/api.go

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

service/files/api.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.

service/iam/api.go

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

service/iam/model.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.

service/jobs/api.go

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

0 commit comments

Comments
 (0)