Registry / utility / tmplfunc

tmplfunc

JSON →
library0.0.3gogounverified

Package tmplfunc extends Go templates to allow templates to be invoked as functions.

go get rsc.io/tmplfunc
INSTALL
IMPORT
SIG · TMPLFUNC
T
tmplfunc
utilitygov0.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tmplfunc
rsc.io/tmplfunc

Parse a template with function-like templates

package main import ( "os" "text/template" "rsc.io/tmplfunc" ) func main() { t := template.New("example") tmplfunc.Parse(t, "{{define \"greet\"}}Hello, {{.}}{{end}}") t.ExecuteTemplate(os.Stdout, "greet", "World") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
tmplfunc — go get tmplfunc · libregistry