A writer that wraps long text lines to a specified length
import (
"os"
"github.com/emersion/go-textwrapper"
)
func main() {
w := textwrapper.New(os.Stdout, "/", 5)
w.Write([]byte("helloworldhelloworldhelloworld"))
// Output: hello/world/hello/world/hello/world
}
MIT