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

Function dummyFileHandles

gopls/internal/cache/parse_cache_test.go:196–204  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

194}
195
196func dummyFileHandles(n int) []file.Handle {
197 var fhs []file.Handle
198 for i := range n {
199 uri := protocol.DocumentURI(fmt.Sprintf("file:///_%d", i))
200 src := fmt.Appendf(nil, "package p\nvar _ = %d", i)
201 fhs = append(fhs, makeFakeFileHandle(uri, src))
202 }
203 return fhs
204}
205
206func makeFakeFileHandle(uri protocol.DocumentURI, src []byte) fakeFileHandle {
207 return fakeFileHandle{

Callers 3

TestParseCacheFunction · 0.85
TestParseCache_ReparsingFunction · 0.85

Calls 3

DocumentURITypeAlias · 0.92
appendFunction · 0.85
makeFakeFileHandleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…