Skip to content

Commit 2c79531

Browse files
authored
Remove optGenVersion from api path for goimports (#430)
`ack-generate crossplane` fails if there is no `apis/_service_/v1alpha1 directory`. The code includes optGenVersion in the apiPath for goimports which causes an error when the directory doesn't exist. Removing optGenVersion from the apiPath causes `goimports` to run on all files/directorys under `apis/<service>` Signed-off-by: Bob Haddleton <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 0888419 commit 2c79531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/ack-generate/command/crossplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func generateCrossplane(_ *cobra.Command, args []string) error {
8787
return err
8888
}
8989
}
90-
apiPath := filepath.Join(optOutputPath, "apis", svcAlias, optGenVersion)
90+
apiPath := filepath.Join(optOutputPath, "apis", svcAlias)
9191
controllerPath := filepath.Join(optOutputPath, "pkg", "controller", svcAlias)
9292
// TODO(muvaf): goimports don't allow to be included as a library. Make sure
9393
// goimports binary exists.

0 commit comments

Comments
 (0)