Skip to content

Commit

Permalink
Support GoLang for auto detect (#43)
Browse files Browse the repository at this point in the history
* test

* Cache Intel: support bazel and node

* Cache Intel: support bazel and node

* Cache Intel: support bazel and node

* ignore linter error

* ignore linter error

* allow autodectect with key

* allow autodectect with key

* add yarn and graceful detect

* clean up logs

* remove lint for now

* support golang cache
  • Loading branch information
jamie-harness authored Mar 8, 2023
1 parent c0caff9 commit b0194ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/plugin/autodetect/auto_detect_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func DetectDirectoriesToCache(skipPrepare bool) ([]string, []string, string, err
tool: "yarn",
preparer: newYarnPreparer(),
},
{
globToDetect: "*go.mod",
tool: "golang",
preparer: newGoPreparer(),
},
}

var directoriesToCache []string
Expand Down
11 changes: 11 additions & 0 deletions internal/plugin/autodetect/prepare_go.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package autodetect

type goPreparer struct{}

func newGoPreparer() *goPreparer {
return &goPreparer{}
}

func (*goPreparer) PrepareRepo() (string, error) {
return ".go", nil
}

0 comments on commit b0194ab

Please sign in to comment.