{"id":17914197,"url":"https://github.com/knadh/querytostruct","last_synced_at":"2025-03-23T23:30:45.628Z","repository":{"id":57505484,"uuid":"208100875","full_name":"knadh/querytostruct","owner":"knadh","description":"An extremely tiny utility for unmarshalling and scanning querystrings into structs","archived":false,"fork":false,"pushed_at":"2022-06-09T18:04:52.000Z","size":4,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T04:06:41.644Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knadh.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}},"created_at":"2019-09-12T16:55:58.000Z","updated_at":"2025-01-01T05:23:01.000Z","dependencies_parsed_at":"2022-09-26T17:51:44.175Z","dependency_job_id":null,"html_url":"https://github.com/knadh/querytostruct","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fquerytostruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fquerytostruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fquerytostruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fquerytostruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knadh","download_url":"https://codeload.github.com/knadh/querytostruct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244326216,"owners_count":20435122,"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"}},"keywords":[],"created_at":"2024-10-28T19:56:47.886Z","updated_at":"2025-03-23T23:30:45.269Z","avatar_url":"https://github.com/knadh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# querytostruct\n\nAn extremely tiny utility for unmarshalling and scanning\nquerystrings into structs. It supports scanning into int*, float*, string,\nand []byte types, along with []int*, []float*, and []\\*string slices\n\n## Install\n\n`go get -u github.com/knadh/querytostruct`\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/knadh/querytostruct\"\n)\n\nfunc main() {\n\tqs := \"name=John+Doe\u0026yes=true\u0026count=42\u0026tag=x\u0026tag=y\"\n\tq, _ := url.ParseQuery(qs)\n\n\ttype test struct {\n\t\tName  string   `q:\"name\"`\n\t\tYes   bool     `q:\"yes\"`\n\t\tCount int      `q:\"count\"`\n\t\tTags  []string `q:\"tag\"`\n\t}\n\n\tvar t test\n\tfields, err := querytostruct.Unmarshal(q, \u0026t, \"q\")\n\tfmt.Println(\"fields=\", fields, \"error=\", err)\n\tfmt.Println(t)\n}\n\n```\n\nLicensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknadh%2Fquerytostruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknadh%2Fquerytostruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknadh%2Fquerytostruct/lists"}