@@ -118,11 +118,15 @@ func (b baseError) OrigErrs() []error {
118118
119119// So that the Error interface type can be included as an anonymous field
120120// in the requestError struct and not conflict with the error.Error() method.
121+ //
122+ //nolint:all
121123type cfnError Error
122124
123125// A requestError wraps a request or service error.
124126//
125127// Composed of baseError for code, message, and original error.
128+ //
129+ //nolint:all
126130type requestError struct {
127131 cfnError
128132 statusCode int
@@ -137,6 +141,8 @@ type requestError struct {
137141// that may be meaningful.
138142//
139143// Also wraps original errors via the baseError.
144+ //
145+ //nolint:all
140146func newRequestError (err Error , statusCode int , requestID string ) * requestError {
141147 return & requestError {
142148 cfnError : err ,
@@ -147,6 +153,8 @@ func newRequestError(err Error, statusCode int, requestID string) *requestError
147153
148154// Error returns the string representation of the error.
149155// Satisfies the error interface.
156+ //
157+ //nolint:all
150158func (r requestError ) Error () string {
151159 extra := fmt .Sprintf ("status code: %d, request id: %s" ,
152160 r .statusCode , r .requestID )
@@ -155,22 +163,30 @@ func (r requestError) Error() string {
155163
156164// String returns the string representation of the error.
157165// Alias for Error to satisfy the stringer interface.
166+ //
167+ //nolint:all
158168func (r requestError ) String () string {
159169 return r .Error ()
160170}
161171
162172// StatusCode returns the wrapped status code for the error
173+ //
174+ //nolint:all
163175func (r requestError ) StatusCode () int {
164176 return r .statusCode
165177}
166178
167179// RequestID returns the wrapped requestID
180+ //
181+ //nolint:all
168182func (r requestError ) RequestID () string {
169183 return r .requestID
170184}
171185
172186// OrigErrs returns the original errors if one was set. An empty slice is
173187// returned if no error was set.
188+ //
189+ //nolint:all
174190func (r requestError ) OrigErrs () []error {
175191 if b , ok := r .cfnError .(BatchedErrors ); ok {
176192 return b .OrigErrs ()
@@ -189,7 +205,7 @@ func (e errorList) Error() string {
189205 // How do we want to handle the array size being zero
190206 if size := len (e ); size > 0 {
191207 for i := 0 ; i < size ; i ++ {
192- msg += fmt . Sprintf ( "%s" , e [i ].Error () )
208+ msg += e [i ].Error ()
193209 // We check the next index to see if it is within the slice.
194210 // If it is, then we append a newline. We do this, because unit tests
195211 // could be broken with the additional '\n'
0 commit comments