linebuf

Package linebuf provides line-buffered IO utilities.

package linebuf

import "go.abhg.dev/doc2go/internal/linebuf"

Package linebuf provides line-buffered IO utilities.

Index

Functions

func Writer

func Writer(fn func([]byte)) (_ io.Writer, done func())

Writer return san io.Writer that splits its input on newline, calling fn for each line -- including the trailing newline.