GetModule resolves the Module for the protocol URI.
(uri protocol.URI)
| 211 | |
| 212 | // GetModule resolves the Module for the protocol URI. |
| 213 | func (w *workspace) GetModule(uri protocol.URI) bufmodule.Module { |
| 214 | if w == nil { |
| 215 | return nil |
| 216 | } |
| 217 | fileName := uri.Filename() |
| 218 | if fileInfo, ok := w.fileNameToFileInfo[fileName]; ok { |
| 219 | return fileInfo.Module() |
| 220 | } |
| 221 | w.lsp.logger.Warn("workspace: module not found", slog.String("file", fileName), slog.String("parent", w.workspaceURI.Filename())) |
| 222 | return nil |
| 223 | } |
| 224 | |
| 225 | // CheckClient returns the buf check Client configured for the workspace. |
| 226 | func (w *workspace) CheckClient() bufcheck.Client { |
no test coverage detected