compare

package
v0.0.0-...-9d46a64 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change interface {
	String() string
	Compatible() bool
}

A Change is the basic abstraction of all changes, backwards compatible or not.

func Decls

func Decls(name string, base, target types.Object) ([]Change, error)

Decls compares two different declarations.

func Packages

func Packages(base, target *packages.Package) ([]Change, error)

Packages compares two packages and returns the list of changes in its identifiers.

func Repos

func Repos(base, target *parser.Repo) ([]Change, error)

Repos compares two given Repos.

type DeclChange

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

DeclChange tracks the addition or removal of an identifier declaration in a package.

func (DeclChange) Compatible

func (c DeclChange) Compatible() bool

Compatible returns true when the change is backwards compatible.

func (DeclChange) String

func (c DeclChange) String() string

type IdentChange

type IdentChange struct {
	Name                 string
	BaseType, TargetType types.Type
}

IdentChange tracks changes in the definition of an identifier.

func (IdentChange) Compatible

func (c IdentChange) Compatible() bool

Compatible returns whether the change is backwards compatible.

func (IdentChange) String

func (c IdentChange) String() string

Jump to

Keyboard shortcuts

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