diff

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package diff contains libraries for diffing packages.

Index

Constants

This section is empty.

Variables

Functions

func SupportedDiffTypesLabel

func SupportedDiffTypesLabel() string

Types

type Command

type Command struct {
	// Path to the local package directory
	Path string

	// Ref is the target Ref in the upstream source package to compare against
	Ref string

	// DiffType specifies the type of changes to show
	DiffType DiffType

	// Difftool refers to diffing commandline tool for showing changes.
	DiffTool string

	// DiffToolOpts refers to the commandline options to for the diffing tool.
	DiffToolOpts string

	// When Debug is true, command will run with verbose logging and will not
	// cleanup the staged packages to assist with debugging.
	Debug bool

	// Output is an io.Writer where command will write the output of the
	// command.
	Output io.Writer

	// PkgDiffer specifies package differ
	PkgDiffer PkgDiffer

	// PkgGetter specifies packaging sourcing adapter
	PkgGetter PkgGetter
}

Command shows changes in local package relative to upstream source pkg, changes in upstream source package between original and target version etc.

func (*Command) DefaultValues

func (c *Command) DefaultValues()

DefaultValues sets up the default values for the command.

func (*Command) Run

func (c *Command) Run() error

func (*Command) Validate

func (c *Command) Validate() error

type DiffType

type DiffType string

DiffType represents type of comparison to be performed.

const (
	// DiffTypeLocal shows the changes in local pkg relative to upstream source pkg at original version
	DiffTypeLocal DiffType = "local"
	// DiffTypeRemote shows changes in the upstream source pkg between original and target version
	DiffTypeRemote DiffType = "remote"
	// DiffTypeCombined shows changes in local pkg relative to upstream source pkg at target version
	DiffTypeCombined DiffType = "combined"
	// 3way shows changes in local and remote changes side-by-side
	DiffType3Way DiffType = "3way"
)

func (DiffType) String

func (dt DiffType) String() string

String implements Stringer.

type PkgDiffer

type PkgDiffer interface {
	Diff(pkgs ...string) error
}

PkgDiffer knows how to compare given packages.

type PkgGetter

type PkgGetter interface {
	GetPkg(repo, path, ref string) (dir string, err error)
}

PkgGetter knows how to fetch a package given a git repo, path and ref.

Jump to

Keyboard shortcuts

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