Standard library / bufio
bufio.Writer.Size()
Returns the total buffer capacity, regardless of occupancy. Expected stdout: '16\n'.
Formal Syntax & Structure
go syntaxgo
func (b *Writer) Size() intReturn Value
int
Returns the total buffer capacity, regardless of occupancy.
Working Example
Example Snippetgo
package main
import ( "bufio" "fmt" "io")
func main() { w := bufio.NewWriterSize(io.Discard, 16); fmt.Println(w.Size()) }