render

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright © 2022 Roberto Hidalgo <chinampa@un.rob.mx> SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var TemplateCommandHelp *template.Template

TemplateCommandHelp holds a template for rendering command help.

View Source
var TemplateFuncs = template.FuncMap{
	"contains":   strings.Contains,
	"hasSuffix":  strings.HasSuffix,
	"hasPrefix":  strings.HasPrefix,
	"replace":    strings.ReplaceAll,
	"toUpper":    strings.ToUpper,
	"toLower":    strings.ToLower,
	"trim":       strings.TrimSpace,
	"trimSuffix": strings.TrimSuffix,
	"trimPrefix": strings.TrimPrefix,
	"list":       func(args ...any) []any { return args },
}

TemplateFuncs is a FuncMap with aliases to the strings package.

Functions

func HelpTemplate

func HelpTemplate(executableName string) *template.Template

func Markdown

func Markdown(content []byte, withColor bool) ([]byte, error)

Markdown renders markdown-formatted content to the tty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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