funcmaps

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package funcmaps provides template functions for code and documentation generation.

This package contains all template helper functions used by both the code generator (for assert/require packages) and the documentation generator (for markdown docs).

The main entry point is FuncMap(), which returns a complete template.FuncMap with all available functions registered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMarkdown

func FormatMarkdown(in string) string

FormatMarkdown carries out a formatting of inline markdown in comments that handles:

  1. Reference-style markdown links: [text]: url
  2. Godoc-style links: errors.Is, testing.T, etc.

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns the complete template function map for code and documentation generation.

func PrintReturns

func PrintReturns(vars model.Parameters) string

PrintReturns print a collection of model.Parameters as values returned by a function.

func Titleize

func Titleize(in string) string

Titleize transform a string into a title, upper-casing the first letter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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