Registry / utility / jensneuse-byte-template

jensneuse-byte-template

JSON →
library0.0.0-20231025215717-69252eb3ed56gogounverified

A fast, low-allocation templating engine for byte slices with custom directives.

go get github.com/jensneuse/byte-template
INSTALL
IMPORT
SIG · JENSNEUSE-BYTE-TEM
J
jensneuse-byte-template
utilitygov0.0.0-20231025215717-69252eb3ed56
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.

bytetemplate
github.com/jensneuse/byte-template

Executes a byte template with a variable.

package main import ( "fmt" "github.com/jensneuse/byte-template" ) func main() { result, _ := bytetemplate.Execute([]byte("Hello {{.Name}}"), map[string]interface{}{"Name": "World"}) fmt.Println(string(result)) }
Debug
Known issues
gotchaNot thread-safe; use with sync.Pool for concurrent access.
fix
Wrap usage with sync.Pool or external synchronization.
affects: all
Upgrade
Version history
0.0.0-20231025215717-69252eb3ed56latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jensneuse-byte-template — go get jensneuse-byte-template · libregistry