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

remove unnecessary break statements

This commit is contained in:
Will Norris 2014-11-19 21:57:50 -08:00
parent 7d5c68c4a0
commit 1bf3ccab06

View file

@ -86,13 +86,10 @@ func Transform(img []byte, opt *Options) ([]byte, error) {
switch opt.Rotate {
case 90:
m = imaging.Rotate90(m)
break
case 180:
m = imaging.Rotate180(m)
break
case 270:
m = imaging.Rotate270(m)
break
}
// encode image
@ -100,13 +97,10 @@ func Transform(img []byte, opt *Options) ([]byte, error) {
switch format {
case "gif":
gif.Encode(buf, m, nil)
break
case "jpeg":
jpeg.Encode(buf, m, &jpeg.Options{95})
break
case "png":
png.Encode(buf, m)
break
}
return buf.Bytes(), nil