Imported Upstream version 0.2.0
Tim Potter
7 years ago
17 | 17 | |
18 | 18 | ### Important note |
19 | 19 | |
20 | Mergo is intended to assign **only** zero value fields on destination with source value. Since April 6th it works like this. Before it didn't work properly, causing some random overwrites. After some issues and PRs I found it didn't merge as I designed it. Thanks to [imdario/mergo#8](https://github.com/imdario/mergo/pull/8) overwriting functions were added and the wrong behavior was clearly detected. | |
20 | Mergo is intended to merge **only** zero value fields on destination. Since April 6th it works like this. Before it didn't work properly, causing some random overwrites. After some issues and PRs I found it didn't merge as I designed it. Thanks to [imdario/mergo#8](https://github.com/imdario/mergo/pull/8) overwriting functions were added and the wrong behavior was clearly detected. | |
21 | 21 | |
22 | 22 | If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0). |
23 | 23 | |
24 | 24 | ### Mergo in the wild |
25 | 25 | |
26 | - [imdario/zas](https://github.com/imdario/zas) | |
27 | 26 | - [GoogleCloudPlatform/kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) |
28 | 27 | - [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) |
29 | 28 | - [EagerIO/Stout](https://github.com/EagerIO/Stout) |
33 | 32 | - [casualjim/exeggutor](https://github.com/casualjim/exeggutor) |
34 | 33 | - [divshot/gitling](https://github.com/divshot/gitling) |
35 | 34 | - [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) |
36 | - [andrerocker/deploy42](https://github.com/andrerocker/deploy42) | |
37 | - [elwinar/rambler](https://github.com/elwinar/rambler) | |
38 | - [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) | |
39 | - [jfbus/impressionist](https://github.com/jfbus/impressionist) | |
40 | - [Jmeyering/zealot](https://github.com/Jmeyering/zealot) | |
41 | - [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) | |
42 | - [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) | |
43 | - [thoas/picfit](https://github.com/thoas/picfit) | |
44 | - [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) | |
45 | - [jnuthong/item_search](https://github.com/jnuthong/item_search) | |
46 | 35 | |
47 | 36 | ## Installation |
48 | 37 | |
100 | 89 | |
101 | 90 | fmt.Println(dest) |
102 | 91 | // Will print |
103 | // {two 2} | |
92 | // {one 2} | |
104 | 93 | } |
105 | 94 | ``` |
106 | 95 |