MCPcopy Create free account
hub / github.com/devld/go-drive / MapCopy

Function MapCopy

common/utils/utils.go:249–257  ·  view source on GitHub ↗
(m map[K]V, dest map[K]V)

Source from the content-addressed store, hash-verified

247}
248
249func MapCopy[K comparable, V any](m map[K]V, dest map[K]V) map[K]V {
250 if dest == nil {
251 dest = make(map[K]V, len(m))
252 }
253 for k, v := range m {
254 dest[k] = v
255 }
256 return dest
257}
258
259func MapKeys[K comparable, V any](m map[K]V) []K {
260 values := make([]K, 0, len(m))

Callers 5

newEntryJsonMethod · 0.92
MetaMethod · 0.92
GetURLFunction · 0.92
MetaMethod · 0.92
initConfigFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected