fixing golint issues to try to figure out test flakiness
This commit is contained in:
@@ -3,9 +3,9 @@ package caddyhugo
|
||||
import (
|
||||
"fmt"
|
||||
"image"
|
||||
_ "image/gif"
|
||||
_ "image/gif" // for processing images
|
||||
"image/jpeg"
|
||||
_ "image/png"
|
||||
_ "image/png" // for processing images
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -217,6 +217,9 @@ func (ch *CaddyHugo) uploadMedia(w http.ResponseWriter, r *http.Request) (int, e
|
||||
|
||||
for {
|
||||
part, err := mr.NextPart()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return 400, nil
|
||||
@@ -344,7 +347,6 @@ func parseSizeString(str string, actual image.Rectangle) (image.Rectangle, error
|
||||
// w was the only dimension given, so set it to the greater dimension
|
||||
// of the actual image size
|
||||
if actual.Dx() > actual.Dy() {
|
||||
w = w
|
||||
h = 0
|
||||
} else {
|
||||
h = w
|
||||
|
||||
Reference in New Issue
Block a user