gen

package
v0.0.0-...-f6bedb9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions() options

func Do

func Do(opts ...Option)

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator holds the state of the analysis. Primarily used to buffer the output for format.Source.

func NewGenerator

func NewGenerator(opts ...Option) *Generator

func (*Generator) Format

func (g *Generator) Format() *Generator

Format returns the gofmt-ed contents of the Generator's buffer.

func (*Generator) Generate

func (g *Generator) Generate() *Generator

Generate inspect node and construct proxy data

func (*Generator) Output

func (g *Generator) Output() *Generator

Output create proxy file by Generator's buffer.

func (*Generator) ParsePackage

func (g *Generator) ParsePackage() *Generator

parsePackage recursive analyzes the package constructed from the patterns and tags. parsePackage exits if there is an error.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithDeps

func WithDeps(deps ...string) Option

func WithPatterns

func WithPatterns(patterns ...string) Option

func WithRecursive

func WithRecursive(recursive bool) Option

func WithTags

func WithTags(tags ...string) Option

Jump to

Keyboard shortcuts

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