All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.1 - 2026-07-05
- golangci-lint v2 configuration — enterprise-grade static analysis with 30+ linters matching coregx ecosystem standard (fursy, stream, coregex, ahocorasick)
- Lint CI job —
golangci/golangci-lint-action@v8in GitHub Actions workflow
- JSON null marshal: zero-allocation —
[]byte("null")extracted to package-levelvar jsonNullacross all types. Eliminates 1 alloc/op on every null MarshalJSON call (15x faster: 13ns → 0.86ns) - JSON string literals (
"null","true","false") extracted to constants for DRY
time.ExactEqualuses struct comparison (==) for timezone-aware equality;time.Equalusestime.Time.Equal()for instant comparison (staticcheck QF1009)NewBoolparameter style:func(b, valid bool)(gocritic paramTypeCombine)- Test helper simplified:
strconv.Itoapassed directly instead of wrapping lambda (gocritic unlambda)
0.3.0 - 2026-07-05
Value[T]renamed toOption[T]— fixesdriver.Valuershadow bug where all concrete types (String, Int, etc.) failed to implementdriver.Valuerdue to Go selector rules. See ADR-003 in project docsField.ToValue()renamed toField.ToOption()— consistent with the type rename
FieldFromOption[T]()— lossless conversion fromOption[T]toField[T](valid→present+valid, invalid→present+null). See ADR-002 in project docs- Compile-time interface checks —
interfaces_test.goin bothopt/andzero/packages. Verifiesdriver.Valuer,sql.Scanner,json.Marshaler,encoding.TextMarshaleron all 16 concrete types. Prevents future shadow bugs
- All concrete types now correctly implement
driver.Valuervia method promotion - pgx v5 INSERT/Exec works without explicit forwarding methods
doc.gocorrected:driver.Valuerclaim is now accurate
Find and replace in your code:
opt.Value[T] → opt.Option[T] (generic usage, rare)
.Value field access → .Option (embedded field, rare)
.ToValue() → .ToOption() (Field method)
Concrete types (opt.String, opt.Int, etc.) and constructors (New, From, FromPtr, OrNull) are unchanged.
0.2.0 - 2026-07-04
OrNull[T]generic constructor — zero value → null mapping for any comparable type- Typed OrNull constructors —
StringOrNull,IntOrNull,Int32OrNull,Int16OrNull,FloatOrNull,BoolOrNull,ByteOrNull,TimeOrNull - Eliminates boilerplate helpers in DB/API projects:
opt.StringOrNull(s)instead of customoptStr(s)functions
- Updated README with OrNull API section
- Updated AGENTS.md with OrNull examples
- Added OrNull example tests for godoc
0.1.0 - 2026-07-04
- Generic
Value[T](renamed toOption[T]in v0.3.0) — foundation type onsql.Null[T]with full JSON/SQL support - 9 concrete types — String, Int, Int32, Int16, Float, Bool, Byte, Time with optimized marshal/unmarshal
Field[T]— three-state (absent/null/value) for PATCH API semantics- Functional API —
Map,FlatMap,Equaltop-level generic functions zero/subpackage — alternative semantics where zero value = null (9 types)internal/— shared unmarshal helpers for DRY across opt and zero- Benchmarks with zero-allocation unmarshal
- Go 1.24+
omitzerosupport viaIsZero()on all types encoding/json/v2compatible (no changes needed)- CI/CD: GitHub Actions (3 OS × 3 Go versions), Codecov OIDC, branch protection