diff options
| author | M. J. Fromberger <fromberger@tailscale.com> | 2025-09-17 08:39:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-17 08:39:29 -0700 |
| commit | 6992f958fc5eb8309f204da953664181256e96ed (patch) | |
| tree | a9d2afe3baffe073f1a7aa5871c049766ab1508b /control/controlknobs/controlknobs.go | |
| parent | 8a4b1eb6a3cf9c3f082c2d725968239084bfeb51 (diff) | |
| download | tailscale-6992f958fc5eb8309f204da953664181256e96ed.tar.xz tailscale-6992f958fc5eb8309f204da953664181256e96ed.zip | |
util/eventbus: add an EqualTo helper for testing (#17178)
For a common case of events being simple struct types with some exported
fields, add a helper to check (reflectively) for equal values using cmp.Diff so
that a failed comparison gives a useful diff in the test output.
More complex uses will still want to provide their own comparisons; this
(intentionally) does not export diff options or other hooks from the cmp
package.
Updates #15160
Change-Id: I86bee1771cad7debd9e3491aa6713afe6fd577a6
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
0 files changed, 0 insertions, 0 deletions
