Rename changes the name of the named attribute n to m. Rename does nothing if o does not have an attribute named n.
(n, m string)
| 499 | // Rename changes the name of the named attribute n to m. Rename does nothing if |
| 500 | // o does not have an attribute named n. |
| 501 | func (o *Object) Rename(n, m string) { |
| 502 | for _, nat := range *o { |
| 503 | if nat.Name == n { |
| 504 | nat.Name = m |
| 505 | return |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | // Kind implements DataKind. |
| 511 | func (*Object) Kind() Kind { return ObjectKind } |
no outgoing calls