simpletmpl

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(s string, vars map[string]any) string

Exec is a easier way to replace variables to the given map values.

func Exec2 added in v0.1.0

func Exec2(s string, args ...any) string

Exec2 is a easier way to replace variables by index to the given map values.

func ExecFunc

func ExecFunc(s string, f func(pattern string) string) string

ExecFunc extract variable's defined in s, and pass them to f; then use the returned value replace the origin variable item.

the variable can be defined starts with '$', such as $name or ${name}.

Types

This section is empty.

Jump to

Keyboard shortcuts

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