| 84 | } |
| 85 | |
| 86 | func deepCopyJSON(src map[string]interface{}, dest map[string]interface{}) error { |
| 87 | if src == nil { |
| 88 | return errors.New("src is nil. You cannot read from a nil map") |
| 89 | } |
| 90 | if dest == nil { |
| 91 | return errors.New("dest is nil. You cannot insert to a nil map") |
| 92 | } |
| 93 | jsonStr, err := json.Marshal(src) |
| 94 | if err != nil { |
| 95 | return err |
| 96 | } |
| 97 | err = json.Unmarshal(jsonStr, &dest) |
| 98 | if err != nil { |
| 99 | return err |
| 100 | } |
| 101 | return nil |
| 102 | } |
| 103 | |
| 104 | func (comp *migrationsComponent) Reconcile(ctx *cu.Context) (cu.Result, error) { |
| 105 | obj := ctx.Object.(*migrationsv1beta1.Migrator) |