Fix govet+staticcheck issues (#20263)

This is better: https://github.com/golang/go/issues/60529
This commit is contained in:
Klaus Post
2024-08-14 10:11:51 -07:00
committed by GitHub
parent 51b1f41518
commit 3ffeabdfcb
16 changed files with 49 additions and 37 deletions

View File

@@ -289,7 +289,7 @@ func (sts *stsAPIHandlers) AssumeRole(w http.ResponseWriter, r *http.Request) {
if apiErrCode != ErrNone {
stsErr := apiToSTSError(apiErrCode)
// Borrow the description error from the API error code
writeSTSErrorResponse(ctx, w, stsErr, fmt.Errorf(errorCodes[apiErrCode].Description))
writeSTSErrorResponse(ctx, w, stsErr, errors.New(errorCodes[apiErrCode].Description))
return
}