Standard library / bufio
bufio.ErrInvalidUnreadByte
Returned when UnreadByte is called without a suitable preceding read. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrInvalidUnreadByte errorWorking Example
Example Snippetgo
package main
import ( "bufio" "fmt" "strings")
func main() { r := bufio.NewReader(strings.NewReader("abc")) fmt.Println(r.UnreadByte() == bufio.ErrInvalidUnreadByte)}