Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
apply the megacheck tool to improve code quality
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
  • Loading branch information
zramsay authored and hsanjuan committed Mar 21, 2018
1 parent fa12e38 commit 66ff8ed
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ func (te *Extractor) extractDir(h *tar.Header, depth int) error {
te.Path = path
}

err := os.MkdirAll(path, 0755)
if err != nil {
return err
}

return nil
return os.MkdirAll(path, 0755)
}

func (te *Extractor) extractSymlink(h *tar.Header) error {
Expand Down Expand Up @@ -112,12 +107,7 @@ func (te *Extractor) extractFile(h *tar.Header, r *tar.Reader, depth int, rootEx
}
defer file.Close()

err = copyWithProgress(file, r, te.Progress)
if err != nil {
return err
}

return nil
return copyWithProgress(file, r, te.Progress)
}

func copyWithProgress(to io.Writer, from io.Reader, cb func(int64) int64) error {
Expand Down

0 comments on commit 66ff8ed

Please sign in to comment.