From 9020c53820213f836fb90a6377d7604c10141c6b Mon Sep 17 00:00:00 2001 From: xuchunming1 Date: Thu, 1 Jul 2021 15:18:12 +0800 Subject: [PATCH] make import statement clean Signed-off-by: xuchunming1 --- session/script.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/session/script.go b/session/script.go index 7306bef6..15efcfd5 100644 --- a/session/script.go +++ b/session/script.go @@ -2,15 +2,17 @@ package session import ( "fmt" - "github.com/bettercap/bettercap/caplets" - _ "github.com/bettercap/bettercap/js" - "github.com/evilsocket/islazy/fs" - "github.com/evilsocket/islazy/plugin" - "github.com/evilsocket/islazy/str" "io/ioutil" "path/filepath" "regexp" "strings" + + "github.com/bettercap/bettercap/caplets" + _ "github.com/bettercap/bettercap/js" + + "github.com/evilsocket/islazy/fs" + "github.com/evilsocket/islazy/plugin" + "github.com/evilsocket/islazy/str" ) // require("telegram.js") @@ -37,7 +39,7 @@ func preprocess(basePath string, code string, level int) (string, error) { filepath.Join(caplets.InstallBase, fileName), } - if strings.Contains(fileName, ".js") == false { + if !strings.Contains(fileName, ".js") { searchPaths = append(searchPaths, []string{ filepath.Join(basePath, fileName) + ".js", filepath.Join(caplets.InstallBase, fileName) + ".js",