mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
refact: refactored several strings.Trim calls to core.Trim
This commit is contained in:
parent
5189068cd3
commit
ca9f4f0945
10 changed files with 35 additions and 23 deletions
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/core"
|
||||
)
|
||||
|
||||
type Module interface {
|
||||
|
@ -62,7 +64,7 @@ func (m SessionModule) ListParam(name string) (err error, values []string) {
|
|||
} else {
|
||||
parts := strings.Split(list, ",")
|
||||
for _, part := range parts {
|
||||
part = strings.Trim(part, "\t\n\r ")
|
||||
part = core.Trim(part)
|
||||
if part != "" {
|
||||
values = append(values, part)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue