diff --git a/reader.go b/reader.go index 2ea3318..8edd0bb 100644 --- a/reader.go +++ b/reader.go @@ -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)) diff --git a/struct.go b/struct.go index 6fdb14c..a04dce5 100644 --- a/struct.go +++ b/struct.go @@ -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 @@ -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