mergo icon indicating copy to clipboard operation
mergo copied to clipboard

Mergo: merging Go structs and maps since 2013

Results 39 mergo issues
Sort by recently updated
recently updated
newest added

[playground](https://go.dev/play/p/q79xNQKeKOJ) ``` package main import ( "testing" "github.com/imdario/mergo" ) func TestMerge(t *testing.T) { dst := []interface{}{ map[string]int{ "a": 1, }, } src := []interface{}{ "nil", } err := mergo.Merge(&dst, src,...

help wanted
hacktoberfest

This PR aims to add a new feature to make it possible to deeply merge slices within maps by combining their contents. Can be considered as a continuation of #180

Fix: #220 Signed-off-by: Zhiyu Wang

```go type Foo struct { A string B int64 C bool D string } src := Foo{ A: "a", B: 52, C: false, D: "2012-02-02", } dest := Foo{ A:...

Right now mergo provides two options to handle slices: 1. `WithAppendSlice` - which appends all items from `src` to `dst` 2. `WithSliceDeepCopy` - which merges with override (override is mandatory...

v2

Mergo was removed from OSS-Fuzz recently because the integration wasn't completed: https://github.com/google/oss-fuzz/pull/9388 Mergo can benefit from fuzz testing, as it's main objective is to merge data, so it seems sensible...

v2

This PR is a followup to https://github.com/darccio/mergo/issues/131 & https://github.com/darccio/mergo/pull/227. The changes in this PR address the scenario where a non-nil struct pointer with `WithoutDereference` set will override the entire `dst`....