28 lines
589 B
Markdown
28 lines
589 B
Markdown
# go-textwrapper
|
|
|
|
[](https://godoc.org/github.com/emersion/go-textwrapper)
|
|
[](https://travis-ci.org/emersion/go-textwrapper)
|
|
|
|
A writer that wraps long text lines to a specified length
|
|
|
|
## Usage
|
|
|
|
```go
|
|
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
|
|
}
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|