mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
refact: refactored core constants into swag.go
This commit is contained in:
parent
7b42da1bf3
commit
2cda9c8c67
5 changed files with 49 additions and 61 deletions
28
core/swag.go
28
core/swag.go
|
@ -25,6 +25,34 @@ const (
|
|||
const ON = GREEN + "✔" + RESET
|
||||
const OFF = RED + "✘" + RESET
|
||||
|
||||
const (
|
||||
DEBUG = iota
|
||||
INFO
|
||||
IMPORTANT
|
||||
WARNING
|
||||
ERROR
|
||||
FATAL
|
||||
)
|
||||
|
||||
var (
|
||||
LogLabels = map[int]string{
|
||||
DEBUG: "dbg",
|
||||
INFO: "inf",
|
||||
IMPORTANT: "imp",
|
||||
WARNING: "war",
|
||||
ERROR: "err",
|
||||
FATAL: "!!!",
|
||||
}
|
||||
LogColors = map[int]string{
|
||||
DEBUG: DIM + FG_BLACK + BG_DGRAY,
|
||||
INFO: FG_WHITE + BG_GREEN,
|
||||
IMPORTANT: FG_WHITE + BG_LBLUE,
|
||||
WARNING: FG_WHITE + BG_YELLOW,
|
||||
ERROR: FG_WHITE + BG_RED,
|
||||
FATAL: FG_WHITE + BG_RED + BOLD,
|
||||
}
|
||||
)
|
||||
|
||||
// W for Wrap
|
||||
func W(e, s string) string {
|
||||
return e + s + RESET
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue