MCPcopy Create free account
hub / github.com/53AI/53AIHub / mapKeyToString

Function mapKeyToString

api/controller/mcp_output.go:110–121  ·  view source on GitHub ↗
(key reflect.Value)

Source from the content-addressed store, hash-verified

108}
109
110func mapKeyToString(key reflect.Value) string {
111 if !key.IsValid() {
112 return ""
113 }
114 if key.Kind() == reflect.String {
115 return key.String()
116 }
117 if key.CanInterface() {
118 return fmt.Sprint(key.Interface())
119 }
120 return ""
121}
122
123func encodeMCPIDValue(value any) (any, bool) {
124 if value == nil {

Callers 1

encodeMCPReflectMapFunction · 0.85

Calls 2

IsValidMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected