From 3f4c558dac40dfb4fe13285ffc43a0d738d3a3f0 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 6 Jul 2021 11:43:13 +0800 Subject: [PATCH] bump up golang v1.17 Signed-off-by: Wang Yan --- .github/workflows/ci.yml | 4 ++-- Dockerfile | 2 +- contrib/compose/README.md | 2 +- go.mod | 4 +--- go.sum | 7 ------- registry/handlers/basicauth.go | 1 + registry/handlers/basicauth_prego14.go | 1 + registry/storage/blobwriter_nonresumable.go | 1 + registry/storage/blobwriter_resumable.go | 1 + registry/storage/driver/gcs/gcs.go | 1 + registry/storage/driver/gcs/gcs_test.go | 1 + registry/storage/driver/oss/oss.go | 1 + registry/storage/driver/oss/oss_test.go | 1 + script/validate/dco | 2 +- vendor/modules.txt | 4 ---- 15 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 097555400..9c657000a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - go-version: ["1.15.x", "1.16.x"] + go-version: ["1.16.x", "1.17.x"] platform: ["ubuntu-latest"] runs-on: ${{ matrix.platform }} env: @@ -40,7 +40,7 @@ jobs: run: | sudo apt-get -q update sudo -E apt-get -yq --no-install-suggests --no-install-recommends install python2-minimal - cd /tmp && go get -u github.com/vbatts/git-validation + cd /tmp && go install github.com/vbatts/git-validation@latest - name: Build working-directory: ./src/github.com/distribution/distribution diff --git a/Dockerfile b/Dockerfile index 81e2804aa..7eb90bb35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16 +ARG GO_VERSION=1.17 FROM golang:${GO_VERSION}-alpine3.14 AS build diff --git a/contrib/compose/README.md b/contrib/compose/README.md index ffe8e4f4e..76c885cea 100644 --- a/contrib/compose/README.md +++ b/contrib/compose/README.md @@ -60,7 +60,7 @@ to the 1.0 registry. Requests from newer clients will route to the 2.0 registry. $ docker-compose build registryv1 uses an image, skipping Building registryv2... - Step 0 : FROM golang:1.16 + Step 0 : FROM golang:1.17 ... diff --git a/go.mod b/go.mod index 81b65ae34..65f09e086 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/distribution/distribution/v3 -go 1.15 +go 1.16 require ( github.com/Azure/azure-sdk-for-go v56.3.0+incompatible @@ -10,7 +10,6 @@ require ( github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d github.com/aws/aws-sdk-go v1.34.9 github.com/bitly/go-simplejson v0.5.0 // indirect - github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/bshuster-repo/logrus-logstash-hook v1.0.0 github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b // indirect @@ -25,7 +24,6 @@ require ( github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/kr/pretty v0.1.0 // indirect github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f // indirect github.com/ncw/swift v1.0.47 diff --git a/go.sum b/go.sum index 8efab4847..d5d7701f7 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= @@ -88,11 +86,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= diff --git a/registry/handlers/basicauth.go b/registry/handlers/basicauth.go index 8727a3cd1..a41965dcf 100644 --- a/registry/handlers/basicauth.go +++ b/registry/handlers/basicauth.go @@ -1,3 +1,4 @@ +//go:build go1.4 // +build go1.4 package handlers diff --git a/registry/handlers/basicauth_prego14.go b/registry/handlers/basicauth_prego14.go index 6cf10a25e..01290adfe 100644 --- a/registry/handlers/basicauth_prego14.go +++ b/registry/handlers/basicauth_prego14.go @@ -1,3 +1,4 @@ +//go:build !go1.4 // +build !go1.4 package handlers diff --git a/registry/storage/blobwriter_nonresumable.go b/registry/storage/blobwriter_nonresumable.go index 3213f1443..a7df9a22a 100644 --- a/registry/storage/blobwriter_nonresumable.go +++ b/registry/storage/blobwriter_nonresumable.go @@ -1,3 +1,4 @@ +//go:build noresumabledigest // +build noresumabledigest package storage diff --git a/registry/storage/blobwriter_resumable.go b/registry/storage/blobwriter_resumable.go index 4cefe1efb..9af1d4c8e 100644 --- a/registry/storage/blobwriter_resumable.go +++ b/registry/storage/blobwriter_resumable.go @@ -1,3 +1,4 @@ +//go:build !noresumabledigest // +build !noresumabledigest package storage diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index 9353e65f2..1eec2512e 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -10,6 +10,7 @@ // Note that the contents of incomplete uploads are not accessible even though // Stat returns their length // +//go:build include_gcs // +build include_gcs package gcs diff --git a/registry/storage/driver/gcs/gcs_test.go b/registry/storage/driver/gcs/gcs_test.go index aae0e3a3d..1b0b4c859 100644 --- a/registry/storage/driver/gcs/gcs_test.go +++ b/registry/storage/driver/gcs/gcs_test.go @@ -1,3 +1,4 @@ +//go:build include_gcs // +build include_gcs package gcs diff --git a/registry/storage/driver/oss/oss.go b/registry/storage/driver/oss/oss.go index c8c38a4ae..f50ea066f 100644 --- a/registry/storage/driver/oss/oss.go +++ b/registry/storage/driver/oss/oss.go @@ -7,6 +7,7 @@ // Because OSS is a key, value store the Stat call does not support last modification // time for directories (directories are an abstraction for key, value stores) // +//go:build include_oss // +build include_oss package oss diff --git a/registry/storage/driver/oss/oss_test.go b/registry/storage/driver/oss/oss_test.go index 29165801c..53fe443f1 100644 --- a/registry/storage/driver/oss/oss_test.go +++ b/registry/storage/driver/oss/oss_test.go @@ -1,3 +1,4 @@ +//go:build include_oss // +build include_oss package oss diff --git a/script/validate/dco b/script/validate/dco index be96b3a85..401f36425 100755 --- a/script/validate/dco +++ b/script/validate/dco @@ -4,7 +4,7 @@ set -eu -o pipefail if ! command -v git-validation; then >&2 echo "ERROR: git-validation not found. Install with:" - >&2 echo " go get -u github.com/vbatts/git-validation" + >&2 echo " go install github.com/vbatts/git-validation@latest" exit 1 fi diff --git a/vendor/modules.txt b/vendor/modules.txt index 0208fe157..9ab8a0f3d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -74,8 +74,6 @@ github.com/aws/aws-sdk-go/service/sts/stsiface github.com/beorn7/perks/quantile # github.com/bitly/go-simplejson v0.5.0 ## explicit -# github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 -## explicit # github.com/bshuster-repo/logrus-logstash-hook v1.0.0 ## explicit github.com/bshuster-repo/logrus-logstash-hook @@ -129,8 +127,6 @@ github.com/gorilla/mux github.com/inconshreveable/mousetrap # github.com/jmespath/go-jmespath v0.3.0 github.com/jmespath/go-jmespath -# github.com/kr/pretty v0.1.0 -## explicit # github.com/matttproud/golang_protobuf_extensions v1.0.1 github.com/matttproud/golang_protobuf_extensions/pbutil # github.com/mitchellh/mapstructure v1.1.2