diff --git a/internal/lsp/cache.go b/internal/lsp/cache.go index d255345..29e11d2 100644 --- a/internal/lsp/cache.go +++ b/internal/lsp/cache.go @@ -30,8 +30,7 @@ func NewCache() *Cache { func (s *server) UpdateCache(pkgPath string) { pkg, err := PackageFromDir(pkgPath, false) - if err != nil { - panic(err) + if err == nil { + s.cache.pkgs.Set(pkgPath, pkg) } - s.cache.pkgs.Set(pkgPath, pkg) }