# darccio/mergo

Mergo: merging Go structs and maps since 2013

Repository: https://github.com/darccio/mergo
Canonical: https://ross.abutalabs.com/products/mergo
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: go, structures, merge, mapping, golang, hacktoberfest
Last push: 2026-08-24T21:54:37+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4923, "days_push": 9, "days_rel": 483, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3106, forks 283 (observed 2026-08-28T04:07:43.760707+00:00)

## What it is
Mergo is a Go library that merges same-type structs and maps by setting default values in zero-value fields using reflection. It has been stable since 2013 and is widely used in production, though it is frozen with no new features accepted.

## Use cases
- merge default values into a Go config struct
- fill zero-value fields of a struct from another struct
- deep merge two maps in Go
- avoid messy if-statements when applying config defaults
- overlay user settings on top of defaults

## When to choose
- you need recursive merging of exported struct fields or maps in Go
- you want a battle-tested, production-ready library for setting default values
- you need a small dependency with a stable, frozen API

## When to avoid
- you need to merge unexported (private) fields
- you need to merge structs inside maps
- you need new features or ongoing development, since the library is frozen
- you are not working in Go

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, backend
- platform: go, cross-platform
- tags: struct-merging, map-merging, default-values, reflection, configuration

## Member repositories
- darccio/mergo (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:43.760707+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:46:00.721075+00:00, confidence not recorded.
  - readme: https://github.com/darccio/mergo (fetched 2026-08-28T04:07:43.760707+00:00, sha b438d695e52d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
