MCPcopy
hub / github.com/golang/tools / makeFakeFileHandle

Function makeFakeFileHandle

gopls/internal/cache/parse_cache_test.go:206–212  ·  view source on GitHub ↗
(uri protocol.DocumentURI, src []byte)

Source from the content-addressed store, hash-verified

204}
205
206func makeFakeFileHandle(uri protocol.DocumentURI, src []byte) fakeFileHandle {
207 return fakeFileHandle{
208 uri: uri,
209 data: src,
210 hash: file.HashOf(src),
211 }
212}
213
214type fakeFileHandle struct {
215 file.Handle

Callers 8

TestMatchingPortsStdlibFunction · 0.85
TestParseCacheFunction · 0.85
TestParseCache_ReparsingFunction · 0.85
dummyFileHandlesFunction · 0.85

Calls 1

HashOfFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…