top

Package cmp determines equality of values.

This package is intended to be a more powerful and safer alternative to reflect.DeepEqual for comparing whether two values are semantically equal.

The primary features of cmp are:

• When the default behavior of equality does not suit the needs of the test, custom equality functions can override the equality operation. For example, an equality function may report floats as equal so long as they are within some tolerance of each other.

• Types that have an Equal method may use that method to determine equality. This allows package authors to determine the equality operation for the types that they define.

• If no custom equality functions are used and no Equal method is defined, equality is determined by recursively comparing the primitive kinds on both values, much like reflect.DeepEqual. Unlike reflect.DeepEqual, unexported fields are not compared by default; they result in panics unless suppressed by using an Ignore option (see cmpopts.IgnoreUnexported) or explicitly compared using the AllowUnexported option.

Imported by 26 package(s)

  1. github.com/CanonicalLtd/candid/internal/candidtest
  2. github.com/GoogleCloudPlatform/skaffold/testutil
  3. github.com/GoogleContainerTools/skaffold/testutil
  4. github.com/appscode/kutil/meta
  5. github.com/appscode/voyager/apis/voyager/v1beta1
  6. github.com/frankban/quicktest
  7. github.com/go-gadgets/eventsourcing/utilities/test
  8. github.com/google/go-cmp/cmp/cmpopts
  9. github.com/gotestyourself/gotestyourself/assert
  10. github.com/gotestyourself/gotestyourself/assert/cmp
  11. github.com/gotestyourself/gotestyourself/assert/opt
  12. github.com/influxdata/chronograf/integrations
  13. github.com/influxdata/chronograf/server
  14. github.com/influxdata/ifql/ast/asttest
  15. github.com/influxdata/ifql/query/execute/executetest
  16. github.com/influxdata/ifql/query/plan/plantest
  17. github.com/influxdata/ifql/query/querytest
  18. github.com/influxdata/ifql/semantic/semantictest
  19. github.com/influxdata/platform/testing
  20. github.com/m3db/m3x/test
  21. github.com/mdlayher/hdhomerun
  22. github.com/polydawn/go-timeless-api/testutil
  23. github.com/retro-framework/go-retro/framework/test_helper
  24. github.com/rogpeppe/misc/cmd/yamltest
  25. github.com/stackmachine/pb/diff
  26. github.com/youngkin/gophercise-quiz

