Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/images/logo-readme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/social-preview-1280x640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version before rolling to production.

## [1.0.0] — 2026-04-21

Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding and rebuilt to AxonOps library standardsnew module path, expanded API, comprehensive tests, CI/CD, and documentation.
Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding so the library can be consumed under AxonOps engineering controlsreproducible release workflow, signed releases, CI quality gates, security scanning, and CLA governance. The upstream project is fully usable on its own; this fork exists only to package it for AxonOps. Library behaviour is unchanged apart from a handful of small API additions tracked below.

### Added

Expand All @@ -39,7 +39,7 @@ Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://
- **Release workflow** (`.github/workflows/release.yml`): `workflow_dispatch` only; verifies, tags, publishes via GoReleaser, warms the Go module proxy. Local tag creation is forbidden.
- **Dependabot** configuration with weekly updates and auto-merge for patch-level test dependencies.
- **LLM documentation bundle**: `llms.txt` (concise summary) and `llms-full.txt` (concatenated corpus) for AI-assistant ingestion, with a CI guard that fails the build on drift.
- `LICENSE` (Apache 2.0, preserved from upstream), `NOTICE` (crediting Robert Gooding as the upstream author), `SECURITY.md`.
- `LICENSE` (Apache 2.0, preserved from upstream), `NOTICE` (crediting Richard Gooding as the upstream author), `SECURITY.md`.

### Changed

Expand All @@ -52,7 +52,7 @@ Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://

### Attribution

This release is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding, which is distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in `NOTICE`.
This release is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding, which is distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in `NOTICE`.

