MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / GetContent

Method GetContent

pkg/lsp/documents.go:269–277  ·  view source on GitHub ↗

GetContent retrieves a document's content

(uri string)

Source from the content-addressed store, hash-verified

267
268// GetContent retrieves a document's content
269func (dm *DocumentManager) GetContent(uri string) (string, bool) {
270 dm.mu.RLock()
271 defer dm.mu.RUnlock()
272 doc, ok := dm.documents[uri]
273 if !ok {
274 return "", false
275 }
276 return doc.Content, true
277}
278
279// splitLines splits content into lines, preserving line endings
280func splitLines(content string) []string {

Callers 8

TestDocumentManagerFunction · 0.95
TestHandler_DidOpenFunction · 0.80
TestHandler_DidChangeFunction · 0.80
handleDidChangeMethod · 0.80
handleDidSaveMethod · 0.80
handleFormattingMethod · 0.80
handleDocumentSymbolMethod · 0.80

Calls

no outgoing calls

Tested by 3

TestDocumentManagerFunction · 0.76
TestHandler_DidOpenFunction · 0.64
TestHandler_DidChangeFunction · 0.64