March 2019
Intermediate to advanced
336 pages
9h 9m
English
The AddEntity method adds the entity to the social graph. The AddEntity method of the SocialGraph class takes name as a parameter and returns true if it is added to the social graph:
// AddEntity methodfunc (socialGraph *SocialGraph) AddEntity(name Name) bool { var exists bool if _, exists = socialGraph.GraphNodes[name]; exists { return true } socialGraph.GraphNodes[name] = struct{}{} return true}
Read now
Unlock full access