map_go123.mx raw

   1  //go:build go1.23
   2  
   3  package sync
   4  
   5  // Go 1.23 added the Clear() method. The clear() function is added in Go 1.21,
   6  // so this method can be moved to map.go once we drop support for Go 1.20 and
   7  // below.
   8  
   9  func (m *Map) Clear() {
  10  	m.lock.Lock()
  11  	defer m.lock.Unlock()
  12  	clear(m.m)
  13  }
  14