Debian Codegraph @

README.md

raw symbols SCIP
1 # Go package with improved reflect.DeepEqual
2
3 [![License MIT](https://img.shields.io/badge/license-MIT-royalblue.svg)](LICENSE)
4 [![License BSD3](https://img.shields.io/badge/license-BSD3-royalblue.svg)](LICENSE-go)
5 [![Go version](https://img.shields.io/github/go-mod/go-version/powerman/deepequal?color=blue)](https://go.dev/)
6 [![Test](https://img.shields.io/github/actions/workflow/status/powerman/deepequal/test.yml?label=test)](https://github.com/powerman/deepequal/actions/workflows/test.yml)
7 [![Coverage Status](https://raw.githubusercontent.com/powerman/deepequal/gh-badges/coverage.svg)](https://github.com/powerman/deepequal/actions/workflows/test.yml)
8 [![Release](https://img.shields.io/github/v/release/powerman/deepequal?color=blue)](https://github.com/powerman/deepequal/releases/latest)
9 [![Go Reference](https://pkg.go.dev/badge/github.com/powerman/deepequal.svg)](https://pkg.go.dev/github.com/powerman/deepequal)
10
11 ![Linux | amd64 arm64 armv7 ppc64le s390x riscv64](https://img.shields.io/badge/Linux-amd64%20arm64%20armv7%20ppc64le%20s390x%20riscv64-royalblue)
12 ![macOS | amd64 arm64](https://img.shields.io/badge/macOS-amd64%20arm64-royalblue)
13 ![Windows | amd64 arm64](https://img.shields.io/badge/Windows-amd64%20arm64-royalblue)
14
15 Most of the code is copied from Go reflect package with slight
16 modifications.
17
18 Differences from reflect.DeepEqual:
19
20 - If compared value implements `.Equal(valueOfSameType) bool` method then
21 it will be called instead of comparing values as is.
22 - If called `Equal` method will panics then whole DeepEqual will panics too.
23
24 This means you can use this DeepEqual method to correctly compare types
25 like time.Time or decimal.Decimal, without taking in account unimportant
26 differences (like time zone or exponent).