Package Usage: go: github.com/posener/autogen
Package autogen automatically generates files from templates.
Create a main package somewhere in your project. In that package, locate templates for generating
files. These templates should have the generated file names suffixed with ".gotmpl". The
generated files will be located by default in the parent directory, but this location can be
customized with the `Location` option. The main package should define the variables to be used
in the templates and run the `autogen.Execute` function with this variable.
The main package should include a `//go:generate go run .` comment. All that left to do is to run
`go generate ./...` from the Go module's root.
See example at the ./example directory.
3 versions
Latest release: presque 2 ans ago
5 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/posener/autogen