mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-09 18:33:36 +02:00
chore: update dependencies
This commit is contained in:
@@ -4,17 +4,17 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/goccy/go-yaml"
|
||||
"github.com/puzpuzpuz/xsync/v3"
|
||||
"github.com/puzpuzpuz/xsync/v4"
|
||||
)
|
||||
|
||||
type Map[KT comparable, VT any] struct {
|
||||
*xsync.MapOf[KT, VT]
|
||||
*xsync.Map[KT, VT]
|
||||
}
|
||||
|
||||
const minParallelSize = 4
|
||||
|
||||
func NewMapOf[KT comparable, VT any](options ...func(*xsync.MapConfig)) Map[KT, VT] {
|
||||
return Map[KT, VT]{xsync.NewMapOf[KT, VT](options...)}
|
||||
return Map[KT, VT]{xsync.NewMap[KT, VT](options...)}
|
||||
}
|
||||
|
||||
func NewMapFrom[KT comparable, VT any](m map[KT]VT) (res Map[KT, VT]) {
|
||||
|
||||
@@ -3,15 +3,15 @@ package functional
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/puzpuzpuz/xsync/v3"
|
||||
"github.com/puzpuzpuz/xsync/v4"
|
||||
)
|
||||
|
||||
type Set[T comparable] struct {
|
||||
m *xsync.MapOf[T, struct{}]
|
||||
m *xsync.Map[T, struct{}]
|
||||
}
|
||||
|
||||
func NewSet[T comparable]() Set[T] {
|
||||
return Set[T]{m: xsync.NewMapOf[T, struct{}]()}
|
||||
return Set[T]{m: xsync.NewMap[T, struct{}]()}
|
||||
}
|
||||
|
||||
func (set Set[T]) Add(v T) {
|
||||
|
||||
Reference in New Issue
Block a user