diff

package
v0.0.0-...-917641f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package diff compares two values and returns the changes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func S16

func S16(d Differ, old, new changes.Value) changes.Change

S16 computes the diff between two types.S9 values

func S8

func S8(d Differ, old, new changes.Value) changes.Change

S8 computes the diff between two types.S9 values

Types

type Differ

type Differ interface {
	// Diff computes the diff between old and new changes.Value
	//
	// The provided differ is meant to be used for any children or
	// inner values whose specific types may not be known to a
	// particular differ.
	Diff(d Differ, old, new changes.Value) changes.Change
}

Differ is the general Diff interface for computing changes in values as a changes.Change (which when applied to the old value is guaranteed to result in the new value)

type Std

type Std struct{}

Std implements diffs for standard types

func (Std) Diff

func (s Std) Diff(d Differ, old, new changes.Value) changes.Change

Diff implemnets Differ.Diff for standard types

Jump to

Keyboard shortcuts

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