formatter

package
v0.0.0-...-b7f917f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2017 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter interface {
	FormatTokens(w io.Writer, tokens golightan.Tokens)
	Format(w io.Writer, token golightan.Token)
}

func Factory

func Factory(f, style string) (Formatter, error)

type HtmlFormat

type HtmlFormat struct {
	Style string
}

func NewHtmlFormat

func NewHtmlFormat(style string) HtmlFormat

func (HtmlFormat) Format

func (f HtmlFormat) Format(w io.Writer, token golightan.Token)

func (HtmlFormat) FormatTokens

func (f HtmlFormat) FormatTokens(w io.Writer, tokens golightan.Tokens)

type RawTokenFormat

type RawTokenFormat struct {
}

func NewRawTokenFormat

func NewRawTokenFormat() RawTokenFormat

func (RawTokenFormat) Format

func (f RawTokenFormat) Format(w io.Writer, token golightan.Token)

func (RawTokenFormat) FormatTokens

func (f RawTokenFormat) FormatTokens(w io.Writer, tokens golightan.Tokens)

type TerminalFormat

type TerminalFormat struct {
	// contains filtered or unexported fields
}

func NewTerminalFormat

func NewTerminalFormat() TerminalFormat

func (TerminalFormat) Format

func (f TerminalFormat) Format(w io.Writer, token golightan.Token)

func (TerminalFormat) FormatTokens

func (f TerminalFormat) FormatTokens(w io.Writer, tokens golightan.Tokens)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL