Documentation ¶
Overview ¶
Package core contains basic utility functions.
Index ¶
- Constants
- Variables
- func AsTable(w io.Writer, columns []string, rows [][]string)
- func Blue(s string) string
- func Bold(s string) string
- func CommaSplit(csv string) []string
- func Dim(s string) string
- func Exec(executable string, args []string) (string, error)
- func ExecSilent(executable string, args []string) (string, error)
- func Exists(path string) bool
- func ExpandPath(path string) (string, error)
- func Green(s string) string
- func InitSwag(disableColors bool)
- func Red(s string) string
- func Shell(cmd string) (string, error)
- func Trim(s string) string
- func TrimRight(s string) string
- func UniqueInts(a []int, sorted bool) []int
- func W(e, s string) string
- func Yellow(s string) string
- type Alignment
- type Options
Constants ¶
View Source
const ( Name = "bettercap" Version = "2.3.1" Author = "Simone 'evilsocket' Margaritelli" Website = "https://bettercap.org/" )
View Source
const ( DEBUG = iota INFO IMPORTANT WARNING ERROR FATAL )
View Source
const ( AlignLeft = Alignment(0) AlignCenter = Alignment(1) AlignRight = Alignment(2) )
Variables ¶
View Source
var ( BOLD = "\033[1m" DIM = "\033[2m" RED = "\033[31m" GREEN = "\033[32m" BLUE = "\033[34m" YELLOW = "\033[33m" FG_BLACK = "\033[30m" FG_WHITE = "\033[97m" BG_DGRAY = "\033[100m" BG_RED = "\033[41m" BG_GREEN = "\033[42m" BG_YELLOW = "\033[43m" BG_LBLUE = "\033[104m" RESET = "\033[0m" 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, } HasColors = true )
Functions ¶
func CommaSplit ¶
func ExpandPath ¶
func UniqueInts ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.