From 9d32fad8f76d026e8ab18a0a75ef9ea562022794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:01:53 +0000 Subject: [PATCH 1/2] Bump github.com/spf13/cobra from 1.10.1 to 1.10.2 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.10.1 to 1.10.2. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.10.1...v1.10.2) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-version: 1.10.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 673a438..6893eb5 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/jarcoal/httpmock v1.4.1 github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 - github.com/spf13/cobra v1.10.1 + github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 golang.org/x/net v0.47.0 golang.org/x/term v0.37.0 diff --git a/go.sum b/go.sum index d7400f0..da066d0 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,8 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= -github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo= @@ -48,6 +48,7 @@ github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02n github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= From 3539c6de0de0e68d28c15d0bbb84d43ff57c6cdc Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 4 Dec 2025 11:39:15 +0100 Subject: [PATCH 2/2] Fix linter issues --- internal/client/client_test.go | 14 +++++++------- internal/inbox/inbox_test.go | 11 ++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/internal/client/client_test.go b/internal/client/client_test.go index d32a604..adc34fe 100644 --- a/internal/client/client_test.go +++ b/internal/client/client_test.go @@ -531,7 +531,7 @@ func TestHTTPClientFactoryCreate(t *testing.T) { }, { "Define a timeout alone", func() { - os.Setenv("YOGO_REQUEST_TIMEOUT", "10") + assert.NoError(t, os.Setenv("YOGO_REQUEST_TIMEOUT", "10")) }, func(c *http.Client, err error) { assert.NoError(t, err) @@ -540,7 +540,7 @@ func TestHTTPClientFactoryCreate(t *testing.T) { }, { "Define an HTTP proxy URL", func() { - os.Setenv("HTTP_PROXY", "http://localhost:8000") + assert.NoError(t, os.Setenv("HTTP_PROXY", "http://localhost:8000")) }, func(c *http.Client, err error) { assert.NoError(t, err) @@ -548,7 +548,7 @@ func TestHTTPClientFactoryCreate(t *testing.T) { }, { "Define an HTTPs proxy URL", func() { - os.Setenv("HTTPS_PROXY", "http://localhost:8000") + assert.NoError(t, os.Setenv("HTTPS_PROXY", "http://localhost:8000")) }, func(c *http.Client, err error) { assert.NoError(t, err) @@ -556,7 +556,7 @@ func TestHTTPClientFactoryCreate(t *testing.T) { }, { "Define a wrong proxy URL", func() { - os.Setenv("HTTP_PROXY", "l\n") + assert.NoError(t, os.Setenv("HTTP_PROXY", "l\n")) }, func(c *http.Client, err error) { assert.Error(t, err) @@ -564,9 +564,9 @@ func TestHTTPClientFactoryCreate(t *testing.T) { }, }} { t.Run(s.name, func(t *testing.T) { - os.Setenv("HTTP_PROXY", "") - os.Setenv("HTTPS_PROXY", "") - os.Setenv("YOGO_REQUEST_TIMEOUT", "") + assert.NoError(t, os.Setenv("HTTP_PROXY", "")) + assert.NoError(t, os.Setenv("HTTPS_PROXY", "")) + assert.NoError(t, os.Setenv("YOGO_REQUEST_TIMEOUT", "")) s.setup() h := httpClientFactory{} c, err := h.create() diff --git a/internal/inbox/inbox_test.go b/internal/inbox/inbox_test.go index 4318e70..b2f0361 100644 --- a/internal/inbox/inbox_test.go +++ b/internal/inbox/inbox_test.go @@ -427,10 +427,8 @@ func TestFlush(t *testing.T) { inbox, err := NewInbox[client.MailHTMLDoc]("test", false) assert.NoError(t, err) - err = inbox.ParseInboxPages(15) - inbox.Flush() - - assert.NoError(t, err) + assert.NoError(t, inbox.ParseInboxPages(15)) + assert.NoError(t, inbox.Flush()) } func TestFlushEmptyInbox(t *testing.T) { @@ -458,10 +456,9 @@ func TestFlushEmptyInbox(t *testing.T) { inbox, err := NewInbox[client.MailHTMLDoc]("test", false) assert.NoError(t, err) - err = inbox.ParseInboxPages(1) - inbox.Flush() + assert.NoError(t, inbox.ParseInboxPages(1)) + assert.NoError(t, inbox.Flush()) - assert.NoError(t, err) assert.Equal(t, 0, inbox.Count()) }