{"id":4165676,"name":"github.com/things-go/mapstruct","ecosystem":"go","description":"Package structs Go library for encoding native Go structures into generic map values.\n\nThe simplest function to start with is Encoded.\n\nWhen encode to a map[string]interface{}, structs will use the field\nname by default to perform the mapping. For example, if a struct has\na field \"Username\" then structs will use a key \"Username\".\n\nYou can change the behavior of structs by using struct tags.\nThe default struct tag that structs looks for is \"map\"\nbut you can customize it using EncodeWithTag.\n\nTo rename the key that structs looks for, use the \"map\" tag and\nset a value directly. For example, to change the \"username\" example\nabove to \"user\":\n\nEmbedded structs are treated as if they're another field with that name.\n\nThis would output that looks like below:\n\nWhen encoding from a struct to any other value, you may use the\n\",omitempty\" suffix on your tag to omit that value if it equates to\nthe zero value. The zero value of all types is specified in the Go\nspecification.\n\nFor example, the zero type of a numeric type is zero (\"0\"). If the struct\nfield value is zero and a numeric type, the field is empty, and it won't\nbe encoded into the destination type.\n\nSince unexported (private) struct fields cannot be set outside the package\nwhere they are defined, the encoder will simply skip them.\n\nFor this input type definition:\n\nthis map as output:","homepage":"https://github.com/things-go/mapstruct","licenses":"MIT","normalized_licenses":["MIT"],"repository_url":"https://github.com/things-go/mapstruct","keywords_array":[],"namespace":"github.com/things-go","versions_count":7,"first_release_published_at":"2021-12-01T09:41:41.000Z","latest_release_published_at":"2022-06-20T03:51:31.000Z","latest_release_number":"v0.0.7","last_synced_at":"2026-03-29T18:05:50.636Z","created_at":"2022-04-12T18:07:07.557Z","updated_at":"2026-03-29T18:05:50.637Z","registry_url":"https://pkg.go.dev/github.com/things-go/mapstruct","install_command":"go get github.com/things-go/mapstruct","documentation_url":"https://pkg.go.dev/github.com/things-go/mapstruct#section-documentation","metadata":{},"repo_metadata":{"uuid":"424046555","full_name":"things-go/structs","owner":"things-go","description":"Go library for encoding native Go structures into generic map values. go struct to map[string]interface{}","archived":false,"fork":false,"pushed_at":"2023-03-04T13:58:13.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2023-03-04T23:32:25.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"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}},"created_at":"2021-11-03T00:56:05.000Z","updated_at":"2021-12-10T19:29:00.000Z","dependencies_parsed_at":"2023-02-05T20:45:24.773Z","dependency_job_id":null,"html_url":"https://github.com/things-go/structs","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/things-go%2Fstructs","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/things-go%2Fstructs/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/things-go%2Fstructs/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/things-go","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"}},"repo_metadata_updated_at":"2023-03-21T19:46:07.739Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":9.345852080216646,"dependent_packages_count":6.999148183520997,"stargazers_count":null,"forks_count":null,"average":8.172500131868823},"purl":"pkg:golang/github.com/things-go/mapstruct","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/things-go/mapstruct","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/things-go/mapstruct","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/things-go/mapstruct/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-05-19T00:04:28.210Z","issues_count":0,"pull_requests_count":14,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":2111576.3571428573,"issues_closed_count":0,"pull_requests_closed_count":14,"pull_request_authors_count":1,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":1.4285714285714286,"merged_pull_requests_count":7,"bot_issues_count":0,"bot_pull_requests_count":14,"past_year_issues_count":0,"past_year_pull_requests_count":14,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":2111576.3571428573,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":14,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":1.4285714285714286,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":14,"past_year_merged_pull_requests_count":7},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fthings-go%2Fmapstruct/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fthings-go%2Fmapstruct/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fthings-go%2Fmapstruct/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fthings-go%2Fmapstruct/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fthings-go%2Fmapstruct/codemeta","maintainers":[]}