Skip to content

Commit 08936bc

Browse files
committed
Fix build with go 1.11
1 parent 4277bcb commit 08936bc

5 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/test-package.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
matrix:
1515
os: [ubuntu, windows]
1616
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']
17+
env:
18+
GO111MODULE: on
1719

1820
steps:
1921
- uses: actions/checkout@v2

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEST?=./...
22

3-
export GO111MODULE=auto
3+
export GO111MODULE=on
44

55
default: alldeps test
66

features/fixtures/app/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
1111
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
1212
ARG GO_VERSION
1313

14+
# Required for go 1.11 as modules are not enabled by default
15+
ENV GO111MODULE="on"
16+
1417
# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
1518
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
1619
echo "Version is between 1.11 and 1.16, running go get"; \

features/fixtures/autoconfigure/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
1111
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
1212
ARG GO_VERSION
1313

14+
# Required for go 1.11 as modules are not enabled by default
15+
ENV GO111MODULE="on"
16+
1417
# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
1518
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
1619
echo "Version is between 1.11 and 1.16, running go get"; \

features/fixtures/net_http/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
1313
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
1414
ARG GO_VERSION
1515

16+
# Required for go 1.11 as modules are not enabled by default
17+
ENV GO111MODULE="on"
18+
1619
# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
1720
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
1821
echo "Version is between 1.11 and 1.16, running go get"; \

0 commit comments

Comments
 (0)