MCPcopy Create free account
hub / github.com/BishopFox/jsluice / Add

Method Add

tree.go:398–404  ·  view source on GitHub ↗

Add accepts a *Node and adds it to the QueryResult, provided it has a valid CaptureName

(n *Node)

Source from the content-addressed store, hash-verified

396// Add accepts a *Node and adds it to the QueryResult,
397// provided it has a valid CaptureName
398func (qr QueryResult) Add(n *Node) {
399 key := n.CaptureName()
400 if key == "" {
401 return
402 }
403 qr[key] = n
404}
405
406// Has returns true if the QueryResult contains a *Node
407// for the provided capture name

Callers 3

QueryMultiMethod · 0.95
NewQueryResultFunction · 0.80
mainFunction · 0.80

Calls 1

CaptureNameMethod · 0.80

Tested by

no test coverage detected