Documentation ¶
Index ¶
- func GetPackagePathAndDecl(path string) (importPath, decl string)
- func ParseVendor(path string) string
- func RetrievePackageName(path string) string
- type Package
- type PackageImporter
- func (i *PackageImporter) AddImport(importPath string, p *Package)
- func (i *PackageImporter) Import(pkgNamePattern, searchPath string, useAlias bool) *Package
- func (i *PackageImporter) Merge(target *PackageImporter)
- func (i *PackageImporter) String() string
- func (i *PackageImporter) Use(pkgName string, subs ...string) string
- func (i *PackageImporter) UseWithoutAlias(pkgName, searchPath string, subs ...string) string
- func (i *PackageImporter) WriteToImports(w io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPackagePathAndDecl ¶
func ParseVendor ¶
func RetrievePackageName ¶
Types ¶
type Package ¶
func (*Package) GetSelector ¶
type PackageImporter ¶
type PackageImporter struct { PackagePath string // contains filtered or unexported fields }
func NewPackageImporter ¶
func NewPackageImporter(packagePath string) *PackageImporter
func (*PackageImporter) AddImport ¶
func (i *PackageImporter) AddImport(importPath string, p *Package)
func (*PackageImporter) Import ¶
func (i *PackageImporter) Import(pkgNamePattern, searchPath string, useAlias bool) *Package
func (*PackageImporter) Merge ¶
func (i *PackageImporter) Merge(target *PackageImporter)
func (*PackageImporter) String ¶
func (i *PackageImporter) String() string
func (*PackageImporter) UseWithoutAlias ¶
func (i *PackageImporter) UseWithoutAlias(pkgName, searchPath string, subs ...string) string
func (*PackageImporter) WriteToImports ¶
func (i *PackageImporter) WriteToImports(w io.Writer)
Click to show internal directories.
Click to hide internal directories.