{"id":53390,"library":"xorcare-golden","title":"Golden","description":"Golden file testing for Go, allowing easy update of test expectations via -update flag.","status":"active","version":"0.8.4","language":"go","source_language":null,"source_url":"https://github.com/xorcare/golden","tags":["testing","golden-files","assert","testdata"],"install":[{"cmd":"go get github.com/xorcare/golden","lang":"bash","label":"Install github.com/xorcare/golden"}],"dependencies":[],"imports":[{"symbol":"golden","correct":"github.com/xorcare/golden"}],"quickstart":{"code":"package main\n\nimport (\n\t\"testing\"\n\t\"github.com/xorcare/golden\"\n)\n\nfunc TestSomething(t *testing.T) {\n\tgot := \"expected output\"\n\tgolden.Assert(t, []byte(got))\n}","lang":"go","description":"Use golden.Assert in a test to compare output with a golden file."},"warnings":[{"fix":"Run tests with -update flag to regenerate golden files when output changes intentionally.","message":"Golden files are stored in testdata directory; ensure they are committed to version control.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'allow':7 'assert':20 'easi':8 'expect':12 'file':3,19 'flag':15 'go':6 'golden':1,2,18 'golden-fil':17 'test':4,11,16 'testdata':21 'updat':9,14 'via':13","created_at":"2026-06-15T07:37:42.427671+00:00","updated_at":"2026-06-15T07:37:42.427671+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/xorcare/golden","github":"https://github.com/xorcare/golden","docs":"https://pkg.go.dev/github.com/xorcare/golden#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-15","next_check":"2026-12-12","install_tag":null}}