Standard library / archive/zip

archive/zip.ErrFormat

Invalid ZIP structure sentinel. Reject malformed archives. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrFormat error

Working Example

Example Snippetgo
package main
import (  "archive/zip"  "errors"  "fmt"  "strings")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  _, e := zip.NewReader(strings.NewReader("not zip"), 7)  fmt.Println(errors.Is(e, zip.ErrFormat))}
Go Reference