Registry / utility / mergo
library1.0.2gogounverified

A helper to merge structs and maps in Golang.

go get dario.cat/mergo
INSTALL
IMPORT
SIG · MERGO
M
mergo
utilitygov1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mergo
dario.cat/mergo

Merge two structs, with src fields overriding dst.

package main import ( "fmt" "dario.cat/mergo" ) func main() { type Foo struct { A string; B int } src := Foo{A: "one", B: 2} dst := Foo{A: "default"} mergo.Merge(&dst, src) fmt.Println(dst) // {one 2} }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
mergo — go get mergo · libregistry