gocontemplate/README.md
Kevin Franklin Kim 1142d15bfc
initial commit
2024-05-20 16:51:24 +02:00

1.1 KiB

Go Contemplate

Build Status Go Report Card GoDoc

A code generation helper, that

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.