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:
parent
a35b7a99c4
commit
aac9997387
@ -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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Original code was cropped and fixed by @DarthSim for imgproxy needs
|
||||
|
||||
package imageSize
|
||||
package imagesize
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user