Standard library / io

io.ErrShortBuffer

Indicates the supplied buffer cannot hold the required minimum data. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrShortBuffer error

Working Example

Example Snippetgo
package main
import (  "fmt"  "io"  "strings")
func main() {  _, e := io.ReadAtLeast(strings.NewReader("abc"), make([]byte, 1), 2)  fmt.Println(e == io.ErrShortBuffer)}
Go Reference