chore: update linter. (#1278)

This commit is contained in:
Ludovic Fernandez 2020-10-27 12:01:05 +01:00 committed by GitHub
parent dfc346a00b
commit 38f23c8c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 61 additions and 53 deletions

View file

@ -90,14 +90,14 @@ func (a *Core) retrievablePost(uri string, content []byte, response interface{})
var err error
resp, err = a.signedPost(uri, content, response)
if err != nil {
switch err.(type) {
// Retry if the nonce was invalidated
case *acme.NonceError:
return err
default:
cancel()
var e *acme.NonceError
if errors.As(err, &e) {
return err
}
cancel()
return err
}
return nil
@ -109,7 +109,7 @@ func (a *Core) retrievablePost(uri string, content []byte, response interface{})
err := backoff.RetryNotify(operation, backoff.WithContext(bo, ctx), notify)
if err != nil {
return nil, err
return resp, err
}
return resp, nil