GitShow/mitchellh/go-wordwrap
mitchellh

go-wordwrap

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

by mitchellh
Star on GitHubFork

Go

128 stars20 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

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 2 in progress · Last activity 5y ago
See all on GitHub →
aoright
test: add empty string test case and fix comment typoOpenPR

Summary In , add unit test case covering empty string input to . Fix test comment typo ( -> ). Update to Go 1.18.

aoright · 1mo ago
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 · 4mo 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 · 8y ago
Structured data for AI agents

Repository: mitchellh/go-wordwrap. Description: A Go (golang) library for wrapping words in a string. Stars: 128, Forks: 20. Primary language: Go. Languages: Go (100%). License: MIT. Open PRs: 2, open issues: 0. Last activity: 5y ago. Community health: 42%. Top contributors: mitchellh, lukecyca, bflad, dtolnay.

·@ofershap

Replace github.com with gitshow.dev