portainer/portainer

View on GitHub
api/archive/zip.go

Summary

Maintainability
A
1 hr
Test Coverage

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

func extractFileFromArchive(file *zip.File, dest string) error {
    f, err := file.Open()
    if err != nil {
        return err
    }
Severity: Major
Found in api/archive/zip.go - About 35 mins to fix

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

    func unzipFile(f *zip.File, p string) error {
        // Make File
        if err := os.MkdirAll(filepath.Dir(p), os.ModePerm); err != nil {
            return errors.Wrapf(err, "unzipFile: can't make a path %s", p)
        }
    Severity: Major
    Found in api/archive/zip.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status