rundoc

package
v0.0.0-...-16bf92b Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCMDMap = LangExecCMDMap{

	"sh": buildStdinCMDFunc("sh"),
	"text": func(ctx context.Context, script []byte) ([]byte, error) {
		return script, nil
	},
}

Functions

func RenderDoc

func RenderDoc(w io.Writer, doc *Rundoc)

Types

type CMDFunc

type CMDFunc func(context.Context, []byte) ([]byte, error)

type HTMLRenderer

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

func NewHTMLRenderer

func NewHTMLRenderer() *HTMLRenderer

func (*HTMLRenderer) RenderFooter

func (r *HTMLRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node)

func (*HTMLRenderer) RenderHeader

func (r *HTMLRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node)

func (*HTMLRenderer) RenderNode

func (r *HTMLRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus

type Handler

type Handler struct {
	RootFS fs.FS
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(rootDir fs.FS) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type LangExecCMDMap

type LangExecCMDMap map[string]CMDFunc

type Rundoc

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

func Parse

func Parse(input []byte) (*Rundoc, error)

Jump to

Keyboard shortcuts

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