modules

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGoModTidyError

func IsGoModTidyError(err error) bool

func IsInvalidDependencyLineError

func IsInvalidDependencyLineError(err error) bool

func IsInvalidModuleListError

func IsInvalidModuleListError(err error) bool

func IsInvalidSemVerError

func IsInvalidSemVerError(err error) bool

func IsNoVersionsFoundError

func IsNoVersionsFoundError(err error) bool

func SemVersToStrings

func SemVersToStrings(vers []SemanticVersion) []string

func UpdatePackage

func UpdatePackage(cwd string, name PackageName, version SemanticVersion) error

func UpdatePackageWithReplace

func UpdatePackageWithReplace(cwd string, name PackageName, oldVersion, version SemanticVersion) error

func VetSuceeds

func VetSuceeds(cwd string) (healthy bool)

Types

type DependencyLink struct {
	Parent string
	Child  string
}
func BuildDependencyLinks(cwd string) ([]DependencyLink, error)

func (DependencyLink) String

func (l DependencyLink) String() string

type Package

type Package struct {
	Name    PackageName
	Version SemanticVersion
}

func FindRootParents

func FindRootParents(
	reverseDependencyMap ReverseDependencyMap,
	packageName PackageName,
	packageVersion SemanticVersion,
	rootPackage PackageName,
) []Package

FindRootParents returns a list of the packages that are directly required by the root package (i.e. the package that is being checked for vulnerabilities) and that require directly or indirectly the given package.

type PackageName

type PackageName string

func GetModuleName

func GetModuleName(cwd string) (PackageName, error)

type ReverseDependencyMap

type ReverseDependencyMap map[string][]string

child -> [parent1, parent2, ...]

func BuildReverseDependencyMap

func BuildReverseDependencyMap(dependencyLinks []DependencyLink) ReverseDependencyMap

type SemanticVersion

type SemanticVersion string

func BuildSemVer

func BuildSemVer(s string) (SemanticVersion, error)

func GetNewestVersion

func GetNewestVersion(name PackageName) (SemanticVersion, error)

func GetVersionsForPackage

func GetVersionsForPackage(name PackageName) ([]SemanticVersion, error)

func RemovePreReleaseVersions

func RemovePreReleaseVersions(versions []SemanticVersion) []SemanticVersion

func (SemanticVersion) LessThan

func (v SemanticVersion) LessThan(other SemanticVersion) bool

func (SemanticVersion) String

func (v SemanticVersion) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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