mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
Trying not to invent the wheel
This commit is contained in:
parent
2eb00ee11a
commit
4181cd1c42
1 changed files with 1 additions and 5 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -26,10 +25,7 @@ func List() []*Caplet {
|
|||
|
||||
for _, fileName := range append(files, files2...) {
|
||||
if _, err := os.Stat(fileName); err == nil {
|
||||
base := strings.Replace(fileName, searchPath+"/", "", -1)
|
||||
if runtime.GOOS == "windows" {
|
||||
base = strings.Replace(fileName, searchPath+"\\", "", -1)
|
||||
}
|
||||
base := strings.Replace(fileName, searchPath+string(os.PathSeparator), "", -1)
|
||||
base = strings.Replace(base, Suffix, "", -1)
|
||||
|
||||
if err, caplet := Load(base); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue