MCPcopy Index your code
hub / github.com/coder/coder / parseQueryParam

Function parseQueryParam

coderd/httpapi/queryparams.go:426–429  ·  view source on GitHub ↗

parseQueryParam expects just 1 value set for the given query param.

(parser *QueryParamParser, vals url.Values, parse func(v string) (T, error), def T, queryParam string)

Source from the content-addressed store, hash-verified

424
425// parseQueryParam expects just 1 value set for the given query param.
426func parseQueryParam[T any](parser *QueryParamParser, vals url.Values, parse func(v string) (T, error), def T, queryParam string) (T, error) {
427 setParse := parseSingle(parser, parse, def, queryParam)
428 return parseQueryParamSet(parser, vals, setParse, def, queryParam)
429}
430
431func parseSingle[T any](parser *QueryParamParser, parse func(v string) (T, error), def T, queryParam string) func(set []string) (T, error) {
432 return func(set []string) (T, error) {

Callers 13

UIntMethod · 0.85
IntMethod · 0.85
Int64Method · 0.85
PositiveInt32Method · 0.85
PositiveInt64Method · 0.85
BooleanMethod · 0.85
UUIDMethod · 0.85
RedirectURLMethod · 0.85
timeWithMutateMethod · 0.85
StringMethod · 0.85
JSONStringMapMethod · 0.85
DurationMethod · 0.85

Calls 2

parseSingleFunction · 0.85
parseQueryParamSetFunction · 0.85

Tested by

no test coverage detected