Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HashLoad/boss
/ AddNode
Method
AddNode
core/compiler/graphs/graph.go:39–45 ·
view source on GitHub ↗
(n *Node)
Source
from the content-addressed store, hash-verified
37
}
38
39
func
(g *GraphItem) AddNode(n *Node) {
40
g.lock()
41
if
!contains(g.nodes, n) {
42
g.nodes = append(g.nodes, n)
43
}
44
g.unlock()
45
}
46
47
func
contains(a []*Node, x *Node) bool {
48
for
_, n :=
range
a {
Callers
1
loadGraph
Function · 0.80
Calls
3
lock
Method · 0.95
unlock
Method · 0.95
contains
Function · 0.85
Tested by
no test coverage detected