diff --git a/autorest/adal/go.mod b/autorest/adal/go.mod index 8c5d36ca6..732c6ff2b 100644 --- a/autorest/adal/go.mod +++ b/autorest/adal/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/autorest/adal -go 1.12 +go 1.15 require ( github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/adal/go_mod_tidy_hack.go b/autorest/adal/go_mod_tidy_hack.go index 7551b7923..647a61bb8 100644 --- a/autorest/adal/go_mod_tidy_hack.go +++ b/autorest/adal/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package adal diff --git a/autorest/adal/token_1.13.go b/autorest/adal/token_1.13.go index 953f75502..aa5ea47d9 100644 --- a/autorest/adal/token_1.13.go +++ b/autorest/adal/token_1.13.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright 2017 Microsoft Corporation diff --git a/autorest/adal/token_legacy.go b/autorest/adal/token_legacy.go index 729bfbd0a..6a4690a25 100644 --- a/autorest/adal/token_legacy.go +++ b/autorest/adal/token_legacy.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 // Copyright 2017 Microsoft Corporation diff --git a/autorest/azure/auth/go.mod b/autorest/azure/auth/go.mod index 7a894faba..51ea85345 100644 --- a/autorest/azure/auth/go.mod +++ b/autorest/azure/auth/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/autorest/azure/auth -go 1.12 +go 1.15 require ( github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/azure/auth/go_mod_tidy_hack.go b/autorest/azure/auth/go_mod_tidy_hack.go index 38e4900ad..f7eb26fd3 100644 --- a/autorest/azure/auth/go_mod_tidy_hack.go +++ b/autorest/azure/auth/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package auth diff --git a/autorest/azure/cli/go.mod b/autorest/azure/cli/go.mod index 7e06a8bb7..25e952560 100644 --- a/autorest/azure/cli/go.mod +++ b/autorest/azure/cli/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/autorest/azure/cli -go 1.12 +go 1.15 require ( github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/azure/cli/go_mod_tidy_hack.go b/autorest/azure/cli/go_mod_tidy_hack.go index 861ce2984..50d6f0391 100644 --- a/autorest/azure/cli/go_mod_tidy_hack.go +++ b/autorest/azure/cli/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package cli diff --git a/autorest/date/go.mod b/autorest/date/go.mod index f88ecc402..615df693f 100644 --- a/autorest/date/go.mod +++ b/autorest/date/go.mod @@ -1,5 +1,5 @@ module github.com/Azure/go-autorest/autorest/date -go 1.12 +go 1.15 require github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/date/go_mod_tidy_hack.go b/autorest/date/go_mod_tidy_hack.go index 4e0543207..c879c200a 100644 --- a/autorest/date/go_mod_tidy_hack.go +++ b/autorest/date/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package date diff --git a/autorest/date/unixtime_test.go b/autorest/date/unixtime_test.go index 3fa347c00..bd64f98c6 100644 --- a/autorest/date/unixtime_test.go +++ b/autorest/date/unixtime_test.go @@ -1,3 +1,4 @@ +//go:build go1.7 // +build go1.7 package date diff --git a/autorest/go.mod b/autorest/go.mod index fd0b2c0c3..c27bef1b7 100644 --- a/autorest/go.mod +++ b/autorest/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/autorest -go 1.12 +go 1.15 require ( github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/go_mod_tidy_hack.go b/autorest/go_mod_tidy_hack.go index da65e1041..792f82d4b 100644 --- a/autorest/go_mod_tidy_hack.go +++ b/autorest/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package autorest diff --git a/autorest/mocks/go.mod b/autorest/mocks/go.mod index c3f6b7e86..ef79c8dfa 100644 --- a/autorest/mocks/go.mod +++ b/autorest/mocks/go.mod @@ -1,5 +1,5 @@ module github.com/Azure/go-autorest/autorest/mocks -go 1.12 +go 1.15 require github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/mocks/go_mod_tidy_hack.go b/autorest/mocks/go_mod_tidy_hack.go index 85a4baf10..175a1c79f 100644 --- a/autorest/mocks/go_mod_tidy_hack.go +++ b/autorest/mocks/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package mocks diff --git a/autorest/retriablerequest_1.7.go b/autorest/retriablerequest_1.7.go index 7143cc61b..4c87030e8 100644 --- a/autorest/retriablerequest_1.7.go +++ b/autorest/retriablerequest_1.7.go @@ -1,3 +1,4 @@ +//go:build !go1.8 // +build !go1.8 // Copyright 2017 Microsoft Corporation diff --git a/autorest/retriablerequest_1.8.go b/autorest/retriablerequest_1.8.go index ae15c6bf9..05847c08b 100644 --- a/autorest/retriablerequest_1.8.go +++ b/autorest/retriablerequest_1.8.go @@ -1,3 +1,4 @@ +//go:build go1.8 // +build go1.8 // Copyright 2017 Microsoft Corporation diff --git a/autorest/to/go.mod b/autorest/to/go.mod index 8fd041e2b..683e6343f 100644 --- a/autorest/to/go.mod +++ b/autorest/to/go.mod @@ -1,5 +1,5 @@ module github.com/Azure/go-autorest/autorest/to -go 1.12 +go 1.15 require github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/to/go_mod_tidy_hack.go b/autorest/to/go_mod_tidy_hack.go index b7310f6b8..ad798b332 100644 --- a/autorest/to/go_mod_tidy_hack.go +++ b/autorest/to/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package to diff --git a/autorest/utility_1.13.go b/autorest/utility_1.13.go index 4cb5e6849..3133fcc08 100644 --- a/autorest/utility_1.13.go +++ b/autorest/utility_1.13.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright 2017 Microsoft Corporation diff --git a/autorest/utility_1.13_test.go b/autorest/utility_1.13_test.go index f147786a3..487584beb 100644 --- a/autorest/utility_1.13_test.go +++ b/autorest/utility_1.13_test.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright 2017 Microsoft Corporation diff --git a/autorest/utility_legacy.go b/autorest/utility_legacy.go index ebb51b4f5..851e152db 100644 --- a/autorest/utility_legacy.go +++ b/autorest/utility_legacy.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 // Copyright 2017 Microsoft Corporation diff --git a/autorest/validation/go.mod b/autorest/validation/go.mod index a0a69e9ae..3adc50069 100644 --- a/autorest/validation/go.mod +++ b/autorest/validation/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/autorest/validation -go 1.12 +go 1.15 require ( github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/autorest/validation/go_mod_tidy_hack.go b/autorest/validation/go_mod_tidy_hack.go index cf1436291..7b522cf96 100644 --- a/autorest/validation/go_mod_tidy_hack.go +++ b/autorest/validation/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package validation diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6fb8404fd..dc48095b8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,5 @@ variables: + GO111MODULE: 'auto' GOPATH: '$(system.defaultWorkingDirectory)/work' sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)' @@ -8,12 +9,16 @@ jobs: strategy: matrix: - Linux_Go113: + Linux_Go115: vm.image: 'ubuntu-18.04' - go.version: '1.13' - Linux_Go114: + go.version: '1.15' + Linux_Go116: vm.image: 'ubuntu-18.04' - go.version: '1.14' + go.version: '1.16' + Linux_Go117: + vm.image: 'ubuntu-18.04' + go.version: '1.17' + current_go: 'true' pool: vmImage: '$(vm.image)' @@ -37,11 +42,11 @@ jobs: set -e curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure -v - go install ./vendor/golang.org/x/lint/golint - go get github.com/jstemmer/go-junit-report - go get github.com/axw/gocov/gocov - go get github.com/AlekSi/gocov-xml - go get -u github.com/matm/gocov-html + GO111MODULE=on go get golang.org/x/lint/golint@latest + GO111MODULE=on go get github.com/jstemmer/go-junit-report@latest + GO111MODULE=on go get github.com/axw/gocov/gocov@latest + GO111MODULE=on go get github.com/AlekSi/gocov-xml@latest + GO111MODULE=on go get github.com/matm/gocov-html@latest workingDirectory: '$(sdkPath)' displayName: 'Install Dependencies' @@ -81,7 +86,7 @@ jobs: workingDirectory: '$(sdkPath)' displayName: 'Format Check' failOnStderr: true - condition: succeededOrFailed() + condition: and(succeededOrFailed(), eq(variables['current_go'], 'true')) - script: | golint ./autorest/... >&2 diff --git a/logger/go.mod b/logger/go.mod index bedeaee03..e2f49b532 100644 --- a/logger/go.mod +++ b/logger/go.mod @@ -1,5 +1,5 @@ module github.com/Azure/go-autorest/logger -go 1.12 +go 1.15 require github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/logger/go_mod_tidy_hack.go b/logger/go_mod_tidy_hack.go index 0aa27680d..be6aa9ee8 100644 --- a/logger/go_mod_tidy_hack.go +++ b/logger/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package logger diff --git a/tracing/go.mod b/tracing/go.mod index a2cdec78c..eca4b1233 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -1,5 +1,5 @@ module github.com/Azure/go-autorest/tracing -go 1.12 +go 1.15 require github.com/Azure/go-autorest v14.2.0+incompatible diff --git a/tracing/go_mod_tidy_hack.go b/tracing/go_mod_tidy_hack.go index e163975cd..213692575 100644 --- a/tracing/go_mod_tidy_hack.go +++ b/tracing/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package tracing diff --git a/tracing/opencensus/go.mod b/tracing/opencensus/go.mod index 5e4c6b0b6..56ffb32dc 100644 --- a/tracing/opencensus/go.mod +++ b/tracing/opencensus/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/go-autorest/tracing/opencensus -go 1.12 +go 1.15 require ( contrib.go.opencensus.io/exporter/ocagent v0.6.0