gomod

package
v0.0.0-...-7cf14b8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencyErr = &Error{}

DependencyErr is a Dependency Error instance. For use with with error.Is.

Functions

func Check

func Check(gomod, release, domain string, ruleset git.RulesetType, out io.Writer) error

Check examines a go mod file for dependencies and determines if each have a release artifact based on the ruleset provided. Check leverages the same rules used by sigs.k8s.io/zeitgeist/buoy/pkg/git.Repo().BestRefFor

func Float

func Float(gomod, release, domain string, ruleset git.RulesetType) ([]string, error)

Float examines a go mod file for dependencies and then discovers the best go mod refs to use for a given release based on the provided ruleset. Returns the set of module refs that were found. If no ref is found for a dependency, Float omits that ref from the returned list. Float leverages the same rules used by sigs.k8s.io/zeitgeist/buoy/pkg/git.Repo().BestRefFor

func Module

func Module(gomod, domain string) (name string, pkgs []string, err error)

Module returns the name and a list of direct dependencies for a given module. TODO: support url and gopath at some point for the gomod string.

func Modules

func Modules(gomod []string, domain string) (pkgs map[string][]string, deps []string, err error)

Modules returns a map of given given modules to their direct dependencies, and a list of unique dependencies.

Types

type Error

type Error struct {
	Module       string
	Dependencies []string
}

Error holds the result of a failed check.

func (*Error) Error

func (e *Error) Error() string

Error implements error.Error()

func (*Error) Is

func (e *Error) Is(target error) bool

Is implements error.Is(target)

type ReleaseMeta

type ReleaseMeta struct {
	Module              string
	ReleaseBranchExists bool
	ReleaseBranch       string
	Release             string
}

ReleaseMeta holds metadata important to module release status.

func ReleaseStatus

func ReleaseStatus(gomod, release string, out io.Writer) (*ReleaseMeta, error)

ReleaseStatus collects metadata about release branch status and next released version tags for a given module.

Jump to

Keyboard shortcuts

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