mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
fix err
This commit is contained in:
@ -9,7 +9,12 @@ type hashMap[K constraints.Ordered, V any] struct {
|
||||
}
|
||||
|
||||
func NewHashMap[K constraints.Ordered, V any](maps ...map[K]V) *hashMap[K, V] {
|
||||
return &hashMap[K, V]{m: make(map[K]V)}
|
||||
m := make(map[K]V)
|
||||
if len(maps) > 0 {
|
||||
m = Merge(maps...)
|
||||
}
|
||||
|
||||
return &hashMap[K, V]{m: m}
|
||||
}
|
||||
|
||||
// synchronized
|
||||
|
Reference in New Issue
Block a user