darccio/mergo

Mergo: merging Go structs and maps since 2013

View on GitHub ↗Jump to charts ↓

darccio/mergo has 3k+ stars and 250+ forks on GitHub, is written in Go, and was last pushed on Oct 12, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 1 hour ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 22nd, 2026
Created on March 11th, 2013
Open Issues & Pull Requests: 24 (+0)
GitHub issues: Enabled
Number of forks: 286
Total Stargazers: 3,108 (+0)
Total Subscribers: 26 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 7.2 days
Mean response time: 48.4 days
90th percentile: 353.8 days
Tracked items: 9

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 760 days
Stale 30+ days: 5
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • allstar (1)
  • v2 (1)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Mergo is a Go library that merges structs and maps by setting default values in zero-value fields.

The tool solves the problem of combining configuration objects and avoiding repetitive conditional logic when applying defaults. It works by recursively merging exported fields of same-type structs and maps, leaving unexported fields untouched. The library does not merge structs nested inside maps since they are not addressable through Go reflection.

Mergo suits projects that need to layer configuration defaults or combine structured data without manual field-by-field assignment. It is particularly useful for applications handling configuration management where default values must be applied cleanly. The tool is stable and frozen, with no new features accepted; the maintainers have indicated that a future major version may improve the implementation and address corner cases.

The project maintains a frozen feature set and is considered production-ready. The codebase has been stable over time with only critical fixes applied, as evidenced by the reversion of a problematic change in a recent release. The tool is widely adopted across large-scale projects in the Go ecosystem.