# jinzhu/copier

Copier for golang, copy value from struct to struct and more

Repository: https://github.com/jinzhu/copier
Canonical: https://ross.abutalabs.com/products/copier
Language: Go
License: MIT
License Family: permissive
Topics: go, golang, golang-package, copy
Last push: 2026-03-14T12:17:10+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 72, release rhythm 35, longevity 100
- inputs: {"age_days": 4689, "days_push": 172, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6175, forks 497 (observed 2026-08-28T04:09:37.597348+00:00)

## What it is
A Go library that copies values between structs, slices, and maps using reflection and matching field names. It supports struct tags to enforce, override, or exclude fields during copying, and can map method results to fields.

## Use cases
- copy values from one struct to another in go
- map dto fields to domain model structs
- convert between structs with matching field names
- copy a struct into a slice of structs
- copy data between maps in golang
- exclude or require fields when copying structs

## When to choose
- you need reflection-based struct-to-struct copying in Go without writing manual mapping code
- you want tag-driven control over which fields are copied, required, or ignored
- you need to copy between slices, structs, and maps with matching names

## When to avoid
- you need deep-copy semantics with independent nested allocations
- your structs have mismatched field names requiring custom mapping logic
- you are not working in the Go language

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, backend, apis
- platform: go, cross-platform
- tags: struct-copying, reflection, data-mapping, object-mapping, field-mapping, dto-mapping

## Member repositories
- jinzhu/copier (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:37.597348+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-29T17:47:26.309054+00:00, confidence not recorded.
  - readme: https://github.com/jinzhu/copier (fetched 2026-08-28T04:09:37.597348+00:00, sha 94c50a83292f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
