Skip to content

proposal: archive/zip: enhance ErrFormat error string with more granular details of failure #64353

@niksw7

Description

@niksw7

Proposal Details

The current code for reading zip
read,err := zip.OpenReader("filename.zip")
In cases of error due to headers etc, it's very difficult to debug without changing the golang source code(And adding logs there). The error just states "zip: not a valid zip file".
It would be beneficial to know why the zip is not valid. So adding a proposal to make the errors here more clear with exact reason for the zip file being invalid

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions