mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
- Added comment for generic type alias compatibility with Go 1.25.1 - Ran gofmt -s on all flagged files for consistent formatting - Updated engine test VM, consensus main, and AI modules - Ensures CI compatibility with modern Go versions
18 lines
386 B
Go
18 lines
386 B
Go
package set
|
|
|
|
import "github.com/luxfi/math/set"
|
|
|
|
// Re-export set types from math package
|
|
// Generic type aliases work natively in Go 1.23+
|
|
type Set[T comparable] = set.Set[T]
|
|
|
|
// Of creates a new set
|
|
func Of[T comparable](elements ...T) Set[T] {
|
|
return set.Of(elements...)
|
|
}
|
|
|
|
// NewSet creates a new empty set
|
|
func NewSet[T comparable](size int) Set[T] {
|
|
return make(Set[T], size)
|
|
}
|