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

Method String

internal/safeurl/safeurl.go:97–103  ·  view source on GitHub ↗

String renders the full URL. Path components and query parameters are URL encoded (aka percent-encoded) while the host prefix is included as given. The zero value renders as the empty string.

()

Source from the content-addressed store, hash-verified

95// (aka percent-encoded) while the host prefix is included as given. The zero value
96// renders as the empty string.
97func (u *MutableSafeURL) String() string {
98 result := joinPathWithHostPrefix(u.prefix, u.components...)
99 if len(u.query) > 0 {
100 result += "?" + u.query.Encode()
101 }
102 return result
103}
104
105// ImmutableSafeURL is a SafeURL that renders a fixed URL string verbatim. It exists
106// so that a URL which was not built from percent-encoded components, such as a full

Callers 7

getRunFunction · 0.95
removeRunFunction · 0.95
removeRunFunction · 0.95
cancelWorkflowRunFunction · 0.95
StopCodespaceMethod · 0.95
DeleteCodespaceMethod · 0.95
TestMutableSafeURLStringFunction · 0.95

Calls 1

joinPathWithHostPrefixFunction · 0.85

Tested by 1

TestMutableSafeURLStringFunction · 0.76