mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
completed lint driven refactoring
This commit is contained in:
parent
e383e4d9b1
commit
557d7dbe17
8 changed files with 27 additions and 47 deletions
|
@ -37,7 +37,7 @@ func (s *Session) helpHandler(args []string, sess *Session) error {
|
|||
fmt.Printf(" "+core.Yellow(pad)+" : %s\n", h.Name, h.Description)
|
||||
}
|
||||
|
||||
fmt.Printf(core.Bold("\nModules\n\n"))
|
||||
fmt.Println(core.Bold("\nModules\n"))
|
||||
|
||||
maxLen = 0
|
||||
for _, m := range s.Modules {
|
||||
|
@ -85,13 +85,13 @@ func (s *Session) helpHandler(args []string, sess *Session) error {
|
|||
}
|
||||
|
||||
for _, h := range handlers {
|
||||
fmt.Printf(h.Help(maxLen))
|
||||
fmt.Print(h.Help(maxLen))
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
params := m.Parameters()
|
||||
if len(params) > 0 {
|
||||
fmt.Printf(" Parameters\n\n")
|
||||
fmt.Print(" Parameters\n\n")
|
||||
maxLen := 0
|
||||
for _, h := range params {
|
||||
len := len(h.Name)
|
||||
|
@ -101,7 +101,7 @@ func (s *Session) helpHandler(args []string, sess *Session) error {
|
|||
}
|
||||
|
||||
for _, p := range params {
|
||||
fmt.Printf(p.Help(maxLen))
|
||||
fmt.Print(p.Help(maxLen))
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ func (s *Session) helpHandler(args []string, sess *Session) error {
|
|||
|
||||
func (s *Session) activeHandler(args []string, sess *Session) error {
|
||||
for _, m := range s.Modules {
|
||||
if m.Running() == false {
|
||||
if !m.Running() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -343,8 +343,7 @@ func (s *Session) registerCoreHandlers() {
|
|||
prefix = "."
|
||||
}
|
||||
|
||||
files := []string{}
|
||||
files, _ = filepath.Glob(prefix + "*")
|
||||
files, _ := filepath.Glob(prefix + "*")
|
||||
return files
|
||||
})))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue