pkgset

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStd

func IsStd(p *packages.Package) bool

IsStd returns whether *packages.Package is a std package

func IsStdName

func IsStdName(id string) bool

IsStdName returns whether id corresponds to a standard package

Types

type Set

type Set map[string]*packages.Package

Set is a p.ID -> *packages.Package

func Calc

func Calc(ctx context.Context, expr []string) (Set, error)

func Intersect

func Intersect(a, b Set) Set

Intersect returns packages that exist in both

func New

func New(roots ...*packages.Package) Set

New makes a set from roots recursively

func Std

func Std() Set

Std returns the standard package set

func Subtract

func Subtract(a, b Set) Set

Subtract returns packages that exist in a, but not in b

func Union

func Union(a, b Set) Set

Union includes packages from both sets

func (Set) Clone

func (set Set) Clone() Set

Clone makes a copy of the set

func (Set) IncludeRecursive

func (set Set) IncludeRecursive(p *packages.Package)

IncludeRecursive adds p recursively

func (Set) Sorted

func (set Set) Sorted() []*packages.Package

Sorted returns packages in sorted order

Jump to

Keyboard shortcuts

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