Top 3.4% dependent packages on proxy.golang.org
Top 1.5% dependent repos on proxy.golang.org
Top 7.8% forks on proxy.golang.org
Top 2.3% docker downloads on proxy.golang.org
proxy.golang.org : github.com/wlbr/templify
templify is a tool to be used with 'go generate' to embed external template files into Go code. An often used scenario in developing go applications is to generate text (e.g. html pages) using the Go template packages. You have two choices: either editing the template in a dedicated file and to read this file at runtime from your application. Or you add a "big" string containing the template to the source of your app and parse this string to create the template. If you want to create a single file application, than the more handy solution with a dedicated file is not desirable. On the other hand to edit a complex html template within a Go string in the source is very uncomfortable. templify allows you to edit your template in an extra file and to generate an Go source file containing the embedded string. Simply add a line for each template you want to embed. Every time you run a 'go generate' in the corresponding folder, the file 'mytemplate.go' will be created. It contains a function 'mytemplateTemplate' returning the template string. You may use 'templify mytemplate.file' directly on the command line. Usage of templify: 'templify [switches] templatefilename'
Registry
-
Source
- Documentation
- JSON
- codemeta.json
purl: pkg:golang/github.com/wlbr/templify
Keywords:
code-generation
, go-generate
, go-template
License: MIT
Latest release: about 4 years ago
First release: about 4 years ago
Namespace: github.com/wlbr
Dependent packages: 3
Dependent repositories: 13
Stars: 28 on GitHub
Forks: 6 on GitHub
Docker dependents: 1
Docker downloads: 17
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/wlbr
Last synced: 6 days ago