MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / DeepCopy

Method DeepCopy

attr.go:37–46  ·  view source on GitHub ↗

DeepCopy creates a deep copy of Attributes. For nil input it returns nil output.

()

Source from the content-addressed store, hash-verified

35// DeepCopy creates a deep copy of Attributes.
36// For nil input it returns nil output.
37func (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//

Callers

nothing calls this directly

Calls 1

DeepCopyMethod · 0.65

Tested by

no test coverage detected