MCPcopy
hub / github.com/danielgtaylor/huma / parseDeepObjectQuery

Function parseDeepObjectQuery

huma.go:1169–1184  ·  view source on GitHub ↗
(query url.Values, name string)

Source from the content-addressed store, hash-verified

1167}
1168
1169func parseDeepObjectQuery(query url.Values, name string) map[string]string {
1170 result := make(map[string]string)
1171
1172 for key, values := range query {
1173 if strings.Contains(key, "[") {
1174 // Nested object
1175 keys := strings.Split(key, "[")
1176 if keys[0] != name {
1177 continue
1178 }
1179 k := strings.Trim(keys[1], "]")
1180 result[k] = values[0]
1181 }
1182 }
1183 return result
1184}
1185
1186func setDeepObjectValue(pb *PathBuffer, res *ValidateResult, f reflect.Value, data map[string]string) map[string]any {
1187 t := f.Type()

Callers 1

RegisterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…