March 2019
Intermediate to advanced
336 pages
9h 9m
English
The AddClass method of the KnowledgeGraph class takes class as a parameter and returns true if the class exists. If the class does not exist, a GraphNode is created with class as a key:
// AddClass methodfunc (knowledgeGraph *KnowledgeGraph) AddClass(class Class) bool { var exists bool if _, exists = knowledgeGraph.GraphNodes[class]; exists { return true } knowledgeGraph.GraphNodes[class] = struct{}{} return true}
Read now
Unlock full access