templify alternatives and similar packages
Based on the "Resource Embedding" category.
Alternatively, view templify alternatives based on common mentions on social networks and blogs.
packr8.8 3.8 templify VS packrThe simple and easy way to embed static files into Go binaries.
statik8.8 0.0 templify VS statikEmbed files into a Go executable
go.rice8.4 0.0 templify VS go.ricego.rice is a Go package that makes working with resources such as html,js,css,images,templates, etc very easy.
vfsgen7.4 0.0 templify VS vfsgenTakes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.
esc7.0 0.0 templify VS escA simple file embedder for Go
fileb0x6.9 0.0 templify VS fileb0xa better customizable tool to embed files in go; also update embedded files remotely without restarting the server
go-bindata5.9 0.0 templify VS go-bindataA small utility which generates Go code from any file. Useful for embedding binary data in a Go program.
binclude5.8 7.5 templify VS bincludeInclude files in your binary the easy way
go-resources5.1 0.0 templify VS go-resourcesUnfancy resources embedding for Go with out of box http.FileSystem support.
statics3.4 0.0 templify VS statics:file_folder: Embeds static resources into go files for single binary compilation + works with http.FileSystem + symlinks
go-embed2.6 0.7 templify VS go-embedGenerates go code to embed resource files into your library or executable
debme1.9 0.9 templify VS debmeembed.FS wrapper providing additional functionality
rebed1.9 0.0 templify VS rebedRecreates directory and files from embedded filesystem using Go 1.16 embed.FS type.
mule1.6 0.8 templify VS mulemule is a tool to be used with 'go generate' to embed external resources files into Go code.
embed0.3 0.0 templify VS embedEmbed files as byte arrays to package.
gassets0.2 0.0 templify VS gassetsEasy resource bundler for go
Static code analysis for 29 languages.
Do you think we are missing an alternative of templify or a related project?
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, then 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.
go get github.com/wlbr/templify
Simply add a line
//go:generate templify mytemplate.file
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
mytemplateTemplate returning the template string.
You may use
templify mytemplate.file directly on the command line.
Usage of templify:
templify [switches] templatefilename
export the generated, the template returning function. Default (false) means the function will not be exported.
-f no formatting of the generated source. Default false means source will be formatted with gofmt.
-n string name of generated, the template returning function. Its name will have 'Template' attached. Will be set to $(basename -s .ext outputfile) if empty (default).
-o string name of output file. Defaults to name of template file excluding extension + '.go'.
-p string name of package to be used in generated code (default "main").
-t string name of alternate code generation template file. If empty (default), then the embedded template will be used. Template variables supplied are: .Name, .Package, .Content
- Documentation: https://godoc.org/github.com/wlbr/templify
- Lint: http://go-lint.appspot.com/github.com/wlbr/templify
- Continous Integration:
- Test Coverage: