mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-24 20:36:24 +02:00
there's no need for Options to be a pointer
This commit is contained in:
parent
c5b279b947
commit
4a5f24e4ec
4 changed files with 49 additions and 49 deletions
|
|
@ -20,7 +20,6 @@ import (
|
|||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"reflect"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
)
|
||||
|
|
@ -29,8 +28,8 @@ import (
|
|||
const jpegQuality = 95
|
||||
|
||||
// Transform the provided image.
|
||||
func Transform(img []byte, opt *Options) ([]byte, error) {
|
||||
if opt == nil || reflect.DeepEqual(opt, emptyOptions) {
|
||||
func Transform(img []byte, opt Options) ([]byte, error) {
|
||||
if opt == emptyOptions {
|
||||
// bail if no transformation was requested
|
||||
return img, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue