mirror of
https://github.com/foomo/gocontemplate.git
synced 2025-10-16 12:35:36 +00:00
| .github | ||
| .husky | ||
| pkg | ||
| .editorconfig | ||
| .gitignore | ||
| .golangci.yml | ||
| .goreleaser.yml | ||
| .husky.yaml | ||
| CODE_OF_CONDUCT.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Go Contemplate
A code generation helper.
Wrapper library around golang.org/x/tools/go/packages to filter only defined types and their dependencies.
Example
package main
import (
"github.com/foomo/gocontemplate"
)
func main() {
goctpl, err := gocontemplate.Load(&gocontemplate.Config{
Packages: []*gocontemplate.ConfigPackage{
{
Path: "github.com/foomo/sesamy-go/event",
Types: []string{"PageView"},
},
},
})
if err != nil {
panic(err)
}
}
How to Contribute
Make a pull request...
License
Distributed under MIT License, please see license file within the code for more details.