maker

package
v0.0.0-...-06def92 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Maker

type Maker struct {
	// StructName is the name of the struct from which to generate an interface.
	StructName string
	// If CopyDocs is true, doc comments will be copied to the generated interface.
	CopyDocs bool
	// contains filtered or unexported fields
}

Maker generates interfaces from structs.

func (*Maker) MakeInterface

func (m *Maker) MakeInterface(pkgName, ifaceName string) ([]byte, error)

MakeInterface creates the go file with the generated interface. The package will be named pkgName, and the interface will be named ifaceName.

func (*Maker) ParseSource

func (m *Maker) ParseSource(src []byte, filename string) error

ParseSource parses the source code in src. filename is used for position information only.

Jump to

Keyboard shortcuts

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