grokify/mogo

View on GitHub
image/imageutil/write.go

Summary

Maintainability
A
1 hr
Test Coverage

Function ResizePathJPEGDir has 9 return statements (exceeds 4 allowed).
Open

func ResizePathJPEGDir(src, out string, x, y uint, o *JPEGEncodeOptions) error {
    if src == "" {
        return ErrSrcDirNotDefined
    } else if out == "" {
        return ErrOutDirNotDefined
Severity: Major
Found in image/imageutil/write.go - About 55 mins to fix

    Function newWriterExif has 5 return statements (exceeds 4 allowed).
    Open

    func newWriterExif(w io.Writer, exif []byte) (io.Writer, error) {
        // Adapted from the following under MIT license: https://github.com/jdeng/goheif/blob/a0d6a8b3e68f9d613abd9ae1db63c72ba33abd14/heic2jpg/main.go
        // See more here: https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format
        // https://www.codeproject.com/Articles/47486/Understanding-and-Reading-Exif-Data
        wExif := ioutil.NewSkipWriter(w, 2)
    Severity: Major
    Found in image/imageutil/write.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status