pkg

package
v0.0.0-...-ba9bc52 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPackagePath

func GetPackagePath(dir string) (string, error)

func GetPackagePathFromImport

func GetPackagePathFromImport(imp *ast.ImportSpec) string

func IsInSrcDirs

func IsInSrcDirs(dir string) bool

func IsPseudoPackage

func IsPseudoPackage(pkgPath string) bool

func NoTestFiles

func NoTestFiles(info os.FileInfo) bool

Types

type Package

type Package struct {
	// contains filtered or unexported fields
}

func New

func New(packagePath string) *Package

func NewFromImport

func NewFromImport(imp *ast.ImportSpec) *Package

func (Package) Dir

func (p Package) Dir() string

func (*Package) Import

func (p *Package) Import(srcPath string, ignoreVendor bool) error

func (Package) IsLocal

func (p Package) IsLocal() bool

func (Package) IsPseudoPackage

func (p Package) IsPseudoPackage() bool

func (Package) IsSaved

func (p Package) IsSaved() bool

func (Package) IsStandardPackage

func (p Package) IsStandardPackage() bool

func (Package) IsVendored

func (p Package) IsVendored() bool

func (Package) MarshalJSON

func (p Package) MarshalJSON() ([]byte, error)

func (Package) MarshalYAML

func (p Package) MarshalYAML() (interface{}, error)

func (Package) Path

func (p Package) Path() string

func (*Package) UnmarshalJSON

func (p *Package) UnmarshalJSON(data []byte) error

func (*Package) UnmarshalYAML

func (p *Package) UnmarshalYAML(unmarshal func(interface{}) error) error

type Set

type Set struct {
	Packages map[string]*Package
	Filter   func(info os.FileInfo) bool
	OnAdded  func(p *Package) (nextDirectory string, err error)
}

func NewSet

func NewSet() *Set

func (*Set) ForEach

func (s *Set) ForEach(cb func(key string, value *Package) error) error

func (*Set) Insert

func (s *Set) Insert(p *Package, force bool) (added bool)

func (*Set) ListFrom

func (s *Set) ListFrom(srcPath string) error

func (*Set) Remove

func (s *Set) Remove(key string)

Jump to

Keyboard shortcuts

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