Documentation ¶
Overview ¶
Example ¶
tpl := templatex.New(store.WithAddFuncsTpl( FuncMapTpl(), )) output, err := tpl.ExecuteBuffer( templatex.WithContent( `{{ $v := codec.JsonDecode (codec.StringToByte .) }}{{ $v.data.name }}`, ), templatex.WithData(`{"data": {"name": "Hatay"}}`), ) if err != nil { fmt.Printf("%v", err) return } fmt.Printf("%s", output)
Output: Hatay
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(options *options)
func WithDisableFuncs ¶
func WithSpecificFuncs ¶
func WithTemplatex ¶
func WithWorkDir ¶
Click to show internal directories.
Click to hide internal directories.