Awesome Go

relimpact

CategoryUtilities
SubcategoryUtilities
Stars13

Fast API compatibility reports for Go projects

About relimpact

relimpact

Fast API compatibility reports for Go projects.

License Go Report Card Go Reference Workflow Status GitHub Issues Go Version Latest Release

relimpact compares two Git refs, snapshots the exported Go API, and reports what changed: breaking changes first, compatible additions below.

It is not a raw diff tool or a changelog generator. It answers one release question:

Did this change break public Go API?


Preview

Breaking Changes

Breaking Changes

New API

New API

PR comment

Markdown Format

Install

Using Go:

go install github.com/hashmap-kz/relimpact@latest

Using Homebrew:

brew tap hashmap-kz/homebrew-tap
brew install relimpact

Or download a binary from the Releases page.

Usage

Markdown output is the default:

relimpact --old=v1.0.0 --new=HEAD > api-report.md

HTML output:

relimpact --old=v1.0.0 --new=HEAD --format=html > api-report.html

Run against another repository:

relimpact --dir=/path/to/repo --old=v1.0.0 --new=HEAD

Use maximum concurrency:

relimpact --old=v1.0.0 --new=HEAD --greedy

GitHub Actions

Generate a Markdown report and post it as a pull request comment:

name: API compatibility

on:
  pull_request:
    branches: [ master ]

permissions:
  contents: read
  pull-requests: write

jobs:
  relimpact:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: actions/setup-go@v5
        with:
          go-version: "1.25"

      - name: Install relimpact
        run: |
          go install github.com/hashmap-kz/relimpact@latest

      - name: Generate Markdown API report
        run: |
          relimpact \
            --old="${{ github.event.pull_request.base.sha }}" \
            --new="${{ github.event.pull_request.head.sha }}" \
            --format=markdown \
            > api-report.md

      - name: Comment API report on PR
        uses: marocchino/sticky-pull-request-comment@v2
        with:
          header: relimpact-api-report
          recreate: true
          path: api-report.md

To also keep the HTML report as a CI artifact:

      - name: Upload HTML API report
        run: |
          relimpact \
            --old="${{ github.event.pull_request.base.sha }}" \
            --new="${{ github.event.pull_request.head.sha }}" \
            --format=html \
            > api-report.html

      - name: Upload HTML artifact
        uses: actions/upload-artifact@v4
        with:
          name: api-report
          path: api-report.html

License

MIT License. See LICENSE for details.

Frequently Asked Questions

What is relimpact?

relimpact is a Utilities library for the Go programming language. Fast API compatibility reports for Go projects

How do I install relimpact?

Install relimpact with the Go module system using `go get hashmap-kz/relimpact`. Check the repository for the current installation instructions.

What category does relimpact belong to?

relimpact is listed under Utilities, specifically Utilities.

← Back to Utilities