Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Const ¶
type Const struct {
// the type of the constant
Type string `json:"type"`
// the value of the constant
Value string `json:"value"`
}
Const is a const definition.
type Content ¶
type Content struct {
// the list of exported constants.
// key is the exported name, value is its type and value.
Consts map[string]Const `json:"consts,omitempty"`
// the list of exported functions and methods.
// key is the exported name, for methods it's prefixed with the receiver type (e.g. "Type.Method").
// value contains the list of params and return types.
Funcs map[string]Func `json:"funcs,omitempty"`
// the list of exported interfaces.
// key is the exported name, value contains the interface definition.
Interfaces map[string]Interface `json:"interfaces,omitempty"`
// the list of exported struct types.
// key is the exported name, value contains field information.
Structs map[string]Struct `json:"structs,omitempty"`
}
Content defines the set of exported constants, funcs, and structs.
type Func ¶
type Func struct {
// a comma-delimited list of the param types
Params *string `json:"params,omitempty"`
// a comma-delimited list of the return types
Returns *string `json:"returns,omitempty"`
}
Func contains parameter and return types of a function/method.
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package represents a Go package.
func LoadPackage ¶
LoadPackage loads the package in the specified directory. It's required there is only one package in the directory.
func (Package) GetExports ¶
GetExports returns the exported content of the package.
Click to show internal directories.
Click to hide internal directories.