MCPcopy Create free account
hub / github.com/prometheus/client_golang / URL

Method URL

api/client.go:107–119  ·  view source on GitHub ↗
(ep string, args map[string]string)

Source from the content-addressed store, hash-verified

105}
106
107func (c *httpClient) URL(ep string, args map[string]string) *url.URL {
108 p := path.Join(c.endpoint.Path, ep)
109
110 for arg, val := range args {
111 arg = ":" + arg
112 p = strings.ReplaceAll(p, arg, val)
113 }
114
115 u := *c.endpoint
116 u.Path = p
117
118 return &u
119}
120
121func (c *httpClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) {
122 if ctx != nil {

Callers 1

TestClientURLFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestClientURLFunction · 0.76