dev: fix updated golangci/tools revision
This commit is contained in:
parent
5d50b907dd
commit
e691e606b1
2
go.mod
2
go.mod
@ -69,5 +69,5 @@ replace (
|
|||||||
// https://github.com/ultraware/funlen/pull/1
|
// https://github.com/ultraware/funlen/pull/1
|
||||||
github.com/ultraware/funlen => github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114
|
github.com/ultraware/funlen => github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114
|
||||||
// https://github.com/golang/tools/pull/139
|
// https://github.com/golang/tools/pull/139
|
||||||
golang.org/x/tools => github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8
|
golang.org/x/tools => github.com/golangci/tools v0.0.0-20190910062050-3540c026601b
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -77,8 +77,8 @@ github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSS
|
|||||||
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
|
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
|
||||||
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg=
|
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg=
|
||||||
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
|
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
|
||||||
github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8 h1:zlLYFLThJpbBZwGgIjfUzDg3gi32safjHB0omx3qtvo=
|
github.com/golangci/tools v0.0.0-20190910062050-3540c026601b h1:0gJ6G80gfLCh1Lz2O2m3tqESG5QJYYZKS0Z3wa2YzPM=
|
||||||
github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
github.com/golangci/tools v0.0.0-20190910062050-3540c026601b/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=
|
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=
|
||||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
|
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
|
||||||
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
|
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
|
||||||
|
41
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
41
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
@ -49,7 +49,6 @@ const (
|
|||||||
NeedImports
|
NeedImports
|
||||||
|
|
||||||
// NeedDeps adds the fields requested by the LoadMode in the packages in Imports.
|
// NeedDeps adds the fields requested by the LoadMode in the packages in Imports.
|
||||||
// If NeedImports is not set, it will be added automatically.
|
|
||||||
NeedDeps
|
NeedDeps
|
||||||
|
|
||||||
// NeedExportsFile adds ExportsFile.
|
// NeedExportsFile adds ExportsFile.
|
||||||
@ -61,7 +60,7 @@ const (
|
|||||||
// NeedSyntax adds Syntax.
|
// NeedSyntax adds Syntax.
|
||||||
NeedSyntax
|
NeedSyntax
|
||||||
|
|
||||||
// NeedTypesInfo adds TypesInfo. If NeedImports is not set, it will be added automatically.
|
// NeedTypesInfo adds TypesInfo.
|
||||||
NeedTypesInfo
|
NeedTypesInfo
|
||||||
|
|
||||||
// NeedTypesSizes adds TypesSizes.
|
// NeedTypesSizes adds TypesSizes.
|
||||||
@ -416,11 +415,13 @@ type loader struct {
|
|||||||
parseCacheMu sync.Mutex
|
parseCacheMu sync.Mutex
|
||||||
exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
|
exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
|
||||||
|
|
||||||
// TODO(matloob): Add an implied mode here and use that instead of mode.
|
// Config.Mode contains the implied mode (see implyLoadMode).
|
||||||
// Implied mode would contain all the fields we need the data for so we can
|
// Implied mode contains all the fields we need the data for.
|
||||||
// get the actually requested fields. We'll zero them out before returning
|
// In requestedMode there are the actually requested fields.
|
||||||
// packages to the user. This will make it easier for us to get the conditions
|
// We'll zero them out before returning packages to the user.
|
||||||
// where we need certain modes right.
|
// This makes it easier for us to get the conditions where
|
||||||
|
// we need certain modes right.
|
||||||
|
requestedMode LoadMode
|
||||||
}
|
}
|
||||||
|
|
||||||
type parseValue struct {
|
type parseValue struct {
|
||||||
@ -477,7 +478,9 @@ func newLoader(cfg *Config) *loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ld.addDependingLoadModes()
|
// Save the actually requested fields. We'll zero them out before returning packages to the user.
|
||||||
|
ld.requestedMode = ld.Mode
|
||||||
|
ld.implyLoadMode()
|
||||||
return ld
|
return ld
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,35 +628,35 @@ func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
|
|||||||
}
|
}
|
||||||
for i := range ld.pkgs {
|
for i := range ld.pkgs {
|
||||||
// Clear all unrequested fields, for extra de-Hyrum-ization.
|
// Clear all unrequested fields, for extra de-Hyrum-ization.
|
||||||
if ld.Mode&NeedName == 0 {
|
if ld.requestedMode&NeedName == 0 {
|
||||||
ld.pkgs[i].Name = ""
|
ld.pkgs[i].Name = ""
|
||||||
ld.pkgs[i].PkgPath = ""
|
ld.pkgs[i].PkgPath = ""
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedFiles == 0 {
|
if ld.requestedMode&NeedFiles == 0 {
|
||||||
ld.pkgs[i].GoFiles = nil
|
ld.pkgs[i].GoFiles = nil
|
||||||
ld.pkgs[i].OtherFiles = nil
|
ld.pkgs[i].OtherFiles = nil
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedCompiledGoFiles == 0 {
|
if ld.requestedMode&NeedCompiledGoFiles == 0 {
|
||||||
ld.pkgs[i].CompiledGoFiles = nil
|
ld.pkgs[i].CompiledGoFiles = nil
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedImports == 0 {
|
if ld.requestedMode&NeedImports == 0 {
|
||||||
ld.pkgs[i].Imports = nil
|
ld.pkgs[i].Imports = nil
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedExportsFile == 0 {
|
if ld.requestedMode&NeedExportsFile == 0 {
|
||||||
ld.pkgs[i].ExportFile = ""
|
ld.pkgs[i].ExportFile = ""
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedTypes == 0 {
|
if ld.requestedMode&NeedTypes == 0 {
|
||||||
ld.pkgs[i].Types = nil
|
ld.pkgs[i].Types = nil
|
||||||
ld.pkgs[i].Fset = nil
|
ld.pkgs[i].Fset = nil
|
||||||
ld.pkgs[i].IllTyped = false
|
ld.pkgs[i].IllTyped = false
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedSyntax == 0 {
|
if ld.requestedMode&NeedSyntax == 0 {
|
||||||
ld.pkgs[i].Syntax = nil
|
ld.pkgs[i].Syntax = nil
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedTypesInfo == 0 {
|
if ld.requestedMode&NeedTypesInfo == 0 {
|
||||||
ld.pkgs[i].TypesInfo = nil
|
ld.pkgs[i].TypesInfo = nil
|
||||||
}
|
}
|
||||||
if ld.Mode&NeedTypesSizes == 0 {
|
if ld.requestedMode&NeedTypesSizes == 0 {
|
||||||
ld.pkgs[i].TypesSizes = nil
|
ld.pkgs[i].TypesSizes = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1077,8 +1080,8 @@ func (ld *loader) loadFromExportData(lpkg *loaderPackage) (*types.Package, error
|
|||||||
return tpkg, nil
|
return tpkg, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// addDependingLoadModes adds dependencies for choosed LoadMode in ld.Mode
|
// implyLoadMode adds dependencies for choosed LoadMode in ld.Mode
|
||||||
func (ld *loader) addDependingLoadModes() {
|
func (ld *loader) implyLoadMode() {
|
||||||
if ld.Mode&NeedTypesInfo != 0 && ld.Mode&NeedImports == 0 {
|
if ld.Mode&NeedTypesInfo != 0 && ld.Mode&NeedImports == 0 {
|
||||||
// If NeedTypesInfo, go/packages needs to do typechecking itself so it can
|
// If NeedTypesInfo, go/packages needs to do typechecking itself so it can
|
||||||
// associate type info with the AST. To do so, we need the export data
|
// associate type info with the AST. To do so, we need the export data
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -198,7 +198,7 @@ golang.org/x/sys/windows
|
|||||||
golang.org/x/text/transform
|
golang.org/x/text/transform
|
||||||
golang.org/x/text/unicode/norm
|
golang.org/x/text/unicode/norm
|
||||||
golang.org/x/text/width
|
golang.org/x/text/width
|
||||||
# golang.org/x/tools v0.0.0-20190908161001-5b82db07426d => github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8
|
# golang.org/x/tools v0.0.0-20190908161001-5b82db07426d => github.com/golangci/tools v0.0.0-20190910062050-3540c026601b
|
||||||
golang.org/x/tools/go/analysis
|
golang.org/x/tools/go/analysis
|
||||||
golang.org/x/tools/go/analysis/passes/asmdecl
|
golang.org/x/tools/go/analysis/passes/asmdecl
|
||||||
golang.org/x/tools/go/analysis/passes/assign
|
golang.org/x/tools/go/analysis/passes/assign
|
||||||
|
Loading…
x
Reference in New Issue
Block a user