{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/2lambda123/schema","name":"github.com/2lambda123/schema","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:","version":"v1.2.1","softwareVersion":"v1.2.1","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/2lambda123/schema","issueTracker":"https://github.com/2lambda123/schema/issues","url":"https://github.com/2lambda123/schema","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2018-02-22","dateModified":"2023-10-18","datePublished":"2023-10-18","copyrightYear":2018,"downloadUrl":"https://proxy.golang.org/github.com/2lambda123/schema/@v/v1.2.1.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/2lambda123/schema#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/2lambda123/schema"]}