Standard library / archive/tar

archive/tar.ErrFieldTooLong

Header field cannot fit a required representation. This example classifies the sentinel rather than inducing a writer error. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrFieldTooLong error

Working Example

Example Snippetgo
package main
import (  "archive/tar"  "errors"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  e := fmt.Errorf("archive: %w", tar.ErrFieldTooLong)  fmt.Println(errors.Is(e, tar.ErrFieldTooLong))}
Go Reference