Standard library / io
io.ErrUnexpectedEOF
Signals premature end in a fixed-size record after some data was received. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrUnexpectedEOF errorWorking Example
Example Snippetgo
package main
import ( "fmt" "io" "strings")
func main() { _, e := io.ReadFull(strings.NewReader("a"), make([]byte, 2)) fmt.Println(e == io.ErrUnexpectedEOF)}