From 140dd7f5976fcb5f95d71a9e65955accf2bcb8ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 12:59:51 +0000 Subject: [PATCH 1/2] Bump github.com/cli/browser from 1.0.0 to 1.3.0 Bumps [github.com/cli/browser](https://github.com/cli/browser) from 1.0.0 to 1.3.0. - [Commits](https://github.com/cli/browser/compare/v1.0.0...v1.3.0) --- updated-dependencies: - dependency-name: github.com/cli/browser dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 ++++-- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 374d30f..72c24ab 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/cli/oauth -go 1.13 +go 1.21 -require github.com/cli/browser v1.0.0 +require github.com/cli/browser v1.3.0 + +require golang.org/x/sys v0.13.0 // indirect diff --git a/go.sum b/go.sum index cb4bc70..c6840c0 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/cli/browser v1.0.0 h1:RIleZgXrhdiCVgFBSjtWwkLPUCWyhhhN5k5HGSBt1js= -github.com/cli/browser v1.0.0/go.mod h1:IEWkHYbLjkhtjwwWlwTHW2lGxeS5gezEQBMLTwDHf5Q= -github.com/cli/safeexec v1.0.0 h1:0VngyaIyqACHdcMNWfo6+KdUYnqEr2Sg+bSP1pdF+dI= -github.com/cli/safeexec v1.0.0/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= +github.com/cli/browser v1.3.0 h1:LejqCrpWr+1pRqmEPDGnTZOjsMe7sehifLynZJuqJpo= +github.com/cli/browser v1.3.0/go.mod h1:HH8s+fOAxjhQoBUAsKuPCbqUuxZDhQ2/aD+SzsEfBTk= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From ec651bce5b498d142aea28cc6185fe2f471864e7 Mon Sep 17 00:00:00 2001 From: William Martin Date: Wed, 20 May 2026 15:04:59 +0200 Subject: [PATCH 2/2] Replace deprecated io/ioutil with io package Fixes golangci-lint SA1019 staticcheck failures triggered by the browser dependency bump revalidating lint on the PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- api/form.go | 5 ++--- api/form_test.go | 4 ++-- device/device_flow_test.go | 4 ++-- webapp/webapp_flow_test.go | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/api/form.go b/api/form.go index 9b28484..4adc709 100644 --- a/api/form.go +++ b/api/form.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "mime" "net/http" "net/url" @@ -78,7 +77,7 @@ func PostForm(c httpClient, u string, params url.Values) (*FormResponse, error) switch mediaType { case "application/x-www-form-urlencoded": var bb []byte - bb, err = ioutil.ReadAll(resp.Body) + bb, err = io.ReadAll(resp.Body) if err != nil { return r, err } @@ -105,7 +104,7 @@ func PostForm(c httpClient, u string, params url.Values) (*FormResponse, error) } } default: - _, err = io.Copy(ioutil.Discard, resp.Body) + _, err = io.Copy(io.Discard, resp.Body) if err != nil { return r, err } diff --git a/api/form_test.go b/api/form_test.go index 78b669f..b6ca906 100644 --- a/api/form_test.go +++ b/api/form_test.go @@ -2,7 +2,7 @@ package api import ( "bytes" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -120,7 +120,7 @@ type apiClient struct { func (c *apiClient) PostForm(_ string, _ url.Values) (*http.Response, error) { c.postCount++ return &http.Response{ - Body: ioutil.NopCloser(bytes.NewBufferString(c.body)), + Body: io.NopCloser(bytes.NewBufferString(c.body)), Header: http.Header{ "Content-Type": {c.contentType}, }, diff --git a/device/device_flow_test.go b/device/device_flow_test.go index b7a0235..0616f08 100644 --- a/device/device_flow_test.go +++ b/device/device_flow_test.go @@ -4,7 +4,7 @@ import ( "bytes" "context" "errors" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -37,7 +37,7 @@ func (c *apiClient) PostForm(u string, params url.Values) (*http.Response, error c.calls = append(c.calls, postArgs{url: u, params: params}) c.postCount++ return &http.Response{ - Body: ioutil.NopCloser(bytes.NewBufferString(stub.body)), + Body: io.NopCloser(bytes.NewBufferString(stub.body)), Header: http.Header{ "Content-Type": {stub.contentType}, }, diff --git a/webapp/webapp_flow_test.go b/webapp/webapp_flow_test.go index 110ff0c..81dad43 100644 --- a/webapp/webapp_flow_test.go +++ b/webapp/webapp_flow_test.go @@ -3,7 +3,7 @@ package webapp import ( "bytes" "context" - "io/ioutil" + "io" "net" "net/http" "net/url" @@ -112,7 +112,7 @@ func (c *apiClient) PostForm(u string, params url.Values) (*http.Response, error c.calls = append(c.calls, postArgs{url: u, params: params}) c.postCount++ return &http.Response{ - Body: ioutil.NopCloser(bytes.NewBufferString(stub.body)), + Body: io.NopCloser(bytes.NewBufferString(stub.body)), Header: http.Header{ "Content-Type": {stub.contentType}, },