maker

package
v0.0.0-...-b20eb2e Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCode

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

func GetEmbedded

func GetEmbedded(src []byte, dec interface{}) (embeds []string)

func GetParameters

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

func GetReceiverTypeName

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

func GetStructName

func GetStructName(src []byte, dec interface{}) string

func MakeInterface

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

func ParseStruct

func ParseStruct(src []byte, copyDocs bool, oexs []string) (sdata map[string]*StructData)

Types

type Method

type Method struct {
	Code string
	Docs []string
}

func (*Method) Lines

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

type StringSlice

type StringSlice []string

func (StringSlice) Contain

func (strs StringSlice) Contain(s string) bool

type StructData

type StructData struct {
	Embedded []string
	Methods  []Method
	Imports  []string
}

Jump to

Keyboard shortcuts

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