compact

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Comment = "comment"
	Markup  = "--"
)

constants for the markup maps in the dl.

Variables

This section is empty.

Functions

func IsUnhandled

func IsUnhandled(e error) bool

func JoinLines

func JoinLines(slice []any) (ret string, okay bool)

type conversion: convert a slice of interfaces to a slice of strings joined with newlines.

func SliceBools

func SliceBools(slice []any) ([]bool, bool)

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

func SliceFloats(slice []any) ([]float64, bool)

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

func SliceStrings(slice []any) ([]string, bool)

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

func UserComment(markup map[string]any) (ret []string)

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:"
	Name   string         // names are lower_underscore
	Labels []string       // parameter names sans colons
	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.

func (*Message) AddMarkup

func (op *Message) AddMarkup(k string, v any)

type Unhandled

type Unhandled string

func (Unhandled) Error

func (u Unhandled) Error() string

Jump to

Keyboard shortcuts

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