Skip to content

Commit

Permalink
golint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skotambkar committed Nov 8, 2020
1 parent 173b48a commit 051b015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion service/internal/s3shared/xml_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GetUnwrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error) {
return errComponents, nil
}

// GetErrorResponseComponents returns the error fields from an xml error response body
// GetWrappedErrorResponseComponents returns the error fields from an xml error response body
// in which error code, and message are wrapped by a <Error> tag
func GetWrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error) {
var errComponents struct {
Expand Down Expand Up @@ -75,6 +75,7 @@ func GetErrorResponseComponents(r io.Reader, options ErrorResponseDeserializerOp
return errComponents, nil
}

// ErrorResponseDeserializerOptions represents error response deserializer options for s3 and s3-control service
type ErrorResponseDeserializerOptions struct {
// UseStatusCode denotes if status code should be used to retrieve error code, msg
UseStatusCode bool
Expand Down
2 changes: 1 addition & 1 deletion service/internal/s3shared/xml_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestGetResponseErrorCode(t *testing.T) {
<RequestId>foo-id</RequestId>
</Error>`

const wrappedXmlErrorResponse = `<ErrorResponse><Error>
const wrappedXMLErrorResponse = `<ErrorResponse><Error>
<Type>Sender</Type>
<Code>InvalidGreeting</Code>
<Message>Hi</Message>
Expand Down

0 comments on commit 051b015

Please sign in to comment.