Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Replace ¶
func Replace(s string) sllm.ParamWriter
Types ¶
type ByName ¶
type ByName struct { Clear sllm.ParamWriter Anon map[string]sllm.ParamWriter }
Example ¶
anon := ByName{ Clear: func(wr io.Writer, idx int, name string) (int, error) { return fmt.Printf("<param #%d %s>", idx, name) }, Anon: map[string]sllm.ParamWriter{ "bar": Replace("XXXXX"), }, } sllm.Expand(os.Stdout, "msg is `foo`, `bar`, `baz`", anon.Param)
Output: msg is `foo:<param #0 foo>`, `bar:XXXXX`, `baz:<param #2 baz>`
Click to show internal directories.
Click to hide internal directories.