packages

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Path       string         // import path of package in dir
	Node       bool           // node package
	Edge       bool           // edge package
	Detail     bool           // if false Path only
	Goroot     bool           // is this package in the Go root?
	Standard   bool           // is this package part of the standard Go library?
	ForTest    string         // package is only for use in named test
	Incomplete bool           // this package or a dependency has an error
	DepOnly    bool           // package is only a dependency, not explicitly listed
	Contained  *golist.Module // info about package's containing module, if any (can be nil)
	Imports    []string       // import paths used by this package
	UseCGO     bool           // use CGO in this package
	UseUnsafe  bool           // use unsafe package in this package
	Error      error          // error loading package
}

Package information

func (*Package) Copy

func (p *Package) Copy(pp *golist.Package) *Package

Copy method copies elements of Package from golist.Package instance

func (*Package) EdgeOnly added in v0.2.0

func (p *Package) EdgeOnly() bool

EdgeOnly returns true if is not Node and is Edge

func (*Package) Equal

func (left *Package) Equal(right *Package) bool

Equal returns true if left == right

func (*Package) IsInternal

func (p *Package) IsInternal() bool

IsInternal returns true if internal package

func (*Package) IsStandard

func (p *Package) IsStandard() bool

IsStandard returns true if standard Go library

func (*Package) Valid

func (p *Package) Valid() bool

Valid returns true if is not Incomplete

type Packages

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

Packages is list of Packages.

func ImportPackages

func ImportPackages(ctx context.Context, gctx golist.Context, name string) (*Packages, error)

ImportPackages gets packages dependency information

func (*Packages) Add

func (ps *Packages) Add(p *golist.Package) *Package

Add method adds Package instance in Packages.

func (*Packages) Get

func (ps *Packages) Get(path string) *Package

Get method gets Package instance from Packages.

func (*Packages) List

func (ps *Packages) List() []*Package

List method returns list of packages.

func (*Packages) Merge

func (ps *Packages) Merge(pps *Packages)

Merge method merges Package instance.

func (*Packages) Set

func (ps *Packages) Set(p *Package) *Package

Set method sets Package instance in Packages.

Jump to

Keyboard shortcuts

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