Skip to content

Commit

Permalink
Fix build with go 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLindsay0 committed Aug 9, 2024
1 parent 75047f7 commit e80b96a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
matrix:
os: [ubuntu-20.04, windows-latest]
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22']
env:
GO111MODULE: on

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEST?=./...

export GO111MODULE=auto
export GO111MODULE=on

default: alldeps test

Expand Down
3 changes: 3 additions & 0 deletions features/fixtures/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down
3 changes: 3 additions & 0 deletions features/fixtures/autoconfigure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down
3 changes: 3 additions & 0 deletions features/fixtures/net_http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down

0 comments on commit e80b96a

Please sign in to comment.