Skip to content

feat!: generic Ring[T] core + RingBuffer byte wrapper, Go 1.23 modern…#1

Open
yuikns wants to merge 1 commit into
masterfrom
v2-rewrite
Open

feat!: generic Ring[T] core + RingBuffer byte wrapper, Go 1.23 modern…#1
yuikns wants to merge 1 commit into
masterfrom
v2-rewrite

Conversation

@yuikns

@yuikns yuikns commented May 18, 2026

Copy link
Copy Markdown
Member

…ization

BREAKING CHANGES:

  • Introduce generic core type Ring[T any]
  • RingBuffer becomes a byte-specific wrapper around *Ring[byte]
  • Byte-specific methods (WriteString, ReadFrom, WriteTo, Copy, Pipe) remain on *RingBuffer for full io compatibility
  • Requires Go 1.23+

FEATURES:

  • Add All() returning iter.Seq[T] (Go 1.23 iterators)
  • Add NewRing[T], NewRingFromSlice[T] constructors
  • RingBuffer fully preserves original API including io.ByteReader, io.ByteWriter, io.ReaderFrom, io.WriterTo, io.StringWriter

FIXES:

  • Fix goroutine leak in WithCancel using done channel + sync.Once
  • Modernize unsafe string-to-bytes conversion in WriteString
  • Use builtin min/max and clear() for cleaner code

INFRA:

  • Update module path to github.com/argcv/ringbuffer
  • Update CI to Go 1.23 and latest action versions
  • Remove legacy .travis.yml
  • Rewrite README with new API docs

@coveralls

coveralls commented May 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27063172392

Warning

No base build found for commit fa467e7 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 84.597%

Details

  • Patch coverage: 102 uncovered changes across 3 files (538 of 640 lines covered, 84.06%).

Uncovered Changes

File Changed Covered %
ring.go 611 518 84.78%
ring_buffer.go 25 19 76.0%
pipe.go 4 1 25.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 818
Covered Lines: 692
Line Coverage: 84.6%
Coverage Strength: 39461.98 hits per line

💛 - Coveralls

…ization

BREAKING CHANGES:
- Introduce generic core type Ring[T any]
- RingBuffer becomes a byte-specific wrapper around *Ring[byte]
- Byte-specific methods (WriteString, ReadFrom, WriteTo, Copy, Pipe)
  remain on *RingBuffer for full io compatibility
- Requires Go 1.23+

FEATURES:
- Add All() returning iter.Seq[T] (Go 1.23 iterators)
- Add NewRing[T], NewRingFromSlice[T] constructors
- RingBuffer fully preserves original API including io.ByteReader,
  io.ByteWriter, io.ReaderFrom, io.WriterTo, io.StringWriter

FIXES:
- Fix goroutine leak in WithCancel using done channel + sync.Once
- Modernize unsafe string-to-bytes conversion in WriteString
- Use builtin min/max and clear() for cleaner code

INFRA:
- Update module path to github.com/argcv/ringbuffer
- Update CI to Go 1.23 and latest action versions
- Remove legacy .travis.yml
- Rewrite README with new API docs
@yuikns yuikns force-pushed the v2-rewrite branch 2 times, most recently from 105a1f1 to 34db2b7 Compare June 6, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants