File: writer.go

package info (click to toggle)
golang-github-jedib0t-go-pretty 6.5.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,700 kB
  • sloc: makefile: 28; sh: 14
file content (26 lines) | stat: -rw-r--r-- 520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package list

import "io"

// Writer declares the interfaces that can be used to set up and render a list.
type Writer interface {
	AppendItem(item interface{})
	AppendItems(items []interface{})
	Indent()
	Length() int
	Render() string
	RenderHTML() string
	RenderMarkdown() string
	Reset()
	SetHTMLCSSClass(cssClass string)
	SetOutputMirror(mirror io.Writer)
	SetStyle(style Style)
	Style() *Style
	UnIndent()
	UnIndentAll()
}

// NewWriter initializes and returns a Writer.
func NewWriter() Writer {
	return &List{}
}