Attribute returns the attribute with the given name if any, nil otherwise.
(name string)
| 459 | |
| 460 | // Attribute returns the attribute with the given name if any, nil otherwise. |
| 461 | func (o *Object) Attribute(name string) *AttributeExpr { |
| 462 | for _, nat := range *o { |
| 463 | if nat.Name == name { |
| 464 | return nat.Attribute |
| 465 | } |
| 466 | } |
| 467 | return nil |
| 468 | } |
| 469 | |
| 470 | // Set replaces the object named attribute n if any - creates a new object by |
| 471 | // appending to the slice of named attributes otherwise. The resulting object is |
no outgoing calls