maker

package
v0.0.0-...-72b210d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCode

func FormatCode(code string) ([]byte, error)

func GetParameters

func GetParameters(src []byte, fl *ast.FieldList) ([]string, bool)

func GetReceiverTypeName

func GetReceiverTypeName(src []byte, fl interface{}) (string, *ast.FuncDecl)

func MakeInterface

func MakeInterface(pkgName, ifaceName string, methods []string, imports []string) ([]byte, error)

Types

type Method

type Method struct {
	Code string
	Docs []string
}

func ParseStruct

func ParseStruct(src []byte, structName string, copyDocs bool) (methods []Method, imports []string)

func (*Method) Lines

func (m *Method) Lines() []string

Jump to

Keyboard shortcuts

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