diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e69a804ee..20bf83882 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/go:1.21", + "image": "mcr.microsoft.com/devcontainers/go:1.22", "features": { "ghcr.io/devcontainers/features/sshd:1": {} }, diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 73174db65..9f5d56376 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,7 +24,7 @@ Please avoid: ## Building the project Prerequisites: -- Go 1.21+ +- Go 1.22+ Build with: * Unix-like systems: `make` diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c45c65e34..00c45a957 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,5 +29,10 @@ jobs: languages: go queries: security-and-quality + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index bf138c95d..6f3f42494 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -18,7 +18,7 @@ on: default: production type: environment go_version: - default: "1.21" + default: "1.22" type: string platforms: default: "linux,macos,windows" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7284a9e08..fa6001369 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.21 + - name: Set up Go 1.22 uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - name: Check out code uses: actions/checkout@v4 @@ -48,10 +48,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 57f584e00..67069277c 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.21 + - name: Set up Go 1.22 uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - name: Check out code uses: actions/checkout@v4 diff --git a/api/http_client_test.go b/api/http_client_test.go index dca032e6f..ce20a2684 100644 --- a/api/http_client_test.go +++ b/api/http_client_test.go @@ -222,7 +222,7 @@ func TestHTTPClientSanitizeJSONControlCharactersC0(t *testing.T) { err = json.Unmarshal(body, &issue) require.NoError(t, err) assert.Equal(t, "^[[31mRed Title^[[0m", issue.Title) - assert.Equal(t, "1^A 2^B 3^C 4^D 5^E 6^F 7^G 8^H 9\t A\r\n B\v C^L D\r\n E^N F^O", issue.Body) + assert.Equal(t, "1^A 2^B 3^C 4^D 5^E 6^F 7^G 8\b 9\t A\r\n B\v C\f D\r\n E^N F^O", issue.Body) assert.Equal(t, "10^P 11^Q 12^R 13^S 14^T 15^U 16^V 17^W 18^X 19^Y 1A^Z 1B^[ 1C^\\ 1D^] 1E^^ 1F^_", issue.Author.Name) assert.Equal(t, "monalisa \\u00^[", issue.Author.Login) assert.Equal(t, "Escaped ^[ \\^[ \\^[ \\\\^[", issue.ActiveLockReason) diff --git a/docs/source.md b/docs/source.md index cc1605b8c..d2b7c5b31 100644 --- a/docs/source.md +++ b/docs/source.md @@ -1,6 +1,6 @@ # Installation from source -1. Verify that you have Go 1.21+ installed +1. Verify that you have Go 1.22+ installed ```sh $ go version diff --git a/go.mod b/go.mod index e419c3224..fe6701037 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cli/cli/v2 -go 1.21 +go 1.22 require ( github.com/AlecAivazis/survey/v2 v2.3.7