{"id":34131610,"url":"https://github.com/vancelongwill/snapshot","last_synced_at":"2026-03-09T21:01:46.552Z","repository":{"id":57506372,"uuid":"214690052","full_name":"VanceLongwill/snapshot","owner":"VanceLongwill","description":"Snapshot testing for Golang","archived":false,"fork":false,"pushed_at":"2019-10-14T11:51:25.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-17T11:55:28.705Z","etag":null,"topics":["go","golang","golang-testing","snapshot","snapshot-testing","testing"],"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/VanceLongwill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-12T17:48:06.000Z","updated_at":"2020-04-03T12:48:47.000Z","dependencies_parsed_at":"2022-08-29T20:00:59.715Z","dependency_job_id":null,"html_url":"https://github.com/VanceLongwill/snapshot","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/VanceLongwill/snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VanceLongwill%2Fsnapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VanceLongwill%2Fsnapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VanceLongwill%2Fsnapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VanceLongwill%2Fsnapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VanceLongwill","download_url":"https://codeload.github.com/VanceLongwill/snapshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VanceLongwill%2Fsnapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30312120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","golang-testing","snapshot","snapshot-testing","testing"],"created_at":"2025-12-15T00:55:21.547Z","updated_at":"2026-03-09T21:01:46.546Z","avatar_url":"https://github.com/VanceLongwill.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## snapshot\n\nProvides basic methods for snapshot testing, inspired by [jest's snapshots](https://jestjs.io/docs/en/snapshot-testing)\n\nThis package doesn't aim to be anything more than a simple utility to be used in conjunction with\ngolang's own testing package, or any other testing framework which is also compatible with `go test`\nsnapshots are auto-generated and managed by this package:\n\n### Getting started\n\n1. Grab the package\n\n```bash\ngo get -u github.com/vancelongwill/snapshot\n```\n\n2. Use it in tests\n\n```golang\nimport (\n  \"testing\"\n\n  \"github.com/VanceLongwill/snapshot\"\n)\n\ntype Something struct {\n  MoreThings []string\n}\n\nfunc TestSomething(t *testing.T) {\n  something := Something{}\n  something.MoreThings = []string{\"a\", \"b\", \"c\"}\n  label := \"should be something\"\n  err := snapshot.WithLabel(label).Matches(\u0026something)\n  // returns an error with a pretty diff if the snapshot doesnt match\n  if err != nil {\n    // print the label and the diff\n    t.Fatalf(\"Snapshot didn't match.\\n - '%s'\\n%s\",\n      label,\n      err.Error())\n  }\n}\n```\n\n3. Update failing snapshots\n\n```bash\ngo test ./... -u\n```\n\n#### Contributing\n\nContributions are absolutely welcome!\n\n##### Steps\n\n- Make sure tests are passing\n\n  ```bash\n  make test\n  ```\n\n- Make sure it passes the linter\n\n  ```bash\n  make lint\n  ```\n\n- Open a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvancelongwill%2Fsnapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvancelongwill%2Fsnapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvancelongwill%2Fsnapshot/lists"}