Equal performs a deep equality check between Deployments. Internal ordering is ignored.
(other *Deployment)
| 93 | |
| 94 | // Equal performs a deep equality check between Deployments. Internal ordering is ignored. |
| 95 | func (d *Deployment) Equal(other *Deployment) bool { |
| 96 | if other == nil { |
| 97 | return false |
| 98 | } |
| 99 | |
| 100 | if len(d.objects) != len(other.objects) { |
| 101 | return false |
| 102 | } |
| 103 | |
| 104 | for k, thisVal := range d.objects { |
| 105 | if otherVal, contains := other.objects[k]; contains { |
| 106 | // check if object in same key matches |
| 107 | if !kube.Semantic.DeepEqual(thisVal, otherVal) { |
| 108 | return false |
| 109 | } |
| 110 | } else { |
| 111 | return false |
| 112 | } |
| 113 | } |
| 114 | return true |
| 115 | } |
| 116 | |
| 117 | // Objects returns the contents of a Deployment. No ordering guarantees are given. |
| 118 | func (d Deployment) Objects() []KubeObject { |
no outgoing calls