Skip to content

Commit

Permalink
update verifygomod mage function
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Oct 27, 2023
1 parent 0a94973 commit ec79463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mage/golangci-lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func testGo(verbose bool, tags string, pkgs ...string) error {

// VerifyGoMod runs `go mod tidy` and `git diff --exit-code go.*` to ensure
// all module updates have been checked in.
func VerifyGoMod(scriptDir string) error {
func VerifyGoMod() error {
minGoVersion := env.Default("MIN_GO_VERSION", defaultMinGoVersion)
if err := shx.RunV(
"go", "mod", "tidy", fmt.Sprintf("-compat=%s", minGoVersion),
Expand Down
2 changes: 1 addition & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Verify() error {
}

fmt.Println("Running go module linter...")
if err := mage.VerifyGoMod(scriptDir); err != nil {
if err := mage.VerifyGoMod(); err != nil {
return err
}

Expand Down

0 comments on commit ec79463

Please sign in to comment.