Help us shape the future of Go! Take the 2026 Go Developer Survey

diff

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package diff compares two versions of a specification element by element and classifies each difference by the version step it needs, as docs/maintenance.md (The diff verb) describes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Pointer string // the element, such as /entities/Loan
	What    string // added, changed or removed
	Impact  int    // semver.Patch, semver.Minor or semver.Major
	Reason  string // for a changed element of the public interface, the change that decided its impact
}

Change is one element that differs between the two versions.

func Compare

func Compare(oldRoot, newRoot *yaml.Node) []Change

Compare lists the elements that differ between two merged specifications, in pointer order.

func (Change) String

func (c Change) String() string

String is the line the diff verb prints.

Jump to

Keyboard shortcuts

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