feedback

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConsTypeConstraint represents a constraint
	ConsTypeConstraint = "constraint"

	// ConsTypeHint represents a constraint type hint
	ConsTypeHint = "hint"

	// DepTypeDirect represents a direct dependency
	DepTypeDirect = "direct dep"

	// DepTypeTransitive represents a transitive dependency,
	// or a dependency of a dependency
	DepTypeTransitive = "transitive dep"

	// DepTypeImported represents a dependency imported by an external tool
	DepTypeImported = "imported dep"
)

Variables

This section is empty.

Functions

func GetLockingFeedback

func GetLockingFeedback(version, revision, depType, projectPath string) string

GetLockingFeedback returns a dependency "locking" feedback message. For example:

Locking in v1.1.4 (bc29b4f) for direct dep github.com/foo/bar
Locking in master (436f39d) for transitive dep github.com/baz/qux

func GetUsingFeedback

func GetUsingFeedback(version, consType, depType, projectPath string) string

GetUsingFeedback returns a dependency "using" feedback message. For example:

Using ^1.0.0 as constraint for direct dep github.com/foo/bar
Using 1b8edb3 as hint for direct dep github.com/bar/baz

Types

type BrokenImportFeedback added in v0.5.0

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

BrokenImportFeedback holds information on changes to locks pre- and post- solving.

func NewBrokenImportFeedback added in v0.5.0

func NewBrokenImportFeedback(ld *LockDiff) *BrokenImportFeedback

NewBrokenImportFeedback builds a feedback entry that compares an initially imported, unsolved lock to the same lock after it has been solved.

func (BrokenImportFeedback) LogFeedback added in v0.5.0

func (b BrokenImportFeedback) LogFeedback(logger *log.Logger)

LogFeedback logs a warning for all changes between the initially imported and post- solve locks

type ConstraintFeedback

type ConstraintFeedback struct {
	Constraint, LockedVersion, Revision, ConstraintType, DependencyType, ProjectPath string
}

ConstraintFeedback holds project constraint feedback data

func NewConstraintFeedback added in v0.2.0

func NewConstraintFeedback(pc gps.ProjectConstraint, depType string) *ConstraintFeedback

NewConstraintFeedback builds a feedback entry for a constraint in the manifest.

func NewLockedProjectFeedback added in v0.2.0

func NewLockedProjectFeedback(lp gps.LockedProject, depType string) *ConstraintFeedback

NewLockedProjectFeedback builds a feedback entry for a project in the lock.

func (ConstraintFeedback) LogFeedback

func (cf ConstraintFeedback) LogFeedback(logger *log.Logger)

LogFeedback logs feedback on changes made to the manifest or lock.

type LockDiff added in v0.5.0

type LockDiff struct {
	Add    []LockedProjectDiff
	Remove []LockedProjectDiff
	Modify []LockedProjectDiff
}

LockDiff is the set of differences between an existing lock file and an updated lock file. Fields are only populated when there is a difference, otherwise they are empty.

func DiffLocks added in v0.5.0

func DiffLocks(l1, l2 gps.Lock) *LockDiff

DiffLocks compares two locks and identifies the differences between them. Returns nil if there are no differences.

type LockedProjectDiff added in v0.5.0

type LockedProjectDiff struct {
	Name     gps.ProjectRoot
	Source   *StringDiff
	Version  *StringDiff
	Branch   *StringDiff
	Revision *StringDiff
	Packages []StringDiff
}

LockedProjectDiff contains the before and after snapshot of a project reference. Fields are only populated when there is a difference, otherwise they are empty.

func DiffProjects added in v0.5.0

func DiffProjects(lp1, lp2 gps.LockedProject) *LockedProjectDiff

DiffProjects compares two projects and identifies the differences between them. Returns nil if there are no differences.

type StringDiff added in v0.5.0

type StringDiff struct {
	Previous string
	Current  string
}

StringDiff represents a modified string value. * Added: Previous = nil, Current != nil * Deleted: Previous != nil, Current = nil * Modified: Previous != nil, Current != nil * No Change: Previous = Current, or a nil pointer

func (*StringDiff) String added in v0.5.0

func (diff *StringDiff) String() string

Jump to

Keyboard shortcuts

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