MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / setVnetParam

Function setVnetParam

cfapi/ip_route.go:229–235  ·  view source on GitHub ↗

setVnetParam overwrites the URL's query parameters with a query param to scope the HostnameRoute action to a certain virtual network (if one is provided).

(endpoint *url.URL, vnetID *uuid.UUID)

Source from the content-addressed store, hash-verified

227// setVnetParam overwrites the URL's query parameters with a query param to scope the HostnameRoute action to a certain
228// virtual network (if one is provided).
229func setVnetParam(endpoint *url.URL, vnetID *uuid.UUID) {
230 queryParams := url.Values{}
231 if vnetID != nil {
232 queryParams.Set("virtual_network_id", vnetID.String())
233 }
234 endpoint.RawQuery = queryParams.Encode()
235}

Callers 1

GetByIPMethod · 0.85

Calls 3

StringMethod · 0.65
SetMethod · 0.45
EncodeMethod · 0.45

Tested by

no test coverage detected