gen

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Verbose bool // enable verbose mode
	// contains filtered or unexported fields
}

Generator holds the state of the generation.

func NewGenerator

func NewGenerator(p string) (*Generator, error)

NewGenerator returns a new code generator for package p, where p is the package's import path.

func (*Generator) Format

func (g *Generator) Format() ([]byte, error)

func (*Generator) Generate

func (g *Generator) Generate(typeName string)

Directories

Path Synopsis
_test
pkg

Jump to

Keyboard shortcuts

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