mirror of https://github.com/tinygo-org/tinygo.git
Ayke van Laethem
5 months ago
committed by
Ron Evans
1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
//go:build go1.23
|
|||
|
|||
package sync |
|||
|
|||
// Go 1.23 added the Clear() method. The clear() function is added in Go 1.21,
|
|||
// so this method can be moved to map.go once we drop support for Go 1.20 and
|
|||
// below.
|
|||
|
|||
func (m *Map) Clear() { |
|||
m.lock.Lock() |
|||
defer m.lock.Unlock() |
|||
clear(m.m) |
|||
} |
Loading…
Reference in new issue