Discover Packages
github.com/koron/tmpl
package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Mar 18, 2022
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Simple Template
Install (update) the tmpl command.
$ go get -u github.com/koron/tmpl/cmd/tmpl
Expand ▾
Collapse ▴
Documentation
¶
SourceGosrc is a source for LoadGosrc(). Default is "." (current directory)
SourceYAML is a source for LoadYAML function. Default is os.Stdin
func AddFunc(name string , fn interface{})
AddFunc add a function which can be used from template.
Execute executes templates set.
If dataFunc is omitted, YAML is loaded by tmpl.LoadYAML
func LoadGosrc() (interface{}, error )
LoadGosrc loads a file or a directory as go source code.
func LoadYAML() (interface{}, error )
LoadYAML loads a YAML from SourceYAML.
type DataFunc func() (interface{}, error )
DataFunc provides data for tmpl.Execute()
Source Files
¶
Directories
¶
cmd
internal
Click to show internal directories.
Click to hide internal directories.