Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Red foreground Red = color.FgRed // Blue Blue foreground Blue = color.FgBlue // Yellow Yellow foreground Yellow = color.FgYellow // Green Green foreground Green = color.FgGreen // Cyan foreground Cyan = color.FgCyan // Magenta foreground Magenta = color.FgMagenta // White foreground White = color.FgWhite // Black foreground Black = color.FgBlack // Bold text Bold = color.Bold // Italic text Italic = color.Italic // Underline text Underline = color.Underline // BlinkRapid text BlinkRapid = color.BlinkRapid // BlinkSlow text BlinkSlow = color.BlinkSlow // BgRed background BgRed = color.BgRed // BgBlue background BgBlue = color.BgBlue // BgYellow background BgYellow = color.BgYellow // BgGreen background BgGreen = color.BgGreen // BgCyan background BgCyan = color.BgCyan // BgMagenta background BgMagenta = color.BgMagenta // BgWhite background BgWhite = color.BgWhite // BgBlack background BgBlack = color.BgBlack )
Variables ¶
View Source
var ConfigDefault = Config{ Namespace: "DEBUG", Style: []color.Attribute{color.FgCyan}, ShowInfo: false, Out: os.Stderr, Pretty: false, }
ConfigDefault default config. Sets foreground color to green and shows additional info. DEBUG namespace.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Namespace Namespace to identify different debug statements // Optional. Default: DEBUG Namespace string // Style Array of styles for debug logging // Optional. Default: []color.Attribute{Green} Style []color.Attribute // ShowInfo Show additional information like file name, line number and function name // Optional. Default: false ShowInfo bool // Out controls where something is being logged. // Optional. Default: os.Stderr Out io.Writer // Pretty print objects // Optional. Default: false Pretty bool }
Config debug options
Click to show internal directories.
Click to hide internal directories.