diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..c1bc6ab --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,26 @@ +name: Go CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + go-version: ['1.26'] # Update this if your go.mod uses a different version + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Test + run: go test -v -race ./... \ No newline at end of file diff --git a/README.md b/README.md index 3b8bf1c..75f40f1 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ go get github.com/trycatchkamal/gauzer --- +[![Go Reference](https://pkg.go.dev/badge/github.com/trycatchkamal/gauzer.svg)](https://pkg.go.dev/github.com/trycatchkamal/gauzer) +[![Go Report Card](https://goreportcard.com/badge/github.com/trycatchkamal/gauzer)](https://goreportcard.com/report/github.com/trycatchkamal/gauzer) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![Build Status](https://github.com/trycatchkamal/gauzer/actions/workflows/go.yml/badge.svg)](https://github.com/trycatchkamal/gauzer/actions/workflows/go.yml) + +--- + +## The Problem +... (rest of your README continues here) + ## The Problem Most validation libraries return errors as flat strings. That works fine until you're on-call trying to answer *"how often are users failing the age check, and with what values?"* in a production system. @@ -220,10 +230,11 @@ type User struct { | `eqfield=OtherField` | Value must equal the named sibling field. | | `nefield=OtherField` | Value must not equal the named sibling field. | -> **v0.2.0 roadmap:** `dive` into nested structs (currently works for slices of scalars and strings), and additional cross-field rules. If a tag token is unrecognized it is silently skipped, so future tags added in minor versions will not break existing code. - --- +## Roadmap +Check out the [ROADMAP](https://github.com/trycatchkamal/gauzer/blob/main/ROADMAP.md) to see what's planned for v0.2.0, including OTel metrics, nested dive, and enterprise dependency injection. + ## Contributing Bug reports and pull requests are welcome. For significant changes, open an issue first to discuss the approach. diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..eb7447b --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,13 @@ +# Gauzer Roadmap + +## v0.1.0 (Current) +* Drop-in struct tag replacement. +* Native `slog.LogValuer` implementation. +* OTel Span attribute adapter. +* Zero-alloc happy path (~61ns). +* Native PII masking (`mask` tag). + +## v0.2.0 (Planned) +* **OTel Metrics Integration:** Adding `Int64Counter` support to the `gauzer/otel` adapter (e.g., `gauzer.validation.errors{rule="email"}`) to enable automated paging on validation spikes. +* **Dependency Injection:** Adding Functional Options to `oteladapter.New()` (e.g., `WithMeter()`) to support strict enterprise OTel provider isolation. +* **Nested `dive`:** Expanding `dive` support to validate nested struct slices (e.g., `[][]User`), not just primitive slices. \ No newline at end of file