github.com/cilium/statedb@v0.3.2/index/map.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package index
     5  
     6  func StringMap[V any](m map[string]V) KeySet {
     7  	keys := make([]Key, 0, len(m))
     8  	for k := range m {
     9  		keys = append(keys, String(k))
    10  	}
    11  	return NewKeySet(keys...)
    12  }