MCPcopy Create free account
hub / github.com/compozy/agh / cloneRawMap

Function cloneRawMap

internal/api/core/network.go:868–877  ·  view source on GitHub ↗
(source T)

Source from the content-addressed store, hash-verified

866}
867
868func cloneRawMap[T ~map[string]json.RawMessage](source T) map[string]json.RawMessage {
869 if len(source) == 0 {
870 return nil
871 }
872 cloned := make(map[string]json.RawMessage, len(source))
873 for key, value := range source {
874 cloned[key] = cloneRawMessage(value)
875 }
876 return cloned
877}
878
879func cloneProofPtr(source *network.Proof) map[string]json.RawMessage {
880 if source == nil {

Calls 1

cloneRawMessageFunction · 0.70

Tested by

no test coverage detected