page

package
v0.0.0-...-e4c3281 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(p Parser, plat platform.Platform)

Parse takes a Parser interface and the current platform of the document that is to be parsed and the parses the internal lines writing to the internal buffer of the parser.

Types

type Page

type Page interface {
	Print()
}

Page provides the Print method for the final generated output of a TLDR page.

func New

func New(file *os.File, plat platform.Platform) Page

New creates a parsed TLDR page. It parsers the provided file and returns the parsed TLDR page.

type Parser

type Parser interface {
	Write(p []byte)
	Lines() [][]byte
	Header() []byte
	Description(line []byte) []byte
	Example(line []byte) []byte
	Syntax(line []byte) []byte
	Variable(line []byte) []byte
}

Parser provides the interface for parsing a TLDR page.

Jump to

Keyboard shortcuts

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