Skip to content

Commit

Permalink
feat: support "controllers" top-level directory
Browse files Browse the repository at this point in the history
It is used by our CAPI providers and common for other providers (AWS, GCP).

Signed-off-by: Alexey Palazhchenko <[email protected]>
  • Loading branch information
AlekSi authored and talos-bot committed Aug 11, 2021
1 parent 0b0a92f commit c77e3bf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/project/auto/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ func (builder *builder) DetectGolang() (bool, error) {

builder.meta.CanonicalPath = modfile.ModulePath(contents)

for _, srcDir := range []string{"src", "internal", "pkg", "cmd", "api"} {
for _, srcDir := range []string{
"api", // API definitions (generated protobufs, Kubebuilder's resources)
"cmd", // main packages
"controllers", // Kubernetes controllers
"internal", // internal packages
"pkg", // generic, general use packages that can be used independently
"src", // deprecated
} {
exists, err := directoryExists(builder.rootPath, srcDir)
if err != nil {
return true, err
Expand Down

0 comments on commit c77e3bf

Please sign in to comment.