parser

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotResolvePackage = errors.New("could not resolve package")
	ErrUnexpectedFieldType    = errors.New("provided fields have unexpected type")
)

Functions

This section is empty.

Types

type FuncField

type FuncField struct {
	Name      string
	Package   *Import
	Type      string
	IsPointer bool
	IsArray   bool
}

Basic field struct. Used for tiny parameters and results representation.

type FuncSignature

type FuncSignature struct {
	Name    string
	Params  []*FuncField
	Results []*FuncField
}

type Import

type Import struct {
	Alias string
	Path  string
}

type Interface

type Interface struct {
	PackageName    string
	Docs           []string
	Name           string
	Imports        []*Import
	FuncSignatures []*FuncSignature
}

func ParseInterface

func ParseInterface(f *ast.File, ifaceName string) (*Interface, error)

Build list of function signatures by provided AST of file and interface name.

Jump to

Keyboard shortcuts

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