MCPcopy Index your code
hub / github.com/53AI/53AIHub / encodeSliceStructs

Function encodeSliceStructs

api/middleware/response_encoder.go:237–245  ·  view source on GitHub ↗

encodeSliceStructs 编码结构体切片

(v reflect.Value)

Source from the content-addressed store, hash-verified

235
236// encodeSliceStructs 编码结构体切片
237func encodeSliceStructs(v reflect.Value) interface{} {
238 result := make([]interface{}, v.Len())
239
240 for i := 0; i < v.Len(); i++ {
241 result[i] = EncodeStructIDs(v.Index(i).Interface())
242 }
243
244 return result
245}

Callers 1

EncodeStructIDsFunction · 0.85

Calls 1

EncodeStructIDsFunction · 0.85

Tested by

no test coverage detected