diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /resources/images | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) | |
download | hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'resources/images')
-rw-r--r-- | resources/images/color.go | 1 | ||||
-rw-r--r-- | resources/images/color_test.go | 1 | ||||
-rw-r--r-- | resources/images/config_test.go | 1 | ||||
-rw-r--r-- | resources/images/exif/exif.go | 4 | ||||
-rw-r--r-- | resources/images/exif/exif_test.go | 1 | ||||
-rw-r--r-- | resources/images/filters_test.go | 1 | ||||
-rw-r--r-- | resources/images/image.go | 3 | ||||
-rw-r--r-- | resources/images/smartcrop.go | 1 |
8 files changed, 0 insertions, 13 deletions
diff --git a/resources/images/color.go b/resources/images/color.go index b17173e26..0a0db9fe0 100644 --- a/resources/images/color.go +++ b/resources/images/color.go @@ -81,5 +81,4 @@ func hexStringToColor(s string) (color.Color, error) { } return color.RGBA{b[0], b[1], b[2], b[3]}, nil - } diff --git a/resources/images/color_test.go b/resources/images/color_test.go index 3ef9f76cc..0a1718180 100644 --- a/resources/images/color_test.go +++ b/resources/images/color_test.go @@ -74,7 +74,6 @@ func TestAddColorToPalette(t *testing.T) { c.Assert(AddColorToPalette(white, palette), qt.HasLen, 2) c.Assert(AddColorToPalette(blue1, palette), qt.HasLen, 3) c.Assert(AddColorToPalette(blue2, palette), qt.HasLen, 3) - } func TestReplaceColorInPalette(t *testing.T) { diff --git a/resources/images/config_test.go b/resources/images/config_test.go index f60cce9ef..2a0de9ec0 100644 --- a/resources/images/config_test.go +++ b/resources/images/config_test.go @@ -77,7 +77,6 @@ func TestDecodeConfig(t *testing.T) { imaging = imagingConfig.Cfg c.Assert(imaging.Exif.DisableLatLong, qt.Equals, true) c.Assert(imaging.Exif.ExcludeFields, qt.Equals, "GPS|Exif|Exposure[M|P|B]|Contrast|Resolution|Sharp|JPEG|Metering|Sensing|Saturation|ColorSpace|Flash|WhiteBalance") - } func TestDecodeImageConfig(t *testing.T) { diff --git a/resources/images/exif/exif.go b/resources/images/exif/exif.go index b5161f770..720d200c9 100644 --- a/resources/images/exif/exif.go +++ b/resources/images/exif/exif.go @@ -93,7 +93,6 @@ func compileRegexp(expression string) (*regexp.Regexp, error) { } return regexp.Compile(expression) - } func NewDecoder(options ...func(*Decoder) error) (*Decoder, error) { @@ -118,7 +117,6 @@ func (d *Decoder) Decode(r io.Reader) (ex *Exif, err error) { x, err = _exif.Decode(r) if err != nil { if err.Error() == "EOF" { - // Found no Exif return nil, nil } @@ -190,7 +188,6 @@ func decodeTag(x *_exif.Exif, f _exif.FieldName, t *tiff.Tag) (interface{}, erro } return rv, nil - } // Code borrowed from exif.DateTime and adjusted. @@ -202,7 +199,6 @@ func tryParseDate(x *_exif.Exif, s string) (time.Time, error) { timeZone = tz } return time.ParseInLocation(exifTimeLayout, dateStr, timeZone) - } type exifWalker struct { diff --git a/resources/images/exif/exif_test.go b/resources/images/exif/exif_test.go index c3cfad1cc..12e3b7f71 100644 --- a/resources/images/exif/exif_test.go +++ b/resources/images/exif/exif_test.go @@ -60,7 +60,6 @@ func TestExif(t *testing.T) { err = json.Unmarshal(data, x2) c.Assert(x2, eq, x) - } func TestExifPNG(t *testing.T) { diff --git a/resources/images/filters_test.go b/resources/images/filters_test.go index 1243e483b..84c8b540d 100644 --- a/resources/images/filters_test.go +++ b/resources/images/filters_test.go @@ -30,5 +30,4 @@ func TestFilterHash(t *testing.T) { c.Assert(helpers.HashString(f.Grayscale()), qt.Not(qt.Equals), helpers.HashString(f.Invert())) c.Assert(helpers.HashString(f.Gamma(32)), qt.Not(qt.Equals), helpers.HashString(f.Gamma(33))) c.Assert(helpers.HashString(f.Gamma(32)), qt.Equals, helpers.HashString(f.Gamma(32))) - } diff --git a/resources/images/image.go b/resources/images/image.go index a13c1a59e..88eed2f7e 100644 --- a/resources/images/image.go +++ b/resources/images/image.go @@ -92,7 +92,6 @@ func (i *Image) EncodeTo(conf ImageConfig, img image.Image, w io.Writer) error { default: return errors.New("format not supported") } - } // Height returns i's height. @@ -165,7 +164,6 @@ func NewImageProcessor(cfg ImagingConfig) (*ImageProcessor, error) { exif.ExcludeFields(e.ExcludeFields), exif.IncludeFields(e.IncludeFields), ) - if err != nil { return nil, err } @@ -174,7 +172,6 @@ func NewImageProcessor(cfg ImagingConfig) (*ImageProcessor, error) { Cfg: cfg, exifDecoder: exifDecoder, }, nil - } type ImageProcessor struct { diff --git a/resources/images/smartcrop.go b/resources/images/smartcrop.go index e0181b671..76f547ef0 100644 --- a/resources/images/smartcrop.go +++ b/resources/images/smartcrop.go @@ -70,5 +70,4 @@ func (p *ImageProcessor) smartCrop(img image.Image, width, height int, filter gi } return img.Bounds().Intersect(rect), nil - } |