Skip to content

v1.0.0 - Major Feature Release

Latest

Choose a tag to compare

@richardwooding richardwooding released this 16 Oct 08:51
· 2 commits to main since this release
d353e40

πŸŽ‰ 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, Clearer
  • Unioner[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 once
  • Remove(items ...T) - Remove multiple items
  • Len() int - Get the size
  • IsEmpty() bool - Check if empty
  • Clear() - Remove all elements
  • Union(other) - Combine two sets
  • Intersection(other) - Find common elements
  • Difference(other) - Elements in this set but not the other
  • Equal(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
  • OrderdSet renamed to OrderedSet (typo fix)

πŸ“¦ Installation

go get github.com/spandigital/sets@v1.0.0

πŸ”— Full Changelog

See PR #1 for complete details.


πŸ€– Generated with Claude Code