From 597eb16a83305e2ab0562d38ae02bbbfdfbbc0cd Mon Sep 17 00:00:00 2001 From: Sam Coe Date: Mon, 9 May 2022 18:46:19 +0200 Subject: [PATCH] Upgrade to go 1.18 (#5542) --- .github/workflows/go.yml | 4 ++-- .github/workflows/lint.yml | 6 +++--- .github/workflows/releases.yml | 4 ++-- .golangci.yml | 1 - docs/source.md | 6 +++--- go.mod | 31 ++++++++++++++++++++++++++++--- 6 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 084fa0df7..44df009b9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,10 +13,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Set up Go 1.16 + - name: Set up Go 1.18 uses: actions/setup-go@v3 with: - go-version: 1.16 + go-version: 1.18 - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 71de38e2a..6eab67141 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.16 + - name: Set up Go 1.18 uses: actions/setup-go@v3 with: - go-version: 1.16 + go-version: 1.18 - name: Check out code uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: go mod verify go mod download - LINT_VERSION=1.44.2 + LINT_VERSION=1.45.2 curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \ tar xz --strip-components 1 --wildcards \*/golangci-lint mkdir -p bin && mv golangci-lint bin/ diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 5f5b6869b..0cc19ef32 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up Go 1.16 + - name: Set up Go 1.18 uses: actions/setup-go@v3 with: - go-version: 1.16 + go-version: 1.18 - name: Generate changelog id: changelog run: | diff --git a/.golangci.yml b/.golangci.yml index ff7f37014..29bd80f0b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,6 @@ linters: enable: - gofmt - - nolintlint issues: max-issues-per-linter: 0 diff --git a/docs/source.md b/docs/source.md index 485c7671c..2b3e682b2 100644 --- a/docs/source.md +++ b/docs/source.md @@ -1,6 +1,6 @@ # Installation from source -1. Verify that you have Go 1.16+ installed +1. Verify that you have Go 1.18+ installed ```sh $ go version @@ -21,12 +21,12 @@ ```sh # installs to '/usr/local' by default; sudo may be required $ make install - + # or, install to a different location $ make install prefix=/path/to/gh ``` - #### Windows + #### Windows ```pwsh # build the `bin\gh.exe` binary > go run script\build.go diff --git a/go.mod b/go.mod index 258596314..1965d0562 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cli/cli/v2 -go 1.16 +go 1.18 require ( github.com/AlecAivazis/survey/v2 v2.3.4 @@ -32,17 +32,42 @@ require ( github.com/muhammadmuzzammil1998/jsonc v0.0.0-20201229145248-615b0916ca38 github.com/opentracing/opentracing-go v1.1.0 github.com/shurcooL/githubv4 v0.0.0-20200928013246-d292edc3691b - github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect github.com/sourcegraph/jsonrpc2 v0.1.0 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 - golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b ) +require ( + github.com/alecthomas/chroma v0.10.0 // indirect + github.com/aymerick/douceur v0.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dlclark/regexp2 v1.4.0 // indirect + github.com/fatih/color v1.7.0 // indirect + github.com/gorilla/css v1.0.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/itchyny/timefmt-go v0.1.3 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/microcosm-cc/bluemonday v1.0.17 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect + github.com/stretchr/objx v0.1.0 // indirect + github.com/yuin/goldmark v1.4.4 // indirect + github.com/yuin/goldmark-emoji v1.0.1 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect + golang.org/x/text v0.3.7 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect +) + replace golang.org/x/crypto => github.com/cli/crypto v0.0.0-20210929142629-6be313f59b03