Documentation ¶
Index ¶
- Variables
- func Export(pkgPath string, w io.Writer) (err error)
- func ExportPackage(pkg *types.Package, w io.Writer) (err error)
- func GoPlusRoot() (root string, err error)
- func Import(pkgPath string) (*types.Package, error)
- func ImportSource(pkgPath string, srcDir string) (*types.Package, error)
- func LookupMod(pkgPath string) (srcDir string, err error)
- func ParsePkgVer(pkgPath string) (pkg string, mod string, sub string)
- type Exporter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrIgnore error ErrIgnore = errors.New("ignore empty exported package") // ErrInvalidPkgPath error ErrInvalidPkgPath = errors.New("invalid package path") )
Functions ¶
func ExportPackage ¶
ExportPackage export types.Package to io.Writer
func GoPlusRoot ¶ added in v0.7.2
GoPlusRoot returns Go+ root path.
func ImportSource ¶ added in v0.7.3
ImportSource import a Go package from pkgPath and srcDir
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter represents a go package exporter.
func NewExporter ¶
NewExporter creates a go package exporter.
func (*Exporter) ExportConst ¶
ExportConst exports a go const.
func (*Exporter) ExportFunc ¶
ExportFunc exports a go function/method.
func (*Exporter) ExportType ¶ added in v0.7.9
ExportType export a go type
Click to show internal directories.
Click to hide internal directories.