Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristina Pathak committed Mar 6, 2024
1 parent 889eabb commit efce7a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/builder/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
go.uber.org/goleak v1.3.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/mod v0.14.0
)

require (
Expand All @@ -31,7 +32,6 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.14.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
3 changes: 2 additions & 1 deletion cmd/builder/internal/builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import (
"text/template"
"time"

"go.opentelemetry.io/collector/cmd/builder/internal/builder/modfile"
"go.uber.org/zap"
"go.uber.org/zap/zapio"
"golang.org/x/mod/semver"

"go.opentelemetry.io/collector/cmd/builder/internal/builder/modfile"
)

var (
Expand Down
5 changes: 4 additions & 1 deletion cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ func makeModule(dir string) error {
return fmt.Errorf("failed to create output path: %w", err)
}

os.WriteFile(filepath.Clean(filepath.Join(dir, "go.mod")), []byte(goModTestFile), 0644)
err := os.WriteFile(filepath.Clean(filepath.Join(dir, "go.mod")), []byte(goModTestFile), 0600)
if err != nil {
return fmt.Errorf("failed to write go.mod file: %w", err)
}
return nil
}

0 comments on commit efce7a9

Please sign in to comment.