{"id":36464057,"url":"https://github.com/fpbear/querystring","last_synced_at":"2026-01-12T00:00:58.091Z","repository":{"id":233431648,"uuid":"785563259","full_name":"FPbear/querystring","owner":"FPbear","description":"QueryString is a Go library for converting a struct or a map into URL values, with support for custom encoders, time formatting, and handling of different data types.","archived":false,"fork":false,"pushed_at":"2024-04-15T08:02:03.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-19T12:26:41.897Z","etag":null,"topics":["camelcase","custom-encode","pascalcase","query-string","querystring","snakecase","url-values"],"latest_commit_sha":null,"homepage":"","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/FPbear.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-12T06:20:11.000Z","updated_at":"2024-04-15T07:47:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"42c217e5-4b75-4d71-ae86-4ea0cbd07b80","html_url":"https://github.com/FPbear/querystring","commit_stats":null,"previous_names":["fpbear/querystring"],"tags_count":2,"template":true,"template_full_name":null,"purl":"pkg:github/FPbear/querystring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FPbear%2Fquerystring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FPbear%2Fquerystring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FPbear%2Fquerystring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FPbear%2Fquerystring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FPbear","download_url":"https://codeload.github.com/FPbear/querystring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FPbear%2Fquerystring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["camelcase","custom-encode","pascalcase","query-string","querystring","snakecase","url-values"],"created_at":"2026-01-12T00:00:32.584Z","updated_at":"2026-01-12T00:00:58.042Z","avatar_url":"https://github.com/FPbear.png","language":"Go","readme":"# QueryString\n\nQueryString is a Go library for converting a struct or a map into URL values, with support for custom encoders, time formatting, and handling of different data types.\n\n\n## Installation\n\nUse the package manager [go get](https://github.com/FPbear/querystring) to install QueryString.\n\n```bash\ngo get github.com/FPbear/querystring\n```\n## Usage\n### Example\n\n```golang\nimport \"github.com/FPbear/querystring\"\n\ntype Input struct {\n    Hello string     `url:\"hello\"`\n    Foo   string     `url:\"foo,omitempty\"`\n    Empty string     `url:\"empty\"`\n}\n\nfunc main() {\n    input := Input{\n        Hello: \"world\",\n        Foo:   \"\",\n        Empty: \"\",\n    }\n\n    values, err := querystring.Values(input)\n    if err != nil {\n        log.Fatal(err)\n    }\n    fmt.Println(values.Encode())\n    // Output: hello=world\u0026empty=\n}\n```\nYou can also customize the encoder, for example:\n```golang\nimport \"github.com/FPbear/querystring\"\n\ntype subEncode struct {\n\tHello string `form:\"hello\"`\n\tWorld string `form:\"world\"`\n}\n\nfunc (s *subEncode) Encode() ([]string, error) {\n\treturn []string{s.Hello + \"-\" + s.World}, nil\n}\n\ntype Input struct {\n    Hello string     `form:\"hello\"`\n    Foo   string     `form:\"foo,omitempty\"`\n    Empty string     `form:\"empty\"`\n    Sub   *subEncode `form:\"sub,omitempty\"`\n}\n\nfunc main() {\n    input := Input{\n        Hello: \"world\",\n        Foo:   \"\",\n        Empty: \"\",\n        Sub: \u0026subEncode{\n            Hello: \"hello\",\n            World: \"world\",\n        },\n    }\n\n    con := NewConverter(NewTag(WithTag(\"form\")))\n    values, err := con.Values(input)\n    if err != nil {\n        log.Fatal(err)\n    }\n    fmt.Println(values.Encode())\n    // Output: hello=world\u0026empty=\u0026sub=hello-world\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpbear%2Fquerystring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpbear%2Fquerystring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpbear%2Fquerystring/lists"}