mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -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 (
|
import (
|
||||||
"fmt"
|
"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"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"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")
|
// require("telegram.js")
|
||||||
|
@ -37,7 +39,7 @@ func preprocess(basePath string, code string, level int) (string, error) {
|
||||||
filepath.Join(caplets.InstallBase, fileName),
|
filepath.Join(caplets.InstallBase, fileName),
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(fileName, ".js") == false {
|
if !strings.Contains(fileName, ".js") {
|
||||||
searchPaths = append(searchPaths, []string{
|
searchPaths = append(searchPaths, []string{
|
||||||
filepath.Join(basePath, fileName) + ".js",
|
filepath.Join(basePath, fileName) + ".js",
|
||||||
filepath.Join(caplets.InstallBase, fileName) + ".js",
|
filepath.Join(caplets.InstallBase, fileName) + ".js",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue