{"id":37856273,"url":"https://github.com/aacfactory/copier","last_synced_at":"2026-01-16T16:27:08.393Z","repository":{"id":57651951,"uuid":"448208508","full_name":"aacfactory/copier","owner":"aacfactory","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-15T07:24:32.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-01-15T10:00:33.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aacfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-15T07:16:52.000Z","updated_at":"2022-01-15T07:24:16.000Z","dependencies_parsed_at":"2024-01-15T08:42:36.158Z","dependency_job_id":"30b540e7-a970-485d-a6ee-2a2301a57af2","html_url":"https://github.com/aacfactory/copier","commit_stats":null,"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"purl":"pkg:github/aacfactory/copier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Fcopier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Fcopier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Fcopier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Fcopier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aacfactory","download_url":"https://codeload.github.com/aacfactory/copier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Fcopier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T16:27:07.716Z","updated_at":"2026-01-16T16:27:08.376Z","avatar_url":"https://github.com/aacfactory.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Copier\ncopy source value into destination value.\n\n## Feature\n* Support tag\n* Support sql.Scanner\n* Support anonymous\n* Support slice\n* Support map\n* Support getter or setter\n* support type convert\n* support interface\n\n## Note\n* DON'T SUPPORT UNEXPORTED EMBED PTR \n\n## Install\n```bash\ngo get github.com/aacfactory/copier\n```\n\n## Example\ndestination\n```go\ntype Date time.Time\n\ntype Foo struct {\n\tStr         string\n\tInt         int\n\tBool        bool\n\tFloat       float64\n\tDate        Date                `copy:\"Time\"`\n\tBytes       json.RawMessage\n\tFaz         *Faz                `copy:\"Faz\"`\n\tBazs        []*Faz\n\tInts        []int\n\tISS         [][]int\n\tFazMap      map[string]*Faz     `copy:\"FazMap\"`\n\tSQLTime     time.Time\n\tSQLString   string\n\tIgnore      interface{}         `copy:\"-\"`\n}\n\ntype Faz struct {\n\tX string\n}\n```\nsource\n```go\ntype Bar struct {\n\tStr         string\n\tInt         int\n\tBool        bool\n\tFloat       float64\n\tTime        Date                `copy:\"Time\"`\n\tBytes       json.RawMessage\n\tBaz         *Baz                `copy:\"Faz\"`\n\tBazs        []*Baz\n\tInts        []int\n\tISS         [][]int\n\tBazMap      map[string]*Baz     `copy:\"FazMap\"`\n\tSQLTime     time.Time\n\tSQLString   string\n\tIgnore      interface{}         `copy:\"-\"`\n}\n\ntype Baz struct {\n\tX string\n}\n```\ncopy\n```go\nfoo := \u0026Foo{}\nbar := Bar{...}\n// use copy\nerr := copier.Copy(foo, bar)\n// use value of\nfoo, err = copier.ValueOf[Foo](bar)\n```\n\n## Type convert\n* string\n  * bool (false, true)\n  * int\n  * float\n  * uint\n  * byte\n  * []byte\n  * time.Time (RFC3339)\n  * sql.NullString \n  * text.TextMarshaler \n* bool\n  * string (false, true)\n  * int (-1,0,1)\n  * uint(0,1)\n  * byte(f,t)\n  * sql.NullBool\n* int\n  * string\n  * bool (-1,1)\n  * float\n  * uint\n  * time.Time (UnixMilli)\n  * sql.NullIntX\n* float\n  * string \n  * int\n  * uint\n  * sql.NullFloatX\n* uint\n  * string\n  * bool (0,1)\n  * int\n  * float\n  * time.Time (UnixMilli)\n* byte\n  * string (first byte)\n  * []byte (first byte)\n  * bool (t,f)\n  * int \n  * encoding.TextMarshaler (first byte)\n* []byte\n  * string\n  * encoding.TextMarshaler\n* time.Time\n  * string (RFC3339)\n  * sql.NullTime\n  * int (UnixMilli)\n  * uint (UnixMilli)\n* encoding.TextUnmarshaler\n  * string\n  * []byte\n  * encoding.TextMarshaler\n\n## Getter \nThe recv of getter method must be value, and num of results must be one.\n\n## Setter\nThe recv of getter method must be ptr, and num of params must be one.  \nNote: when src field type equals dst field type, setter will be discarded.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faacfactory%2Fcopier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faacfactory%2Fcopier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faacfactory%2Fcopier/lists"}