refact: refactored to use islazy and updated deps

This commit is contained in:
evilsocket 2018-10-10 19:00:25 +02:00
parent a2b3ee79fb
commit d070445225
238 changed files with 12662 additions and 1586 deletions

View file

@ -9,7 +9,7 @@ import (
// "net/url"
"strings"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/islazy/str"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
@ -39,7 +39,7 @@ func UPNPGetMeta(pkt gopacket.Packet) map[string]string {
meta := make(map[string]string)
for name, values := range response.Header {
if name != "Cache-Control" && len(values) > 0 {
if data := core.Trim(strings.Join(values, ", ")); data != "" {
if data := str.Trim(strings.Join(values, ", ")); data != "" {
meta["upnp:"+name] = data
}