refact: refactored several strings.Trim calls to core.Trim

This commit is contained in:
evilsocket 2018-02-05 18:09:59 +01:00
parent 5189068cd3
commit ca9f4f0945
10 changed files with 35 additions and 23 deletions

View file

@ -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)
}