(t *testing.T, name string, callDepth int)
| 34 | } |
| 35 | |
| 36 | func loadBytes(t *testing.T, name string, callDepth int) []byte { |
| 37 | _, b, _, _ := runtime.Caller(callDepth) |
| 38 | basepath := filepath.Dir(b) |
| 39 | |
| 40 | path := filepath.Join(basepath, name) // relative path |
| 41 | bytes, err := os.ReadFile(path) |
| 42 | if err != nil { |
| 43 | t.Fatal(err) |
| 44 | } |
| 45 | return bytes[:] |
| 46 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…