there's no need for Options to be a pointer

This commit is contained in:
Will Norris 2014-11-19 21:59:52 -08:00
parent c5b279b947
commit 4a5f24e4ec
4 changed files with 49 additions and 49 deletions

View file

@ -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
}