{"id":49862,"library":"google-go-cmp","title":"go-cmp","description":"Package cmp provides a powerful and flexible comparison of Go values, useful for testing.","status":"active","version":"0.7.0","language":"go","source_language":null,"source_url":"https://github.com/google/go-cmp","tags":["testing","comparison","diff","assertion"],"install":[{"cmd":"go get github.com/google/go-cmp","lang":"bash","label":"Install github.com/google/go-cmp"}],"dependencies":[],"imports":[{"symbol":"cmp","correct":"github.com/google/go-cmp/cmp"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/google/go-cmp/cmp\"\n)\n\nfunc main() {\n\tgot := []int{1, 2, 3}\n\twant := []int{1, 2, 4}\n\tfmt.Println(cmp.Diff(got, want))\n}","lang":"go","description":"Compare two slices and print the difference."},"warnings":[{"fix":"Pass cmp.AllowUnexported(MyStruct{}) to cmp.Diff or cmp.Equal.","message":"Unexported fields are not compared by default; use cmp.AllowUnexported to include them.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'assert':21 'cmp':3,5 'comparison':11,19 'diff':20 'flexibl':10 'go':2,13 'go-cmp':1 'packag':4 'power':8 'provid':6 'test':17,18 'use':15 'valu':14","created_at":"2026-06-14T18:18:31.464059+00:00","updated_at":"2026-06-14T18:18:31.464059+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/google/go-cmp","github":"https://github.com/google/go-cmp","docs":"https://pkg.go.dev/github.com/google/go-cmp#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-14","next_check":"2026-12-11","install_tag":null}}