diff

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 1 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 struct {
	Field string
	Old   string
	New   string
}

Change is a change to a field

func DiffSet

func DiffSet[T comparable](field string, old, new []T) (Change, bool)

DiffSet returns the difference between two slice-based sets

func DiffString

func DiffString(field string, old, new string) (Change, bool)

DiffString returns the difference between two strings

type Diff

type Diff[T any] struct {
	Item    T
	Changes []Change
}

Diff is the difference between two items

Jump to

Keyboard shortcuts

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