{"id":13493061,"url":"https://github.com/google/go-querystring","last_synced_at":"2025-05-13T17:04:14.425Z","repository":{"id":10542265,"uuid":"12738417","full_name":"google/go-querystring","owner":"google","description":"go-querystring is Go library for encoding structs into URL query strings.","archived":false,"fork":false,"pushed_at":"2025-05-05T14:18:10.000Z","size":69,"stargazers_count":2043,"open_issues_count":18,"forks_count":178,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-06T16:17:08.417Z","etag":null,"topics":["query-string","querystring"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/google/go-querystring/query","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/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2013-09-10T19:26:51.000Z","updated_at":"2025-05-03T04:58:24.000Z","dependencies_parsed_at":"2022-07-12T14:03:40.968Z","dependency_job_id":"b263fdef-229d-4092-92bc-baaa07bfb5ed","html_url":"https://github.com/google/go-querystring","commit_stats":{"total_commits":84,"total_committers":18,"mean_commits":4.666666666666667,"dds":0.6904761904761905,"last_synced_commit":"085cc7882e69d266a8d5683a062957aa5046aa2c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgo-querystring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgo-querystring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgo-querystring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgo-querystring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/go-querystring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990456,"owners_count":21995773,"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":["query-string","querystring"],"created_at":"2024-07-31T19:01:11.876Z","updated_at":"2025-05-13T17:04:14.392Z","avatar_url":"https://github.com/google.png","language":"Go","readme":"# go-querystring #\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/google/go-querystring/query.svg)](https://pkg.go.dev/github.com/google/go-querystring/query)\n[![Test Status](https://github.com/google/go-querystring/workflows/tests/badge.svg)](https://github.com/google/go-querystring/actions?query=workflow%3Atests)\n[![Test Coverage](https://codecov.io/gh/google/go-querystring/branch/master/graph/badge.svg)](https://codecov.io/gh/google/go-querystring)\n\ngo-querystring is a Go library for encoding structs into URL query parameters.\n\n## Usage ##\n\n```go\nimport \"github.com/google/go-querystring/query\"\n```\n\ngo-querystring is designed to assist in scenarios where you want to construct a\nURL using a struct that represents the URL query parameters.  You might do this\nto enforce the type safety of your parameters, for example, as is done in the\n[go-github][] library.\n\nThe query package exports a single `Values()` function.  A simple example:\n\n```go\ntype Options struct {\n  Query   string `url:\"q\"`\n  ShowAll bool   `url:\"all\"`\n  Page    int    `url:\"page\"`\n}\n\nopt := Options{ \"foo\", true, 2 }\nv, _ := query.Values(opt)\nfmt.Print(v.Encode()) // will output: \"q=foo\u0026all=true\u0026page=2\"\n```\n\nSee the [package godocs][] for complete documentation on supported types and\nformatting options.\n\n[go-github]: https://github.com/google/go-github/commit/994f6f8405f052a117d2d0b500054341048fbb08\n[package godocs]: https://pkg.go.dev/github.com/google/go-querystring/query\n\n## Alternatives ##\n\nIf you are looking for a library that can both encode and decode query strings,\nyou might consider one of these alternatives:\n\n - https://github.com/gorilla/schema\n - https://github.com/pasztorpisti/qs\n - https://github.com/hetiansu5/urlquery\n - https://github.com/ggicci/httpin (decoder only)\n","funding_links":[],"categories":["Template Engines","开源类库","Text Processing","Go","Open source library","文本处理"],"sub_categories":["Parsers/Encoders/Decoders","路由","Redirect","解析 器/Encoders/Decoders"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fgo-querystring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fgo-querystring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fgo-querystring/lists"}