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:
parent
cc2bed6b8f
commit
702a07e3b5
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue