From 113cbc7bb2b419f5b72c3c87d2e2428a86b43a82 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 29 Jun 2021 03:59:58 +0200 Subject: [PATCH 1/5] ci: test golang 1.16.x too --- .github/workflows/Test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index c34c2fbbe..c78d591e9 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -20,6 +20,7 @@ jobs: go: - 1.14.x - 1.15.x + - 1.16.x name: '${{ matrix.platform }} | ${{ matrix.go }}' runs-on: ${{ matrix.platform }}-latest steps: @@ -39,8 +40,9 @@ jobs: - run: | export GOBIN=$HOME/go/bin curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest - go install github.com/kyoh86/richgo - go install github.com/mitchellh/gox + [ "${{ matrix.go }}" = "1.16.x" ] && _version='@latest' || _version='' + go install github.com/kyoh86/richgo"${_version}" + go install github.com/mitchellh/gox"${_version}" - run: PATH=$HOME/go/bin/:$PATH make From 65c2074cbe0383ebd82787637dc0d877e2cde8ad Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 17 Aug 2021 14:03:34 +0200 Subject: [PATCH 2/5] ci: style --- .github/workflows/Test.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index c78d591e9..cc147d3b4 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -18,29 +18,32 @@ jobs: - ubuntu - macOS go: - - 1.14.x - - 1.15.x - - 1.16.x - name: '${{ matrix.platform }} | ${{ matrix.go }}' + - 14 + - 15 + - 16 + name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x' runs-on: ${{ matrix.platform }}-latest steps: - uses: actions/setup-go@v2 with: - go-version: ${{ matrix.go }} + go-version: 1.${{ matrix.go }}.x - uses: actions/checkout@v2 - uses: actions/cache@v2 with: path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-${{ matrix.go }}- + key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x- - run: | export GOBIN=$HOME/go/bin curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest - [ "${{ matrix.go }}" = "1.16.x" ] && _version='@latest' || _version='' + case "${{ matrix.go }}" in + 16) _version='@latest';; + *) _version='';; + esac go install github.com/kyoh86/richgo"${_version}" go install github.com/mitchellh/gox"${_version}" From 604154e005445da5e4c19fcafa7d0353d4838127 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 17 Aug 2021 14:03:34 +0200 Subject: [PATCH 3/5] ci: test golang 1.17.x too --- .github/workflows/Test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index cc147d3b4..bc748030e 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -21,6 +21,7 @@ jobs: - 14 - 15 - 16 + - 17 name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x' runs-on: ${{ matrix.platform }}-latest steps: @@ -41,7 +42,7 @@ jobs: export GOBIN=$HOME/go/bin curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest case "${{ matrix.go }}" in - 16) _version='@latest';; + 16|17) _version='@latest';; *) _version='';; esac go install github.com/kyoh86/richgo"${_version}" From 9c1de95288815bda4d3a0591012290bbc24956c5 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 17 Aug 2021 15:05:11 +0200 Subject: [PATCH 4/5] bump go.mod to 1.15 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b4c870e88..97eab3c9c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spf13/cobra -go 1.14 +go 1.15 require ( github.com/cpuguy83/go-md2man/v2 v2.0.1 From 38db4b76899faa9a9b48c6f434ff6e0fff99256e Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 17 Aug 2021 15:05:17 +0200 Subject: [PATCH 5/5] run gofmt --- command_notwin.go | 1 + command_win.go | 1 + 2 files changed, 2 insertions(+) diff --git a/command_notwin.go b/command_notwin.go index 6159c1cc1..bb5dad90b 100644 --- a/command_notwin.go +++ b/command_notwin.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package cobra diff --git a/command_win.go b/command_win.go index 8768b1736..a84f5a82a 100644 --- a/command_win.go +++ b/command_win.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package cobra