DeepCopy creates a deep copy of Attributes. For nil input it returns nil output.
()
| 35 | // DeepCopy creates a deep copy of Attributes. |
| 36 | // For nil input it returns nil output. |
| 37 | func (attrs Attributes) DeepCopy() Attributes { |
| 38 | var attrs2 Attributes |
| 39 | if attrs != nil { |
| 40 | attrs2 = make(Attributes, len(attrs)) |
| 41 | for i := range attrs { |
| 42 | attrs2[i] = attrs[i].DeepCopy() |
| 43 | } |
| 44 | } |
| 45 | return attrs2 |
| 46 | } |
| 47 | |
| 48 | // Equal checks that attrs and attrs2 are equal |
| 49 | // |