Skip to content

Installation

  • Go 1.26 or later (uses errors.AsType)
  • An active Go module (go.mod)
  • GOEXPERIMENT=jsonv2 environment variable (the root module uses encoding/json/v2)

Run this in your project directory:

Terminal window
go get github.com/larsartmann/go-error-family@latest

This is a Go workspace. The root module (classification core, zero third-party deps) is stable. Experimental submodules have their own go.mod and require separate imports:

Module Import Path Purpose
Root github.com/larsartmann/go-error-family Classification core, zero-dep
Agent github.com/larsartmann/go-error-family/agent AI debug agent
Bridge github.com/larsartmann/go-error-family/bridge samber/oops integration
Diagnose github.com/larsartmann/go-error-family/diagnose Diagnostic rules (core)
Diagnose/Git github.com/larsartmann/go-error-family/diagnose/git Git diagnostic rule
Diagnose/Postgres github.com/larsartmann/go-error-family/diagnose/postgres PostgreSQL diagnostic rule

The root module imports encoding/json/v2, which requires GOEXPERIMENT=jsonv2 on Go 1.26. Set it before building:

Terminal window
export GOEXPERIMENT=jsonv2

Or in flake.nix devShells (if using Nix):

GOEXPERIMENT = "jsonv2";

This will become non-experimental in a future Go release.

Terminal window
go list -m github.com/larsartmann/go-error-family