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

Function NewQueryResult

tree.go:386–394  ·  view source on GitHub ↗

NewQueryResult returns a QueryResult containing the provided *Nodes

(nodes ...*Node)

Source from the content-addressed store, hash-verified

384
385// NewQueryResult returns a QueryResult containing the provided *Nodes
386func NewQueryResult(nodes ...*Node) QueryResult {
387 out := make(QueryResult)
388
389 for _, n := range nodes {
390 out.Add(n)
391 }
392
393 return out
394}
395
396// Add accepts a *Node and adds it to the QueryResult,
397// provided it has a valid CaptureName

Callers 1

QueryMultiMethod · 0.85

Calls 1

AddMethod · 0.80

Tested by

no test coverage detected