improving code coverage

This commit is contained in:
Julien Neuhart
2018-04-05 10:36:38 +02:00
parent 15916e80e6
commit ee15a52001
8 changed files with 95 additions and 14 deletions

View File

@@ -43,8 +43,10 @@ func FindAuthorizedContentType(h http.Header) (ContentType, error) {
type notAuthorizedFileContentTypeError struct{}
const notAuthorizedFileContentTypeErrorMessage = "Unable to detect an authorized file content type"
func (e *notAuthorizedFileContentTypeError) Error() string {
return fmt.Sprintf("Unable to detect a file content type")
return notAuthorizedFileContentTypeErrorMessage
}
// SniffContentType tries to detect the content type of a file.