cmp

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffResult

type DiffResult struct {
	Fields []FieldInfo
}

func Diff

func Diff(o, n interface{}) (res DiffResult, err error)

Diff will compare the `old` and `new` one then return diff result.Call DiffResult.Display function will return display map with new filed json value.

func (DiffResult) Beautiful

func (r DiffResult) Beautiful() ([]map[string]string, error)

type FieldInfo

type FieldInfo struct {
	TagValue           string
	Name               string
	ValueNew, ValueOld reflect.Value
}

Jump to

Keyboard shortcuts

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