From 42311b9e8d1e2fa0260acb8e6edd0f147724eb9f Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sun, 11 Feb 2018 19:52:18 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- net/oui_compiled.go | 2 +- session/session_core_handlers.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/oui_compiled.go b/net/oui_compiled.go index 5f4beb1c..78297181 100644 --- a/net/oui_compiled.go +++ b/net/oui_compiled.go @@ -182,6 +182,7 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "net": &bintree{nil, map[string]*bintree{ "oui.dat": &bintree{netOuiDat, map[string]*bintree{}}, @@ -234,4 +235,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - diff --git a/session/session_core_handlers.go b/session/session_core_handlers.go index 8f23b5d1..811c10d7 100644 --- a/session/session_core_handlers.go +++ b/session/session_core_handlers.go @@ -253,7 +253,7 @@ func (s *Session) registerCoreHandlers() { readline.PcItem("set", readline.PcItemDynamic(func(prefix string) []string { prefix = core.Trim(prefix[3:]) varNames := []string{""} - for key, _ := range s.Env.Storage { + for key := range s.Env.Storage { if prefix == "" || strings.HasPrefix(key, prefix) == true { varNames = append(varNames, key) } @@ -295,7 +295,7 @@ func (s *Session) registerCoreHandlers() { readline.PcItem("alias", readline.PcItemDynamic(func(prefix string) []string { prefix = core.Trim(prefix[5:]) macs := []string{""} - for mac, _ := range s.Targets.Targets { + for mac := range s.Targets.Targets { if prefix == "" || strings.HasPrefix(mac, prefix) == true { macs = append(macs, mac) }