0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

move emptyOptions to data.go

This commit is contained in:
Will Norris 2013-12-26 15:04:14 -08:00
parent cc2bed6b8f
commit 702a07e3b5
2 changed files with 2 additions and 2 deletions

View file

@ -42,6 +42,8 @@ type Options struct {
FlipHorizontal bool FlipHorizontal bool
} }
var emptyOptions = new(Options)
func (o Options) String() string { func (o Options) String() string {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
fmt.Fprintf(buf, "%vx%v", o.Width, o.Height) fmt.Fprintf(buf, "%vx%v", o.Width, o.Height)

View file

@ -26,8 +26,6 @@ import (
"github.com/disintegration/imaging" "github.com/disintegration/imaging"
) )
var emptyOptions = new(Options)
// Transform the provided image. // Transform the provided image.
func Transform(img []byte, opt *Options) ([]byte, error) { func Transform(img []byte, opt *Options) ([]byte, error) {
if opt == nil || reflect.DeepEqual(opt, emptyOptions) { if opt == nil || reflect.DeepEqual(opt, emptyOptions) {