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

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

View file

@ -4,7 +4,6 @@ import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/evilsocket/bettercap-ng/core"
)
@ -57,7 +56,7 @@ func (f LinuxFirewall) IsForwardingEnabled() bool {
if out, err := ioutil.ReadFile(IPV4ForwardingFile); err != nil {
return false
} else {
return strings.Trim(string(out), "\r\n\t ") == "1"
return core.Trim(string(out)) == "1"
}
}