jsondiff

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const OP_DELETE = "-"
View Source
const OP_DMP = "d"

diff match patch

View Source
const OP_EQUAL = "="
View Source
const OP_INSERT = "+"
View Source
const OP_MODIFY = "M"
View Source
const OP_REPLACE = "r"

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolJSONDiff

type BoolJSONDiff JSONDiff[bool]

type Float32JSONDiff

type Float32JSONDiff JSONDiff[float32]

type Int64JSONDiff

type Int64JSONDiff JSONDiff[int64]

type JSONDiff

type JSONDiff[T any] struct {
	Operation string `json:"o"`
	Value     T      `json:"v"`
}

type StringJSONDiff

type StringJSONDiff JSONDiff[string]

func GetDiff

func GetDiff(s1 string, s2 string) StringJSONDiff

func (*StringJSONDiff) Apply

func (jsondiff *StringJSONDiff) Apply(src string) string

func (*StringJSONDiff) PrettyPrint added in v1.10.0

func (jsondiff *StringJSONDiff) PrettyPrint(source string, content string)

Jump to

Keyboard shortcuts

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