mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
make import statement clean
Signed-off-by: xuchunming1 <xuchunming@jd.com>
This commit is contained in:
parent
c1770b3aa6
commit
9020c53820
1 changed files with 8 additions and 6 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue