This package browser is in early development. Mind the rough edges.

go-dario-cat-mergo 1.0.2

Helper to merge structs and maps in Golang

Helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.

Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).

Installation

Install go-dario-cat-mergo 1.0.2 as follows:

guix install go-dario-cat-mergo@1.0.2

Or install the latest version:

guix install go-dario-cat-mergo

You can also install packages in augmented, pure or containerized environments for development or simply to try them out without polluting your user profile. See the guix shell documentation for more information.