package
Version:
v0.0.0-...-b1976e4
Opens a new window with list of versions in this module.
Published: Feb 28, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
Package parse contains simple go parser code to be used to generate code
from interfaces.
FindType finds a file level type declaration and returns it if found.
FormatSource runs the equivalent of gofmt on the buffer and returns the
formatted version.
If the code is not valid go syntax, prefix the buffer with a comment about
this issue and include the buffer unformatted.
Arg is one parameter or return value.
FullType returns the qualified type including the package.
Args is a slice of Arg.
Flat returns the comma separated qualified arguments.
Names returns the comma separated name of arguments.
type Method struct {
Name string
Params []Arg
Results []Arg
}
Method is a simplification of ast.FuncType using only strings.
EnumInterface enumerates all the methods of an interface.
Useful to generate code from an interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.