gogen

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultJuteImport = "github.com/go-zookeeper/jute/lib/go/jute"

Variables

This section is empty.

Functions

func Generate

func Generate(outDir string, files []*generate.File, opts *Options) error

Generate will generate Go packages/modules for the given input files.

Types

type ModuleMap

type ModuleMap struct {
	Re   *regexp.Regexp // Regexp to match
	Repl string         // Re replacement string (see regexp.ReplaceAll)
	Skip bool           // Don't generate files for the matching jute modules
}

ModuleMap helps map jute modules to go packages.

func (ModuleMap) String

func (m ModuleMap) String() string

type Options

type Options struct {
	// Base import path for generated packages
	ImportPathPrefix string
	// if not blank will use for serialization/deserialization libraries
	JuteImport string
	// map of hute modles to go packages. The BaseImportPath is prepended to
	// these values.
	ModuleMap []ModuleMap
}

Options can be passed to Generate to modify the output.

Jump to

Keyboard shortcuts

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