From 931000c0414ddddd5af90df0f354ac7928ec631d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 16 Jan 2018 15:30:06 +0100 Subject: [PATCH 1/2] Bump to Go 1.10 Signed-off-by: Sebastiaan van Stijn --- .appveyor.yml | 4 +++- .travis.yml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 10babf806..31292a749 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,7 +11,9 @@ branches: environment: GOPATH: C:\gopath CGO_ENABLED: 1 - GO_VERSION: 1.9 + matrix: + - GO_VERSION: 1.9 + - GO_VERSION: 1.10 before_build: - choco install -y mingw diff --git a/.travis.yml b/.travis.yml index 3310250e2..c00c2cff5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ services: language: go go: - - 1.9.x + - "1.9.x" + - "1.10" go_import_path: github.com/containerd/containerd From b17bcb728460bf1cbaed2f857c16c41d690aef14 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 21 Feb 2018 10:45:57 +0100 Subject: [PATCH 2/2] Regenerate protos with Go 1.10, and make check conditional Gofmt changed in Go 1.10, so regenerating with the new formatting. From the Go 1.10 release notes: https://golang.org/doc/go1.10#gofmt > Gofmt > ... Second, single-method interface literals written on a single line, > which are sometimes used in type assertions, are no longer split onto multiple lines. The travis configuration was updated to skip `check-protos` on Go 1.9 Signed-off-by: Sebastiaan van Stijn --- .travis.yml | 2 +- api/events/container.pb.go | 4 +--- api/services/events/v1/events.pb.go | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index c00c2cff5..cf8005d7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ script: - script/validate/vendor - go build -i . - make check - - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi + - if [[ "$GOOS" = "linux" && "$TRAVIS_GO_VERSION" != "1.9"* ]]; then make check-protos check-api-descriptors; fi - make build - make binaries - if [ "$GOOS" = "linux" ]; then sudo make install ; fi diff --git a/api/events/container.pb.go b/api/events/container.pb.go index b05a402bb..5b715fc1e 100644 --- a/api/events/container.pb.go +++ b/api/events/container.pb.go @@ -158,9 +158,7 @@ func (m *ContainerCreate_Runtime) Field(fieldpath []string) (string, bool) { return "", false } - adaptor, ok := decoded.(interface { - Field([]string) (string, bool) - }) + adaptor, ok := decoded.(interface{ Field([]string) (string, bool) }) if !ok { return "", false } diff --git a/api/services/events/v1/events.pb.go b/api/services/events/v1/events.pb.go index e2ad455a4..52cca0acd 100644 --- a/api/services/events/v1/events.pb.go +++ b/api/services/events/v1/events.pb.go @@ -115,9 +115,7 @@ func (m *Envelope) Field(fieldpath []string) (string, bool) { return "", false } - adaptor, ok := decoded.(interface { - Field([]string) (string, bool) - }) + adaptor, ok := decoded.(interface{ Field([]string) (string, bool) }) if !ok { return "", false }