Help us shape the future of Go! Take the 2026 Go Developer Survey

markdown

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(t *template.Template, data any) (string, error)

func Parse

func Parse(name, text string) *template.Template

Parse makes {{template "credential" .}} available to text, which renders an internal/auth.CredentialStatus.

func Render

func Render(text string, width int) (string, error)

Render is for a full-screen prompt. It uses glamour's dark style unless GLAMOUR_STYLE names another, and wraps at maxWidth at most.

func RenderInline

func RenderInline(text string) string

RenderInline takes only a built-in glamour style from GLAMOUR_STYLE, unlike Render: it has to change the style's margin, so a GLAMOUR_STYLE that names a style file gets the dark style.

func Write

func Write(w io.Writer, t *template.Template, data any) error

Write renders the Markdown where color.Output allows any styling, and writes it as it is otherwise. It wraps at the narrowest width that takes no more lines than the terminal's does, because glamour stretches a table to the width it wraps at, and a short table reads badly across a wide terminal. Forced color without a terminal takes maxWidth for the terminal's width.

Types

This section is empty.

Jump to

Keyboard shortcuts

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