Standard library / testing/iotest

testing/iotest.ErrTimeout

Synthetic timeout sentinel from iotest; it is not a real network deadline. Expected stdout: 'timeout\n'.

Formal Syntax & Structure

go syntaxgo
var ErrTimeout = errors.New("timeout")

Working Example

Example Snippetgo
package main
import (  "fmt"  "testing/iotest")
func main() { fmt.Println(iotest.ErrTimeout.Error()) }
Go Reference