Skip to content

Commit

Permalink
Fix gofumpt lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bodgit committed Apr 30, 2022
1 parent 4a5a786 commit 836f3a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ func (z *Reader) init(r io.ReaderAt, size int64) error {

z.si = header.streamsInfo

//spew.Dump(header)
// spew.Dump(header)

folder, offset := 0, int64(0)
z.File = make([]*File, 0, len(header.filesInfo.file))
Expand Down
12 changes: 5 additions & 7 deletions struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const (
idDummy
)

var (
signature = []byte{'7', 'z', 0xbc, 0xaf, 0x27, 0x1c}
)
var signature = []byte{'7', 'z', 0xbc, 0xaf, 0x27, 0x1c}

type cryptoReadCloser interface {
io.ReadCloser
Expand Down Expand Up @@ -376,19 +374,19 @@ func (h *FileHeader) Mode() (mode os.FileMode) {

func msdosModeToFileMode(m uint32) (mode os.FileMode) {
if m&msdosDir != 0 {
mode = os.ModeDir | 0777
mode = os.ModeDir | 0o777
} else {
mode = 0666
mode = 0o666
}
if m&msdosReadOnly != 0 {
mode &^= 0222
mode &^= 0o222
}

return mode
}

func unixModeToFileMode(m uint32) os.FileMode {
mode := os.FileMode(m & 0777)
mode := os.FileMode(m & 0o777)
switch m & sIFMT {
case sIFBLK:
mode |= os.ModeDevice
Expand Down

0 comments on commit 836f3a1

Please sign in to comment.