Skip to content

refactor: bump to go1.20#83

Merged
xiaost merged 1 commit into
mainfrom
refactor/go-1-20
Feb 25, 2026
Merged

refactor: bump to go1.20#83
xiaost merged 1 commit into
mainfrom
refactor/go-1-20

Conversation

@xiaost

@xiaost xiaost commented Feb 25, 2026

Copy link
Copy Markdown
Contributor
  • Update go.mod to go 1.20
  • descmap: use per-slot atomic.Pointer[T] instead of single atomic pointer to entire buckets array, only realloc the affected slot on Set
  • hack: simplify newMapIter using rv.MapRange() (go1.19), remove stringHeader, use unsafe.SliceData for zerobase (go1.20)
  • decoder: replace stringHeader/sliceHeader with unsafe.String and unsafe.Slice for string/binary decoding (go1.20)
  • utils: inline copyn with unsafe.Slice, replace 7 checkUniqueness functions with single generic checkUnique[T comparable]
  • unknownfields: use unsafe.Slice instead of sliceHeader manipulation
  • Add descmap unit tests

…nerics

- Update go.mod to go 1.20
- descmap: use per-slot atomic.Pointer[T] instead of single atomic pointer
  to entire buckets array, only realloc the affected slot on Set
- hack: simplify newMapIter using rv.MapRange() (go1.19), remove
  stringHeader, use unsafe.SliceData for zerobase (go1.20)
- decoder: replace stringHeader/sliceHeader with unsafe.String and
  unsafe.Slice for string/binary decoding (go1.20)
- utils: inline copyn with unsafe.Slice, replace 7 checkUniqueness
  functions with single generic checkUnique[T comparable]
- unknownfields: use unsafe.Slice instead of sliceHeader manipulation
- Add descmap unit tests
@xiaost xiaost requested review from a team as code owners February 25, 2026 08:03
@xiaost xiaost merged commit 7c0726c into main Feb 25, 2026
18 checks passed
@xiaost xiaost deleted the refactor/go-1-20 branch February 25, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants