configdoc

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FieldDefault = "# Default"
	FieldExample = "# Example"

	TokenAdvanced = "**ADVANCED**"
)

Variables

This section is empty.

Functions

func DefaultsOnly added in v0.9.5

func DefaultsOnly(r io.Reader, cfg any, decode func(io.Reader, any) error) error

DefaultsOnly reads only the default values from a docs TOML file and decodes in to cfg. Fields without defaults will set to zero values. Arrays of tables are ignored.

func Generate

func Generate(toml, header, example string, extendedDescriptions map[string]string) (string, error)

Generate returns MarkDown documentation generated from the TOML string. - Each field but include a trailing comment of either FieldDefault or FieldExample. - If a description begins with TokenAdvanced, then a warning will be included. - The markdown wil begin with the header, followed by the example - Extended descriptions can be applied to top level tables

Types

This section is empty.

Jump to

Keyboard shortcuts

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