{"id":13983624,"url":"https://github.com/go-test/deep","last_synced_at":"2025-05-14T08:06:33.704Z","repository":{"id":38454773,"uuid":"83229186","full_name":"go-test/deep","owner":"go-test","description":"Golang deep variable equality test that returns human-readable differences","archived":false,"fork":false,"pushed_at":"2025-05-02T18:30:25.000Z","size":86,"stargazers_count":770,"open_issues_count":12,"forks_count":56,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-14T05:04:37.086Z","etag":null,"topics":["deep-equals","golang","golang-testing","variable-equality"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-test.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-26T18:00:00.000Z","updated_at":"2025-05-06T18:04:55.000Z","dependencies_parsed_at":"2024-04-09T19:58:14.530Z","dependency_job_id":"aa19e85c-844e-4f56-b8ae-a3e27050cdc5","html_url":"https://github.com/go-test/deep","commit_stats":{"total_commits":91,"total_committers":17,"mean_commits":5.352941176470588,"dds":"0.46153846153846156","last_synced_commit":"9e863ff5cf900f95c7e8a5e8248300939257744b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-test%2Fdeep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-test%2Fdeep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-test%2Fdeep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-test%2Fdeep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-test","download_url":"https://codeload.github.com/go-test/deep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101616,"owners_count":22014909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-equals","golang","golang-testing","variable-equality"],"created_at":"2024-08-09T05:01:49.908Z","updated_at":"2025-05-14T08:06:28.675Z","avatar_url":"https://github.com/go-test.png","language":"Go","readme":"# Deep Variable Equality for Humans\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-test/deep)](https://goreportcard.com/report/github.com/go-test/deep)\n[![Coverage Status](https://coveralls.io/repos/github/go-test/deep/badge.svg?branch=master)](https://coveralls.io/github/go-test/deep?branch=master)\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-test/deep.svg)](https://pkg.go.dev/github.com/go-test/deep)\n\nThis package provides a single function: `deep.Equal`. It's like [reflect.DeepEqual](http://golang.org/pkg/reflect/#DeepEqual) but much friendlier to humans (or any sentient being) for two reason:\n\n* `deep.Equal` returns a list of differences\n* `deep.Equal` does not compare unexported fields (by default)\n\n`reflect.DeepEqual` is good (like all things Golang!), but it's a game of [Hunt the Wumpus](https://en.wikipedia.org/wiki/Hunt_the_Wumpus). For large maps, slices, and structs, finding the difference is difficult.\n\n`deep.Equal` doesn't play games with you, it lists the differences:\n\n```go\npackage main_test\n\nimport (\n\t\"testing\"\n\t\"github.com/go-test/deep\"\n)\n\ntype T struct {\n\tName    string\n\tNumbers []float64\n}\n\nfunc TestDeepEqual(t *testing.T) {\n\t// Can you spot the difference?\n\tt1 := T{\n\t\tName:    \"Isabella\",\n\t\tNumbers: []float64{1.13459, 2.29343, 3.010100010},\n\t}\n\tt2 := T{\n\t\tName:    \"Isabella\",\n\t\tNumbers: []float64{1.13459, 2.29843, 3.010100010},\n\t}\n\n\tif diff := deep.Equal(t1, t2); diff != nil {\n\t\tt.Error(diff)\n\t}\n}\n```\n\n\n```\n$ go test\n--- FAIL: TestDeepEqual (0.00s)\n        main_test.go:25: [Numbers.slice[1]: 2.29343 != 2.29843]\n```\n\nThe difference is in `Numbers.slice[1]`: the two values aren't equal using Go `==`.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-test%2Fdeep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-test%2Fdeep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-test%2Fdeep/lists"}