minor fix
This commit is contained in:
parent
b6ce1f8b29
commit
f492e2cd84
1 changed files with 1 additions and 1 deletions
|
|
@ -289,11 +289,11 @@ func splitLongString(input string, maxLength int) []string {
|
|||
currentLength := 0
|
||||
|
||||
for i, line := range lines {
|
||||
lineLength := len(line)
|
||||
if i < len(lines)-1 {
|
||||
lineLength++
|
||||
}
|
||||
|
||||
lineLength := len(line)
|
||||
if currentLength+lineLength > maxLength {
|
||||
if currentChunk.Len() > 0 {
|
||||
result = append(result, currentChunk.String())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue