Skip to content

Commit 54f39c7

Browse files
committed
replace github.com/juju/errors with github.com/pkg/errors wich is used in the rest of the project and does not have a LGPL license
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 737cd99 commit 54f39c7

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ require (
1111
github.com/hashicorp/go-multierror v1.1.1
1212
github.com/jetstack/venafi-connection-lib v0.1.1-0.20240814101135-a72cec54dc1a
1313
github.com/json-iterator/go v1.1.12
14-
github.com/juju/errors v1.0.0
1514
github.com/kylelemons/godebug v1.1.0
1615
github.com/maxatome/go-testdeep v1.14.0
1716
github.com/microcosm-cc/bluemonday v1.0.26

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
110110
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
111111
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
112112
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
113-
github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM=
114-
github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8=
115113
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
116114
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
117115
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=

pkg/client/client_oauth.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/hashicorp/go-multierror"
1616
"github.com/jetstack/preflight/api"
17-
"github.com/juju/errors"
17+
"github.com/pkg/errors"
1818
)
1919

2020
type (
@@ -178,18 +178,18 @@ func (c *OAuthClient) renewAccessToken() error {
178178
payload.Set("password", c.credentials.UserSecret)
179179
req, err := http.NewRequest("POST", tokenURL, strings.NewReader(payload.Encode()))
180180
if err != nil {
181-
return errors.Trace(err)
181+
return errors.WithStack(err)
182182
}
183183
req.Header.Add("content-type", "application/x-www-form-urlencoded")
184184

185185
res, err := http.DefaultClient.Do(req)
186186
if err != nil {
187-
return errors.Trace(err)
187+
return errors.WithStack(err)
188188
}
189189

190190
body, err := ioutil.ReadAll(res.Body)
191191
if err != nil {
192-
return errors.Trace(err)
192+
return errors.WithStack(err)
193193
}
194194

195195
defer res.Body.Close()
@@ -205,7 +205,7 @@ func (c *OAuthClient) renewAccessToken() error {
205205

206206
err = json.Unmarshal(body, &response)
207207
if err != nil {
208-
return errors.Trace(err)
208+
return errors.WithStack(err)
209209
}
210210

211211
if response.ExpiresIn == 0 {

0 commit comments

Comments
 (0)