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

Function copyTestFile

scrape/scrape_test.go:34–48  ·  view source on GitHub ↗
(t *testing.T, w io.Writer, filename string)

Source from the content-addressed store, hash-verified

32}
33
34func copyTestFile(t *testing.T, w io.Writer, filename string) {
35 t.Helper()
36 f, err := os.Open(filepath.Join("testdata", filename))
37 if err != nil {
38 t.Fatalf("unable to open test file: %v", err)
39 }
40 _, err = io.Copy(w, f)
41 if err != nil {
42 t.Errorf("failure copying test file: %v", err)
43 }
44 err = f.Close()
45 if err != nil {
46 t.Errorf("failure closing test file: %v", err)
47 }
48}

Callers 2

Test_ListOAuthAppsFunction · 0.85

Calls 1

CloseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…