Documentation ¶
Index ¶
- Constants
- func ExtractComment(markup map[string]any) (ret []string, err error)
- func IsUnhandled(e error) bool
- func JoinLines(slice []any) (ret string, okay bool)
- func SliceBools(slice []any) ([]bool, bool)
- func SliceFloats(slice []any) ([]float64, bool)
- func SliceStrings(slice []any) ([]string, bool)
- func UserComment(markup map[string]any) (ret []string)
- type Message
- type Unhandled
Constants ¶
const ( Comment = "comment" Markup = "--" )
constants for the markup maps in the dl.
Variables ¶
This section is empty.
Functions ¶
func ExtractComment ¶ added in v0.24.6
extract a comment string or strings from the passed msg markup. returns nil if no comment existed. errors if some data existed that couldn't be interpreted.
func IsUnhandled ¶
func JoinLines ¶
type conversion: convert a slice of interfaces to a slice of strings joined with newlines.
func SliceBools ¶
type conversion: convert a slice containing bool values into a bool slice. returns false if any member of the slice isnt a bool
func SliceFloats ¶
type conversion: convert a slice containing float values into a float slice. returns false if any member of the slice isnt a float64
func SliceStrings ¶
type conversion: convert a slice containing string values into a string slice. returns false if any member of the slice isnt a string
func UserComment ¶
read a user comment from markup, normalizing it as an array of strings
Types ¶
type Message ¶
type Message struct { Key string // original specified text: "Sig:label:" Lede string // the leading part of the signature in lowercase Labels []string // parameter names sans colons; the first can be blank ( anonymous ) Args []any // the same length as labels Markup map[string]any // from map keys starting with "--"; stored stripped of the dashes. }
A decoding of a tapestry command. Commands on disk are stored as plain value maps containing a command signature and command data pair; and any number of markup key-value pairs. Signatures start with a capital letter, and contain parameter names separated by colons. Markup keys start with a double dash.