MCPcopy Index your code
hub / github.com/google/go-github / mustParseURL

Function mustParseURL

github/github_test.go:59–66  ·  view source on GitHub ↗

mustParseURL is a helper function that parses a URL and fails the test if there is an error.

(t *testing.T, rawurl string)

Source from the content-addressed store, hash-verified

57
58// mustParseURL is a helper function that parses a URL and fails the test if there is an error.
59func mustParseURL(t *testing.T, rawurl string) *url.URL {
60 t.Helper()
61 u, err := url.Parse(rawurl)
62 if err != nil {
63 t.Fatalf("Failed to parse URL %q: %v", rawurl, err)
64 }
65 return u
66}
67
68// setup sets up a test HTTP server along with a github.Client that is
69// configured to talk to that test server. Tests should register handlers on

Callers 3

Test_newClientFunction · 0.85
TestClient_BaseURLFunction · 0.85
TestClient_UploadURLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…