Skip to content

Merge the enumerable attributes of two interface deeply.

License

Notifications You must be signed in to change notification settings

ieee0824/go-deepmerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-deepmerge

Merge the enumerable attributes of two interface deeply.

example

a := map[string]interface{}{
    "foo": "bar",
    "hoge": "huga",
    "array": []interface{}{1, 2, 3},
}

b := map[string]interface{}{
    "john": "doe",
    "hoge": "huga",
    "array": []interface{}{1, 2, "fizz", 4, "buzz"},
}

c, _ := Merge(a, b)

c => 
map[string]interface{}{
    "foo": "bar",
    "john": "doe",
    "hoge": "huga",
    "array": []interface{}{1, 2, 3, 1, 2, "fizz", 4, "buzz"},
}

About

Merge the enumerable attributes of two interface deeply.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages