mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -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,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"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue