mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 03:29:57 -07:00
Remove unnecessary fmt.Sprintf
the tui.Bold function already returning a string. There has not need to convert it ot string by using fmt.Sprintf
This commit is contained in:
parent
8ae28f4b3d
commit
1fee1f718d
1 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ func (mod *EventsStream) dumpForm(body []byte) string {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
value = v
|
value = v
|
||||||
}
|
}
|
||||||
form = append(form, fmt.Sprintf("%s", tui.Bold(tui.Red(value))))
|
form = append(form, tui.Bold(tui.Red(value)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "\n" + strings.Join(form, "&") + "\n"
|
return "\n" + strings.Join(form, "&") + "\n"
|
||||||
|
@ -113,7 +113,7 @@ func (mod *EventsStream) dumpJSON(body []byte) string {
|
||||||
if err := json.Indent(&buf, body, "", " "); err != nil {
|
if err := json.Indent(&buf, body, "", " "); err != nil {
|
||||||
pretty = string(body)
|
pretty = string(body)
|
||||||
} else {
|
} else {
|
||||||
pretty = string(buf.Bytes())
|
pretty = buf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
return "\n" + reJsonKey.ReplaceAllString(pretty, tui.Green(`$1:`)) + "\n"
|
return "\n" + reJsonKey.ReplaceAllString(pretty, tui.Green(`$1:`)) + "\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue