internal/lsp: correct typo
Misspelled 'gcOptimizationDetails'. (auto-completion helped.)
Change-Id: I496de8f1749768e5bc0037821fe1672ba605d605
Reviewed-on: https://go-review.googlesource.com/c/tools/+/265779
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
diff --git a/internal/lsp/command.go b/internal/lsp/command.go
index 328ba92..398b2a5 100644
--- a/internal/lsp/command.go
+++ b/internal/lsp/command.go
@@ -201,10 +201,10 @@
}
pkgDir := span.URIFromPath(filepath.Dir(fileURI.Filename()))
s.gcOptimizationDetailsMu.Lock()
- if _, ok := s.gcOptimizatonDetails[pkgDir]; ok {
- delete(s.gcOptimizatonDetails, pkgDir)
+ if _, ok := s.gcOptimizationDetails[pkgDir]; ok {
+ delete(s.gcOptimizationDetails, pkgDir)
} else {
- s.gcOptimizatonDetails[pkgDir] = struct{}{}
+ s.gcOptimizationDetails[pkgDir] = struct{}{}
}
s.gcOptimizationDetailsMu.Unlock()
// need to recompute diagnostics.
diff --git a/internal/lsp/diagnostics.go b/internal/lsp/diagnostics.go
index d0dcb27..ca560d3 100644
--- a/internal/lsp/diagnostics.go
+++ b/internal/lsp/diagnostics.go
@@ -224,7 +224,7 @@
if gcDetailsDir == "" {
dirURI := span.URIFromPath(filepath.Dir(pgf.URI.Filename()))
s.gcOptimizationDetailsMu.Lock()
- _, ok := s.gcOptimizatonDetails[dirURI]
+ _, ok := s.gcOptimizationDetails[dirURI]
s.gcOptimizationDetailsMu.Unlock()
if ok {
gcDetailsDir = dirURI
diff --git a/internal/lsp/server.go b/internal/lsp/server.go
index dceb2a7..763f4d1 100644
--- a/internal/lsp/server.go
+++ b/internal/lsp/server.go
@@ -23,15 +23,15 @@
// messages on on the supplied stream.
func NewServer(session source.Session, client protocol.Client) *Server {
return &Server{
- delivered: make(map[span.URI]sentDiagnostics),
- gcOptimizatonDetails: make(map[span.URI]struct{}),
- watchedDirectories: make(map[span.URI]struct{}),
- changedFiles: make(map[span.URI]struct{}),
- session: session,
- client: client,
- diagnosticsSema: make(chan struct{}, concurrentAnalyses),
- progress: newProgressTracker(client),
- debouncer: newDebouncer(),
+ delivered: make(map[span.URI]sentDiagnostics),
+ gcOptimizationDetails: make(map[span.URI]struct{}),
+ watchedDirectories: make(map[span.URI]struct{}),
+ changedFiles: make(map[span.URI]struct{}),
+ session: session,
+ client: client,
+ diagnosticsSema: make(chan struct{}, concurrentAnalyses),
+ progress: newProgressTracker(client),
+ debouncer: newDebouncer(),
}
}
@@ -93,7 +93,7 @@
// optimization details to be included in the diagnostics. The key is the
// directory of the package.
gcOptimizationDetailsMu sync.Mutex
- gcOptimizatonDetails map[span.URI]struct{}
+ gcOptimizationDetails map[span.URI]struct{}
// diagnosticsSema limits the concurrency of diagnostics runs, which can be expensive.
diagnosticsSema chan struct{}