{"id":8619151,"name":"github.com/2lambda123/schema","ecosystem":"go","description":"Package gorilla/schema fills a struct with form values.\n\nThe basic usage is really simple. Given this struct:\n\n...we can fill it passing a map to the Decode() function:\n\nThis is just a simple example and it doesn't make a lot of sense to create\nthe map manually. Typically it will come from a http.Request object and\nwill be of type url.Values, http.Request.Form, or http.Request.MultipartForm:\n\nNote: it is a good idea to set a Decoder instance as a package global,\nbecause it caches meta-data about structs, and an instance can be shared safely:\n\nTo define custom names for fields, use a struct tag \"schema\". To not populate\ncertain fields, use a dash for the name and it will be ignored:\n\nThe supported field types in the destination struct are:\n\nNon-supported types are simply ignored, however custom types can be registered\nto be converted.\n\nTo fill nested structs, keys must use a dotted notation as the \"path\" for the\nfield. So for example, to fill the struct Person below:\n\n...the source map must have the keys \"Name\", \"Phone.Label\" and \"Phone.Number\".\nThis means that an HTML form to fill a Person struct must look like this:\n\nSingle values are filled using the first value for a key from the source map.\nSlices are filled using all values for a key from the source map. So to fill\na Person with multiple Phone values, like:\n\n...an HTML form that accepts three Phone values would look like this:\n\nNotice that only for slices of structs the slice index is required.\nThis is needed for disambiguation: if the nested struct also had a slice\nfield, we could not translate multiple values to it if we did not use an\nindex for the parent struct.\n\nThere's also the possibility to create a custom type that implements the\nTextUnmarshaler interface, and in this case there's no need to register\na converter, like:\n\n...an HTML form that accepts three Email values would look like this:","homepage":"https://github.com/2lambda123/schema","licenses":"BSD-3-Clause","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/2lambda123/schema","keywords_array":[],"namespace":"github.com/2lambda123","versions_count":6,"first_release_published_at":"2018-02-22T22:19:46.000Z","latest_release_published_at":"2023-10-18T11:20:12.000Z","latest_release_number":"v1.2.1","last_synced_at":"2026-04-16T16:16:03.981Z","created_at":"2023-12-05T01:35:56.348Z","updated_at":"2026-04-16T16:16:03.981Z","registry_url":"https://pkg.go.dev/github.com/2lambda123/schema","install_command":"go get github.com/2lambda123/schema","documentation_url":"https://pkg.go.dev/github.com/2lambda123/schema#section-documentation","metadata":{},"repo_metadata":{"uuid":"726770700","full_name":"2lambda123/schema","owner":"2lambda123","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-03T11:12:52.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-03T12:24:08.563Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2lambda123.png","metadata":{},"created_at":"2023-12-03T11:00:06.000Z","updated_at":"2023-12-03T11:00:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/2lambda123/schema","commit_stats":null,"previous_names":["2lambda123/schema"],"tags_count":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2lambda123%2Fschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2lambda123%2Fschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2lambda123%2Fschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2lambda123%2Fschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2lambda123","download_url":"https://codeload.github.com/2lambda123/schema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":174677196,"owners_count":10149300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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"}},"repo_metadata_updated_at":"2023-12-05T01:36:00.565Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":10.771707882697278,"dependent_packages_count":9.555904237689512,"stargazers_count":25.34783379277267,"forks_count":18.880903912260273,"docker_downloads_count":null,"average":16.139087456354932},"purl":"pkg:golang/github.com/2lambda123/schema","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/2lambda123/schema","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/2lambda123/schema","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/2lambda123/schema/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2F2lambda123%2Fschema/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2F2lambda123%2Fschema/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2F2lambda123%2Fschema/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2F2lambda123%2Fschema/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2F2lambda123%2Fschema/codemeta","maintainers":[]}