Documentation ¶
Overview ¶
Package typed is a strictly typed wrapper around cmp.Diff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
Diff is the same as DiffSafe except that both failures and actual diff are returned in `ret` without any way to distinguish them.
func DiffSafe ¶
DiffSafe is just like cmp.Diff but it forces got and want to have the same type and includes protocmp.Transform().
This will result in more informative compile-time errors. protocmp.Transform() is necessary for any protocol buffer comparison, and it correctly does nothing if the arguments that we pass in are hereditarily non-protobufs. So, for developer convenience, let's just always add it.
Unlike a raw `cmp.Diff`, this will not panic but will instead return any discovered error as a string value with ok == false.
if you want to extend the defaults, take a look at: - "go.chromium.org/luci/common/testing/registry"
Types ¶
This section is empty.