gocontemplate

module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: MIT

README

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/pkg/contemplate"
)

func main() {
  ctpl, err := contemplate.Load(&contemplate.Config{
    Packages: []*contemplate.PackageConfig{
      {
        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.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL