mirror of
https://github.com/bettercap/bettercap
synced 2025-07-31 04:00:09 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
5dd248cef8
commit
973c88fd31
1 changed files with 8 additions and 1 deletions
|
@ -98,7 +98,14 @@ func (mod *Discovery) getRow(e *network.Endpoint, withMeta bool) [][]string {
|
|||
|
||||
metas := []string{}
|
||||
e.Meta.Each(func(name string, value interface{}) {
|
||||
metas = append(metas, fmt.Sprintf("%s:%s", tui.Green(name), tui.Yellow(value.(string))))
|
||||
s := ""
|
||||
if sv, ok := value.(string); ok {
|
||||
s = sv
|
||||
} else {
|
||||
s = fmt.Sprintf("%+v", value)
|
||||
}
|
||||
|
||||
metas = append(metas, fmt.Sprintf("%s:%s", tui.Green(name), tui.Yellow(s)))
|
||||
})
|
||||
sort.Strings(metas)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue