mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 11:01:07 +01:00
fix(rules): prevent appending empty parts in splitPipe function
This commit is contained in:
@@ -604,7 +604,9 @@ func splitPipe(s string) []string {
|
||||
|
||||
// drop trailing empty part.
|
||||
if start < len(s) {
|
||||
result = append(result, strings.TrimSpace(s[start:]))
|
||||
if part := strings.TrimSpace(s[start:]); part != "" {
|
||||
result = append(result, part)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user