github cweill/gotests v1.7.1

latest releases: v1.8.0, v1.7.4, v1.7.3...
one day ago

What's New in v1.7.1

This release adds two highly-requested features to improve the gotests experience.

New Features

๐Ÿงช go-cmp Support (-use_go_cmp)

Generate tests using google/go-cmp instead of reflect.DeepEqual for better test assertions and diff output.

$ gotests -use_go_cmp -all -w example.go

Generated tests will use cmp.Equal() for comparisons and cmp.Diff() in error messages, providing much clearer output when tests fail.

Example output:

if !cmp.Equal(tt.want, got) {
    t.Errorf("Foo() = %v, want %v\ndiff=%s", got, tt.want, cmp.Diff(tt.want, got))
}

Resolves #155 (thanks to @butuzov for the original PR!)

๐Ÿ“‹ Version Information (-version)

Check which version of gotests you're running:

$ gotests -version
gotests v1.7.1
Go version: go1.22.0
Git commit: 5252e0b...
Build time: 2025-10-21T02:15:00Z

This helps with troubleshooting and verifying you have the latest release.

Resolves #133

Housekeeping

  • Closed superseded README PRs (#172, #166) that were already addressed in v1.7.0

Installation

go install github.com/cweill/gotests/gotests@v1.7.1

Full Changelog: v1.7.0...v1.7.1

Don't miss a new gotests release

NewReleases is sending notifications on new releases.