1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:24:42 -07:00
Change-Id: Ib9b2a8b6b4c7ef711bc4710c18a74556cde0117c
This commit is contained in:
qiulaidongfeng 2024-04-02 22:20:21 +08:00
parent d42ad790d9
commit 88222bd8d0

View File

@ -17,7 +17,6 @@ import (
"go/parser"
"go/token"
"go/types"
"internal/singleflight"
"internal/testenv"
"io"
"log"
@ -386,7 +385,6 @@ func (w *Walker) Features() (fs []string) {
var parsedFileCache struct {
lock sync.RWMutex
m map[string]*ast.File
wg singleflight.Group
}
func init() {
@ -411,6 +409,7 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
parsedFileCache.m[filename] = f
}
parsedFileCache.lock.Unlock()
return f, nil
}