[Unreleased]: https://github.com/axonops/syncmap/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/axonops/syncmap/releases/tag/v1.0.0
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This product includes software developed at
AxonOps Limited (https://axonops.com/).

This product is a fork of github.com/rgooding/go-syncmap by
Robert Gooding, which is distributed under the Apache License,
Richard Gooding, which is distributed under the Apache License,
Version 2.0. This fork continues under the same licence. The
original upstream copyright notice is preserved in this
repository's git history.
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div align="center">

<img src=".github/images/logo-readme.png" alt="syncmap" width="128">

# syncmap

**Type-safe generic wrapper around Go's `sync.Map` — zero dependencies, zero assertion cost at the call site.**
**AxonOps-packaged fork of `rgooding/go-syncmap` — a type-safe generic wrapper around Go's `sync.Map`.**

[![CI](https://github.com/axonops/syncmap/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/axonops/syncmap/actions/workflows/ci.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/axonops/syncmap.svg)](https://pkg.go.dev/github.com/axonops/syncmap)
Expand All @@ -18,9 +20,9 @@

**Table of contents**

- [🌱 About this fork](#-about-this-fork)
- [✅ Status](#-status)
- [🔍 Overview](#-overview)
- [✨ Why `syncmap`?](#-why-syncmap)
- [🚀 Quick Start](#-quick-start)
- [📖 API Reference](#-api-reference)
- [🧵 Thread Safety](#-thread-safety)
Expand All @@ -34,6 +36,14 @@

---

## 🌱 About this fork

This repository is a **fork** of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap), the original type-safe generic wrapper around `sync.Map` written by [Richard Gooding](https://github.com/rgooding). It is **not a rewrite**: the library's ideas, shape, and implementation are Richard's work, and the upstream project is fully usable and recommended for anyone who does not need the AxonOps-specific packaging.

AxonOps forks it only so the library can be consumed under our standard engineering controls — reproducible release workflow, signed releases, CI quality gates, security scanning, CLA governance, and audit-friendly documentation. If you don't need any of that, please use the upstream at `github.com/rgooding/go-syncmap` instead. We carry Richard's copyright notice and credit forward in [`NOTICE`](./NOTICE) and aim to track upstream where practical.

Library behaviour is unchanged from upstream. The small set of additions and the one rename (to match the stdlib `maps.Values` naming) are enumerated in [`CHANGELOG.md`](./CHANGELOG.md).

## ✅ Status

`syncmap` is **stable** from `v1.0.0` onwards and follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html): breaking changes to the public API only in a new major version. Pin a specific tag in your `go.mod` and review the [CHANGELOG](./CHANGELOG.md) on every upgrade.
Expand All @@ -49,15 +59,6 @@ v, ok := m.Load("hits")
// v is an int, not interface{}. No `.(int)` at the call site.
```

## ✨ Why `syncmap`?

- **Compile-time type safety.** `SyncMap[K comparable, V any]` is fully generic. `Load`, `Store`, `Range`, and friends accept and return your types directly.
- **Zero runtime dependencies.** Stdlib only. No goroutines spawned by the library. No transitive dependency CVEs to track.
- **Stdlib-parity semantics.** Every method maps one-to-one to a `sync.Map` method. `Load` on a missing key returns the typed zero value of `V` and `ok=false`, matching the stdlib contract.
- **The full modern API.** `Swap` (Go 1.20), `Clear` (Go 1.23), plus `CompareAndSwap` / `CompareAndDelete` as package-level generic functions that reject non-comparable `V` at **compile time** instead of the stdlib's runtime panic.
- **Convenience helpers** beyond `sync.Map`: `Len`, `Map`, `Keys`, `Values`. Each is documented as `O(n)` and a point-in-time approximation — no surprises.
- **Race-clean under scrutiny.** The suite runs with `-race`, `goleak.VerifyTestMain`, 100 % line coverage, 37 BDD scenarios, 2 fuzz targets, and a benchstat regression gate in CI.

## 🚀 Quick Start

```go
Expand Down Expand Up @@ -171,7 +172,7 @@ Report suspected vulnerabilities privately to **oss@axonops.com**. Do not open a

## 📜 Attribution

This project is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding, originally released under Apache 2.0. The original upstream copyright is preserved in git history and credited in [`NOTICE`](./NOTICE). Every change from the fork is enumerated in [`CHANGELOG.md`](./CHANGELOG.md).
This project is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding, distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in [`NOTICE`](./NOTICE). Every change from the fork is enumerated in [`CHANGELOG.md`](./CHANGELOG.md).

## 📄 Licence

Expand Down
4 changes: 2 additions & 2 deletions documentation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func TestReadmeQuickStart_Compiles(t *testing.T) {
}

// TestGovernance_NoticeFileExists asserts NOTICE is present at the
// repo root and carries the AxonOps and upstream Robert Gooding
// repo root and carries the AxonOps and upstream Richard Gooding
// attribution required for the fork.
func TestGovernance_NoticeFileExists(t *testing.T) {
t.Parallel()
Expand All @@ -284,7 +284,7 @@ func TestGovernance_NoticeFileExists(t *testing.T) {
"NOTICE must reference the Apache License")
assert.Contains(t, s, "rgooding/go-syncmap",
"NOTICE must credit the upstream repository")
assert.Contains(t, s, "Robert Gooding",
assert.Contains(t, s, "Richard Gooding",
"NOTICE must credit the upstream author by name")
}

Expand Down
31 changes: 16 additions & 15 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ And a bad fit when:

<div align="center">

<img src=".github/images/logo-readme.png" alt="syncmap" width="128">

# syncmap

**Type-safe generic wrapper around Go's `sync.Map` — zero dependencies, zero assertion cost at the call site.**
**AxonOps-packaged fork of `rgooding/go-syncmap` — a type-safe generic wrapper around Go's `sync.Map`.**

[![CI](https://github.com/axonops/syncmap/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/axonops/syncmap/actions/workflows/ci.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/axonops/syncmap.svg)](https://pkg.go.dev/github.com/axonops/syncmap)
Expand All @@ -163,9 +165,9 @@ And a bad fit when:

**Table of contents**

- [🌱 About this fork](#-about-this-fork)
- [✅ Status](#-status)
- [🔍 Overview](#-overview)
- [✨ Why `syncmap`?](#-why-syncmap)
- [🚀 Quick Start](#-quick-start)
- [📖 API Reference](#-api-reference)
- [🧵 Thread Safety](#-thread-safety)
Expand All @@ -179,6 +181,14 @@ And a bad fit when:

---

## 🌱 About this fork

This repository is a **fork** of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap), the original type-safe generic wrapper around `sync.Map` written by [Richard Gooding](https://github.com/rgooding). It is **not a rewrite**: the library's ideas, shape, and implementation are Richard's work, and the upstream project is fully usable and recommended for anyone who does not need the AxonOps-specific packaging.

AxonOps forks it only so the library can be consumed under our standard engineering controls — reproducible release workflow, signed releases, CI quality gates, security scanning, CLA governance, and audit-friendly documentation. If you don't need any of that, please use the upstream at `github.com/rgooding/go-syncmap` instead. We carry Richard's copyright notice and credit forward in [`NOTICE`](./NOTICE) and aim to track upstream where practical.

Library behaviour is unchanged from upstream. The small set of additions and the one rename (to match the stdlib `maps.Values` naming) are enumerated in [`CHANGELOG.md`](./CHANGELOG.md).

## ✅ Status

`syncmap` is **stable** from `v1.0.0` onwards and follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html): breaking changes to the public API only in a new major version. Pin a specific tag in your `go.mod` and review the [CHANGELOG](./CHANGELOG.md) on every upgrade.
Expand All @@ -194,15 +204,6 @@ v, ok := m.Load("hits")
// v is an int, not interface{}. No `.(int)` at the call site.
```

## ✨ Why `syncmap`?

- **Compile-time type safety.** `SyncMap[K comparable, V any]` is fully generic. `Load`, `Store`, `Range`, and friends accept and return your types directly.
- **Zero runtime dependencies.** Stdlib only. No goroutines spawned by the library. No transitive dependency CVEs to track.
- **Stdlib-parity semantics.** Every method maps one-to-one to a `sync.Map` method. `Load` on a missing key returns the typed zero value of `V` and `ok=false`, matching the stdlib contract.
- **The full modern API.** `Swap` (Go 1.20), `Clear` (Go 1.23), plus `CompareAndSwap` / `CompareAndDelete` as package-level generic functions that reject non-comparable `V` at **compile time** instead of the stdlib's runtime panic.
- **Convenience helpers** beyond `sync.Map`: `Len`, `Map`, `Keys`, `Values`. Each is documented as `O(n)` and a point-in-time approximation — no surprises.
- **Race-clean under scrutiny.** The suite runs with `-race`, `goleak.VerifyTestMain`, 100 % line coverage, 37 BDD scenarios, 2 fuzz targets, and a benchstat regression gate in CI.

## 🚀 Quick Start

```go
Expand Down Expand Up @@ -316,7 +317,7 @@ Report suspected vulnerabilities privately to **oss@axonops.com**. Do not open a

## 📜 Attribution

This project is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding, originally released under Apache 2.0. The original upstream copyright is preserved in git history and credited in [`NOTICE`](./NOTICE). Every change from the fork is enumerated in [`CHANGELOG.md`](./CHANGELOG.md).
This project is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding, distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in [`NOTICE`](./NOTICE). Every change from the fork is enumerated in [`CHANGELOG.md`](./CHANGELOG.md).

## 📄 Licence

Expand Down Expand Up @@ -599,7 +600,7 @@ version before rolling to production.

## [1.0.0] — 2026-04-21

Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding and rebuilt to AxonOps library standardsnew module path, expanded API, comprehensive tests, CI/CD, and documentation.
Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding so the library can be consumed under AxonOps engineering controlsreproducible release workflow, signed releases, CI quality gates, security scanning, and CLA governance. The upstream project is fully usable on its own; this fork exists only to package it for AxonOps. Library behaviour is unchanged apart from a handful of small API additions tracked below.

### Added

Expand All @@ -618,7 +619,7 @@ Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://
- **Release workflow** (`.github/workflows/release.yml`): `workflow_dispatch` only; verifies, tags, publishes via GoReleaser, warms the Go module proxy. Local tag creation is forbidden.
- **Dependabot** configuration with weekly updates and auto-merge for patch-level test dependencies.
- **LLM documentation bundle**: `llms.txt` (concise summary) and `llms-full.txt` (concatenated corpus) for AI-assistant ingestion, with a CI guard that fails the build on drift.
- `LICENSE` (Apache 2.0, preserved from upstream), `NOTICE` (crediting Robert Gooding as the upstream author), `SECURITY.md`.
- `LICENSE` (Apache 2.0, preserved from upstream), `NOTICE` (crediting Richard Gooding as the upstream author), `SECURITY.md`.

### Changed

Expand All @@ -631,7 +632,7 @@ Initial AxonOps release. Forked from [`github.com/rgooding/go-syncmap`](https://

### Attribution

This release is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Robert Gooding, which is distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in `NOTICE`.
This release is a fork of [`github.com/rgooding/go-syncmap`](https://github.com/rgooding/go-syncmap) by Richard Gooding, which is distributed under Apache 2.0; this fork continues under the same licence. The original upstream copyright is preserved in git history and credited in `NOTICE`.

[Unreleased]: https://github.com/axonops/syncmap/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/axonops/syncmap/releases/tag/v1.0.0
Expand Down
Loading