GetAnnotation retrieves the annotation associated with this node.
(ann *Annotations)
| 38 | |
| 39 | // GetAnnotation retrieves the annotation associated with this node. |
| 40 | func (n AnnotatedNode) GetAnnotation(ann *Annotations) interface{} { |
| 41 | if n.AnnIdx == NoAnnotation { |
| 42 | return nil |
| 43 | } |
| 44 | return ann.Get(n.AnnIdx) |
| 45 | } |
| 46 | |
| 47 | // SetAnnotation sets the annotation associated with this node. |
| 48 | func (n AnnotatedNode) SetAnnotation(ann *Annotations, annotation interface{}) { |