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

Method Close

pkg/lsp/documents.go:241–245  ·  view source on GitHub ↗

Close removes a document from the manager. This method is called when the client sends a textDocument/didClose notification. It removes the document from the internal map and releases associated resources. Parameters: - uri: Document URI to close and remove Thread Safety: This method uses a write

(uri string)

Source from the content-addressed store, hash-verified

239// Once closed, the document must be re-opened with Open() before it can be
240// accessed again. Attempting to Update() or Get() a closed document will fail.
241func (dm *DocumentManager) Close(uri string) {
242 dm.mu.Lock()
243 defer dm.mu.Unlock()
244 delete(dm.documents, uri)
245}
246
247// Get retrieves a copy of a document to avoid race conditions
248// The returned document is a snapshot and modifications won't affect the original

Callers 3

TestDocumentManagerFunction · 0.95
handleDidCloseMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestDocumentManagerFunction · 0.76