Skip to content

Commit

Permalink
make import statement clean
Browse files Browse the repository at this point in the history
Signed-off-by: xuchunming1 <[email protected]>
  • Loading branch information
xuchunming1 committed Jul 1, 2021
1 parent c1770b3 commit 9020c53
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions session/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ package session

import (
"fmt"
"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"
"io/ioutil"
"path/filepath"
"regexp"
"strings"
)

// require("telegram.js")
Expand All @@ -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",
Expand Down

0 comments on commit 9020c53

Please sign in to comment.