Skip to content
Permalink
Browse files

Fix lint errors

  • Loading branch information...
DarthSim committed Oct 10, 2019
1 parent a35b7a9 commit aac9997387ce550a8330d83bc38d3f453a62ba1d
Showing with 16 additions and 16 deletions.
  1. +3 −3 download.go
  2. +1 −1 image_size/bmp.go
  3. +1 −1 image_size/gif.go
  4. +1 −1 image_size/heic.go
  5. +1 −1 image_size/ico.go
  6. +1 −1 image_size/image_meta.go
  7. +1 −1 image_size/jpeg.go
  8. +1 −1 image_size/png.go
  9. +1 −1 image_size/svg.go
  10. +1 −1 image_size/tiff.go
  11. +1 −1 image_size/webp.go
  12. +3 −3 process.go
@@ -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
}

0 comments on commit aac9997

Please sign in to comment.
You can’t perform that action at this time.