8000 Tags · google/go-cmp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Tags: google/go-cmp

Tags

v0.7.0

Toggle v0.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Detect proto.Message types when failing to export a field (#370)

While we do not provide 1st class handling of protobuf messages,
we can at least detect whether the type is a proto.Message
and refer the user to the correct package to use to handle
protobuf messages with cmp.Equal.

v0.6.0

Toggle v0.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add cmpopts.EquateComparable (#340)

This helper function makes it easier to specify that comparable types
are safe to directly compare with the == operator in Go.

The API does not use generics as it follows existing options like
cmp.AllowUnexported, cmpopts.IgnoreUnexported, or cmpopts.IgnoreTypes.

While generics provides type safety, the user experience is not as nice.
Our current API allows multiple types to be specified:
	cmpopts.EquateComparable(netip.Addr{}, netip.Prefix{})
While generics would not allow variadic arguments:
	cmpopts.EquateComparable[netip.Addr]()
	cmpopts.EquateComparable[netip.Prefix]()

Bump mininimum supported Go to 1.18 for net/netip type.
Start testing on Go 1.21.

Fixes #339

v0.5.9

Toggle v0.5.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Adjust heuristic for line-based versus byte-based diffing (#299)

If the string has many characters that require escape sequences to print,
then we need to take that into consideration and avoid byte-by-byte diffing.

Co-authored-by: Damien Neil <neild@users.noreply.github.com>

v0.5.8

Toggle v0.5.8's commit message
10000

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Additional cleanup with Go 1.13 as minimal version (#295)

v0.5.7

Toggle v0.5.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add //go:build lines (#285)

Starting with Go 1.17, //go:build lines are preferred over // +build
lines, see https://golang.org/doc/go1.17#build-lines and
https://golang.org/design/draft-gobuild for details.

This change was generated by running Go 1.17 go fmt ./... which
automatically adds //go:build lines based on the existing // +build
lines.

Also update the corresponding GitHub action to use Go 1.17 gofmt.

v0.5.6

Toggle v0.5.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Print as text if mostly text (#258)

The previous heuristic of treating strings as binary data
if it contains any invalid UTF-8 was too strict.
Loosen the heuristic to check if most of the characters
are printable text.

Fixes #257

v0.5.5

Toggle v0.5.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix reporter verbosity bug (#253)

FormatDiff should only set the verbosity to 3 if the current verbosity
is lower than 3. Otherwise, it may remove an intended higher verbosity
setting causing the reporter output to not differentiate between
two large values that are different at the end.

While we are at it, increase the maxVerbosityPreset to 6.

v0.5.4

Toggle v0.5.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Impose verbosity limit when formatting map keys (#248)

Map keys should have a sensible verbosity limit imposed,
otherwise the reporter can end up printing a massive data structure
that cannot reasonably fit in memory.

v0.5.3

Toggle v0.5.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix Diff documentation (#237)

The description inaccurately describes the operation of Diff,
which is y - x, where a '+' prefix denotes elements added from y
and a '-' prefix denotes elements removed from x.

For example:
	// Consider this call to Diff and its result.
	                  x  y
	cmp.Diff({b:2, c:3}, {a:1, b:2}) => {+a:1, b:2, -c:3}

	// Consider the same in mathematical notation.
	         y - x
	{a:1, b:2} - {b:2, c:3} = {+a:1, b:2, -c:3}

v0.5.2

Toggle v0.5.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Suggest use of cmpopts.EquateErrors (#234)

If cmp panics because it is trying to access an unexported field,
specially suggest the use of cmpopts.EquateErrors if the parent type
implements the error interface.

Fixes #233
0