Repository navigation
π Version 1.0.0 - Major Feature Release
This is a major release with significant new features, Go 1.23 iterator support, and comprehensive improvements.
π New Features
InsertionOrderedSet
A new set type that preserves the order elements were added:
history := sets.NewInsertionOrderedSet("home", "search", "profile")
for page := range history.All() {
fmt.Println(page) // home, search, profile (in order)
}Go 1.23 Iterator Support
All set types now support standard Go iteration with range:
s := sets.NewOrderedSet(3, 1, 2)
for v := range s.All() {
fmt.Println(v) // 1, 2, 3
}Single-Method Interfaces
Composable interfaces for maximum flexibility:
Containser[T],Valuer[T],Adder[T],Remover[T]Lener,EmptyChecker,ClearerUnioner[T, S],Intersectioner[T, S],Differencer[T, S],Equaler[S]Iterable[T]for iterator support
β¨ Enhancements
Extended Operations
All set types now include:
Add(items ...T)- Add multiple items at onceRemove(items ...T)- Remove multiple itemsLen() int- Get the sizeIsEmpty() bool- Check if emptyClear()- Remove all elementsUnion(other)- Combine two setsIntersection(other)- Find common elementsDifference(other)- Elements in this set but not the otherEqual(other)- Compare two sets
Documentation Overhaul
- π Completely rewritten README with clear examples
- π― Performance comparison table
- π‘ Real-world usage examples
- π Comprehensive godoc comments
- π€ Added CLAUDE.md for AI assistant guidance
π Bug Fixes
- Fixed typo:
OrderdSetβOrderedSet - Fixed confusing test data in OrderedSet tests
- Removed duplicate test case
β Testing
- 72 comprehensive tests (all passing)
- Full iterator test coverage
- Order preservation verification
- Early termination support tested
β οΈ Breaking Changes
- Requires Go 1.23+ for iterator support
OrderdSetrenamed toOrderedSet(typo fix)
π¦ Installation
go get github.com/spandigital/sets@v1.0.0π Full Changelog
See PR #1 for complete details.
π€ Generated with Claude Code