Created
May 2, 2022 21:55
-
-
Save sausheong/9ccfea06b76f854c868f293f12251d10 to your computer and use it in GitHub Desktop.
mst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check if a node is in a subgraph | |
func in(node *Node, subgraph *Subgraph) bool { | |
for _, n := range subgraph.nodes { | |
if n.name == node.name { | |
return true | |
} | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment