GoPLS Viewer

Home|gopls/internal/packagesinternal/packages.go
1// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Package packagesinternal exposes internal-only fields from go/packages.
6package packagesinternal
7
8import (
9    "golang.org/x/tools/internal/gocommand"
10)
11
12var GetForTest = func(p interface{}) string { return "" }
13var GetDepsErrors = func(p interface{}) []*PackageError { return nil }
14
15type PackageError struct {
16    ImportStack []string // shortest path from package named on command line to this one
17    Pos         string   // position of error (if present, file:line:col)
18    Err         string   // the error itself
19}
20
21var GetGoCmdRunner = func(config interface{}) *gocommand.Runner { return nil }
22
23var SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {}
24
25var TypecheckCgo int
26var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
27var ForTest int    // must be set as a LoadMode to call GetForTest
28
29var SetModFlag = func(config interface{}, value string) {}
30var SetModFile = func(config interface{}, value string) {}
31
MembersX
DepsErrors
ForTest
gocommand
PackageError
PackageError.ImportStack
PackageError.Pos
PackageError.Err
TypecheckCgo
Members
X