Documentation
¶
Index ¶
- func WCRuneWidth(r rune) int
- func WCStringWidth(s string) int
- type HtmlHead
- type HtmlWriter
- func (w *HtmlWriter) BeginBody()
- func (w *HtmlWriter) BeginHTML()
- func (w *HtmlWriter) BeginList()
- func (w *HtmlWriter) BeginSection(s any)
- func (w *HtmlWriter) BeginTable(columns ...any)
- func (w *HtmlWriter) Code(a any) string
- func (w *HtmlWriter) DoubleQuoted(a any) string
- func (w *HtmlWriter) EndBODY()
- func (w *HtmlWriter) EndHTML()
- func (w *HtmlWriter) EndList()
- func (w *HtmlWriter) EndSection()
- func (w *HtmlWriter) EndTable()
- func (w *HtmlWriter) Head(h *HtmlHead)
- func (w *HtmlWriter) Link(a any, url string) string
- func (w *HtmlWriter) ListItem(a any)
- func (w *HtmlWriter) Para(s any)
- func (w *HtmlWriter) Scramble(a any) string
- func (w *HtmlWriter) Section(s any)
- func (w *HtmlWriter) SingleQuoted(a any) string
- func (w *HtmlWriter) TableRow(cells ...any)
- func (w *HtmlWriter) WriteBOM()
- type MarkdownWriter
- func (w *MarkdownWriter) BeginList()
- func (w *MarkdownWriter) BeginSection(a any)
- func (w *MarkdownWriter) BeginTable(columns ...any)
- func (w *MarkdownWriter) Code(a any) string
- func (w *MarkdownWriter) DoubleQuoted(a any) string
- func (w *MarkdownWriter) EndList()
- func (w *MarkdownWriter) EndSection()
- func (w *MarkdownWriter) EndTable()
- func (w *MarkdownWriter) Link(a any, url string) string
- func (w *MarkdownWriter) ListItem(a any)
- func (w *MarkdownWriter) Para(a any)
- func (w *MarkdownWriter) Scramble(a any) string
- func (w *MarkdownWriter) Section(a any)
- func (w *MarkdownWriter) SingleQuoted(a any) string
- func (w *MarkdownWriter) TableRow(cells ...any)
- type TextWriter
- func (w *TextWriter) BeginList()
- func (w *TextWriter) BeginSection(a any)
- func (w *TextWriter) BeginTable(columns ...any)
- func (w *TextWriter) Code(a any) string
- func (w *TextWriter) DoubleQuoted(a any) string
- func (w *TextWriter) EndList()
- func (w *TextWriter) EndSection()
- func (w *TextWriter) EndTable()
- func (w *TextWriter) Link(a any, url string) string
- func (w *TextWriter) ListItem(a any)
- func (w *TextWriter) Para(a any)
- func (w *TextWriter) Scramble(a any) string
- func (w *TextWriter) Section(a any)
- func (w *TextWriter) SingleQuoted(a any) string
- func (w *TextWriter) TableRow(cells ...any)
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WCRuneWidth ¶
func WCStringWidth ¶
Types ¶
type HtmlWriter ¶
type HtmlWriter struct {
// contains filtered or unexported fields
}
func NewHtml ¶
func NewHtml(out io.Writer) *HtmlWriter
func (*HtmlWriter) BeginBody ¶
func (w *HtmlWriter) BeginBody()
func (*HtmlWriter) BeginHTML ¶
func (w *HtmlWriter) BeginHTML()
func (*HtmlWriter) BeginList ¶
func (w *HtmlWriter) BeginList()
func (*HtmlWriter) BeginSection ¶
func (w *HtmlWriter) BeginSection(s any)
func (*HtmlWriter) BeginTable ¶
func (w *HtmlWriter) BeginTable(columns ...any)
func (*HtmlWriter) Code ¶
func (w *HtmlWriter) Code(a any) string
func (*HtmlWriter) DoubleQuoted ¶
func (w *HtmlWriter) DoubleQuoted(a any) string
func (*HtmlWriter) EndBODY ¶
func (w *HtmlWriter) EndBODY()
func (*HtmlWriter) EndHTML ¶
func (w *HtmlWriter) EndHTML()
func (*HtmlWriter) EndList ¶
func (w *HtmlWriter) EndList()
func (*HtmlWriter) EndSection ¶
func (w *HtmlWriter) EndSection()
func (*HtmlWriter) EndTable ¶
func (w *HtmlWriter) EndTable()
func (*HtmlWriter) Head ¶
func (w *HtmlWriter) Head(h *HtmlHead)
func (*HtmlWriter) ListItem ¶
func (w *HtmlWriter) ListItem(a any)
func (*HtmlWriter) Para ¶
func (w *HtmlWriter) Para(s any)
func (*HtmlWriter) Scramble ¶
func (w *HtmlWriter) Scramble(a any) string
func (*HtmlWriter) Section ¶
func (w *HtmlWriter) Section(s any)
func (*HtmlWriter) SingleQuoted ¶
func (w *HtmlWriter) SingleQuoted(a any) string
func (*HtmlWriter) TableRow ¶
func (w *HtmlWriter) TableRow(cells ...any)
func (*HtmlWriter) WriteBOM ¶
func (w *HtmlWriter) WriteBOM()
type MarkdownWriter ¶
type MarkdownWriter struct {
// contains filtered or unexported fields
}
func NewMarkdown ¶
func NewMarkdown(out io.Writer) *MarkdownWriter
func (*MarkdownWriter) BeginList ¶
func (w *MarkdownWriter) BeginList()
func (*MarkdownWriter) BeginSection ¶
func (w *MarkdownWriter) BeginSection(a any)
func (*MarkdownWriter) BeginTable ¶
func (w *MarkdownWriter) BeginTable(columns ...any)
func (*MarkdownWriter) Code ¶
func (w *MarkdownWriter) Code(a any) string
func (*MarkdownWriter) DoubleQuoted ¶
func (w *MarkdownWriter) DoubleQuoted(a any) string
func (*MarkdownWriter) EndList ¶
func (w *MarkdownWriter) EndList()
func (*MarkdownWriter) EndSection ¶
func (w *MarkdownWriter) EndSection()
func (*MarkdownWriter) EndTable ¶
func (w *MarkdownWriter) EndTable()
func (*MarkdownWriter) ListItem ¶
func (w *MarkdownWriter) ListItem(a any)
func (*MarkdownWriter) Para ¶
func (w *MarkdownWriter) Para(a any)
func (*MarkdownWriter) Scramble ¶
func (w *MarkdownWriter) Scramble(a any) string
func (*MarkdownWriter) Section ¶
func (w *MarkdownWriter) Section(a any)
func (*MarkdownWriter) SingleQuoted ¶
func (w *MarkdownWriter) SingleQuoted(a any) string
func (*MarkdownWriter) TableRow ¶
func (w *MarkdownWriter) TableRow(cells ...any)
type TextWriter ¶
type TextWriter struct {
// contains filtered or unexported fields
}
func NewText ¶
func NewText(out io.Writer) *TextWriter
func (*TextWriter) BeginList ¶
func (w *TextWriter) BeginList()
func (*TextWriter) BeginSection ¶
func (w *TextWriter) BeginSection(a any)
func (*TextWriter) BeginTable ¶
func (w *TextWriter) BeginTable(columns ...any)
func (*TextWriter) Code ¶
func (w *TextWriter) Code(a any) string
func (*TextWriter) DoubleQuoted ¶
func (w *TextWriter) DoubleQuoted(a any) string
func (*TextWriter) EndList ¶
func (w *TextWriter) EndList()
func (*TextWriter) EndSection ¶
func (w *TextWriter) EndSection()
func (*TextWriter) EndTable ¶
func (w *TextWriter) EndTable()
func (*TextWriter) ListItem ¶
func (w *TextWriter) ListItem(a any)
func (*TextWriter) Para ¶
func (w *TextWriter) Para(a any)
func (*TextWriter) Scramble ¶
func (w *TextWriter) Scramble(a any) string
func (*TextWriter) Section ¶
func (w *TextWriter) Section(a any)
func (*TextWriter) SingleQuoted ¶
func (w *TextWriter) SingleQuoted(a any) string
func (*TextWriter) TableRow ¶
func (w *TextWriter) TableRow(cells ...any)
type Writer ¶
type Writer interface {
// writing
Para(any)
Section(any)
BeginSection(any)
EndSection()
BeginTable(columns ...any)
TableRow(cells ...any)
EndTable()
BeginList()
ListItem(any)
EndList()
// formatting
Scramble(a any) string
Link(a any, url string) string
Code(any) string
SingleQuoted(any) string
DoubleQuoted(any) string
}
Writer is the writing API common for all supported outputs
Click to show internal directories.
Click to hide internal directories.