resolve

package
v0.0.0-...-2c887f5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildFileNotExist = fmt.Errorf("load build file: %w", os.ErrNotExist)

Functions

func DependencyGraph

func DependencyGraph(ctx context.Context, paths gravel.Paths) (types.Graph[Pkg], error)

DependencyGraph returns a dependency graph for the go packages that exist under the specified root directory. This will omit any package dependencies that aren't included in the root, such as stdlib imports or imports from other modules.

func GitCommit

func GitCommit() (string, error)

Types

type CacheFile

type CacheFile struct {
	Packages map[string]string `json:"packages"`
}

type Hashes

type Hashes struct {
	Old *CacheFile `json:"old"`
	New *CacheFile `json:"new"`
}

func (Hashes) ChangedPackages

func (h Hashes) ChangedPackages() types.Set[string]

type Module

type Module struct {
	ModPath string `json:"modPath"`
	DirPath string `json:"dirPath"`
}

type Pkg

type Pkg struct {
	Module  Module `json:"module"`
	Binary  string `json:"binary"`
	PkgName string `json:"pkgName"`
	PkgPath string `json:"pkgPath"`
	DirPath string `json:"dirPath"`
}

func NewPkg

func NewPkg(frm *packages.Package) (pkg Pkg)

func (Pkg) Hash

func (pkg Pkg) Hash() (string, error)

func (Pkg) String

func (pkg Pkg) String() string

type VersionFile

type VersionFile struct {
	semver.Version
	// contains filtered or unexported fields
}

func Version

func Version(pkg Pkg) *VersionFile

func (*VersionFile) Save

func (vf *VersionFile) Save() error

type VersionedPkg

type VersionedPkg struct {
	Pkg
	Version semver.Version `json:"version"`
}

Jump to

Keyboard shortcuts

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