Skip to content

Commit

Permalink
Merge pull request #114 from atc0005/dependabot/go_modules/master/zgo…
Browse files Browse the repository at this point in the history
….at/termtext-1.2.0

go.mod: bump zgo.at/termtext from 1.1.0 to 1.2.0
  • Loading branch information
atc0005 authored Nov 27, 2023
2 parents 672091c + 851f9a4 commit 62e86a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ require (
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
golang.org/x/sys v0.14.0 // indirect
zgo.at/termtext v1.1.0 // indirect
zgo.at/termtext v1.2.0 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
zgo.at/acidtab v1.0.0 h1:KtXvxtY0uXKNQW1dz113e++5XodEs5HEqIO9AJDT7Nk=
zgo.at/acidtab v1.0.0/go.mod h1:dOHM1/D5cRCsskzFmyniTDVZjuwnqFdAcvRiT3RTvY0=
zgo.at/termtext v0.0.0-20211017203350-a2beb4680d76/go.mod h1:P0jvULwo8z82ad7+WR6vg5vTy86dqvbOmR3bT3NlYvc=
zgo.at/termtext v1.1.0 h1:fBwyR6BVw1DnOIGmRhlQwM3cePzoJtY9FHpc62TwCWU=
zgo.at/termtext v1.1.0/go.mod h1:P0jvULwo8z82ad7+WR6vg5vTy86dqvbOmR3bT3NlYvc=
zgo.at/termtext v1.2.0 h1:l8X6/dWho0vEfNJiNiNmtjofHNjFc52ON+/tbdf2B54=
zgo.at/termtext v1.2.0/go.mod h1:0BcvPG9CB8vjIMflLVU4Xy4+HsoIdUKTfo+GLOWYF8A=
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ golang.org/x/sys/unix
# zgo.at/acidtab v1.0.0
## explicit; go 1.16
zgo.at/acidtab
# zgo.at/termtext v1.1.0
# zgo.at/termtext v1.2.0
## explicit; go 1.16
zgo.at/termtext
6 changes: 4 additions & 2 deletions vendor/zgo.at/termtext/termtext.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ func WordWrap(s string, w int, prefix string) string {
/// Last word.
if lineLen > 0 {
if lineLen > w {
b.Truncate(b.Len() - 1) /// Trailing space.
b.WriteByte('\n')
if b.Len() > 0 {
b.Truncate(b.Len() - 1) /// Trailing space.
b.WriteByte('\n')
}
b.WriteString(prefix)
}
b.WriteString(word.String())
Expand Down

0 comments on commit 62e86a9

Please sign in to comment.