Skip to content

Releases: bracesdev/errtrace

v0.3.0

22 Dec 17:41
3e960df
Compare
Choose a tag to compare

This release adds support to the CLI for using Go package patterns like ./...
to match and transform files.
You can now use errtrace -w ./... to instrument all files in a Go module,
or errtrace -l ./... to list all files that would be changed.

Added

  • cmd/errtrace: Support Go package patterns in addition to file paths.
    Use errtrace -w ./... to transform all files under the current package
    and its descendants.

Changed

  • cmd/errtrace:
    Print a message when reading from stdin because no arguments were given.
    Use '-' as the file name to read from stdin without a warning.

v0.2.0: CLI improvements

30 Nov 16:37
e20616b
Compare
Choose a tag to compare

This release contains minor improvements to the errtrace code transformer
allowing it to fit more use cases.

Added

  • cmd/errtrace: Add -l flag to print files that would be changed without changing them. You can use this to build a check to verify that your code is instrumented.

  • cmd/errtrace: Support opt-out on lines with a //errtrace:skip comment. Optionally, a reason may be specified alongside the comment. The command will print a warning for any unused //errtrace:skip comments.

    if err != nil {
      return io.EOF //errtrace:skip(io.Reader expects io.EOF)
    }

v0.1.1

29 Nov 02:57
6b2cef1
Compare
Choose a tag to compare

This release contains minor fix-ups to better consume the project.
Install this with:

go get braces.dev/errtrace@v0.1.1

See the prior release announcement for additional information.

Changed

  • Lower go directive in go.mod to 1.20 to allow use with older versions.

Fixed

v0.1.0: Introducing errtrace

29 Nov 02:03
a6f9caf
Compare
Choose a tag to compare

Introducing errtrace, an experimental library that provides better stack traces for your errors.

Install the library with:

go get braces.dev/errtrace@v0.1.0

We've also included a tool that will automatically instrument your code with errtrace.
In your project, run:

go install braces.dev/errtrace/cmd/errtrace@v0.1.0
git ls-files -- '*.go' | xargs errtrace -w

See README for more information.