MCPcopy
hub / github.com/dosco/graphjin / stripCacheTrackingFields

Function stripCacheTrackingFields

core/cache_response.go:277–290  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

275}
276
277func stripCacheTrackingFields(data []byte) ([]byte, error) {
278 fields := jsn.Get(data, [][]byte{[]byte("__gj_id")})
279 if len(fields) == 0 {
280 return data, nil
281 }
282
283 to := make([]jsn.Field, len(fields))
284 var buf bytes.Buffer
285 buf.Grow(len(data))
286 if err := jsn.Replace(&buf, data, fields, to); err != nil {
287 return nil, err
288 }
289 return buf.Bytes(), nil
290}
291
292func (rp *ResponseProcessor) processNode(
293 tableName string,

Callers 4

stripGjIdFieldsFunction · 0.85
ProcessForCacheMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by 2