1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-03 10:43:58 +02:00

Fix lint errors

This commit is contained in:
DarthSim 2019-10-10 19:20:25 +06:00
parent a35b7a99c4
commit aac9997387
12 changed files with 16 additions and 16 deletions

View File

@ -10,7 +10,7 @@ import (
"net/http"
"time"
imageSize "github.com/imgproxy/imgproxy/image_size"
imagesize "github.com/imgproxy/imgproxy/image_size"
)
var (
@ -102,8 +102,8 @@ func checkDimensions(width, height int) error {
}
func checkTypeAndDimensions(r io.Reader) (imageType, error) {
meta, err := imageSize.DecodeMeta(r)
if err == imageSize.ErrFormat {
meta, err := imagesize.DecodeMeta(r)
if err == imagesize.ErrFormat {
return imageTypeUnknown, errSourceImageTypeNotSupported
}
if err != nil {

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bytes"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"io"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bytes"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"encoding/binary"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bufio"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bufio"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bytes"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"io"

View File

@ -1,4 +1,4 @@
package imageSize
package imagesize
import (
"bufio"

View File

@ -4,7 +4,7 @@
// Original code was cropped and fixed by @DarthSim for imgproxy needs
package imageSize
package imagesize
import (
"errors"

View File

@ -7,7 +7,7 @@ import (
"math"
"runtime"
imageSize "github.com/imgproxy/imgproxy/image_size"
imagesize "github.com/imgproxy/imgproxy/image_size"
"golang.org/x/sync/errgroup"
)
@ -551,14 +551,14 @@ func transformAnimated(ctx context.Context, img *vipsImage, data []byte, po *pro
}
func getIcoData(imgdata *imageData) (*imageData, error) {
offset, size, err := imageSize.BestIcoPage(bytes.NewBuffer(imgdata.Data))
offset, size, err := imagesize.BestIcoPage(bytes.NewBuffer(imgdata.Data))
if err != nil {
return nil, err
}
data := imgdata.Data[offset : offset+size]
meta, err := imageSize.DecodeMeta(bytes.NewBuffer(data))
meta, err := imagesize.DecodeMeta(bytes.NewBuffer(data))
if err != nil {
return nil, err
}