register
The register command extends tempo by allowing you to:
- Load external template function providers
- Use helpers from a Git repo or local Go module inside your templates
Register a function provider
This command enhances tempo’s templates by loading custom functions from a:
- 🌐 Remote Git repository
- 🗂️ Local Go module
Registered functions become available in .gotxt and .templ templates during generation.
Flags (tempo register functions)
--name(-n) value- Name for the function provider
--url(-u) value- Repository URL
--path(-p) value- Path to a local go module provider
🌐 Register from a Git repository
bash
tempo register functions --name sprig --url https://github.com/indaco/tempo-provider-sprig.git🗂️ Register from a local Go module
bash
tempo register functions --name myprovider --path ./my-template-funcs-go-module