Documentation ¶
Index ¶
- Constants
- func Match(input string, pattern string) bool
- func New(name string) *slog.Logger
- func Request(log *slog.Logger) func(http.Handler) http.Handler
- type ColorTextHandler
- type Level
- type Text
- func (self Text) BlackBackground() Text
- func (self Text) BlackForeground() Text
- func (self Text) Blink() Text
- func (self Text) BlueBackground() Text
- func (self Text) BlueForeground() Text
- func (self Text) Bold() Text
- func (self Text) CyanBackground() Text
- func (self Text) CyanForeground() Text
- func (self Text) DefaultBackground() Text
- func (self Text) DefaultForeground() Text
- func (self Text) Dim() Text
- func (self Text) EraseLine() Text
- func (self Text) EraseLineEnd() Text
- func (self Text) EraseLineStart() Text
- func (self Text) EraseScreen() Text
- func (self Text) EraseScreenEnd() Text
- func (self Text) EraseScreenStart() Text
- func (self Text) GrayForeground() Text
- func (self Text) GreenBackground() Text
- func (self Text) GreenForeground() Text
- func (self Text) Hide() Text
- func (self Text) Italic() Text
- func (self Text) MagentaBackground() Text
- func (self Text) MagentaForeground() Text
- func (self Text) PadLeft(n int) Text
- func (self Text) PadRight(n int) Text
- func (self Text) RedBackground() Text
- func (self Text) RedForeground() Text
- func (self Text) Reverse() Text
- func (self Text) Strike() Text
- func (self Text) String() string
- func (self Text) Underline() Text
- func (self Text) WhiteBackground() Text
- func (self Text) WhiteForeground() Text
- func (self Text) YellowBackground() Text
- func (self Text) YellowForeground() Text
Constants ¶
View Source
const ( ANSI_CODE_RESET string = "\x1b[0m" ANSI_CODE_BOLD string = "\x1b[1m" ANSI_CODE_BOLD_RESET string = "\x1b[22m" ANSI_CODE_DIM string = "\x1b[2m" ANSI_CODE_DIM_RESET string = "\x1b[22m" ANSI_CODE_ITALIC string = "\x1b[3m" ANSI_CODE_ITALIC_RESET string = "\x1b[23m" ANSI_CODE_UNDERLINE string = "\x1b[4m" ANSI_CODE_UNDERLINE_RESET string = "\x1b[24m" ANSI_CODE_BLINK string = "\x1b[5m" ANSI_CODE_BLINK_RESET string = "\x1b[25m" ANSI_CODE_REVERSE string = "\x1b[7m" ANSI_CODE_REVERSE_RESET string = "\x1b[27m" ANSI_CODE_HIDE string = "\x1b[8m" ANSI_CODE_HIDE_RESET string = "\x1b[28m" ANSI_CODE_STRIKE string = "\x1b[9m" ANSI_CODE_STRIKE_RESET string = "\x1b[29m" ANSI_CODE_FOREGROUND_RESET string = "\x1b[0m" ANSI_CODE_BACKGROUND_RESET string = "\x1b[0m" ANSI_CODE_FOREGROUND_BLACK string = "\x1b[30m" ANSI_CODE_BACKGROUND_BLACK string = "\x1b[40m" ANSI_CODE_FOREGROUND_RED string = "\x1b[31m" ANSI_CODE_BACKGROUND_RED string = "\x1b[41m" ANSI_CODE_FOREGROUND_GREEN string = "\x1b[32m" ANSI_CODE_BACKGROUND_GREEN string = "\x1b[42m" ANSI_CODE_FOREGROUND_YELLOW string = "\x1b[33m" ANSI_CODE_BACKGROUND_YELLOW string = "\x1b[43m" ANSI_CODE_FOREGROUND_BLUE string = "\x1b[34m" ANSI_CODE_BACKGROUND_BLUE string = "\x1b[44m" ANSI_CODE_FOREGROUND_MAGENTA string = "\x1b[35m" ANSI_CODE_BACKGROUND_MAGENTA string = "\x1b[45m" ANSI_CODE_FOREGROUND_CYAN string = "\x1b[36m" ANSI_CODE_BACKGROUND_CYAN string = "\x1b[46m" ANSI_CODE_FOREGROUND_WHITE string = "\x1b[37m" ANSI_CODE_BACKGROUND_WHITE string = "\x1b[47m" ANSI_CODE_FOREGROUND_GRAY string = "\x1b[90m" ANSI_CODE_FOREGROUND_DEFAULT string = "\x1b[39m" ANSI_CODE_BACKGROUND_DEFAULT string = "\x1b[49m" ANSI_CODE_ERASE_SCREEN_END string = "\x1b[0Jm" ANSI_CODE_ERASE_SCREEN_START string = "\x1b[1Jm" ANSI_CODE_ERASE_SCREEN string = "\x1b[2Jm" ANSI_CODE_ERASE_LINE_END string = "\x1b[0K" ANSI_CODE_ERASE_LINE_START string = "\x1b[1K" ANSI_CODE_ERASE_LINE string = "\x1b[2K" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColorTextHandler ¶
type ColorTextHandler struct {
// contains filtered or unexported fields
}
func NewColorTextHandler ¶
func NewColorTextHandler(opts *slog.HandlerOptions) *ColorTextHandler
type Text ¶
type Text string
func (Text) BlackBackground ¶
func (Text) BlackForeground ¶
func (Text) BlueBackground ¶
func (Text) BlueForeground ¶
func (Text) CyanBackground ¶
func (Text) CyanForeground ¶
func (Text) DefaultBackground ¶
func (Text) DefaultForeground ¶
func (Text) EraseLineEnd ¶
func (Text) EraseLineStart ¶
func (Text) EraseScreen ¶
func (Text) EraseScreenEnd ¶
func (Text) EraseScreenStart ¶
func (Text) GrayForeground ¶
func (Text) GreenBackground ¶
func (Text) GreenForeground ¶
func (Text) MagentaBackground ¶
func (Text) MagentaForeground ¶
func (Text) RedBackground ¶
func (Text) RedForeground ¶
func (Text) WhiteBackground ¶
func (Text) WhiteForeground ¶
func (Text) YellowBackground ¶
func (Text) YellowForeground ¶
Click to show internal directories.
Click to hide internal directories.