You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Items() method on SyncMap[K, V] returns a slice of values, not key-value pairs. Go convention uses "Values" for this operation (maps.Values, stdlib 1.23). Rename to Values() for consistency before the v1.0.0 API is locked. The module path under github.com/axonops/syncmap is pre-v1.0 and a pkg.go.dev search for importers of the new path returns none, so this is a free rename with no compatibility shim required.
Requirements
Rename the method on SyncMap[K, V] from Items → Values in syncmap.go. Signature and body are otherwise unchanged.
example_test.go: rename ExampleSyncMap_Items to ExampleSyncMap_Values (if example_test.go exists by merge time — feat!: rename Items to Values #12 adds it; this issue updates it if present).
tests/bdd/features/syncmap.feature: rename the Scenario Values slice matches stored entries (or equivalent — scenario names may already use "Values" if written post-rename).
tests/bdd/steps/syncmap_steps.go: rename any step function wired to Items.
No other files change. No signature change. No other renames.
Commit message subject uses feat!: prefix and the body explicitly names the old and new symbol.
Add godoc block deprecation note: none — the method is renamed outright, not deprecated.
Acceptance Criteria
grep -nE '\\bfunc.*Items\\b' syncmap.go returns no matches.
grep -nE '\\bfunc.*Values\\b' syncmap.go returns exactly one match, against the SyncMap[K, V] receiver.
git grep -nE '\\bItems\\b' -- syncmap.go syncmap_test.go example_test.go syncmap_bench_test.go tests/bdd/ returns zero matches. (Scope: all production and test files that could carry the old name. String-literal test data for this rename does not exist, so no escape hatch is required.)
go doc github.com/axonops/syncmap Values prints a non-empty doc block that begins with Values and contains the substring O(n).
go doc github.com/axonops/syncmap Items prints nothing (symbol absent).
CHANGELOG.md contains a ## [1.0.0] section with a ### Changed (or ### Breaking) subsection that names Items → Values as a rename.
Commit subject matches the regex ^feat!: .
make check passes end-to-end; coverage is unchanged or improved by the test rename.
CI on the PR green.
Testing Requirements
make check — green.
go test -race -run 'TestValues' -count=1 ./... — runs the renamed test and passes. Zero matches when run with -run 'TestItems'.
feat!: rename Items to Values
Summary
The current
Items()method onSyncMap[K, V]returns a slice of values, not key-value pairs. Go convention uses "Values" for this operation (maps.Values, stdlib 1.23). Rename toValues()for consistency before the v1.0.0 API is locked. The module path undergithub.com/axonops/syncmapis pre-v1.0 and apkg.go.devsearch for importers of the new path returns none, so this is a free rename with no compatibility shim required.Requirements
SyncMap[K, V]fromItems→Valuesinsyncmap.go. Signature and body are otherwise unchanged.// Values …and describes the return slice as a point-in-time snapshot withO(n)cost (matching the style established by docs: add doc.go and rewrite godoc on every exported symbol #11; if docs: add doc.go and rewrite godoc on every exported symbol #11 has not merged, apply the style here).Itemsreference in the test suite toValues:syncmap_test.go(from test: rewrite unit tests to external package with testify/goleak; coverage ≥95% #10): rename theTestItemsfunction toTestValuesand each of its subtests (empty_is_empty→empty_is_empty,matches→matches,length_equals_len→length_equals_len— names are the same, just attached to the renamed parent).example_test.go: renameExampleSyncMap_ItemstoExampleSyncMap_Values(ifexample_test.goexists by merge time — feat!: rename Items to Values #12 adds it; this issue updates it if present).syncmap_bench_test.go: renameBenchmarkItemstoBenchmarkValues(if present from feat!: rename Items to Values #12).tests/bdd/features/syncmap.feature: rename the ScenarioValues slice matches stored entries(or equivalent — scenario names may already use "Values" if written post-rename).tests/bdd/steps/syncmap_steps.go: rename any step function wired toItems.feat!:prefix and the body explicitly names the old and new symbol.Acceptance Criteria
grep -nE '\\bfunc.*Items\\b' syncmap.goreturns no matches.grep -nE '\\bfunc.*Values\\b' syncmap.goreturns exactly one match, against theSyncMap[K, V]receiver.git grep -nE '\\bItems\\b' -- syncmap.go syncmap_test.go example_test.go syncmap_bench_test.go tests/bdd/returns zero matches. (Scope: all production and test files that could carry the old name. String-literal test data for this rename does not exist, so no escape hatch is required.)go doc github.com/axonops/syncmap Valuesprints a non-empty doc block that begins withValuesand contains the substringO(n).go doc github.com/axonops/syncmap Itemsprints nothing (symbol absent).## [1.0.0]section with a### Changed(or### Breaking) subsection that namesItems→Valuesas a rename.^feat!:.make checkpasses end-to-end; coverage is unchanged or improved by the test rename.Testing Requirements
make check— green.go test -race -run 'TestValues' -count=1 ./...— runs the renamed test and passes. Zero matches when run with-run 'TestItems'.go docinspection per AC chore: add .gitignore, Makefile, and .golangci.yml (#3) #4 / ci: add GitHub Actions CI workflow #5 — output pasted in the PR description.pkg.go.devsearch for importers ofgithub.com/axonops/syncmapat PR-open time — zero importers confirmed, screenshot or link in the PR description.Documentation Requirements
Valuesper Req chore: rename module to axonops/syncmap and bump Go to 1.26 (#1) #2.Values(README lands in feat: add top-level CompareAndSwap and CompareAndDelete functions #14; if feat: add top-level CompareAndSwap and CompareAndDelete functions #14 has merged, this PR amends the table).Out of Scope
Dependencies
Labels
enhancementbreaking-changeP1