Imported only in test by 233 package(s)

  1. github.com/AristaNetworks/telegraf/plugins/inputs/zipkin
  2. github.com/AristaNetworks/telegraf/plugins/inputs/zipkin/codec
  3. github.com/AristaNetworks/telegraf/plugins/inputs/zipkin/codec/jsonV1
  4. github.com/AristaNetworks/telegraf/plugins/inputs/zipkin/codec/thrift
  5. github.com/ChrisRx/distcache
  6. github.com/ChrisRx/jolt
  7. github.com/ChrisRx/myriad
  8. github.com/Chyroc/tui-go
  9. github.com/GeorgeMac/go-dockerclient
  10. github.com/GoogleCloudPlatform/google-cloud-go/civil
  11. github.com/GoogleCloudPlatform/skaffold/pkg/skaffold/watch
  12. github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker
  13. github.com/LarsFronius/go-dockerclient
  14. github.com/NYTimes/gcs-helper
  15. github.com/airylinus/selenium
  16. github.com/aktungmak/jdhcp
  17. github.com/allencloud/docker/builder/remotecontext/git
  18. github.com/aristanetworks/telegraf/plugins/inputs/zipkin
  19. github.com/aristanetworks/telegraf/plugins/inputs/zipkin/codec
  20. github.com/aristanetworks/telegraf/plugins/inputs/zipkin/codec/jsonV1
  21. github.com/aristanetworks/telegraf/plugins/inputs/zipkin/codec/thrift
  22. github.com/blacklightcms/go-recurly/webhooks
  23. github.com/boynux/docker/builder/dockerfile/parser
  24. github.com/boynux/docker/builder/remotecontext/git
  25. github.com/boynux/docker/volume/store
  26. github.com/branthz/utarrow/httputil
  27. github.com/branthz/utarrow/httputil/header
  28. github.com/bukalapak/ottoman/x/http
  29. github.com/cceckman/discoirc/data
  30. github.com/cceckman/discoirc/ui/client
  31. github.com/cceckman/discoirc/ui/widgets
  32. github.com/cceckman/tui-go
  33. github.com/christophberger/grada
  34. github.com/clinta/go-dockerclient
  35. github.com/containerd/containerd/snapshots/storage
  36. github.com/crosbymichael/containerd/snapshots/storage
  37. github.com/darkgray1981/kanjiquizbot
  38. github.com/digitalocean/go-openvswitch/ovs
  39. github.com/digitalocean/go-openvswitch/ovsdb
  40. github.com/digitalocean/go-openvswitch/ovsdb/internal/jsonrpc
  41. github.com/digitalocean/go-openvswitch/ovsnl
  42. github.com/digitalocean/go-smbios/smbios
  43. github.com/dnephin/buildpipe/tasks/job
  44. github.com/docker/cli/cli/command/container
  45. github.com/docker/cli/cli/command/image
  46. github.com/docker/cli/cli/command/network
  47. github.com/docker/cli/cli/command/service
  48. github.com/docker/cli/cli/manifest/store
  49. github.com/docker/docker-ce/components/cli/cli/command/container
  50. github.com/docker/docker-ce/components/cli/cli/command/image
  51. github.com/docker/docker-ce/components/cli/cli/command/network
  52. github.com/docker/docker-ce/components/cli/cli/command/service
  53. github.com/docker/docker/builder/remotecontext/git
  54. github.com/drone/go-scm/scm/driver/gitlab
  55. github.com/drone/go-scm/scm/driver/gogs
  56. github.com/dsnet/golib/jsonfmt
  57. github.com/dsnet/golib/unitconv
  58. github.com/duglin/docker/builder/remotecontext/git
  59. github.com/dustin-decker/featuremill
  60. github.com/eandre/pyparse
  61. github.com/elastic/apm-agent-go/stacktrace
  62. github.com/eraclitux/pqstream
  63. github.com/estesp/docker/builder/remotecontext/git
  64. github.com/fsouza/gizmo-stackdriver-logging
  65. github.com/garyburd/gddo/gddo-server
  66. github.com/garyburd/gddo/gosrc
  67. github.com/garyburd/gopkgdoc/gddo-server
  68. github.com/garyburd/gopkgdoc/gosrc
  69. github.com/garyburd/gopkgdoc/httputil
  70. github.com/garyburd/gopkgdoc/httputil/header
  71. github.com/genuinetools/reg/repoutils
  72. github.com/giganteous/mtail
  73. github.com/golang/build/devapp/owners
  74. github.com/google/go-cmp/cmp/internal/value
  75. github.com/google/go-containerregistry/v1
  76. github.com/google/go-containerregistry/v1/remote
  77. github.com/google/go-containerregistry/v1/tarball
  78. github.com/google/gvisor/runsc/cmd
  79. github.com/google/keytransparency/impl/sql/domain
  80. github.com/google/keytransparency/impl/sql/keysets
  81. github.com/google/metallb/controller
  82. github.com/google/metallb/speaker
  83. github.com/google/mtail/metrics/datum
  84. github.com/google/mtail/testutil
  85. github.com/gotestyourself/gotestyourself/fs
  86. github.com/hackebrot/turtle
  87. github.com/henderjon/handlerset
  88. github.com/henderjon/knobs
  89. github.com/influxdata/chronograf/bolt
  90. github.com/influxdata/chronograf/bolt/internal
  91. github.com/influxdata/chronograf/influx
  92. github.com/influxdata/chronograf/kapacitor
  93. github.com/influxdata/chronograf/organizations
  94. github.com/influxdata/chronograf/roles
  95. github.com/influxdata/ifql/ast
  96. github.com/influxdata/ifql/compiler
  97. github.com/influxdata/ifql/complete
  98. github.com/influxdata/ifql/functions
  99. github.com/influxdata/ifql/interpreter
  100. github.com/influxdata/ifql/parser
  101. github.com/influxdata/ifql/promql
  102. github.com/influxdata/ifql/query
  103. github.com/influxdata/ifql/query/execute
  104. github.com/influxdata/ifql/query/plan
  105. github.com/influxdata/ifql/semantic
  106. github.com/influxdata/influxdb/pkg/bytesutil
  107. github.com/influxdata/influxdb/query
  108. github.com/influxdata/influxdb/query/internal/gota
  109. github.com/influxdata/influxdb/services/storage
  110. github.com/influxdata/influxdb/tests
  111. github.com/influxdata/kapacitor/services/sideload
  112. github.com/influxdata/platform
  113. github.com/influxdata/platform/http
  114. github.com/influxdata/tdigest
  115. github.com/influxdata/telegraf/plugins/inputs/zipkin
  116. github.com/influxdata/telegraf/plugins/inputs/zipkin/codec
  117. github.com/influxdata/telegraf/plugins/inputs/zipkin/codec/jsonV1
  118. github.com/influxdata/telegraf/plugins/inputs/zipkin/codec/thrift
  119. github.com/influxdb/influxdb/services/storage
  120. github.com/influxdb/kapacitor/services/sideload
  121. github.com/influxdb/telegraf/plugins/inputs/zipkin
  122. github.com/influxdb/telegraf/plugins/inputs/zipkin/codec
  123. github.com/influxdb/telegraf/plugins/inputs/zipkin/codec/jsonV1
  124. github.com/influxdb/telegraf/plugins/inputs/zipkin/codec/thrift
  125. github.com/ipfans/qcloudsms
  126. github.com/ivzb/achievers_server/app/shared/config
  127. github.com/ivzb/achievers_server/app/shared/response
  128. github.com/izumin5210/grapi/pkg/grapicmd/util/fs
  129. github.com/izumin5210/grapi/pkg/grapiserver
  130. github.com/jba/btree
  131. github.com/jba/gen
  132. github.com/jcmturner/awsarn
  133. github.com/jda/xmaintnote-go
  134. github.com/jda/xmaintnote-go/icalgen
  135. github.com/jens18/lgresu/lgresustatus
  136. github.com/jessfraz/docker/builder/remotecontext/git
  137. github.com/jessfraz/docker/image
  138. github.com/jessfraz/docker/pkg/streamformatter
  139. github.com/jessfraz/docker/pkg/term
  140. github.com/jessfraz/docker/volume/store
  141. github.com/jessfraz/reg/repoutils
  142. github.com/jjjjpppp/bitbank-go-client/v1
  143. github.com/jjjjpppp/bitbank-go-client/v1/models
  144. github.com/jjjjpppp/quoinex-go-client/v2
  145. github.com/jonstaryuk/gcloudzap
  146. github.com/jonstaryuk/logwatch
  147. github.com/jseely/amqp
  148. github.com/jsternberg/influxdb/services/storage
  149. github.com/juju/jujushell/internal/lxdclient
  150. github.com/karupanerura/go-httpagent
  151. github.com/karupanerura/go-httpflow
  152. github.com/kevinburke/go-git
  153. github.com/kevinburke/nacl/auth
  154. github.com/kevinburke/nacl/stream
  155. github.com/klauspost/compress/fse
  156. github.com/klauspost/compress/huff0
  157. github.com/kyleconroy/pgoutput
  158. github.com/ljagiello/influxdb/services/storage
  159. github.com/ljagiello/telegraf/plugins/inputs/zipkin
  160. github.com/ljagiello/telegraf/plugins/inputs/zipkin/codec
  161. github.com/ljagiello/telegraf/plugins/inputs/zipkin/codec/jsonV1
  162. github.com/ljagiello/telegraf/plugins/inputs/zipkin/codec/thrift
  163. github.com/mafredri/cdp/rpcc
  164. github.com/mdlayher/genetlink
  165. github.com/mdlayher/genetlink/genltest
  166. github.com/mdlayher/hdhomerun_exporter
  167. github.com/mdlayher/kobject
  168. github.com/mdlayher/ndp
  169. github.com/mdlayher/netconsole
  170. github.com/mdlayher/netconsoled
  171. github.com/mdlayher/netconsoled/internal/config
  172. github.com/mdlayher/taskstats
  173. github.com/mdlayher/wifi
  174. github.com/mishudark/magic-decoder
  175. github.com/mongodb-labs/mgobson
  176. github.com/mongodb/mongo-go-driver/bson
  177. github.com/mongodb/mongo-go-driver/core/description
  178. github.com/mongodb/mongo-go-driver/core/wiremessage
  179. github.com/mongodb/mongo-go-driver/mongo
  180. github.com/ncabatoff/mtail
  181. github.com/ncabatoff/process-exporter/proc
  182. github.com/nictuku/go-dockerclient
  183. github.com/nkirsch/taskstats
  184. github.com/nuclio/amqp
  185. github.com/nytimes/gcs-helper
  186. github.com/openconfig/gnmi/cache
  187. github.com/openconfig/gnmi/client/gnmi
  188. github.com/openshift/go-dockerclient
  189. github.com/peterbourgon/prometheus-aggregator
  190. github.com/pteich/go-dockerclient
  191. github.com/restic/restic/internal/archiver
  192. github.com/restic/restic/internal/fs
  193. github.com/restic/restic/internal/restic
  194. github.com/restic/restic/internal/ui
  195. github.com/retro-framework/go-retro/framework/depot
  196. github.com/retro-framework/go-retro/framework/packing
  197. github.com/rickypai/civil
  198. github.com/rykov/paperboy/mail
  199. github.com/rykov/paperboy/server
  200. github.com/ryym/goq/cllct
  201. github.com/ryym/goq/gen
  202. github.com/ryym/goq/goql
  203. github.com/sclevine/go-containerregistry/ko/resolve
  204. github.com/sclevine/go-containerregistry/v1
  205. github.com/sclevine/go-containerregistry/v1/mutate
  206. github.com/sclevine/go-containerregistry/v1/remote
  207. github.com/sclevine/go-containerregistry/v1/remote/transport
  208. github.com/sclevine/go-containerregistry/v1/tarball
  209. github.com/scylladb/gocqlx
  210. github.com/scylladb/gocqlx/qb
  211. github.com/sloppyio/sloppose/pkg/converter
  212. github.com/smarterclayton/go-dockerclient
  213. github.com/src-d/go-git/plumbing/format/index
  214. github.com/stevenjack/go-dockerclient
  215. github.com/tenntenn/sync/fcfs
  216. github.com/timberio/agent
  217. github.com/tmc/cryptopals
  218. github.com/tmc/pqstream
  219. github.com/trustelem/zxcvbn/matching
  220. github.com/unclejack/moby/builder/remotecontext/git
  221. github.com/vCabbage/amqp
  222. github.com/vcabbage/amqp
  223. github.com/veqryn/goracle
  224. github.com/vmware/dispatch/pkg/events/parser
  225. github.com/wargarblgarbl/libgosubs/ass
  226. github.com/wargarblgarbl/libgosubs/mdvd
  227. github.com/wargarblgarbl/libgosubs/srt
  228. github.com/wargarblgarbl/libgosubs/ttml
  229. github.com/wttw/pgoutput
  230. github.com/wzshiming/go-dockerclient
  231. github.com/yosifkit/docker/builder/remotecontext/git
  232. github.com/zalando/skipper/dataclients/kubernetes
  233. github.com/zvelo/httpsig

Imports 3 package(s)

  1. github.com/google/go-cmp/cmp/internal/function
  2. github.com/google/go-cmp/cmp/internal/diff
  3. github.com/google/go-cmp/cmp/internal/value

Test imports 3 package(s)

  1. github.com/google/go-cmp/cmp/cmpopts
  2. github.com/google/go-cmp/cmp/internal/testprotos
  3. github.com/google/go-cmp/cmp/internal/teststructs