breaking

package module
v0.0.0-...-9c46d9a Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: MIT Imports: 14 Imported by: 0

README

Installation: go get github.com/sprt/breaking/cmd/gobreaking

See https://godoc.org/github.com/sprt/breaking/cmd/gobreaking for more info.

Documentation

Overview

Package breaking reports breaking changes across two versions of a package.

See the documentation of cmd/gobreaking for a list of changes that are considered breaking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

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

An Object describes a named language entity such as a constant, type, variable, function.

func (*Object) Fpos

func (o *Object) Fpos() token.Position

Fpos returns the position of the object within a file.

func (*Object) Name

func (o *Object) Name() string

Name returns the name of the object.

func (*Object) String

func (o *Object) String() string

String returns the object as it appears in code.

type ObjectDiff

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

An ObjectDiff represents a breaking change in the representation of two objects that share the same name across two packages.

func ComparePackages

func ComparePackages(a, b interface{}) ([]*ObjectDiff, error)

ComparePackages returns the breaking changes introduced by package b relative to package a.

A package can be passed as either a string or a map of string -> io.Reader. If a string, it is the path to the package. If a map, it maps filenames to source code.

func (*ObjectDiff) Name

func (d *ObjectDiff) Name() string

Name returns the name of the objects.

func (*ObjectDiff) New

func (d *ObjectDiff) New() *Object

New returns the object after the change, or nil if it was deleted.

func (*ObjectDiff) Old

func (d *ObjectDiff) Old() *Object

Old returns the object before the change.

Directories

Path Synopsis
cmd
gobreaking
gobreaking reports breaking changes in a Git repository.
gobreaking reports breaking changes in a Git repository.
internal

Jump to

Keyboard shortcuts

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