this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/lsp/fscache: use internal.Package helper

A very small tidy up.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I9342530205b3589f08a7183073c1209d1ff52183
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1233929
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>

+1 -7
+1 -7
internal/lsp/fscache/fs_cache.go
··· 149 149 150 150 if syntax != nil { 151 151 syntax.Pos().File().SetContent(content) 152 - var pkg *ast.Package 152 + pkg, _ := internal.Package(syntax) 153 153 decls := syntax.Decls 154 - for _, decl := range decls { 155 - if p, ok := decl.(*ast.Package); ok { 156 - pkg = p 157 - break 158 - } 159 - } 160 154 if pkg == nil { 161 155 pkg = &ast.Package{PackagePos: syntax.Pos()} 162 156 if len(decls) == 0 {