changes

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 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 changes builds, fingerprints and summarises structured change records (contract.Change) produced by compare plugins, so every plugin reports changes the same way and a governance policy can judge them per kind.

Index

Constants

View Source
const (
	ActionAdded    = "added"
	ActionRemoved  = "removed"
	ActionModified = "modified"
)

Actions are the last segment of a change kind.

Variables

This section is empty.

Functions

func Counts

func Counts(cs []contract.Change) (breaking, nonBreaking int)

Counts returns how many changes are breaking and how many are not.

func Fingerprint

func Fingerprint(kind, pointer string) string

Fingerprint is the sha256 of a change's kind and pointer.

func Kind

func Kind(object, property, action string) string

Kind joins an object, a property and an action into a change kind.

func New

func New(kind, pointer string, breaking bool, message string) contract.Change

New builds a change with its default level (error when breaking, warn otherwise) and fingerprint.

func RenderText

func RenderText(cs []contract.Change) string

RenderText renders changes as compare plugin raw output: one "BREAKING|NON-BREAKING kind pointer: message" line per change and a total.

func Sort

func Sort(cs []contract.Change)

Sort orders changes breaking first, then by pointer and kind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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