Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google/go-cmp
/ functions
Functions
428 in github.com/google/go-cmp
⨍
Functions
428
◇
Types & classes
226
↓ 1 callers
Function
updateReferencePrefix
(prefix, ref string)
cmp/report_references.go:258
↓ 1 callers
Function
validateScript
(x, y string, es EditScript)
cmp/internal/diff/diff_test.go:356
↓ 1 callers
Function
wrapParens
wrapParens wraps s with a set of parenthesis, but avoids it if the wrapped node itself is already surrounded by a pair of parenthesis or braces. It ha
cmp/report_reflect.go:86
↓ 1 callers
Function
wrapTrunkReference
(p value.Pointer, printAddress bool, s textNode)
cmp/report_references.go:94
↓ 1 callers
Function
wrapTrunkReferences
(pp [2]value.Pointer, s textNode)
cmp/report_references.go:82
↓ 1 callers
Function
zigzag
zigzag maps a consecutive sequence of integers to a zig-zag sequence. [0 1 2 3 4 5 ...] => [0 -1 +1 -2 +2 ...]
cmp/internal/diff/diff.go:397
Method
Begin
(_, _ int, f EqualFunc, _, _ *EditScript)
cmp/internal/diff/debug_disable.go:14
Function
BenchmarkBytes
BenchmarkBytes benchmarks the performance of performing Equal or Diff on large slices of bytes.
cmp/compare_test.go:2962
Function
BenchmarkDifference
(b *testing.B)
cmp/internal/diff/diff_test.go:295
Method
Boss
()
cmp/internal/teststructs/project4.go:70
Method
ByCycle
ByCycle reports whether a reference cycle was detected.
cmp/options.go:464
Method
Convulsion
()
cmp/internal/teststructs/project4.go:106
Function
CreateDish
(m *pb.Dish, err error)
cmp/internal/teststructs/project2.go:65
Function
CreateMockTable
(s []string)
cmp/internal/teststructs/project3.go:78
Method
CreationDate
()
cmp/internal/teststructs/project4.go:69
Method
CreationTime
()
cmp/internal/teststructs/project4.go:110
Function
Equal
(x, y Message)
cmp/internal/testprotos/protos.go:7
Method
Equal
Equal reports whether the node was determined to be equal or not. As a special case, ignored nodes are considered equal.
cmp/options.go:443
Method
Equal
(s2 textNode)
cmp/report_text.go:106
Method
Equal
(s2 textNode)
cmp/report_text.go:182
Method
Equal
(s2 textNode)
cmp/report_text.go:349
Method
Equal
(y otherString)
cmp/example_test.go:222
Method
Equal
Equal indicates whether the symbols are equal. Two symbols are equal if and only if NumDiff == 0. If Equal, then they are also Similar.
cmp/internal/diff/diff.go:110
Method
Equal
(y StructA)
cmp/internal/teststructs/structs.go:79
Method
Equal
(y *StructB)
cmp/internal/teststructs/structs.go:80
Method
Equal
(y InterfaceA)
cmp/internal/teststructs/structs.go:81
Method
Equal
(y InterfaceA)
cmp/internal/teststructs/structs.go:83
Method
Equal
(y InterfaceA)
cmp/internal/teststructs/structs.go:85
Method
Equal
(y InterfaceA)
cmp/internal/teststructs/structs.go:87
Method
Equal
(y InterfaceA)
cmp/internal/teststructs/structs.go:89
Method
Equal
(y func() int)
cmp/internal/teststructs/structs.go:91
Method
Equal
(y struct{ A int })
cmp/internal/teststructs/structs.go:92
Method
Equal
(y chan bool)
cmp/internal/teststructs/structs.go:93
Method
Equal
(y <-chan bool)
cmp/internal/teststructs/structs.go:94
Function
ExampleDiff_testing
TODO: Re-write these examples in terms of how you actually use the fundamental options and filters and not in terms of what cool things you can do wit
cmp/example_test.go:25
Function
ExampleIgnoreFields_testing
Use IgnoreFields to ignore fields on a struct type when comparing by providing a value of the type and the field names to ignore. Typically, a zero va
cmp/cmpopts/example_test.go:24
Function
ExampleOption_approximateFloats
Approximate equality for floats can be handled by defining a custom comparer on floats that determines two values to be equal if they are within some
cmp/example_test.go:66
Function
ExampleOption_avoidEqualMethod
If the Equal method defined on a type is not suitable, the type can be dynamically transformed to be stripped of the Equal method (or any method for t
cmp/example_test.go:229
Function
ExampleOption_equalEmpty
Sometimes, an empty map or slice is considered equal to an allocated one of zero length. This example is for demonstrative purposes; use [github.com/
cmp/example_test.go:163
Function
ExampleOption_equalNaNs
Normal floating-point arithmetic defines == to be false when comparing NaN with itself. In certain cases, this is not the desired property. This exam
cmp/example_test.go:95
Function
ExampleOption_equalNaNsAndApproximateFloats
To have floating-point comparisons combine both properties of NaN being equal to itself and also approximate equality of values, filters are needed to
cmp/example_test.go:123
Function
ExampleOption_sortedSlice
Two slices may be considered equal if they have the same elements, regardless of the order that they appear in. Transformations can be used to sort th
cmp/example_test.go:198
Function
ExampleOption_transformComplex
The complex numbers complex64 and complex128 can really just be decomposed into a pair of float32 or float64 values. It would be convenient to be able
cmp/example_test.go:264
Function
ExampleReporter
()
cmp/example_reporter_test.go:40
Method
Expansion
()
cmp/internal/teststructs/project4.go:107
Method
Expiration
()
cmp/internal/teststructs/project4.go:135
Function
Exporter
Exporter returns an [Option] that specifies whether [Equal] is allowed to introspect into the unexported fields of certain struct types. Users of thi
cmp/options.go:408
Method
Finish
()
cmp/internal/diff/debug_disable.go:18
Method
Func
Func is the function pointer to the transformer function.
cmp/path.go:314
Method
GoString
GoString returns the path to a specific node using Go syntax. For example: (*root.MyMap["key"].(*mypkg.MyStruct).MySlices)[2][3].MyField
cmp/path.go:121
Method
HorseBack
()
cmp/internal/teststructs/project4.go:104
Method
ID
()
cmp/internal/teststructs/project4.go:97
Method
IncorporatedDate
()
cmp/internal/teststructs/project4.go:100
Method
Index
Index is the index of the field in the parent struct type. See [reflect.Type.Field].
cmp/path.go:216
Method
InterfaceA
()
cmp/internal/teststructs/structs.go:8
Method
InterfaceA
()
cmp/internal/teststructs/structs.go:82
Method
InterfaceA
()
cmp/internal/teststructs/structs.go:84
Method
InterfaceA
()
cmp/internal/teststructs/structs.go:86
Method
InterfaceA
()
cmp/internal/teststructs/structs.go:88
Method
Key
Key is the index key; it may return -1 if in a split state
cmp/path.go:246
Method
LastCrimeDate
()
cmp/internal/teststructs/project4.go:71
Method
Len
()
cmp/compare_test.go:2692
Method
Len
()
cmp/report_text.go:103
Method
Len
()
cmp/report_text.go:168
Method
Len
()
cmp/report_text.go:346
Method
Less
(i, j int)
cmp/compare_test.go:2693
Method
Location
()
cmp/internal/teststructs/project4.go:98
Method
Manufacturer
()
cmp/internal/teststructs/project4.go:136
Method
MetaData
()
cmp/internal/teststructs/project4.go:101
Method
Method
()
cmp/compare_test.go:203
Method
Name
Name is the field name.
cmp/path.go:212
Function
NewParentStructG
()
cmp/internal/teststructs/structs.go:171
Function
NewParentStructH
()
cmp/internal/teststructs/structs.go:174
Function
NewParentStructI
()
cmp/internal/teststructs/structs.go:177
Function
NewParentStructJ
()
cmp/internal/teststructs/structs.go:180
Method
Operation1
()
cmp/internal/teststructs/project3.go:69
Method
Operation1
()
cmp/internal/teststructs/project3.go:79
Method
Operation2
()
cmp/internal/teststructs/project3.go:70
Method
Operation2
()
cmp/internal/teststructs/project3.go:80
Method
Operation3
()
cmp/internal/teststructs/project3.go:71
Method
Operation3
()
cmp/internal/teststructs/project3.go:81
Method
PointerMethod
()
cmp/internal/function/func_test.go:19
Method
PoisonType
()
cmp/internal/teststructs/project4.go:134
Method
Poisons
()
cmp/internal/teststructs/project4.go:72
Method
Pop
()
cmp/report_references.go:66
Method
PopStep
()
cmp/example_reporter_test.go:32
Method
PopStep
()
cmp/report_value.go:106
Method
PopStep
()
cmp/report.go:32
Method
Potency
()
cmp/internal/teststructs/project4.go:137
Method
PrivateMessage
()
cmp/internal/teststructs/project4.go:102
Method
PrivateStruct
()
cmp/internal/teststructs/structs.go:191
Method
PrivateStruct
()
cmp/internal/teststructs/structs.go:192
Method
PrivateStruct
()
cmp/internal/teststructs/structs.go:193
Method
PrivateStruct
()
cmp/internal/teststructs/structs.go:194
Method
PrivateStruct
()
cmp/internal/teststructs/structs.go:195
Method
Proto
()
cmp/internal/testprotos/protos.go:15
Method
Proto
()
cmp/internal/teststructs/project1.go:263
Method
Proto
()
cmp/internal/teststructs/project1.go:264
Method
Proto
()
cmp/internal/teststructs/project1.go:265
Method
Proto
()
cmp/internal/teststructs/project1.go:266
← previous
next →
201–300 of 428, ranked by callers