MCPcopy
hub / github.com/valyala/fasthttp / getFileContents

Function getFileContents

fs_test.go:631–639  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

629}
630
631func getFileContents(path string) ([]byte, error) {
632 path = "." + path
633 f, err := os.Open(path)
634 if err != nil {
635 return nil, err
636 }
637 defer f.Close()
638 return io.ReadAll(f)
639}
640
641func TestParseByteRangeSuccess(t *testing.T) {
642 t.Parallel()

Callers 9

TestFSServeFileHeadFunction · 0.85
TestDirFSServeFileHeadFunction · 0.85
TestServeFileHeadFunction · 0.85
TestServeFileCompressedFunction · 0.85
testFSByteRangeFunction · 0.85

Calls 2

OpenMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…