Documentation
¶
Overview ¶
Package template contains methods that will template go text/templates files that may contain sjs snippets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Templator ¶
type Templator struct {
WriteFunc WriteFunc
ReadFunc ReadFunc
ContextData interface{}
TmplFuncs map[string]any
}
Templator extends the go text/template package to allow for sjs snippets.
func (*Templator) TemplateFile ¶
TemplateFile will template a file and write the output to outFile.
type VM ¶
type VM interface {
Get(name string) goja.Value
Set(name string, value interface{}) error
Compile(name string, src string, strict bool) (*goja.Program, error)
RunProgram(p *goja.Program) (result goja.Value, err error)
GetObject(val goja.Value) *goja.Object
}
VM represents a virtual machine that can be used to run js.
Click to show internal directories.
Click to hide internal directories.