Go to file
2024-05-21 07:34:19 +02:00
.github initial commit 2024-05-20 16:51:24 +02:00
.husky initial commit 2024-05-20 16:51:24 +02:00
pkg refactor: structure 2024-05-21 07:34:19 +02:00
.editorconfig initial commit 2024-05-20 16:51:24 +02:00
.gitignore initial commit 2024-05-20 16:51:24 +02:00
.golangci.yml initial commit 2024-05-20 16:51:24 +02:00
.goreleaser.yml initial commit 2024-05-20 16:51:24 +02:00
.husky.yaml initial commit 2024-05-20 16:51:24 +02:00
CODE_OF_CONDUCT.md initial commit 2024-05-20 16:51:24 +02:00
go.mod initial commit 2024-05-20 16:51:24 +02:00
go.sum initial commit 2024-05-20 16:51:24 +02:00
LICENSE initial commit 2024-05-20 16:51:24 +02:00
Makefile initial commit 2024-05-20 16:51:24 +02:00
README.md refactor: structure 2024-05-21 07:34:19 +02:00

Go Contemplate

Build Status Go Report Card GoDoc

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.