MCPcopy Create free account
hub / github.com/cli/cli / MutableSafeURL

Struct MutableSafeURL

internal/safeurl/safeurl.go:45–49  ·  view source on GitHub ↗

MutableSafeURL is a REST API URL built from a host prefix, path components, and query parameters. The path components and query parameters are URL encoded (aka percent-encoded) when the URL is rendered so that caller supplied values cannot alter the structure of the URL or change which resource it a

Source from the content-addressed store, hash-verified

43// alter the structure of the URL or change which resource it addresses; the host
44// prefix is used as given. The zero value renders as the empty string.
45type MutableSafeURL struct {
46 prefix string
47 components []string
48 query url.Values
49}
50
51// JoinPath returns a SafeURL for the path made up of the given components. It
52// returns an error if any component is exactly "..", which would traverse the URL

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected