examples

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(out io.Writer, errOut io.Writer, args []string, exitFn func(int), name string, render Renderer)

Main runs one focused example, reporting any error and delegating exit handling.

func RenderAll

func RenderAll(out io.Writer, printer *laslig.Printer) error

RenderAll writes the aggregate walkthrough used by mage demo.

func RenderCodeBlock

func RenderCodeBlock(_ io.Writer, printer *laslig.Printer) error

RenderCodeBlock demonstrates the CodeBlock primitive.

func RenderGotestout

func RenderGotestout(out io.Writer, printer *laslig.Printer) error

RenderGotestout demonstrates the focused gotestout example.

func RenderKV

func RenderKV(_ io.Writer, printer *laslig.Printer) error

RenderKV demonstrates the KV primitive.

func RenderList

func RenderList(_ io.Writer, printer *laslig.Printer) error

RenderList demonstrates the List primitive.

func RenderLogBlock

func RenderLogBlock(_ io.Writer, printer *laslig.Printer) error

RenderLogBlock demonstrates the LogBlock primitive.

func RenderMageCheckPreview

func RenderMageCheckPreview(out io.Writer, printer *laslig.Printer) error

RenderMageCheckPreview demonstrates the repository-style Mage integration.

func RenderMarkdown

func RenderMarkdown(_ io.Writer, printer *laslig.Printer) error

RenderMarkdown demonstrates the Markdown primitive.

func RenderNotice

func RenderNotice(_ io.Writer, printer *laslig.Printer) error

RenderNotice demonstrates the Notice primitive.

func RenderPanel

func RenderPanel(_ io.Writer, printer *laslig.Printer) error

RenderPanel demonstrates the Panel primitive.

func RenderParagraph

func RenderParagraph(_ io.Writer, printer *laslig.Printer) error

RenderParagraph demonstrates the Paragraph primitive.

func RenderRecord

func RenderRecord(_ io.Writer, printer *laslig.Printer) error

RenderRecord demonstrates the Record primitive.

func RenderSection

func RenderSection(_ io.Writer, printer *laslig.Printer) error

RenderSection demonstrates how Section creates document headings and owned blocks.

func RenderSpinner added in v0.2.0

func RenderSpinner(out io.Writer, printer *laslig.Printer) error

RenderSpinner demonstrates the transient Spinner helper.

func RenderStatusLine

func RenderStatusLine(_ io.Writer, printer *laslig.Printer) error

RenderStatusLine demonstrates the StatusLine primitive.

func RenderTable

func RenderTable(_ io.Writer, printer *laslig.Printer) error

RenderTable demonstrates the Table primitive.

func Run

func Run(out io.Writer, args []string, name string, render Renderer) error

Run parses the common example flags and renders one shared example.

func StylePolicyForMode

func StylePolicyForMode(mode laslig.Mode) laslig.StylePolicy

StylePolicyForMode converts one resolved printer mode back into a style policy for helpers that only accept a Policy.

Types

type Renderer

type Renderer func(io.Writer, *laslig.Printer) error

Renderer writes one runnable example to the provided writer with one prepared printer.

Jump to

Keyboard shortcuts

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