Standard library / compress/flate

compress/flate.WriteError.Error()

Return a diagnostic message for WriteError. Do not parse diagnostic text as a stable wire protocol. This deprecated type is instantiated synthetically. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (e *WriteError) Error() string

Return Value

string

Human-readable diagnostic.

Working Example

Example Snippetgo
package main
import (  "compress/flate"  "fmt"  "io")
func must(e error) {  if e != nil {    panic(e)  }}
func main() { e := &flate.WriteError{Offset: 4, Err: io.ErrShortWrite}; fmt.Println(e.Error() != "") }
Go Reference