Skip to content

Commit c0ebeab

Browse files
committed
fix: ignore space
1 parent 30d3b1d commit c0ebeab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/lintersutil/lintersutil.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package lintersutil
33
import (
44
"os"
55
"path/filepath"
6+
"strings"
67

78
"github.com/qiniu/x/log"
89
)
@@ -11,6 +12,10 @@ import (
1112
func LimitJoin(str []string, length int) string {
1213
var result string
1314
for _, s := range str {
15+
if strings.TrimSpace(s) == "" {
16+
continue
17+
}
18+
1419
if len(result)+len(s) > length {
1520
break
1621
}

0 commit comments

Comments
 (0)