Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump Go to 1.20 #5067

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ linters:
- misspell

run:
go: 1.19
go: '1.20'
skip-files:
- ".*._mock.go$"
- ".*._test.go$"
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile.protoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 golang:1.19
FROM --platform=linux/amd64 golang:1.20

# Set environment variable for protoc
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
Expand All @@ -13,9 +13,8 @@ RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/down
&& rm -f $PROTOC_ZIP

# Install Go tools
RUN go install \
github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0 \
google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1 \
github.com/magefile/mage@v1.14.0
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
RUN go install github.com/magefile/mage@v1.14.0
Comment on lines +16 to +18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we can't install different modules with different versions with the same command:

root@c5244beadb12:/go# go install \
    github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0 \
    google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1 \
    github.com/magefile/mage@v1.14.0
go: google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1: all arguments must refer to packages in the same module at the same version (@v8.1.0)
root@c5244beadb12:/go# go install     github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0     google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1     github.com/magefile/mage@v1.14.0
go: google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1: all arguments must refer to packages in the same module at the same version (@v8.1.0)


ENV TRIVY_PROTOC_CONTAINER=true
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aquasecurity/trivy

go 1.19
go 1.20

require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
Expand Down