Documentation
¶
Overview ¶
package reportstyle
Index ¶
Constants ¶
View Source
const ( // ascii string token Linefeed = "\n" Space = " " Empty = "" Separator = " : " Ok = "[OK]" Valid = "[VALID]" Fail = "[FAIL]" Alert = "[ALERT]" // ansi color terminal AnsiRed = "\033[2;91m" AnsiGreen = "\033[2;92m" AnsiYellow = "\033[2;93m" AnsiBlue = "\033[2;94m" AnsiMagenta = "\033[2;95m" AnsiCyan = "\033[2;96m" AnsiWhite = "\033[2;97m" AnsiGrey = "\033[2;90m" AnsiEnd = "\033[0m" // html color HtmlRed = "<a style=\"color:#FF0000\"><strong>" HtmlGreen = "<a style=\"color:#00FF00\"><strong>" HtmlEnd = "</strong></a>" )
const
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Style ¶
type Style struct {
Raw bool // add raw datasets
Start string // start object with
End string // end object with
Ok string // string Ok statement
Valid string // strong valid statement
Fail string // strong fail statement
Alert string // strong alert statement
L1 string // table start & style 1
L2 string // table style 2
L3 string // table style 3 ( multiline style 2 )
L4 string // table style 4
LE string // table end
PS string // preformated start
PE string // preformated end
SaniFunc func(string) string // sanitizer function for preformated blocks
}
Style defines the output style, feel free to design your own within your app, see example defaults below
func StyleAnsi ¶
func StyleAnsi() *Style
StyleAnsi ... Returns as example a Ansi Color Terminal Report Style
func StyleHTML ¶
func StyleHTML() *Style
StyleHTML ... Returns as example a HTML/CSS Report Style for usage with any google compatible syntax highlighter css stylesheet
func StyleMarkdown ¶
func StyleMarkdown() *Style
StyleMarkdown ... Returns as example a [gh] Markdown Report Style
func StylePlain ¶
func StylePlain() *Style
StylePlain ... Returns a Default Plain Text Report Style [currently:alias]
Click to show internal directories.
Click to hide internal directories.