{"id":15664308,"url":"https://github.com/smola/gocompat","last_synced_at":"2025-05-05T23:32:07.935Z","repository":{"id":34868513,"uuid":"161154349","full_name":"smola/gocompat","owner":"smola","description":"Go API compatibility checker.","archived":false,"fork":false,"pushed_at":"2023-05-19T05:01:06.000Z","size":84,"stargazers_count":16,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T12:13:53.816Z","etag":null,"topics":["compatibility","compatibility-testing","golang","golang-tools"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smola.png","metadata":{"files":{"readme":"README.md","changelog":"changes.go","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-10T10:02:45.000Z","updated_at":"2023-01-31T05:14:32.000Z","dependencies_parsed_at":"2024-06-18T18:43:56.551Z","dependency_job_id":"43b20293-e91c-40e0-95b9-87981b2ce72d","html_url":"https://github.com/smola/gocompat","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smola%2Fgocompat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smola%2Fgocompat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smola%2Fgocompat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smola%2Fgocompat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smola","download_url":"https://codeload.github.com/smola/gocompat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593036,"owners_count":21773394,"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":["compatibility","compatibility-testing","golang","golang-tools"],"created_at":"2024-10-03T13:42:00.958Z","updated_at":"2025-05-05T23:32:07.918Z","avatar_url":"https://github.com/smola.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# gocompat [![Go Reference](https://pkg.go.dev/badge/github.com/smola/gocompat.svg)](https://pkg.go.dev/github.com/smola/gocompat) ![Build Status](https://github.com/smola/gocompat/workflows/ci/badge.svg?branch=master) [![codecov.io](https://codecov.io/github/smola/gocompat/coverage.svg)](https://codecov.io/github/smola/gocompat)\n\n\n\n**gocompat** is a tool to check compatibility between Go API versions.\n\n## Usage\n\n### Listing all symbols\n\n**gocompat** considers an API as all exported symbols in a given set of packages as well as all exported symbols reachable from them. You can check this for the current package as follows:\n\n```bash\ngocompat reach .\n```\n\n### Compare current version against reference data\n\n**gocompat** can save your API for later comparison. Usage example:\n\n```bash\ngit checkout v1.0.0\ngocompat save ./...\ngit checkout master\ngocompat compare ./...\n```\n\n### Comparing two git reference\n\n**gocompat** can compare the API of two git references in a repository. For example:\n\n```\ngocompat compare --git-refs=v0.1.0..master ./...\n```\n\n## Declaring your compatibility guarantees\n\nThere is almost no API change in Go that is fully backwards compatibility ([see this post for more](https://blog.merovius.de/2015/07/29/backwards-compatibility-in-go.html)). By default, gocompat uses a strict approach in which most changes to exported symbols are considered incompatible. The `--exclude=` flag can be used to exclude a change type from results.\n\nMost users will probably want to use compatibility guarantees analogous to the [Go 1 compatibility promise](https://golang.org/doc/go1compat). You can use the `--go1compat` for that, which is a shorthand for `--exclude=TopLevelDeclarationAdded --exclude=FieldAdded --exclude=MethodAdded`. For example:\n\n```\ngocompat compare --go1compat --from-git=v1.0.0..v1.1.0 ./...\n```\n\nIf you are using [Semantic Versioning](https://semver.org/), you might want to use the strict defaults for patch versions.\n\n## License\n\nReleased under the terms of the Apache License Version 2.0, see [LICENSE](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmola%2Fgocompat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmola%2Fgocompat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmola%2Fgocompat/lists"}