Standard library / bufio

bufio.Reader.Size()

Returns the size of the underlying buffer, not the amount of data in it. Expected stdout: '32\n'.

Formal Syntax & Structure

go syntaxgo
func (b *Reader) Size() int

Return Value

int

Returns the size of the underlying buffer, not the amount of data in it.

Working Example

Example Snippetgo
package main
import (  "bufio"  "fmt"  "strings")
func main() { r := bufio.NewReaderSize(strings.NewReader("x"), 32); fmt.Println(r.Size()) }
Go Reference