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

Method SetQuery

internal/safeurl/safeurl.go:87–92  ·  view source on GitHub ↗

SetQuery sets the query parameter key to value, replacing any existing value.

(key, value string)

Source from the content-addressed store, hash-verified

85
86// SetQuery sets the query parameter key to value, replacing any existing value.
87func (u *MutableSafeURL) SetQuery(key, value string) {
88 if u.query == nil {
89 u.query = url.Values{}
90 }
91 u.query.Set(key, value)
92}
93
94// String renders the full URL. Path components and query parameters are URL encoded
95// (aka percent-encoded) while the host prefix is included as given. The zero value

Callers 15

buildRequestURLMethod · 0.95
TestMutableSafeURLStringFunction · 0.95
searchMethod · 0.80
deleteCacheByKeyFunction · 0.80
GetCachesFunction · 0.80
getTagsFunction · 0.80
isNewReleaseFunction · 0.80
getGPGKeysFunction · 0.80
userKeysFunction · 0.80
getCommitsFunction · 0.80
contentsAPIPathFunction · 0.80
getReadmePathFunction · 0.80

Calls 1

SetMethod · 0.65

Tested by 2

TestMutableSafeURLStringFunction · 0.76