# google/go-querystring

go-querystring is Go library for encoding structs into URL query strings.

Repository: https://github.com/google/go-querystring
Canonical: https://ross.abutalabs.com/products/go-querystring
Homepage: https://pkg.go.dev/github.com/google/go-querystring/query
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: query-string, querystring
Last push: 2026-08-20T17:11:57+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 31, longevity 100
- inputs: {"age_days": 4740, "days_push": 13, "days_rel": 246, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2147, forks 187 (observed 2026-08-28T04:06:18.991733+00:00)

## What it is
go-querystring is a small Go library that encodes structs into URL query parameters via struct tags. It exposes a single Values() function and is widely used, notably by go-github.

## Use cases
- build url query strings from a struct in go
- type-safe query parameters for api requests
- encode struct fields with url tags
- construct paginated api request urls
- convert go struct to url.values

## When to choose
- you need to encode structs into query strings in Go with type safety
- you want a tiny, stable, widely-adopted library
- you already use struct tags like encoding/json and want similar ergonomics

## When to avoid
- you need to decode query strings back into structs
- you need complex nested or custom serialization beyond query parameters

## Facets
- artifact type: library
- maturity: stable
- function: serialization, http-client
- domain: web-development, developer-tools
- platform: go
- tags: query-string, struct-tags, url-encoding

## Member repositories
- google/go-querystring (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:18.991733+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:51:08.210967+00:00, confidence not recorded.
  - readme: https://github.com/google/go-querystring (fetched 2026-08-28T04:06:18.991733+00:00, sha d9f4b6f4dad7)
  - homepage: https://pkg.go.dev/github.com/google/go-querystring/query (fetched 2026-08-29T10:30:59.408692+00:00, sha cf51fe93852e)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T10:30:59.411748+00:00, sha 757852027879)
  - site_page: https://go.dev/project (fetched 2026-08-29T10:30:59.413741+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
