Skip to content

Commit 7dff1f4

Browse files
authored
Keep local import separation inside references.go.tpl (#299)
Description of changes: * Do not strip the whitespace character **after** third-party imports * without the new-line, gofmt was reordering "svcapitypes" import with third-party imports * validated the fix by generating service controllers locally and the imports inside `references.go` were correct By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 4724c49 commit 7dff1f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/pkg/resource/references.go.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
{{ range $fieldName, $field := .CRD.Fields -}}
2525
{{ if and $field.HasReference (not (eq $field.ReferencedServiceName $servicePackageName)) -}}
2626
{{ $field.ReferencedServiceName }}apitypes "github.com/aws-controllers-k8s/{{ $field.ReferencedServiceName }}-controller/apis/{{ $apiVersion }}"
27-
{{ end -}}
28-
{{ end -}}
29-
{{ end -}}
27+
{{- end }}
28+
{{- end }}
29+
{{- end }}
3030

3131
svcapitypes "github.com/aws-controllers-k8s/{{ .ServicePackageName }}-controller/apis/{{ .APIVersion }}"
3232
)

0 commit comments

Comments
 (0)