GitShow/mitchellh/go-wordwrap
mitchellh

go-wordwrap

A Go (golang) library for wrapping words in a string.

by mitchellh
Star on GitHubFork

Go

127 stars18 forks4 contributorsQuiet · 5y agoSince 2014MIT

Meet the team

See all 4 on GitHub →
mitchellh
mitchellh10 contributions
lukecyca
lukecyca3 contributions
bflad
bflad1 contribution
dtolnay
dtolnay1 contribution

Recent PRs & issues

Quiet · 1 in progress · Last activity 5y ago
See all on GitHub →
jessp01
Support multiple break sequencesOpenPR

For regular text, injecting newlines when wrapping is the obvious (and only reasonable) choice. However, consider a situation where you're wrapping a shell (or ) command: in such a case, you'll want a , followed by a newline. This pull introduces the argument for that reason. Unfortunately, since Go does not support optional arguments or overloading, this breaks the existing API, but I think it's worth it. The alternative would be to introduce an additional method, but, IMHO, this is less sensible, especially since fixing existing code wouldn't be hard or time-consuming.

jessp01 · 1mo ago

Recent fixes

View closed PRs →
dtolnay
Do not break on non-breaking spaceMergedPR
dtolnay · 5y ago
ghostsquad
no tests for special charactersClosedIssue

I noticed that there are no tests for special characters, and that the source does convert the string into a rune slice.

ghostsquad · 5y ago
bflad
Add go.modMergedPR

Simple one. 😄 Created via:

bflad · 7y ago
Structured data for AI agents

Repository: mitchellh/go-wordwrap. Description: A Go (golang) library for wrapping words in a string. Stars: 127, Forks: 18. Primary language: Go. License: MIT. Open PRs: 1, open issues: 0. Last activity: 5y ago. Top contributors: mitchellh, lukecyca, bflad, dtolnay.

·@ofershap

Replace github.com with gitshow.dev