From de1c46fc2cdeffb90aeab6c6761b8b5e0a5bf4ac Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 23 Jul 2018 20:13:18 +0800 Subject: [PATCH 001/133] add package_types for go1.11 index export format data --- gocode_test.go | 15 ++++ package.go | 5 ++ package_bin.go | 24 +++++- package_types.go | 191 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+), 2 deletions(-) create mode 100644 gocode_test.go create mode 100644 package_types.go diff --git a/gocode_test.go b/gocode_test.go new file mode 100644 index 00000000..fd63aed9 --- /dev/null +++ b/gocode_test.go @@ -0,0 +1,15 @@ +package main + +import ( + "go/build" + "testing" +) + +func TestGocode(t *testing.T) { + var ctx package_lookup_context + ctx.Context = build.Default + *g_debug = true + resolveKnownPackageIdent("fmt", "gocode.go", &ctx) + resolveKnownPackageIdent("os", "gocode.go", &ctx) + resolveKnownPackageIdent("http", "gocode.go", &ctx) +} diff --git a/package.go b/package.go index 687cb805..2d848974 100644 --- a/package.go +++ b/package.go @@ -112,6 +112,11 @@ func (m *package_file_cache) process_package_data(data []byte) { if data[0] == 'B' { // binary format, skip 'B\n' data = data[2:] + if data[0] == 'i' { + var tp types_parser + tp.init(m.import_name, m) + data = tp.exportData() + } var p gc_bin_parser p.init(data, m) pp = &p diff --git a/package_bin.go b/package_bin.go index 4a51c740..b1ab3af1 100644 --- a/package_bin.go +++ b/package_bin.go @@ -113,10 +113,10 @@ func (p *gc_bin_parser) parse_export(callback func(string, ast.Decl)) { // read version specific flags - extend as necessary switch p.version { - // case 6: + // case 7: // ... // fallthrough - case 5, 4, 3, 2, 1: + case 6, 5, 4, 3, 2, 1: p.debugFormat = p.rawStringln(p.rawByte()) == "debug" p.trackAllTypes = p.int() != 0 p.posInfoFormat = p.int() != 0 @@ -152,6 +152,9 @@ func (p *gc_bin_parser) parse_export(callback func(string, ast.Decl)) { } } +// MaxPkgHeight is a height greater than any likely package height. +const MaxPkgHeight = 1e9 + func (p *gc_bin_parser) pkg() string { // if the package was seen before, i is its index (>= 0) i := p.tagOrIndex() @@ -172,6 +175,10 @@ func (p *gc_bin_parser) pkg() string { } else { path = p.string() } + var height int + if p.version >= 6 { + height = p.int() + } // we should never see an empty package name if name == "" { @@ -184,6 +191,18 @@ func (p *gc_bin_parser) pkg() string { panic(fmt.Sprintf("package path %q for pkg index %d", path, len(p.pkgList))) } + if p.version >= 6 { + if height < 0 || height >= MaxPkgHeight { + panic(fmt.Sprintf("bad package height %v for package %s", height, name)) + } + + // reexported packages should always have a lower height than + // the main package + // if len(p.pkgList) != 0 && height >= p.imp.Height { + // p.formatErrorf("package %q (height %d) reexports package %q (height %d)", p.imp.Path, p.imp.Height, path, height) + // } + } + var fullName string if path != "" { fullName = "!" + path + "!" + name @@ -193,6 +212,7 @@ func (p *gc_bin_parser) pkg() string { } // if the package was imported before, use that one; otherwise create a new one + // pkg.Height = height p.pkgList = append(p.pkgList, fullName) return p.pkgList[len(p.pkgList)-1] } diff --git a/package_types.go b/package_types.go new file mode 100644 index 00000000..45a96bb4 --- /dev/null +++ b/package_types.go @@ -0,0 +1,191 @@ +package main + +import ( + "bytes" + "fmt" + "go/ast" + "go/importer" + "go/token" + "go/types" + "log" + "regexp" + "strings" + + "golang.org/x/tools/go/gcexportdata" +) + +type types_parser struct { + pfc *package_file_cache + pkg *types.Package +} + +func typeToAst(typ types.Type) ast.Expr { + switch t := (typ).(type) { + case *types.Basic: + return ast.NewIdent(t.Name()) + case *types.Named: + switch ut := t.Underlying().(type) { + case *types.Basic: + return ast.NewIdent(typ.String()) + case *types.Interface: + case *types.Struct: + default: + log.Fatalf("%T\n", ut) + } + } + return nil +} + +func objToAst(obj types.Object) ast.Decl { + switch ot := (obj).(type) { + case *types.Const: + typ := typeToAst(ot.Type()) + return &ast.GenDecl{ + Tok: token.CONST, + Specs: []ast.Spec{ + &ast.ValueSpec{ + Names: []*ast.Ident{ast.NewIdent(obj.Name())}, + Type: typ, + Values: []ast.Expr{&ast.BasicLit{Kind: token.INT, Value: ot.Val().String()}}, + }, + }, + } + case *types.Var: + typ := typeToAst(ot.Type()) + return &ast.GenDecl{ + Tok: token.VAR, + Specs: []ast.Spec{ + &ast.ValueSpec{ + Names: []*ast.Ident{ast.NewIdent(obj.Name())}, + Type: typ, + }, + }, + } + default: + //fmt.Println(typ) + _ = ot + } + return nil +} + +func (p *types_parser) init(path string, pfc *package_file_cache) { + p.pkg, _ = importer.Default().Import(path) + p.pfc = pfc +} + +func MakeTuple(re *regexp.Regexp, params *types.Tuple) string { + var info string + for i := 0; i < params.Len(); i++ { + v := params.At(i) + name := v.Name() + if name == "" { + name = fmt.Sprintf("param%v", i+1) + } + if i > 0 { + info += "," + } + typ := v.Type().String() + typ = re.ReplaceAllStringFunc(typ, func(s string) string { + s = strings.Replace(s, ".", "\".", 1) + return "@\"" + s + }) + info += name + " " + typ + } + return info +} + +func (p *types_parser) exportData() []byte { + fset := token.NewFileSet() + var buf bytes.Buffer + gcexportdata.Write(&buf, fset, p.pkg) + return buf.Bytes() +} + +func (p *types_parser) export() []byte { + var ar []string + ar = append(ar, "package "+p.pkg.Name()) + + ar = append(ar, `func @"".Expand(s string,mapping func(string) string)(param1 string)`) + ar = append(ar, "\n") + return []byte(strings.Join(ar, "\n")) + + scope := p.pkg.Scope() + re, _ := regexp.Compile("[\\w]+\\.[\\w]+") + for _, name := range scope.Names() { + obj := scope.Lookup(name) + var info string + switch typ := (obj).(type) { + case *types.Func: + sig := typ.Type().(*types.Signature) + if sig.Recv() != nil { + log.Fatalln(obj.String()) + } + info = `func @"".` + obj.Name() + info += "(" + if sig.Params() != nil { + info += MakeTuple(re, sig.Params()) + } + info += ")" + if sig.Results() != nil { + info += "(" + info += MakeTuple(re, sig.Results()) + info += ")" + } + case *types.Const: + info = `const @"".` + obj.Name() + "=" + typ.Val().String() + case *types.Var: + info = strings.Replace(obj.String(), p.pkg.Name()+".", `@"".`, 1) + info = re.ReplaceAllStringFunc(info, func(s string) string { + s = strings.Replace(s, ".", "\".", 1) + return "@\"" + s + }) + info = strings.Replace(info, " untyped ", " ", -1) + //str = "type @\"\".ScanState interface{Read(buf []byte) (n int, err error);SkipSpace()}" + //str = "func @\"\".test(f func() bool))" //; Token(skipSpace bool, f func(rune) bool) (token []byte, err error); UnreadRune() error; Width() (wid int, ok bool)}" + case *types.TypeName: + //log.Println(typ.Type().Underlying()) + switch tt := typ.Type().Underlying().(type) { + case *types.Interface: + info = "type @\"\"." + obj.Name() + " interface{}" + case *types.Struct: + info = "type @\"\"." + obj.Name() + " struct{}" + case *types.Basic: + info = strings.Replace(obj.String(), p.pkg.Name()+".", `@"".`, 1) + info = re.ReplaceAllStringFunc(info, func(s string) string { + s = strings.Replace(s, ".", "\".", 1) + return "@\"" + s + }) + default: + info = "type @\"\"." + obj.Name() + " " + typ.Type().String() + log.Fatalf("TypeName %T\n", tt) + } + default: + log.Fatalf("types %T\n", typ) + } + //info = `func @"".Create(name string)(param1 *@"os".File,param2 error)` + info = `func @"".Expand(s string,mapping func(string) string)(param1 string)` + log.Println(info) + if info != "" { + ar = append(ar, info) + } + } + ar = append(ar, "\n") + + return []byte(strings.Join(ar, "\n")) +} + +func (p *types_parser) parse_export(callback func(pkg string, decl ast.Decl)) { + if p.pkg == nil { + return + } + scope := p.pkg.Scope() + var pname = "!" + p.pfc.name + "!" + p.pkg.Name() + for _, name := range scope.Names() { + obj := scope.Lookup(name) + decl := objToAst(obj) + if decl == nil { + continue + } + callback(pname, decl) + } +} From 12854bbde3a03cdc2bd1e2048f16c86bd735d5a4 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 09:32:32 +0800 Subject: [PATCH 002/133] add gomod parser --- declcache.go | 10 +++++++ package.go | 72 ++++++++++++++++++++++++++++++++---------------- package_types.go | 17 ++++++++++-- server.go | 4 +++ 4 files changed, 78 insertions(+), 25 deletions(-) diff --git a/declcache.go b/declcache.go index 215a5a8a..5fa6d3ef 100644 --- a/declcache.go +++ b/declcache.go @@ -391,6 +391,16 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool } } + if g_daemon != nil && g_daemon.modList != nil { + pkg := g_daemon.modList.LookupModule(imp) + if pkg != nil { + if *g_debug { + log.Println("lookup module", pkg.Path, pkg.Dir) + } + return pkg.Path, true + } + } + if p, err := context.Import(imp, "", build.AllowBinary|build.FindOnly); err == nil { try_autobuild(p) if file_exists(p.PkgObj) { diff --git a/package.go b/package.go index 2d848974..542c3adc 100644 --- a/package.go +++ b/package.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "go/ast" + "log" "os" "strings" ) @@ -78,6 +79,10 @@ func (m *package_file_cache) update_cache() { fname := m.find_file() stat, err := os.Stat(fname) if err != nil { + if *g_debug { + log.Println("update cache source", m.import_name) + } + m.process_package_data(nil, true) return } @@ -89,19 +94,21 @@ func (m *package_file_cache) update_cache() { if err != nil { return } - m.process_package_data(data) + m.process_package_data(data, false) } } -func (m *package_file_cache) process_package_data(data []byte) { +func (m *package_file_cache) process_package_data(data []byte, source bool) { m.scope = new_named_scope(g_universe_scope, m.name) // find import section - i := bytes.Index(data, []byte{'\n', '$', '$'}) - if i == -1 { - panic(fmt.Sprintf("Can't find the import section in the package file %s", m.name)) + if !source { + i := bytes.Index(data, []byte{'\n', '$', '$'}) + if i == -1 { + panic(fmt.Sprintf("Can't find the import section in the package file %s", m.name)) + } + data = data[i+len("\n$$"):] } - data = data[i+len("\n$$"):] // main package m.main = new_decl(m.name, decl_package, nil) @@ -109,28 +116,47 @@ func (m *package_file_cache) process_package_data(data []byte) { m.others = make(map[string]*decl) var pp package_parser - if data[0] == 'B' { - // binary format, skip 'B\n' - data = data[2:] - if data[0] == 'i' { - var tp types_parser - tp.init(m.import_name, m) - data = tp.exportData() + if source { + var tp types_parser + var srcDir string + if g_daemon.modList != nil { + pkg := g_daemon.modList.LookupModule(m.import_name) + if pkg != nil { + srcDir = pkg.Dir + if *g_debug { + log.Println(m.import_name, srcDir) + } + } } + tp.init(m.import_name, srcDir, m, true) + data = tp.exportData() var p gc_bin_parser p.init(data, m) pp = &p } else { - // textual format, find the beginning of the package clause - i = bytes.Index(data, []byte{'p', 'a', 'c', 'k', 'a', 'g', 'e'}) - if i == -1 { - panic("Can't find the package clause") - } - data = data[i:] + if data[0] == 'B' { + // binary format, skip 'B\n' + data = data[2:] + if data[0] == 'i' { + var tp types_parser + tp.init(m.import_name, m.import_name, m, false) + data = tp.exportData() + } + var p gc_bin_parser + p.init(data, m) + pp = &p + } else { + // textual format, find the beginning of the package clause + i := bytes.Index(data, []byte{'p', 'a', 'c', 'k', 'a', 'g', 'e'}) + if i == -1 { + panic("Can't find the package clause") + } + data = data[i:] - var p gc_parser - p.init(data, m) - pp = &p + var p gc_parser + p.init(data, m) + pp = &p + } } prefix := "!" + m.name + "!" @@ -254,6 +280,6 @@ $$ func (c package_cache) add_builtin_unsafe_package() { pkg := new_package_file_cache_forever("unsafe", "unsafe") - pkg.process_package_data(g_builtin_unsafe_package) + pkg.process_package_data(g_builtin_unsafe_package, false) c["unsafe"] = pkg } diff --git a/package_types.go b/package_types.go index 45a96bb4..48abf89c 100644 --- a/package_types.go +++ b/package_types.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "go/ast" + "go/build" "go/importer" "go/token" "go/types" @@ -11,6 +12,7 @@ import ( "regexp" "strings" + "github.com/visualfc/gotools/pkg/srcimporter" "golang.org/x/tools/go/gcexportdata" ) @@ -68,8 +70,19 @@ func objToAst(obj types.Object) ast.Decl { return nil } -func (p *types_parser) init(path string, pfc *package_file_cache) { - p.pkg, _ = importer.Default().Import(path) +func (p *types_parser) init(path string, dir string, pfc *package_file_cache, source bool) { + if source { + im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) + if dir != "" { + var err error + p.pkg, err = im.ImportFrom(path, dir, 0) + log.Println(err, dir) + } else { + p.pkg, _ = im.Import(path) + } + } else { + p.pkg, _ = importer.Default().Import(path) + } p.pfc = pfc } diff --git a/server.go b/server.go index 82813df6..3c4e4441 100644 --- a/server.go +++ b/server.go @@ -12,6 +12,8 @@ import ( "reflect" "runtime" "time" + + "github.com/visualfc/gotools/pkg/gomod" ) func do_server() int { @@ -58,6 +60,7 @@ type daemon struct { pkgcache package_cache declcache *decl_cache context package_lookup_context + modList *gomod.ModuleList } func new_daemon(network, address string) *daemon { @@ -181,6 +184,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack } else if *g_debug { log.Printf("Go project path not found: %s", err) } + g_daemon.modList = gomod.LooupModList(filepath.Dir(filename)) } if *g_debug { var buf bytes.Buffer From a53c135b16aee60613adddc7b83537a852ab606e Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 10:53:43 +0800 Subject: [PATCH 003/133] update gomod search path --- declcache.go | 4 ++-- package.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/declcache.go b/declcache.go index 5fa6d3ef..6e919545 100644 --- a/declcache.go +++ b/declcache.go @@ -392,12 +392,12 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool } if g_daemon != nil && g_daemon.modList != nil { - pkg := g_daemon.modList.LookupModule(imp) + pkg, _ := g_daemon.modList.LookupModule(imp) if pkg != nil { if *g_debug { log.Println("lookup module", pkg.Path, pkg.Dir) } - return pkg.Path, true + return imp, true } } diff --git a/package.go b/package.go index 542c3adc..bbe07379 100644 --- a/package.go +++ b/package.go @@ -120,9 +120,9 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { var tp types_parser var srcDir string if g_daemon.modList != nil { - pkg := g_daemon.modList.LookupModule(m.import_name) + pkg, dir := g_daemon.modList.LookupModule(m.import_name) if pkg != nil { - srcDir = pkg.Dir + srcDir = dir if *g_debug { log.Println(m.import_name, srcDir) } From 6374488119c3502c4b550e73f7b9f5323e07ebdd Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 11:01:56 +0800 Subject: [PATCH 004/133] fix types_parser skip nil --- package.go | 6 ++++++ package_types.go | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.go b/package.go index bbe07379..1851a028 100644 --- a/package.go +++ b/package.go @@ -130,6 +130,9 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { } tp.init(m.import_name, srcDir, m, true) data = tp.exportData() + if data == nil { + return + } var p gc_bin_parser p.init(data, m) pp = &p @@ -141,6 +144,9 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { var tp types_parser tp.init(m.import_name, m.import_name, m, false) data = tp.exportData() + if data == nil { + return + } } var p gc_bin_parser p.init(data, m) diff --git a/package_types.go b/package_types.go index 48abf89c..5d16d97b 100644 --- a/package_types.go +++ b/package_types.go @@ -74,9 +74,7 @@ func (p *types_parser) init(path string, dir string, pfc *package_file_cache, so if source { im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) if dir != "" { - var err error - p.pkg, err = im.ImportFrom(path, dir, 0) - log.Println(err, dir) + p.pkg, _ = im.ImportFrom(path, dir, 0) } else { p.pkg, _ = im.Import(path) } @@ -108,6 +106,9 @@ func MakeTuple(re *regexp.Regexp, params *types.Tuple) string { } func (p *types_parser) exportData() []byte { + if p.pkg == nil { + return nil + } fset := token.NewFileSet() var buf bytes.Buffer gcexportdata.Write(&buf, fset, p.pkg) From 53cf96feca8ef98af92937643020949fdbe64421 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 21:16:15 +0800 Subject: [PATCH 005/133] add vendor --- Godeps/Godeps.json | 26 + Godeps/Readme | 5 + package.go | 2 +- vendor/github.com/visualfc/gotools/LICENSE | 28 + .../visualfc/gotools/pkg/gomod/gomod.go | 85 ++ .../gotools/pkg/srcimporter/srcimporter.go | 211 ++++ vendor/golang.org/x/tools/AUTHORS | 3 + vendor/golang.org/x/tools/CONTRIBUTORS | 3 + vendor/golang.org/x/tools/LICENSE | 27 + vendor/golang.org/x/tools/PATENTS | 22 + .../x/tools/go/gcexportdata/gcexportdata.go | 109 ++ .../x/tools/go/gcexportdata/importer.go | 73 ++ .../x/tools/go/gcexportdata/main.go | 99 ++ .../x/tools/go/internal/gcimporter/bexport.go | 852 +++++++++++++ .../x/tools/go/internal/gcimporter/bimport.go | 1028 ++++++++++++++++ .../go/internal/gcimporter/exportdata.go | 93 ++ .../go/internal/gcimporter/gcimporter.go | 1051 +++++++++++++++++ .../x/tools/go/internal/gcimporter/iimport.go | 598 ++++++++++ .../tools/go/internal/gcimporter/isAlias18.go | 13 + .../tools/go/internal/gcimporter/isAlias19.go | 13 + .../go/internal/gcimporter/newInterface10.go | 21 + .../go/internal/gcimporter/newInterface11.go | 13 + 22 files changed, 4374 insertions(+), 1 deletion(-) create mode 100644 Godeps/Godeps.json create mode 100644 Godeps/Readme create mode 100644 vendor/github.com/visualfc/gotools/LICENSE create mode 100644 vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go create mode 100644 vendor/golang.org/x/tools/AUTHORS create mode 100644 vendor/golang.org/x/tools/CONTRIBUTORS create mode 100644 vendor/golang.org/x/tools/LICENSE create mode 100644 vendor/golang.org/x/tools/PATENTS create mode 100644 vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go create mode 100644 vendor/golang.org/x/tools/go/gcexportdata/importer.go create mode 100644 vendor/golang.org/x/tools/go/gcexportdata/main.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json new file mode 100644 index 00000000..deec7360 --- /dev/null +++ b/Godeps/Godeps.json @@ -0,0 +1,26 @@ +{ + "ImportPath": "github.com/visualfc/gocode", + "GoVersion": "go1.11", + "GodepVersion": "v80", + "Packages": [ + "." + ], + "Deps": [ + { + "ImportPath": "github.com/visualfc/gotools/pkg/gomod", + "Rev": "7ab499df0956c934555c5da7f1469262a0f1032b" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", + "Rev": "7ab499df0956c934555c5da7f1469262a0f1032b" + }, + { + "ImportPath": "golang.org/x/tools/go/gcexportdata", + "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" + }, + { + "ImportPath": "golang.org/x/tools/go/internal/gcimporter", + "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" + } + ] +} diff --git a/Godeps/Readme b/Godeps/Readme new file mode 100644 index 00000000..4cdaa53d --- /dev/null +++ b/Godeps/Readme @@ -0,0 +1,5 @@ +This directory tree is generated automatically by godep. + +Please do not edit. + +See https://github.com/tools/godep for more information. diff --git a/package.go b/package.go index 1851a028..aa835d1d 100644 --- a/package.go +++ b/package.go @@ -142,7 +142,7 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { data = data[2:] if data[0] == 'i' { var tp types_parser - tp.init(m.import_name, m.import_name, m, false) + tp.init(m.import_name, "", m, false) data = tp.exportData() if data == nil { return diff --git a/vendor/github.com/visualfc/gotools/LICENSE b/vendor/github.com/visualfc/gotools/LICENSE new file mode 100644 index 00000000..ca2493d5 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2011-2017, visualfc +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of gotools nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go new file mode 100644 index 00000000..7e259b6d --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -0,0 +1,85 @@ +// Copyright 2011-2018 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gomod + +import ( + "encoding/json" + "os/exec" + "path/filepath" + "strings" +) + +func LooupModList(dir string) *ModuleList { + data := ListModuleJson(dir) + if data == nil { + return nil + } + ms := parseModuleJson(data) + return &ms +} + +func LookupModFile(dir string) string { + command := exec.Command("go", "env", "GOMOD") + command.Dir = dir + data, err := command.Output() + if err != nil { + return "" + } + return strings.TrimSpace(string(data)) +} + +func ListModuleJson(dir string) []byte { + command := exec.Command("go", "list", "-m", "-json", "all") + command.Dir = dir + data, err := command.Output() + if err != nil { + return nil + } + return data +} + +type ModuleList struct { + Module Module + Require []*Module +} + +func (m *ModuleList) LookupModule(pkgname string) (*Module, string) { + for _, r := range m.Require { + if strings.HasPrefix(pkgname, r.Path) { + return r, filepath.Join(r.Dir, pkgname[len(r.Path):]) + } + } + return nil, "" +} + +type Module struct { + Path string + Version string + Time string + Dir string + Main bool +} + +func parseModuleJson(data []byte) ModuleList { + var ms ModuleList + var index int + for i, v := range data { + switch v { + case '{': + index = i + case '}': + var m Module + err := json.Unmarshal(data[index:i+1], &m) + if err == nil { + if m.Main { + ms.Module = m + } else { + ms.Require = append(ms.Require, &m) + } + } + } + } + return ms +} diff --git a/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go b/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go new file mode 100644 index 00000000..ee31067f --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go @@ -0,0 +1,211 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package srcimporter implements importing directly +// from source files rather than installed packages. +package srcimporter + +import ( + "fmt" + "go/ast" + "go/build" + "go/importer" + "go/parser" + "go/token" + "go/types" + "io" + "os" + "path/filepath" + "sync" +) + +// An Importer provides the context for importing packages from source code. +type Importer struct { + ctxt *build.Context + fset *token.FileSet + sizes types.Sizes + packages map[string]*types.Package +} + +// NewImporter returns a new Importer for the given context, file set, and map +// of packages. The context is used to resolve import paths to package paths, +// and identifying the files belonging to the package. If the context provides +// non-nil file system functions, they are used instead of the regular package +// os functions. The file set is used to track position information of package +// files; and imported packages are added to the packages map. +func New(ctxt *build.Context, fset *token.FileSet, packages map[string]*types.Package) *Importer { + return &Importer{ + ctxt: ctxt, + fset: fset, + sizes: types.SizesFor(ctxt.Compiler, ctxt.GOARCH), // uses go/types default if GOARCH not found + packages: packages, + } +} + +// Importing is a sentinel taking the place in Importer.packages +// for a package that is in the process of being imported. +var importing types.Package + +// Import(path) is a shortcut for ImportFrom(path, ".", 0). +func (p *Importer) Import(path string) (*types.Package, error) { + return p.ImportFrom(path, ".", 0) // use "." rather than "" (see issue #24441) +} + +// ImportFrom imports the package with the given import path resolved from the given srcDir, +// adds the new package to the set of packages maintained by the importer, and returns the +// package. Package path resolution and file system operations are controlled by the context +// maintained with the importer. The import mode must be zero but is otherwise ignored. +// Packages that are not comprised entirely of pure Go files may fail to import because the +// type checker may not be able to determine all exported entities (e.g. due to cgo dependencies). +func (p *Importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) { + if mode != 0 { + panic("non-zero import mode") + } + + // if abs, err := p.absPath(srcDir); err == nil { // see issue #14282 + // srcDir = abs + // } + var bp *build.Package + var err error + if srcDir != "" && srcDir != "." { + bp, err = p.ctxt.ImportDir(srcDir, 0) + bp.ImportPath = path + } else { + bp, err = p.ctxt.Import(path, srcDir, 0) + } + if err != nil { + return nil, err // err may be *build.NoGoError - return as is + } + + // package unsafe is known to the type checker + if bp.ImportPath == "unsafe" { + return types.Unsafe, nil + } + + // no need to re-import if the package was imported completely before + pkg := p.packages[bp.ImportPath] + if pkg != nil { + if pkg == &importing { + return nil, fmt.Errorf("import cycle through package %q", bp.ImportPath) + } + if !pkg.Complete() { + // Package exists but is not complete - we cannot handle this + // at the moment since the source importer replaces the package + // wholesale rather than augmenting it (see #19337 for details). + // Return incomplete package with error (see #16088). + return pkg, fmt.Errorf("reimported partially imported package %q", bp.ImportPath) + } + return pkg, nil + } + + p.packages[bp.ImportPath] = &importing + defer func() { + // clean up in case of error + // TODO(gri) Eventually we may want to leave a (possibly empty) + // package in the map in all cases (and use that package to + // identify cycles). See also issue 16088. + if p.packages[bp.ImportPath] == &importing { + p.packages[bp.ImportPath] = nil + } + }() + + var filenames []string + filenames = append(filenames, bp.GoFiles...) + filenames = append(filenames, bp.CgoFiles...) + + files, err := p.parseFiles(bp.Dir, filenames) + if err != nil { + return nil, err + } + + // type-check package files + var firstHardErr error + conf := types.Config{ + IgnoreFuncBodies: true, + FakeImportC: true, + // continue type-checking after the first error + Error: func(err error) { + if firstHardErr == nil && !err.(types.Error).Soft { + firstHardErr = err + } + }, + Importer: importer.Default(), + Sizes: p.sizes, + } + pkg, err = conf.Check(bp.ImportPath, p.fset, files, nil) + if pkg == nil { + // If there was a hard error it is possibly unsafe + // to use the package as it may not be fully populated. + // Do not return it (see also #20837, #20855). + if firstHardErr != nil { + err = firstHardErr // give preference to first hard error over any soft error + } + return pkg, fmt.Errorf("type-checking package %q failed (%v)", bp.ImportPath, err) + } + // if firstHardErr != nil { + // // this can only happen if we have a bug in go/types + // panic("package is not safe yet no error was returned") + // } + + p.packages[bp.ImportPath] = pkg + return pkg, nil +} + +func (p *Importer) parseFiles(dir string, filenames []string) ([]*ast.File, error) { + // use build.Context's OpenFile if there is one + open := p.ctxt.OpenFile + if open == nil { + open = func(name string) (io.ReadCloser, error) { return os.Open(name) } + } + + files := make([]*ast.File, len(filenames)) + errors := make([]error, len(filenames)) + + var wg sync.WaitGroup + wg.Add(len(filenames)) + for i, filename := range filenames { + go func(i int, filepath string) { + defer wg.Done() + src, err := open(filepath) + if err != nil { + errors[i] = err // open provides operation and filename in error + return + } + files[i], errors[i] = parser.ParseFile(p.fset, filepath, src, 0) + src.Close() // ignore Close error - parsing may have succeeded which is all we need + }(i, p.joinPath(dir, filename)) + } + wg.Wait() + + // if there are errors, return the first one for deterministic results + for _, err := range errors { + if err != nil { + return nil, err + } + } + + return files, nil +} + +// context-controlled file system operations + +func (p *Importer) absPath(path string) (string, error) { + // TODO(gri) This should be using p.ctxt.AbsPath which doesn't + // exist but probably should. See also issue #14282. + return filepath.Abs(path) +} + +func (p *Importer) isAbsPath(path string) bool { + if f := p.ctxt.IsAbsPath; f != nil { + return f(path) + } + return filepath.IsAbs(path) +} + +func (p *Importer) joinPath(elem ...string) string { + if f := p.ctxt.JoinPath; f != nil { + return f(elem...) + } + return filepath.Join(elem...) +} diff --git a/vendor/golang.org/x/tools/AUTHORS b/vendor/golang.org/x/tools/AUTHORS new file mode 100644 index 00000000..15167cd7 --- /dev/null +++ b/vendor/golang.org/x/tools/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/tools/CONTRIBUTORS b/vendor/golang.org/x/tools/CONTRIBUTORS new file mode 100644 index 00000000..1c4577e9 --- /dev/null +++ b/vendor/golang.org/x/tools/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/vendor/golang.org/x/tools/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/golang.org/x/tools/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go new file mode 100644 index 00000000..4bb2367f --- /dev/null +++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -0,0 +1,109 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package gcexportdata provides functions for locating, reading, and +// writing export data files containing type information produced by the +// gc compiler. This package supports go1.7 export data format and all +// later versions. +// +// Although it might seem convenient for this package to live alongside +// go/types in the standard library, this would cause version skew +// problems for developer tools that use it, since they must be able to +// consume the outputs of the gc compiler both before and after a Go +// update such as from Go 1.7 to Go 1.8. Because this package lives in +// golang.org/x/tools, sites can update their version of this repo some +// time before the Go 1.8 release and rebuild and redeploy their +// developer tools, which will then be able to consume both Go 1.7 and +// Go 1.8 export data files, so they will work before and after the +// Go update. (See discussion at https://github.com/golang/go/issues/15651.) +// +package gcexportdata + +import ( + "bufio" + "bytes" + "fmt" + "go/token" + "go/types" + "io" + "io/ioutil" + + "golang.org/x/tools/go/internal/gcimporter" +) + +// Find returns the name of an object (.o) or archive (.a) file +// containing type information for the specified import path, +// using the workspace layout conventions of go/build. +// If no file was found, an empty filename is returned. +// +// A relative srcDir is interpreted relative to the current working directory. +// +// Find also returns the package's resolved (canonical) import path, +// reflecting the effects of srcDir and vendoring on importPath. +func Find(importPath, srcDir string) (filename, path string) { + return gcimporter.FindPkg(importPath, srcDir) +} + +// NewReader returns a reader for the export data section of an object +// (.o) or archive (.a) file read from r. The new reader may provide +// additional trailing data beyond the end of the export data. +func NewReader(r io.Reader) (io.Reader, error) { + buf := bufio.NewReader(r) + _, err := gcimporter.FindExportData(buf) + // If we ever switch to a zip-like archive format with the ToC + // at the end, we can return the correct portion of export data, + // but for now we must return the entire rest of the file. + return buf, err +} + +// Read reads export data from in, decodes it, and returns type +// information for the package. +// The package name is specified by path. +// File position information is added to fset. +// +// Read may inspect and add to the imports map to ensure that references +// within the export data to other packages are consistent. The caller +// must ensure that imports[path] does not exist, or exists but is +// incomplete (see types.Package.Complete), and Read inserts the +// resulting package into this map entry. +// +// On return, the state of the reader is undefined. +func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) { + data, err := ioutil.ReadAll(in) + if err != nil { + return nil, fmt.Errorf("reading export data for %q: %v", path, err) + } + + if bytes.HasPrefix(data, []byte("!")) { + return nil, fmt.Errorf("can't read export data for %q directly from an archive file (call gcexportdata.NewReader first to extract export data)", path) + } + + // The App Engine Go runtime v1.6 uses the old export data format. + // TODO(adonovan): delete once v1.7 has been around for a while. + if bytes.HasPrefix(data, []byte("package ")) { + return gcimporter.ImportData(imports, path, path, bytes.NewReader(data)) + } + + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path) + return pkg, err + } + + _, pkg, err := gcimporter.BImportData(fset, imports, data, path) + return pkg, err +} + +// Write writes encoded type information for the specified package to out. +// The FileSet provides file position information for named objects. +func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { + b, err := gcimporter.BExportData(fset, pkg) + if err != nil { + return err + } + _, err = out.Write(b) + return err +} diff --git a/vendor/golang.org/x/tools/go/gcexportdata/importer.go b/vendor/golang.org/x/tools/go/gcexportdata/importer.go new file mode 100644 index 00000000..efe221e7 --- /dev/null +++ b/vendor/golang.org/x/tools/go/gcexportdata/importer.go @@ -0,0 +1,73 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gcexportdata + +import ( + "fmt" + "go/token" + "go/types" + "os" +) + +// NewImporter returns a new instance of the types.Importer interface +// that reads type information from export data files written by gc. +// The Importer also satisfies types.ImporterFrom. +// +// Export data files are located using "go build" workspace conventions +// and the build.Default context. +// +// Use this importer instead of go/importer.For("gc", ...) to avoid the +// version-skew problems described in the documentation of this package, +// or to control the FileSet or access the imports map populated during +// package loading. +// +func NewImporter(fset *token.FileSet, imports map[string]*types.Package) types.ImporterFrom { + return importer{fset, imports} +} + +type importer struct { + fset *token.FileSet + imports map[string]*types.Package +} + +func (imp importer) Import(importPath string) (*types.Package, error) { + return imp.ImportFrom(importPath, "", 0) +} + +func (imp importer) ImportFrom(importPath, srcDir string, mode types.ImportMode) (_ *types.Package, err error) { + filename, path := Find(importPath, srcDir) + if filename == "" { + if importPath == "unsafe" { + // Even for unsafe, call Find first in case + // the package was vendored. + return types.Unsafe, nil + } + return nil, fmt.Errorf("can't find import: %s", importPath) + } + + if pkg, ok := imp.imports[path]; ok && pkg.Complete() { + return pkg, nil // cache hit + } + + // open file + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer func() { + f.Close() + if err != nil { + // add file name to error + err = fmt.Errorf("reading export data: %s: %v", filename, err) + } + }() + + r, err := NewReader(f) + if err != nil { + return nil, err + } + + return Read(r, imp.fset, imp.imports, path) +} diff --git a/vendor/golang.org/x/tools/go/gcexportdata/main.go b/vendor/golang.org/x/tools/go/gcexportdata/main.go new file mode 100644 index 00000000..2713dce6 --- /dev/null +++ b/vendor/golang.org/x/tools/go/gcexportdata/main.go @@ -0,0 +1,99 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// The gcexportdata command is a diagnostic tool that displays the +// contents of gc export data files. +package main + +import ( + "flag" + "fmt" + "go/token" + "go/types" + "log" + "os" + + "golang.org/x/tools/go/gcexportdata" + "golang.org/x/tools/go/types/typeutil" +) + +var packageFlag = flag.String("package", "", "alternative package to print") + +func main() { + log.SetPrefix("gcexportdata: ") + log.SetFlags(0) + flag.Usage = func() { + fmt.Fprintln(os.Stderr, "usage: gcexportdata [-package path] file.a") + } + flag.Parse() + if flag.NArg() != 1 { + flag.Usage() + os.Exit(2) + } + filename := flag.Args()[0] + + f, err := os.Open(filename) + if err != nil { + log.Fatal(err) + } + + r, err := gcexportdata.NewReader(f) + if err != nil { + log.Fatalf("%s: %s", filename, err) + } + + // Decode the package. + const primary = "" + imports := make(map[string]*types.Package) + fset := token.NewFileSet() + pkg, err := gcexportdata.Read(r, fset, imports, primary) + if err != nil { + log.Fatalf("%s: %s", filename, err) + } + + // Optionally select an indirectly mentioned package. + if *packageFlag != "" { + pkg = imports[*packageFlag] + if pkg == nil { + fmt.Fprintf(os.Stderr, "export data file %s does not mention %s; has:\n", + filename, *packageFlag) + for p := range imports { + if p != primary { + fmt.Fprintf(os.Stderr, "\t%s\n", p) + } + } + os.Exit(1) + } + } + + // Print all package-level declarations, including non-exported ones. + fmt.Printf("package %s\n", pkg.Name()) + for _, imp := range pkg.Imports() { + fmt.Printf("import %q\n", imp.Path()) + } + qual := func(p *types.Package) string { + if pkg == p { + return "" + } + return p.Name() + } + scope := pkg.Scope() + for _, name := range scope.Names() { + obj := scope.Lookup(name) + fmt.Printf("%s: %s\n", + fset.Position(obj.Pos()), + types.ObjectString(obj, qual)) + + // For types, print each method. + if _, ok := obj.(*types.TypeName); ok { + for _, method := range typeutil.IntuitiveMethodSet(obj.Type(), nil) { + fmt.Printf("%s: %s\n", + fset.Position(method.Obj().Pos()), + types.SelectionString(method, qual)) + } + } + } +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go new file mode 100644 index 00000000..6a9821ae --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go @@ -0,0 +1,852 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Binary package export. +// This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go; +// see that file for specification of the format. + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "fmt" + "go/ast" + "go/constant" + "go/token" + "go/types" + "math" + "math/big" + "sort" + "strings" +) + +// If debugFormat is set, each integer and string value is preceded by a marker +// and position information in the encoding. This mechanism permits an importer +// to recognize immediately when it is out of sync. The importer recognizes this +// mode automatically (i.e., it can import export data produced with debugging +// support even if debugFormat is not set at the time of import). This mode will +// lead to massively larger export data (by a factor of 2 to 3) and should only +// be enabled during development and debugging. +// +// NOTE: This flag is the first flag to enable if importing dies because of +// (suspected) format errors, and whenever a change is made to the format. +const debugFormat = false // default: false + +// If trace is set, debugging output is printed to std out. +const trace = false // default: false + +// Current export format version. Increase with each format change. +// Note: The latest binary (non-indexed) export format is at version 6. +// This exporter is still at level 4, but it doesn't matter since +// the binary importer can handle older versions just fine. +// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE +// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE +// 4: type name objects support type aliases, uses aliasTag +// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used) +// 2: removed unused bool in ODCL export (compiler only) +// 1: header format change (more regular), export package for _ struct fields +// 0: Go1.7 encoding +const exportVersion = 4 + +// trackAllTypes enables cycle tracking for all types, not just named +// types. The existing compiler invariants assume that unnamed types +// that are not completely set up are not used, or else there are spurious +// errors. +// If disabled, only named types are tracked, possibly leading to slightly +// less efficient encoding in rare cases. It also prevents the export of +// some corner-case type declarations (but those are not handled correctly +// with with the textual export format either). +// TODO(gri) enable and remove once issues caused by it are fixed +const trackAllTypes = false + +type exporter struct { + fset *token.FileSet + out bytes.Buffer + + // object -> index maps, indexed in order of serialization + strIndex map[string]int + pkgIndex map[*types.Package]int + typIndex map[types.Type]int + + // position encoding + posInfoFormat bool + prevFile string + prevLine int + + // debugging support + written int // bytes written + indent int // for trace +} + +// internalError represents an error generated inside this package. +type internalError string + +func (e internalError) Error() string { return "gcimporter: " + string(e) } + +func internalErrorf(format string, args ...interface{}) error { + return internalError(fmt.Sprintf(format, args...)) +} + +// BExportData returns binary export data for pkg. +// If no file set is provided, position info will be missing. +func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { + defer func() { + if e := recover(); e != nil { + if ierr, ok := e.(internalError); ok { + err = ierr + return + } + // Not an internal error; panic again. + panic(e) + } + }() + + p := exporter{ + fset: fset, + strIndex: map[string]int{"": 0}, // empty string is mapped to 0 + pkgIndex: make(map[*types.Package]int), + typIndex: make(map[types.Type]int), + posInfoFormat: true, // TODO(gri) might become a flag, eventually + } + + // write version info + // The version string must start with "version %d" where %d is the version + // number. Additional debugging information may follow after a blank; that + // text is ignored by the importer. + p.rawStringln(fmt.Sprintf("version %d", exportVersion)) + var debug string + if debugFormat { + debug = "debug" + } + p.rawStringln(debug) // cannot use p.bool since it's affected by debugFormat; also want to see this clearly + p.bool(trackAllTypes) + p.bool(p.posInfoFormat) + + // --- generic export data --- + + // populate type map with predeclared "known" types + for index, typ := range predeclared { + p.typIndex[typ] = index + } + if len(p.typIndex) != len(predeclared) { + return nil, internalError("duplicate entries in type map?") + } + + // write package data + p.pkg(pkg, true) + if trace { + p.tracef("\n") + } + + // write objects + objcount := 0 + scope := pkg.Scope() + for _, name := range scope.Names() { + if !ast.IsExported(name) { + continue + } + if trace { + p.tracef("\n") + } + p.obj(scope.Lookup(name)) + objcount++ + } + + // indicate end of list + if trace { + p.tracef("\n") + } + p.tag(endTag) + + // for self-verification only (redundant) + p.int(objcount) + + if trace { + p.tracef("\n") + } + + // --- end of export data --- + + return p.out.Bytes(), nil +} + +func (p *exporter) pkg(pkg *types.Package, emptypath bool) { + if pkg == nil { + panic(internalError("unexpected nil pkg")) + } + + // if we saw the package before, write its index (>= 0) + if i, ok := p.pkgIndex[pkg]; ok { + p.index('P', i) + return + } + + // otherwise, remember the package, write the package tag (< 0) and package data + if trace { + p.tracef("P%d = { ", len(p.pkgIndex)) + defer p.tracef("} ") + } + p.pkgIndex[pkg] = len(p.pkgIndex) + + p.tag(packageTag) + p.string(pkg.Name()) + if emptypath { + p.string("") + } else { + p.string(pkg.Path()) + } +} + +func (p *exporter) obj(obj types.Object) { + switch obj := obj.(type) { + case *types.Const: + p.tag(constTag) + p.pos(obj) + p.qualifiedName(obj) + p.typ(obj.Type()) + p.value(obj.Val()) + + case *types.TypeName: + if isAlias(obj) { + p.tag(aliasTag) + p.pos(obj) + p.qualifiedName(obj) + } else { + p.tag(typeTag) + } + p.typ(obj.Type()) + + case *types.Var: + p.tag(varTag) + p.pos(obj) + p.qualifiedName(obj) + p.typ(obj.Type()) + + case *types.Func: + p.tag(funcTag) + p.pos(obj) + p.qualifiedName(obj) + sig := obj.Type().(*types.Signature) + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) + + default: + panic(internalErrorf("unexpected object %v (%T)", obj, obj)) + } +} + +func (p *exporter) pos(obj types.Object) { + if !p.posInfoFormat { + return + } + + file, line := p.fileLine(obj) + if file == p.prevFile { + // common case: write line delta + // delta == 0 means different file or no line change + delta := line - p.prevLine + p.int(delta) + if delta == 0 { + p.int(-1) // -1 means no file change + } + } else { + // different file + p.int(0) + // Encode filename as length of common prefix with previous + // filename, followed by (possibly empty) suffix. Filenames + // frequently share path prefixes, so this can save a lot + // of space and make export data size less dependent on file + // path length. The suffix is unlikely to be empty because + // file names tend to end in ".go". + n := commonPrefixLen(p.prevFile, file) + p.int(n) // n >= 0 + p.string(file[n:]) // write suffix only + p.prevFile = file + p.int(line) + } + p.prevLine = line +} + +func (p *exporter) fileLine(obj types.Object) (file string, line int) { + if p.fset != nil { + pos := p.fset.Position(obj.Pos()) + file = pos.Filename + line = pos.Line + } + return +} + +func commonPrefixLen(a, b string) int { + if len(a) > len(b) { + a, b = b, a + } + // len(a) <= len(b) + i := 0 + for i < len(a) && a[i] == b[i] { + i++ + } + return i +} + +func (p *exporter) qualifiedName(obj types.Object) { + p.string(obj.Name()) + p.pkg(obj.Pkg(), false) +} + +func (p *exporter) typ(t types.Type) { + if t == nil { + panic(internalError("nil type")) + } + + // Possible optimization: Anonymous pointer types *T where + // T is a named type are common. We could canonicalize all + // such types *T to a single type PT = *T. This would lead + // to at most one *T entry in typIndex, and all future *T's + // would be encoded as the respective index directly. Would + // save 1 byte (pointerTag) per *T and reduce the typIndex + // size (at the cost of a canonicalization map). We can do + // this later, without encoding format change. + + // if we saw the type before, write its index (>= 0) + if i, ok := p.typIndex[t]; ok { + p.index('T', i) + return + } + + // otherwise, remember the type, write the type tag (< 0) and type data + if trackAllTypes { + if trace { + p.tracef("T%d = {>\n", len(p.typIndex)) + defer p.tracef("<\n} ") + } + p.typIndex[t] = len(p.typIndex) + } + + switch t := t.(type) { + case *types.Named: + if !trackAllTypes { + // if we don't track all types, track named types now + p.typIndex[t] = len(p.typIndex) + } + + p.tag(namedTag) + p.pos(t.Obj()) + p.qualifiedName(t.Obj()) + p.typ(t.Underlying()) + if !types.IsInterface(t) { + p.assocMethods(t) + } + + case *types.Array: + p.tag(arrayTag) + p.int64(t.Len()) + p.typ(t.Elem()) + + case *types.Slice: + p.tag(sliceTag) + p.typ(t.Elem()) + + case *dddSlice: + p.tag(dddTag) + p.typ(t.elem) + + case *types.Struct: + p.tag(structTag) + p.fieldList(t) + + case *types.Pointer: + p.tag(pointerTag) + p.typ(t.Elem()) + + case *types.Signature: + p.tag(signatureTag) + p.paramList(t.Params(), t.Variadic()) + p.paramList(t.Results(), false) + + case *types.Interface: + p.tag(interfaceTag) + p.iface(t) + + case *types.Map: + p.tag(mapTag) + p.typ(t.Key()) + p.typ(t.Elem()) + + case *types.Chan: + p.tag(chanTag) + p.int(int(3 - t.Dir())) // hack + p.typ(t.Elem()) + + default: + panic(internalErrorf("unexpected type %T: %s", t, t)) + } +} + +func (p *exporter) assocMethods(named *types.Named) { + // Sort methods (for determinism). + var methods []*types.Func + for i := 0; i < named.NumMethods(); i++ { + methods = append(methods, named.Method(i)) + } + sort.Sort(methodsByName(methods)) + + p.int(len(methods)) + + if trace && methods != nil { + p.tracef("associated methods {>\n") + } + + for i, m := range methods { + if trace && i > 0 { + p.tracef("\n") + } + + p.pos(m) + name := m.Name() + p.string(name) + if !exported(name) { + p.pkg(m.Pkg(), false) + } + + sig := m.Type().(*types.Signature) + p.paramList(types.NewTuple(sig.Recv()), false) + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) + p.int(0) // dummy value for go:nointerface pragma - ignored by importer + } + + if trace && methods != nil { + p.tracef("<\n} ") + } +} + +type methodsByName []*types.Func + +func (x methodsByName) Len() int { return len(x) } +func (x methodsByName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } +func (x methodsByName) Less(i, j int) bool { return x[i].Name() < x[j].Name() } + +func (p *exporter) fieldList(t *types.Struct) { + if trace && t.NumFields() > 0 { + p.tracef("fields {>\n") + defer p.tracef("<\n} ") + } + + p.int(t.NumFields()) + for i := 0; i < t.NumFields(); i++ { + if trace && i > 0 { + p.tracef("\n") + } + p.field(t.Field(i)) + p.string(t.Tag(i)) + } +} + +func (p *exporter) field(f *types.Var) { + if !f.IsField() { + panic(internalError("field expected")) + } + + p.pos(f) + p.fieldName(f) + p.typ(f.Type()) +} + +func (p *exporter) iface(t *types.Interface) { + // TODO(gri): enable importer to load embedded interfaces, + // then emit Embeddeds and ExplicitMethods separately here. + p.int(0) + + n := t.NumMethods() + if trace && n > 0 { + p.tracef("methods {>\n") + defer p.tracef("<\n} ") + } + p.int(n) + for i := 0; i < n; i++ { + if trace && i > 0 { + p.tracef("\n") + } + p.method(t.Method(i)) + } +} + +func (p *exporter) method(m *types.Func) { + sig := m.Type().(*types.Signature) + if sig.Recv() == nil { + panic(internalError("method expected")) + } + + p.pos(m) + p.string(m.Name()) + if m.Name() != "_" && !ast.IsExported(m.Name()) { + p.pkg(m.Pkg(), false) + } + + // interface method; no need to encode receiver. + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) +} + +func (p *exporter) fieldName(f *types.Var) { + name := f.Name() + + if f.Anonymous() { + // anonymous field - we distinguish between 3 cases: + // 1) field name matches base type name and is exported + // 2) field name matches base type name and is not exported + // 3) field name doesn't match base type name (alias name) + bname := basetypeName(f.Type()) + if name == bname { + if ast.IsExported(name) { + name = "" // 1) we don't need to know the field name or package + } else { + name = "?" // 2) use unexported name "?" to force package export + } + } else { + // 3) indicate alias and export name as is + // (this requires an extra "@" but this is a rare case) + p.string("@") + } + } + + p.string(name) + if name != "" && !ast.IsExported(name) { + p.pkg(f.Pkg(), false) + } +} + +func basetypeName(typ types.Type) string { + switch typ := deref(typ).(type) { + case *types.Basic: + return typ.Name() + case *types.Named: + return typ.Obj().Name() + default: + return "" // unnamed type + } +} + +func (p *exporter) paramList(params *types.Tuple, variadic bool) { + // use negative length to indicate unnamed parameters + // (look at the first parameter only since either all + // names are present or all are absent) + n := params.Len() + if n > 0 && params.At(0).Name() == "" { + n = -n + } + p.int(n) + for i := 0; i < params.Len(); i++ { + q := params.At(i) + t := q.Type() + if variadic && i == params.Len()-1 { + t = &dddSlice{t.(*types.Slice).Elem()} + } + p.typ(t) + if n > 0 { + name := q.Name() + p.string(name) + if name != "_" { + p.pkg(q.Pkg(), false) + } + } + p.string("") // no compiler-specific info + } +} + +func (p *exporter) value(x constant.Value) { + if trace { + p.tracef("= ") + } + + switch x.Kind() { + case constant.Bool: + tag := falseTag + if constant.BoolVal(x) { + tag = trueTag + } + p.tag(tag) + + case constant.Int: + if v, exact := constant.Int64Val(x); exact { + // common case: x fits into an int64 - use compact encoding + p.tag(int64Tag) + p.int64(v) + return + } + // uncommon case: large x - use float encoding + // (powers of 2 will be encoded efficiently with exponent) + p.tag(floatTag) + p.float(constant.ToFloat(x)) + + case constant.Float: + p.tag(floatTag) + p.float(x) + + case constant.Complex: + p.tag(complexTag) + p.float(constant.Real(x)) + p.float(constant.Imag(x)) + + case constant.String: + p.tag(stringTag) + p.string(constant.StringVal(x)) + + case constant.Unknown: + // package contains type errors + p.tag(unknownTag) + + default: + panic(internalErrorf("unexpected value %v (%T)", x, x)) + } +} + +func (p *exporter) float(x constant.Value) { + if x.Kind() != constant.Float { + panic(internalErrorf("unexpected constant %v, want float", x)) + } + // extract sign (there is no -0) + sign := constant.Sign(x) + if sign == 0 { + // x == 0 + p.int(0) + return + } + // x != 0 + + var f big.Float + if v, exact := constant.Float64Val(x); exact { + // float64 + f.SetFloat64(v) + } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { + // TODO(gri): add big.Rat accessor to constant.Value. + r := valueToRat(num) + f.SetRat(r.Quo(r, valueToRat(denom))) + } else { + // Value too large to represent as a fraction => inaccessible. + // TODO(gri): add big.Float accessor to constant.Value. + f.SetFloat64(math.MaxFloat64) // FIXME + } + + // extract exponent such that 0.5 <= m < 1.0 + var m big.Float + exp := f.MantExp(&m) + + // extract mantissa as *big.Int + // - set exponent large enough so mant satisfies mant.IsInt() + // - get *big.Int from mant + m.SetMantExp(&m, int(m.MinPrec())) + mant, acc := m.Int(nil) + if acc != big.Exact { + panic(internalError("internal error")) + } + + p.int(sign) + p.int(exp) + p.string(string(mant.Bytes())) +} + +func valueToRat(x constant.Value) *big.Rat { + // Convert little-endian to big-endian. + // I can't believe this is necessary. + bytes := constant.Bytes(x) + for i := 0; i < len(bytes)/2; i++ { + bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i] + } + return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes)) +} + +func (p *exporter) bool(b bool) bool { + if trace { + p.tracef("[") + defer p.tracef("= %v] ", b) + } + + x := 0 + if b { + x = 1 + } + p.int(x) + return b +} + +// ---------------------------------------------------------------------------- +// Low-level encoders + +func (p *exporter) index(marker byte, index int) { + if index < 0 { + panic(internalError("invalid index < 0")) + } + if debugFormat { + p.marker('t') + } + if trace { + p.tracef("%c%d ", marker, index) + } + p.rawInt64(int64(index)) +} + +func (p *exporter) tag(tag int) { + if tag >= 0 { + panic(internalError("invalid tag >= 0")) + } + if debugFormat { + p.marker('t') + } + if trace { + p.tracef("%s ", tagString[-tag]) + } + p.rawInt64(int64(tag)) +} + +func (p *exporter) int(x int) { + p.int64(int64(x)) +} + +func (p *exporter) int64(x int64) { + if debugFormat { + p.marker('i') + } + if trace { + p.tracef("%d ", x) + } + p.rawInt64(x) +} + +func (p *exporter) string(s string) { + if debugFormat { + p.marker('s') + } + if trace { + p.tracef("%q ", s) + } + // if we saw the string before, write its index (>= 0) + // (the empty string is mapped to 0) + if i, ok := p.strIndex[s]; ok { + p.rawInt64(int64(i)) + return + } + // otherwise, remember string and write its negative length and bytes + p.strIndex[s] = len(p.strIndex) + p.rawInt64(-int64(len(s))) + for i := 0; i < len(s); i++ { + p.rawByte(s[i]) + } +} + +// marker emits a marker byte and position information which makes +// it easy for a reader to detect if it is "out of sync". Used for +// debugFormat format only. +func (p *exporter) marker(m byte) { + p.rawByte(m) + // Enable this for help tracking down the location + // of an incorrect marker when running in debugFormat. + if false && trace { + p.tracef("#%d ", p.written) + } + p.rawInt64(int64(p.written)) +} + +// rawInt64 should only be used by low-level encoders. +func (p *exporter) rawInt64(x int64) { + var tmp [binary.MaxVarintLen64]byte + n := binary.PutVarint(tmp[:], x) + for i := 0; i < n; i++ { + p.rawByte(tmp[i]) + } +} + +// rawStringln should only be used to emit the initial version string. +func (p *exporter) rawStringln(s string) { + for i := 0; i < len(s); i++ { + p.rawByte(s[i]) + } + p.rawByte('\n') +} + +// rawByte is the bottleneck interface to write to p.out. +// rawByte escapes b as follows (any encoding does that +// hides '$'): +// +// '$' => '|' 'S' +// '|' => '|' '|' +// +// Necessary so other tools can find the end of the +// export data by searching for "$$". +// rawByte should only be used by low-level encoders. +func (p *exporter) rawByte(b byte) { + switch b { + case '$': + // write '$' as '|' 'S' + b = 'S' + fallthrough + case '|': + // write '|' as '|' '|' + p.out.WriteByte('|') + p.written++ + } + p.out.WriteByte(b) + p.written++ +} + +// tracef is like fmt.Printf but it rewrites the format string +// to take care of indentation. +func (p *exporter) tracef(format string, args ...interface{}) { + if strings.ContainsAny(format, "<>\n") { + var buf bytes.Buffer + for i := 0; i < len(format); i++ { + // no need to deal with runes + ch := format[i] + switch ch { + case '>': + p.indent++ + continue + case '<': + p.indent-- + continue + } + buf.WriteByte(ch) + if ch == '\n' { + for j := p.indent; j > 0; j-- { + buf.WriteString(". ") + } + } + } + format = buf.String() + } + fmt.Printf(format, args...) +} + +// Debugging support. +// (tagString is only used when tracing is enabled) +var tagString = [...]string{ + // Packages + -packageTag: "package", + + // Types + -namedTag: "named type", + -arrayTag: "array", + -sliceTag: "slice", + -dddTag: "ddd", + -structTag: "struct", + -pointerTag: "pointer", + -signatureTag: "signature", + -interfaceTag: "interface", + -mapTag: "map", + -chanTag: "chan", + + // Values + -falseTag: "false", + -trueTag: "true", + -int64Tag: "int64", + -floatTag: "float", + -fractionTag: "fraction", + -complexTag: "complex", + -stringTag: "string", + -unknownTag: "unknown", + + // Type aliases + -aliasTag: "alias", +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go new file mode 100644 index 00000000..b31eacfc --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go @@ -0,0 +1,1028 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go. + +package gcimporter + +import ( + "encoding/binary" + "fmt" + "go/constant" + "go/token" + "go/types" + "sort" + "strconv" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +type importer struct { + imports map[string]*types.Package + data []byte + importpath string + buf []byte // for reading strings + version int // export format version + + // object lists + strList []string // in order of appearance + pathList []string // in order of appearance + pkgList []*types.Package // in order of appearance + typList []types.Type // in order of appearance + interfaceList []*types.Interface // for delayed completion only + trackAllTypes bool + + // position encoding + posInfoFormat bool + prevFile string + prevLine int + fake fakeFileSet + + // debugging support + debugFormat bool + read int // bytes read +} + +// BImportData imports a package from the serialized package data +// and returns the number of bytes consumed and a reference to the package. +// If the export data version is not recognized or the format is otherwise +// compromised, an error is returned. +func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { + // catch panics and return them as errors + const currentVersion = 6 + version := -1 // unknown version + defer func() { + if e := recover(); e != nil { + // Return a (possibly nil or incomplete) package unchanged (see #16088). + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } + } + }() + + p := importer{ + imports: imports, + data: data, + importpath: path, + version: version, + strList: []string{""}, // empty string is mapped to 0 + pathList: []string{""}, // empty string is mapped to 0 + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, + } + + // read version info + var versionstr string + if b := p.rawByte(); b == 'c' || b == 'd' { + // Go1.7 encoding; first byte encodes low-level + // encoding format (compact vs debug). + // For backward-compatibility only (avoid problems with + // old installed packages). Newly compiled packages use + // the extensible format string. + // TODO(gri) Remove this support eventually; after Go1.8. + if b == 'd' { + p.debugFormat = true + } + p.trackAllTypes = p.rawByte() == 'a' + p.posInfoFormat = p.int() != 0 + versionstr = p.string() + if versionstr == "v1" { + version = 0 + } + } else { + // Go1.8 extensible encoding + // read version string and extract version number (ignore anything after the version number) + versionstr = p.rawStringln(b) + if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { + if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { + version = v + } + } + } + p.version = version + + // read version specific flags - extend as necessary + switch p.version { + // case currentVersion: + // ... + // fallthrough + case currentVersion, 5, 4, 3, 2, 1: + p.debugFormat = p.rawStringln(p.rawByte()) == "debug" + p.trackAllTypes = p.int() != 0 + p.posInfoFormat = p.int() != 0 + case 0: + // Go1.7 encoding format - nothing to do here + default: + errorf("unknown bexport format version %d (%q)", p.version, versionstr) + } + + // --- generic export data --- + + // populate typList with predeclared "known" types + p.typList = append(p.typList, predeclared...) + + // read package data + pkg = p.pkg() + + // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go) + objcount := 0 + for { + tag := p.tagOrIndex() + if tag == endTag { + break + } + p.obj(tag) + objcount++ + } + + // self-verification + if count := p.int(); count != objcount { + errorf("got %d objects; want %d", objcount, count) + } + + // ignore compiler-specific import data + + // complete interfaces + // TODO(gri) re-investigate if we still need to do this in a delayed fashion + for _, typ := range p.interfaceList { + typ.Complete() + } + + // record all referenced packages as imports + list := append(([]*types.Package)(nil), p.pkgList[1:]...) + sort.Sort(byPath(list)) + pkg.SetImports(list) + + // package was imported completely and without errors + pkg.MarkComplete() + + return p.read, pkg, nil +} + +func errorf(format string, args ...interface{}) { + panic(fmt.Sprintf(format, args...)) +} + +func (p *importer) pkg() *types.Package { + // if the package was seen before, i is its index (>= 0) + i := p.tagOrIndex() + if i >= 0 { + return p.pkgList[i] + } + + // otherwise, i is the package tag (< 0) + if i != packageTag { + errorf("unexpected package tag %d version %d", i, p.version) + } + + // read package data + name := p.string() + var path string + if p.version >= 5 { + path = p.path() + } else { + path = p.string() + } + if p.version >= 6 { + p.int() // package height; unused by go/types + } + + // we should never see an empty package name + if name == "" { + errorf("empty package name in import") + } + + // an empty path denotes the package we are currently importing; + // it must be the first package we see + if (path == "") != (len(p.pkgList) == 0) { + errorf("package path %q for pkg index %d", path, len(p.pkgList)) + } + + // if the package was imported before, use that one; otherwise create a new one + if path == "" { + path = p.importpath + } + pkg := p.imports[path] + if pkg == nil { + pkg = types.NewPackage(path, name) + p.imports[path] = pkg + } else if pkg.Name() != name { + errorf("conflicting names %s and %s for package %q", pkg.Name(), name, path) + } + p.pkgList = append(p.pkgList, pkg) + + return pkg +} + +// objTag returns the tag value for each object kind. +func objTag(obj types.Object) int { + switch obj.(type) { + case *types.Const: + return constTag + case *types.TypeName: + return typeTag + case *types.Var: + return varTag + case *types.Func: + return funcTag + default: + errorf("unexpected object: %v (%T)", obj, obj) // panics + panic("unreachable") + } +} + +func sameObj(a, b types.Object) bool { + // Because unnamed types are not canonicalized, we cannot simply compare types for + // (pointer) identity. + // Ideally we'd check equality of constant values as well, but this is good enough. + return objTag(a) == objTag(b) && types.Identical(a.Type(), b.Type()) +} + +func (p *importer) declare(obj types.Object) { + pkg := obj.Pkg() + if alt := pkg.Scope().Insert(obj); alt != nil { + // This can only trigger if we import a (non-type) object a second time. + // Excluding type aliases, this cannot happen because 1) we only import a package + // once; and b) we ignore compiler-specific export data which may contain + // functions whose inlined function bodies refer to other functions that + // were already imported. + // However, type aliases require reexporting the original type, so we need + // to allow it (see also the comment in cmd/compile/internal/gc/bimport.go, + // method importer.obj, switch case importing functions). + // TODO(gri) review/update this comment once the gc compiler handles type aliases. + if !sameObj(obj, alt) { + errorf("inconsistent import:\n\t%v\npreviously imported as:\n\t%v\n", obj, alt) + } + } +} + +func (p *importer) obj(tag int) { + switch tag { + case constTag: + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + val := p.value() + p.declare(types.NewConst(pos, pkg, name, typ, val)) + + case aliasTag: + // TODO(gri) verify type alias hookup is correct + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + p.declare(types.NewTypeName(pos, pkg, name, typ)) + + case typeTag: + p.typ(nil, nil) + + case varTag: + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + p.declare(types.NewVar(pos, pkg, name, typ)) + + case funcTag: + pos := p.pos() + pkg, name := p.qualifiedName() + params, isddd := p.paramList() + result, _ := p.paramList() + sig := types.NewSignature(nil, params, result, isddd) + p.declare(types.NewFunc(pos, pkg, name, sig)) + + default: + errorf("unexpected object tag %d", tag) + } +} + +const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go + +func (p *importer) pos() token.Pos { + if !p.posInfoFormat { + return token.NoPos + } + + file := p.prevFile + line := p.prevLine + delta := p.int() + line += delta + if p.version >= 5 { + if delta == deltaNewFile { + if n := p.int(); n >= 0 { + // file changed + file = p.path() + line = n + } + } + } else { + if delta == 0 { + if n := p.int(); n >= 0 { + // file changed + file = p.prevFile[:n] + p.string() + line = p.int() + } + } + } + p.prevFile = file + p.prevLine = line + + return p.fake.pos(file, line) +} + +// Synthesize a token.Pos +type fakeFileSet struct { + fset *token.FileSet + files map[string]*token.File +} + +func (s *fakeFileSet) pos(file string, line int) token.Pos { + // Since we don't know the set of needed file positions, we + // reserve maxlines positions per file. + const maxlines = 64 * 1024 + f := s.files[file] + if f == nil { + f = s.fset.AddFile(file, -1, maxlines) + s.files[file] = f + // Allocate the fake linebreak indices on first use. + // TODO(adonovan): opt: save ~512KB using a more complex scheme? + fakeLinesOnce.Do(func() { + fakeLines = make([]int, maxlines) + for i := range fakeLines { + fakeLines[i] = i + } + }) + f.SetLines(fakeLines) + } + + if line > maxlines { + line = 1 + } + + // Treat the file as if it contained only newlines + // and column=1: use the line number as the offset. + return f.Pos(line - 1) +} + +var ( + fakeLines []int + fakeLinesOnce sync.Once +) + +func (p *importer) qualifiedName() (pkg *types.Package, name string) { + name = p.string() + pkg = p.pkg() + return +} + +func (p *importer) record(t types.Type) { + p.typList = append(p.typList, t) +} + +// A dddSlice is a types.Type representing ...T parameters. +// It only appears for parameter types and does not escape +// the importer. +type dddSlice struct { + elem types.Type +} + +func (t *dddSlice) Underlying() types.Type { return t } +func (t *dddSlice) String() string { return "..." + t.elem.String() } + +// parent is the package which declared the type; parent == nil means +// the package currently imported. The parent package is needed for +// exported struct fields and interface methods which don't contain +// explicit package information in the export data. +// +// A non-nil tname is used as the "owner" of the result type; i.e., +// the result type is the underlying type of tname. tname is used +// to give interface methods a named receiver type where possible. +func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type { + // if the type was seen before, i is its index (>= 0) + i := p.tagOrIndex() + if i >= 0 { + return p.typList[i] + } + + // otherwise, i is the type tag (< 0) + switch i { + case namedTag: + // read type object + pos := p.pos() + parent, name := p.qualifiedName() + scope := parent.Scope() + obj := scope.Lookup(name) + + // if the object doesn't exist yet, create and insert it + if obj == nil { + obj = types.NewTypeName(pos, parent, name, nil) + scope.Insert(obj) + } + + if _, ok := obj.(*types.TypeName); !ok { + errorf("pkg = %s, name = %s => %s", parent, name, obj) + } + + // associate new named type with obj if it doesn't exist yet + t0 := types.NewNamed(obj.(*types.TypeName), nil, nil) + + // but record the existing type, if any + tname := obj.Type().(*types.Named) // tname is either t0 or the existing type + p.record(tname) + + // read underlying type + t0.SetUnderlying(p.typ(parent, t0)) + + // interfaces don't have associated methods + if types.IsInterface(t0) { + return tname + } + + // read associated methods + for i := p.int(); i > 0; i-- { + // TODO(gri) replace this with something closer to fieldName + pos := p.pos() + name := p.string() + if !exported(name) { + p.pkg() + } + + recv, _ := p.paramList() // TODO(gri) do we need a full param list for the receiver? + params, isddd := p.paramList() + result, _ := p.paramList() + p.int() // go:nointerface pragma - discarded + + sig := types.NewSignature(recv.At(0), params, result, isddd) + t0.AddMethod(types.NewFunc(pos, parent, name, sig)) + } + + return tname + + case arrayTag: + t := new(types.Array) + if p.trackAllTypes { + p.record(t) + } + + n := p.int64() + *t = *types.NewArray(p.typ(parent, nil), n) + return t + + case sliceTag: + t := new(types.Slice) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewSlice(p.typ(parent, nil)) + return t + + case dddTag: + t := new(dddSlice) + if p.trackAllTypes { + p.record(t) + } + + t.elem = p.typ(parent, nil) + return t + + case structTag: + t := new(types.Struct) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewStruct(p.fieldList(parent)) + return t + + case pointerTag: + t := new(types.Pointer) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewPointer(p.typ(parent, nil)) + return t + + case signatureTag: + t := new(types.Signature) + if p.trackAllTypes { + p.record(t) + } + + params, isddd := p.paramList() + result, _ := p.paramList() + *t = *types.NewSignature(nil, params, result, isddd) + return t + + case interfaceTag: + // Create a dummy entry in the type list. This is safe because we + // cannot expect the interface type to appear in a cycle, as any + // such cycle must contain a named type which would have been + // first defined earlier. + // TODO(gri) Is this still true now that we have type aliases? + // See issue #23225. + n := len(p.typList) + if p.trackAllTypes { + p.record(nil) + } + + var embeddeds []types.Type + for n := p.int(); n > 0; n-- { + p.pos() + embeddeds = append(embeddeds, p.typ(parent, nil)) + } + + t := newInterface(p.methodList(parent, tname), embeddeds) + p.interfaceList = append(p.interfaceList, t) + if p.trackAllTypes { + p.typList[n] = t + } + return t + + case mapTag: + t := new(types.Map) + if p.trackAllTypes { + p.record(t) + } + + key := p.typ(parent, nil) + val := p.typ(parent, nil) + *t = *types.NewMap(key, val) + return t + + case chanTag: + t := new(types.Chan) + if p.trackAllTypes { + p.record(t) + } + + dir := chanDir(p.int()) + val := p.typ(parent, nil) + *t = *types.NewChan(dir, val) + return t + + default: + errorf("unexpected type tag %d", i) // panics + panic("unreachable") + } +} + +func chanDir(d int) types.ChanDir { + // tag values must match the constants in cmd/compile/internal/gc/go.go + switch d { + case 1 /* Crecv */ : + return types.RecvOnly + case 2 /* Csend */ : + return types.SendOnly + case 3 /* Cboth */ : + return types.SendRecv + default: + errorf("unexpected channel dir %d", d) + return 0 + } +} + +func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) { + if n := p.int(); n > 0 { + fields = make([]*types.Var, n) + tags = make([]string, n) + for i := range fields { + fields[i], tags[i] = p.field(parent) + } + } + return +} + +func (p *importer) field(parent *types.Package) (*types.Var, string) { + pos := p.pos() + pkg, name, alias := p.fieldName(parent) + typ := p.typ(parent, nil) + tag := p.string() + + anonymous := false + if name == "" { + // anonymous field - typ must be T or *T and T must be a type name + switch typ := deref(typ).(type) { + case *types.Basic: // basic types are named types + pkg = nil // // objects defined in Universe scope have no package + name = typ.Name() + case *types.Named: + name = typ.Obj().Name() + default: + errorf("named base type expected") + } + anonymous = true + } else if alias { + // anonymous field: we have an explicit name because it's an alias + anonymous = true + } + + return types.NewField(pos, pkg, name, typ, anonymous), tag +} + +func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) { + if n := p.int(); n > 0 { + methods = make([]*types.Func, n) + for i := range methods { + methods[i] = p.method(parent, baseType) + } + } + return +} + +func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func { + pos := p.pos() + pkg, name, _ := p.fieldName(parent) + // If we don't have a baseType, use a nil receiver. + // A receiver using the actual interface type (which + // we don't know yet) will be filled in when we call + // types.Interface.Complete. + var recv *types.Var + if baseType != nil { + recv = types.NewVar(token.NoPos, parent, "", baseType) + } + params, isddd := p.paramList() + result, _ := p.paramList() + sig := types.NewSignature(recv, params, result, isddd) + return types.NewFunc(pos, pkg, name, sig) +} + +func (p *importer) fieldName(parent *types.Package) (pkg *types.Package, name string, alias bool) { + name = p.string() + pkg = parent + if pkg == nil { + // use the imported package instead + pkg = p.pkgList[0] + } + if p.version == 0 && name == "_" { + // version 0 didn't export a package for _ fields + return + } + switch name { + case "": + // 1) field name matches base type name and is exported: nothing to do + case "?": + // 2) field name matches base type name and is not exported: need package + name = "" + pkg = p.pkg() + case "@": + // 3) field name doesn't match type name (alias) + name = p.string() + alias = true + fallthrough + default: + if !exported(name) { + pkg = p.pkg() + } + } + return +} + +func (p *importer) paramList() (*types.Tuple, bool) { + n := p.int() + if n == 0 { + return nil, false + } + // negative length indicates unnamed parameters + named := true + if n < 0 { + n = -n + named = false + } + // n > 0 + params := make([]*types.Var, n) + isddd := false + for i := range params { + params[i], isddd = p.param(named) + } + return types.NewTuple(params...), isddd +} + +func (p *importer) param(named bool) (*types.Var, bool) { + t := p.typ(nil, nil) + td, isddd := t.(*dddSlice) + if isddd { + t = types.NewSlice(td.elem) + } + + var pkg *types.Package + var name string + if named { + name = p.string() + if name == "" { + errorf("expected named parameter") + } + if name != "_" { + pkg = p.pkg() + } + if i := strings.Index(name, "·"); i > 0 { + name = name[:i] // cut off gc-specific parameter numbering + } + } + + // read and discard compiler-specific info + p.string() + + return types.NewVar(token.NoPos, pkg, name, t), isddd +} + +func exported(name string) bool { + ch, _ := utf8.DecodeRuneInString(name) + return unicode.IsUpper(ch) +} + +func (p *importer) value() constant.Value { + switch tag := p.tagOrIndex(); tag { + case falseTag: + return constant.MakeBool(false) + case trueTag: + return constant.MakeBool(true) + case int64Tag: + return constant.MakeInt64(p.int64()) + case floatTag: + return p.float() + case complexTag: + re := p.float() + im := p.float() + return constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + case stringTag: + return constant.MakeString(p.string()) + case unknownTag: + return constant.MakeUnknown() + default: + errorf("unexpected value tag %d", tag) // panics + panic("unreachable") + } +} + +func (p *importer) float() constant.Value { + sign := p.int() + if sign == 0 { + return constant.MakeInt64(0) + } + + exp := p.int() + mant := []byte(p.string()) // big endian + + // remove leading 0's if any + for len(mant) > 0 && mant[0] == 0 { + mant = mant[1:] + } + + // convert to little endian + // TODO(gri) go/constant should have a more direct conversion function + // (e.g., once it supports a big.Float based implementation) + for i, j := 0, len(mant)-1; i < j; i, j = i+1, j-1 { + mant[i], mant[j] = mant[j], mant[i] + } + + // adjust exponent (constant.MakeFromBytes creates an integer value, + // but mant represents the mantissa bits such that 0.5 <= mant < 1.0) + exp -= len(mant) << 3 + if len(mant) > 0 { + for msd := mant[len(mant)-1]; msd&0x80 == 0; msd <<= 1 { + exp++ + } + } + + x := constant.MakeFromBytes(mant) + switch { + case exp < 0: + d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) + x = constant.BinaryOp(x, token.QUO, d) + case exp > 0: + x = constant.Shift(x, token.SHL, uint(exp)) + } + + if sign < 0 { + x = constant.UnaryOp(token.SUB, x, 0) + } + return x +} + +// ---------------------------------------------------------------------------- +// Low-level decoders + +func (p *importer) tagOrIndex() int { + if p.debugFormat { + p.marker('t') + } + + return int(p.rawInt64()) +} + +func (p *importer) int() int { + x := p.int64() + if int64(int(x)) != x { + errorf("exported integer too large") + } + return int(x) +} + +func (p *importer) int64() int64 { + if p.debugFormat { + p.marker('i') + } + + return p.rawInt64() +} + +func (p *importer) path() string { + if p.debugFormat { + p.marker('p') + } + // if the path was seen before, i is its index (>= 0) + // (the empty string is at index 0) + i := p.rawInt64() + if i >= 0 { + return p.pathList[i] + } + // otherwise, i is the negative path length (< 0) + a := make([]string, -i) + for n := range a { + a[n] = p.string() + } + s := strings.Join(a, "/") + p.pathList = append(p.pathList, s) + return s +} + +func (p *importer) string() string { + if p.debugFormat { + p.marker('s') + } + // if the string was seen before, i is its index (>= 0) + // (the empty string is at index 0) + i := p.rawInt64() + if i >= 0 { + return p.strList[i] + } + // otherwise, i is the negative string length (< 0) + if n := int(-i); n <= cap(p.buf) { + p.buf = p.buf[:n] + } else { + p.buf = make([]byte, n) + } + for i := range p.buf { + p.buf[i] = p.rawByte() + } + s := string(p.buf) + p.strList = append(p.strList, s) + return s +} + +func (p *importer) marker(want byte) { + if got := p.rawByte(); got != want { + errorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read) + } + + pos := p.read + if n := int(p.rawInt64()); n != pos { + errorf("incorrect position: got %d; want %d", n, pos) + } +} + +// rawInt64 should only be used by low-level decoders. +func (p *importer) rawInt64() int64 { + i, err := binary.ReadVarint(p) + if err != nil { + errorf("read error: %v", err) + } + return i +} + +// rawStringln should only be used to read the initial version string. +func (p *importer) rawStringln(b byte) string { + p.buf = p.buf[:0] + for b != '\n' { + p.buf = append(p.buf, b) + b = p.rawByte() + } + return string(p.buf) +} + +// needed for binary.ReadVarint in rawInt64 +func (p *importer) ReadByte() (byte, error) { + return p.rawByte(), nil +} + +// byte is the bottleneck interface for reading p.data. +// It unescapes '|' 'S' to '$' and '|' '|' to '|'. +// rawByte should only be used by low-level decoders. +func (p *importer) rawByte() byte { + b := p.data[0] + r := 1 + if b == '|' { + b = p.data[1] + r = 2 + switch b { + case 'S': + b = '$' + case '|': + // nothing to do + default: + errorf("unexpected escape sequence in export data") + } + } + p.data = p.data[r:] + p.read += r + return b + +} + +// ---------------------------------------------------------------------------- +// Export format + +// Tags. Must be < 0. +const ( + // Objects + packageTag = -(iota + 1) + constTag + typeTag + varTag + funcTag + endTag + + // Types + namedTag + arrayTag + sliceTag + dddTag + structTag + pointerTag + signatureTag + interfaceTag + mapTag + chanTag + + // Values + falseTag + trueTag + int64Tag + floatTag + fractionTag // not used by gc + complexTag + stringTag + nilTag // only used by gc (appears in exported inlined function bodies) + unknownTag // not used by gc (only appears in packages with errors) + + // Type aliases + aliasTag +) + +var predeclared = []types.Type{ + // basic types + types.Typ[types.Bool], + types.Typ[types.Int], + types.Typ[types.Int8], + types.Typ[types.Int16], + types.Typ[types.Int32], + types.Typ[types.Int64], + types.Typ[types.Uint], + types.Typ[types.Uint8], + types.Typ[types.Uint16], + types.Typ[types.Uint32], + types.Typ[types.Uint64], + types.Typ[types.Uintptr], + types.Typ[types.Float32], + types.Typ[types.Float64], + types.Typ[types.Complex64], + types.Typ[types.Complex128], + types.Typ[types.String], + + // basic type aliases + types.Universe.Lookup("byte").Type(), + types.Universe.Lookup("rune").Type(), + + // error + types.Universe.Lookup("error").Type(), + + // untyped types + types.Typ[types.UntypedBool], + types.Typ[types.UntypedInt], + types.Typ[types.UntypedRune], + types.Typ[types.UntypedFloat], + types.Typ[types.UntypedComplex], + types.Typ[types.UntypedString], + types.Typ[types.UntypedNil], + + // package unsafe + types.Typ[types.UnsafePointer], + + // invalid type + types.Typ[types.Invalid], // only appears in packages with errors + + // used internally by gc; never used by this package or in .a files + anyType{}, +} + +type anyType struct{} + +func (t anyType) Underlying() types.Type { return t } +func (t anyType) String() string { return "any" } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go new file mode 100644 index 00000000..f33dc561 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go @@ -0,0 +1,93 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go. + +// This file implements FindExportData. + +package gcimporter + +import ( + "bufio" + "fmt" + "io" + "strconv" + "strings" +) + +func readGopackHeader(r *bufio.Reader) (name string, size int, err error) { + // See $GOROOT/include/ar.h. + hdr := make([]byte, 16+12+6+6+8+10+2) + _, err = io.ReadFull(r, hdr) + if err != nil { + return + } + // leave for debugging + if false { + fmt.Printf("header: %s", hdr) + } + s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10])) + size, err = strconv.Atoi(s) + if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' { + err = fmt.Errorf("invalid archive header") + return + } + name = strings.TrimSpace(string(hdr[:16])) + return +} + +// FindExportData positions the reader r at the beginning of the +// export data section of an underlying GC-created object/archive +// file by reading from it. The reader must be positioned at the +// start of the file before calling this function. The hdr result +// is the string before the export data, either "$$" or "$$B". +// +func FindExportData(r *bufio.Reader) (hdr string, err error) { + // Read first line to make sure this is an object file. + line, err := r.ReadSlice('\n') + if err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + + if string(line) == "!\n" { + // Archive file. Scan to __.PKGDEF. + var name string + if name, _, err = readGopackHeader(r); err != nil { + return + } + + // First entry should be __.PKGDEF. + if name != "__.PKGDEF" { + err = fmt.Errorf("go archive is missing __.PKGDEF") + return + } + + // Read first line of __.PKGDEF data, so that line + // is once again the first line of the input. + if line, err = r.ReadSlice('\n'); err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + } + + // Now at __.PKGDEF in archive or still at beginning of file. + // Either way, line should begin with "go object ". + if !strings.HasPrefix(string(line), "go object ") { + err = fmt.Errorf("not a Go object file") + return + } + + // Skip over object header to export data. + // Begins after first line starting with $$. + for line[0] != '$' { + if line, err = r.ReadSlice('\n'); err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + } + hdr = string(line) + + return +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go new file mode 100644 index 00000000..d379881e --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -0,0 +1,1051 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, +// but it also contains the original source-based importer code for Go1.6. +// Once we stop supporting 1.6, we can remove that code. + +// Package gcimporter provides various functions for reading +// gc-generated object files that can be used to implement the +// Importer interface defined by the Go 1.5 standard library package. +package gcimporter + +import ( + "bufio" + "errors" + "fmt" + "go/build" + exact "go/constant" + "go/token" + "go/types" + "io" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strconv" + "strings" + "text/scanner" +) + +// debugging/development support +const debug = false + +var pkgExts = [...]string{".a", ".o"} + +// FindPkg returns the filename and unique package id for an import +// path based on package information provided by build.Import (using +// the build.Default build.Context). A relative srcDir is interpreted +// relative to the current working directory. +// If no file was found, an empty filename is returned. +// +func FindPkg(path, srcDir string) (filename, id string) { + if path == "" { + return + } + + var noext string + switch { + default: + // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x" + // Don't require the source files to be present. + if abs, err := filepath.Abs(srcDir); err == nil { // see issue 14282 + srcDir = abs + } + bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary) + if bp.PkgObj == "" { + id = path // make sure we have an id to print in error message + return + } + noext = strings.TrimSuffix(bp.PkgObj, ".a") + id = bp.ImportPath + + case build.IsLocalImport(path): + // "./x" -> "/this/directory/x.ext", "/this/directory/x" + noext = filepath.Join(srcDir, path) + id = noext + + case filepath.IsAbs(path): + // for completeness only - go/build.Import + // does not support absolute imports + // "/x" -> "/x.ext", "/x" + noext = path + id = path + } + + if false { // for debugging + if path != id { + fmt.Printf("%s -> %s\n", path, id) + } + } + + // try extensions + for _, ext := range pkgExts { + filename = noext + ext + if f, err := os.Stat(filename); err == nil && !f.IsDir() { + return + } + } + + filename = "" // not found + return +} + +// ImportData imports a package by reading the gc-generated export data, +// adds the corresponding package object to the packages map indexed by id, +// and returns the object. +// +// The packages map must contains all packages already imported. The data +// reader position must be the beginning of the export data section. The +// filename is only used in error messages. +// +// If packages[id] contains the completely imported package, that package +// can be used directly, and there is no need to call this function (but +// there is also no harm but for extra time used). +// +func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) { + // support for parser error handling + defer func() { + switch r := recover().(type) { + case nil: + // nothing to do + case importError: + err = r + default: + panic(r) // internal error + } + }() + + var p parser + p.init(filename, id, data, packages) + pkg = p.parseExport() + + return +} + +// Import imports a gc-generated package given its import path and srcDir, adds +// the corresponding package object to the packages map, and returns the object. +// The packages map must contain all packages already imported. +// +func Import(packages map[string]*types.Package, path, srcDir string) (pkg *types.Package, err error) { + filename, id := FindPkg(path, srcDir) + if filename == "" { + if path == "unsafe" { + return types.Unsafe, nil + } + err = fmt.Errorf("can't find import: %q", id) + return + } + + // no need to re-import if the package was imported completely before + if pkg = packages[id]; pkg != nil && pkg.Complete() { + return + } + + // open file + f, err := os.Open(filename) + if err != nil { + return + } + defer func() { + f.Close() + if err != nil { + // add file name to error + err = fmt.Errorf("reading export data: %s: %v", filename, err) + } + }() + + var hdr string + buf := bufio.NewReader(f) + if hdr, err = FindExportData(buf); err != nil { + return + } + + switch hdr { + case "$$\n": + return ImportData(packages, filename, id, buf) + + case "$$B\n": + var data []byte + data, err = ioutil.ReadAll(buf) + if err != nil { + break + } + + // TODO(gri): allow clients of go/importer to provide a FileSet. + // Or, define a new standard go/types/gcexportdata package. + fset := token.NewFileSet() + + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err = IImportData(fset, packages, data[1:], id) + } else { + _, pkg, err = BImportData(fset, packages, data, id) + } + + default: + err = fmt.Errorf("unknown export data header: %q", hdr) + } + + return +} + +// ---------------------------------------------------------------------------- +// Parser + +// TODO(gri) Imported objects don't have position information. +// Ideally use the debug table line info; alternatively +// create some fake position (or the position of the +// import). That way error messages referring to imported +// objects can print meaningful information. + +// parser parses the exports inside a gc compiler-produced +// object/archive file and populates its scope with the results. +type parser struct { + scanner scanner.Scanner + tok rune // current token + lit string // literal string; only valid for Ident, Int, String tokens + id string // package id of imported package + sharedPkgs map[string]*types.Package // package id -> package object (across importer) + localPkgs map[string]*types.Package // package id -> package object (just this package) +} + +func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) { + p.scanner.Init(src) + p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) } + p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments + p.scanner.Whitespace = 1<<'\t' | 1<<' ' + p.scanner.Filename = filename // for good error messages + p.next() + p.id = id + p.sharedPkgs = packages + if debug { + // check consistency of packages map + for _, pkg := range packages { + if pkg.Name() == "" { + fmt.Printf("no package name for %s\n", pkg.Path()) + } + } + } +} + +func (p *parser) next() { + p.tok = p.scanner.Scan() + switch p.tok { + case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·': + p.lit = p.scanner.TokenText() + default: + p.lit = "" + } + if debug { + fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit) + } +} + +func declTypeName(pkg *types.Package, name string) *types.TypeName { + scope := pkg.Scope() + if obj := scope.Lookup(name); obj != nil { + return obj.(*types.TypeName) + } + obj := types.NewTypeName(token.NoPos, pkg, name, nil) + // a named type may be referred to before the underlying type + // is known - set it up + types.NewNamed(obj, nil, nil) + scope.Insert(obj) + return obj +} + +// ---------------------------------------------------------------------------- +// Error handling + +// Internal errors are boxed as importErrors. +type importError struct { + pos scanner.Position + err error +} + +func (e importError) Error() string { + return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err) +} + +func (p *parser) error(err interface{}) { + if s, ok := err.(string); ok { + err = errors.New(s) + } + // panic with a runtime.Error if err is not an error + panic(importError{p.scanner.Pos(), err.(error)}) +} + +func (p *parser) errorf(format string, args ...interface{}) { + p.error(fmt.Sprintf(format, args...)) +} + +func (p *parser) expect(tok rune) string { + lit := p.lit + if p.tok != tok { + p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit) + } + p.next() + return lit +} + +func (p *parser) expectSpecial(tok string) { + sep := 'x' // not white space + i := 0 + for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' { + sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token + p.next() + i++ + } + if i < len(tok) { + p.errorf("expected %q, got %q", tok, tok[0:i]) + } +} + +func (p *parser) expectKeyword(keyword string) { + lit := p.expect(scanner.Ident) + if lit != keyword { + p.errorf("expected keyword %s, got %q", keyword, lit) + } +} + +// ---------------------------------------------------------------------------- +// Qualified and unqualified names + +// PackageId = string_lit . +// +func (p *parser) parsePackageId() string { + id, err := strconv.Unquote(p.expect(scanner.String)) + if err != nil { + p.error(err) + } + // id == "" stands for the imported package id + // (only known at time of package installation) + if id == "" { + id = p.id + } + return id +} + +// PackageName = ident . +// +func (p *parser) parsePackageName() string { + return p.expect(scanner.Ident) +} + +// dotIdentifier = ( ident | '·' ) { ident | int | '·' } . +func (p *parser) parseDotIdent() string { + ident := "" + if p.tok != scanner.Int { + sep := 'x' // not white space + for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' { + ident += p.lit + sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token + p.next() + } + } + if ident == "" { + p.expect(scanner.Ident) // use expect() for error handling + } + return ident +} + +// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) . +// +func (p *parser) parseQualifiedName() (id, name string) { + p.expect('@') + id = p.parsePackageId() + p.expect('.') + // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields. + if p.tok == '?' { + p.next() + } else { + name = p.parseDotIdent() + } + return +} + +// getPkg returns the package for a given id. If the package is +// not found, create the package and add it to the p.localPkgs +// and p.sharedPkgs maps. name is the (expected) name of the +// package. If name == "", the package name is expected to be +// set later via an import clause in the export data. +// +// id identifies a package, usually by a canonical package path like +// "encoding/json" but possibly by a non-canonical import path like +// "./json". +// +func (p *parser) getPkg(id, name string) *types.Package { + // package unsafe is not in the packages maps - handle explicitly + if id == "unsafe" { + return types.Unsafe + } + + pkg := p.localPkgs[id] + if pkg == nil { + // first import of id from this package + pkg = p.sharedPkgs[id] + if pkg == nil { + // first import of id by this importer; + // add (possibly unnamed) pkg to shared packages + pkg = types.NewPackage(id, name) + p.sharedPkgs[id] = pkg + } + // add (possibly unnamed) pkg to local packages + if p.localPkgs == nil { + p.localPkgs = make(map[string]*types.Package) + } + p.localPkgs[id] = pkg + } else if name != "" { + // package exists already and we have an expected package name; + // make sure names match or set package name if necessary + if pname := pkg.Name(); pname == "" { + pkg.SetName(name) + } else if pname != name { + p.errorf("%s package name mismatch: %s (given) vs %s (expected)", id, pname, name) + } + } + return pkg +} + +// parseExportedName is like parseQualifiedName, but +// the package id is resolved to an imported *types.Package. +// +func (p *parser) parseExportedName() (pkg *types.Package, name string) { + id, name := p.parseQualifiedName() + pkg = p.getPkg(id, "") + return +} + +// ---------------------------------------------------------------------------- +// Types + +// BasicType = identifier . +// +func (p *parser) parseBasicType() types.Type { + id := p.expect(scanner.Ident) + obj := types.Universe.Lookup(id) + if obj, ok := obj.(*types.TypeName); ok { + return obj.Type() + } + p.errorf("not a basic type: %s", id) + return nil +} + +// ArrayType = "[" int_lit "]" Type . +// +func (p *parser) parseArrayType(parent *types.Package) types.Type { + // "[" already consumed and lookahead known not to be "]" + lit := p.expect(scanner.Int) + p.expect(']') + elem := p.parseType(parent) + n, err := strconv.ParseInt(lit, 10, 64) + if err != nil { + p.error(err) + } + return types.NewArray(elem, n) +} + +// MapType = "map" "[" Type "]" Type . +// +func (p *parser) parseMapType(parent *types.Package) types.Type { + p.expectKeyword("map") + p.expect('[') + key := p.parseType(parent) + p.expect(']') + elem := p.parseType(parent) + return types.NewMap(key, elem) +} + +// Name = identifier | "?" | QualifiedName . +// +// For unqualified and anonymous names, the returned package is the parent +// package unless parent == nil, in which case the returned package is the +// package being imported. (The parent package is not nil if the the name +// is an unqualified struct field or interface method name belonging to a +// type declared in another package.) +// +// For qualified names, the returned package is nil (and not created if +// it doesn't exist yet) unless materializePkg is set (which creates an +// unnamed package with valid package path). In the latter case, a +// subsequent import clause is expected to provide a name for the package. +// +func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) { + pkg = parent + if pkg == nil { + pkg = p.sharedPkgs[p.id] + } + switch p.tok { + case scanner.Ident: + name = p.lit + p.next() + case '?': + // anonymous + p.next() + case '@': + // exported name prefixed with package path + pkg = nil + var id string + id, name = p.parseQualifiedName() + if materializePkg { + pkg = p.getPkg(id, "") + } + default: + p.error("name expected") + } + return +} + +func deref(typ types.Type) types.Type { + if p, _ := typ.(*types.Pointer); p != nil { + return p.Elem() + } + return typ +} + +// Field = Name Type [ string_lit ] . +// +func (p *parser) parseField(parent *types.Package) (*types.Var, string) { + pkg, name := p.parseName(parent, true) + + if name == "_" { + // Blank fields should be package-qualified because they + // are unexported identifiers, but gc does not qualify them. + // Assuming that the ident belongs to the current package + // causes types to change during re-exporting, leading + // to spurious "can't assign A to B" errors from go/types. + // As a workaround, pretend all blank fields belong + // to the same unique dummy package. + const blankpkg = "<_>" + pkg = p.getPkg(blankpkg, blankpkg) + } + + typ := p.parseType(parent) + anonymous := false + if name == "" { + // anonymous field - typ must be T or *T and T must be a type name + switch typ := deref(typ).(type) { + case *types.Basic: // basic types are named types + pkg = nil // objects defined in Universe scope have no package + name = typ.Name() + case *types.Named: + name = typ.Obj().Name() + default: + p.errorf("anonymous field expected") + } + anonymous = true + } + tag := "" + if p.tok == scanner.String { + s := p.expect(scanner.String) + var err error + tag, err = strconv.Unquote(s) + if err != nil { + p.errorf("invalid struct tag %s: %s", s, err) + } + } + return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag +} + +// StructType = "struct" "{" [ FieldList ] "}" . +// FieldList = Field { ";" Field } . +// +func (p *parser) parseStructType(parent *types.Package) types.Type { + var fields []*types.Var + var tags []string + + p.expectKeyword("struct") + p.expect('{') + for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { + if i > 0 { + p.expect(';') + } + fld, tag := p.parseField(parent) + if tag != "" && tags == nil { + tags = make([]string, i) + } + if tags != nil { + tags = append(tags, tag) + } + fields = append(fields, fld) + } + p.expect('}') + + return types.NewStruct(fields, tags) +} + +// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] . +// +func (p *parser) parseParameter() (par *types.Var, isVariadic bool) { + _, name := p.parseName(nil, false) + // remove gc-specific parameter numbering + if i := strings.Index(name, "·"); i >= 0 { + name = name[:i] + } + if p.tok == '.' { + p.expectSpecial("...") + isVariadic = true + } + typ := p.parseType(nil) + if isVariadic { + typ = types.NewSlice(typ) + } + // ignore argument tag (e.g. "noescape") + if p.tok == scanner.String { + p.next() + } + // TODO(gri) should we provide a package? + par = types.NewVar(token.NoPos, nil, name, typ) + return +} + +// Parameters = "(" [ ParameterList ] ")" . +// ParameterList = { Parameter "," } Parameter . +// +func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) { + p.expect('(') + for p.tok != ')' && p.tok != scanner.EOF { + if len(list) > 0 { + p.expect(',') + } + par, variadic := p.parseParameter() + list = append(list, par) + if variadic { + if isVariadic { + p.error("... not on final argument") + } + isVariadic = true + } + } + p.expect(')') + + return +} + +// Signature = Parameters [ Result ] . +// Result = Type | Parameters . +// +func (p *parser) parseSignature(recv *types.Var) *types.Signature { + params, isVariadic := p.parseParameters() + + // optional result type + var results []*types.Var + if p.tok == '(' { + var variadic bool + results, variadic = p.parseParameters() + if variadic { + p.error("... not permitted on result type") + } + } + + return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic) +} + +// InterfaceType = "interface" "{" [ MethodList ] "}" . +// MethodList = Method { ";" Method } . +// Method = Name Signature . +// +// The methods of embedded interfaces are always "inlined" +// by the compiler and thus embedded interfaces are never +// visible in the export data. +// +func (p *parser) parseInterfaceType(parent *types.Package) types.Type { + var methods []*types.Func + + p.expectKeyword("interface") + p.expect('{') + for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { + if i > 0 { + p.expect(';') + } + pkg, name := p.parseName(parent, true) + sig := p.parseSignature(nil) + methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig)) + } + p.expect('}') + + // Complete requires the type's embedded interfaces to be fully defined, + // but we do not define any + return types.NewInterface(methods, nil).Complete() +} + +// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type . +// +func (p *parser) parseChanType(parent *types.Package) types.Type { + dir := types.SendRecv + if p.tok == scanner.Ident { + p.expectKeyword("chan") + if p.tok == '<' { + p.expectSpecial("<-") + dir = types.SendOnly + } + } else { + p.expectSpecial("<-") + p.expectKeyword("chan") + dir = types.RecvOnly + } + elem := p.parseType(parent) + return types.NewChan(dir, elem) +} + +// Type = +// BasicType | TypeName | ArrayType | SliceType | StructType | +// PointerType | FuncType | InterfaceType | MapType | ChanType | +// "(" Type ")" . +// +// BasicType = ident . +// TypeName = ExportedName . +// SliceType = "[" "]" Type . +// PointerType = "*" Type . +// FuncType = "func" Signature . +// +func (p *parser) parseType(parent *types.Package) types.Type { + switch p.tok { + case scanner.Ident: + switch p.lit { + default: + return p.parseBasicType() + case "struct": + return p.parseStructType(parent) + case "func": + // FuncType + p.next() + return p.parseSignature(nil) + case "interface": + return p.parseInterfaceType(parent) + case "map": + return p.parseMapType(parent) + case "chan": + return p.parseChanType(parent) + } + case '@': + // TypeName + pkg, name := p.parseExportedName() + return declTypeName(pkg, name).Type() + case '[': + p.next() // look ahead + if p.tok == ']' { + // SliceType + p.next() + return types.NewSlice(p.parseType(parent)) + } + return p.parseArrayType(parent) + case '*': + // PointerType + p.next() + return types.NewPointer(p.parseType(parent)) + case '<': + return p.parseChanType(parent) + case '(': + // "(" Type ")" + p.next() + typ := p.parseType(parent) + p.expect(')') + return typ + } + p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit) + return nil +} + +// ---------------------------------------------------------------------------- +// Declarations + +// ImportDecl = "import" PackageName PackageId . +// +func (p *parser) parseImportDecl() { + p.expectKeyword("import") + name := p.parsePackageName() + p.getPkg(p.parsePackageId(), name) +} + +// int_lit = [ "+" | "-" ] { "0" ... "9" } . +// +func (p *parser) parseInt() string { + s := "" + switch p.tok { + case '-': + s = "-" + p.next() + case '+': + p.next() + } + return s + p.expect(scanner.Int) +} + +// number = int_lit [ "p" int_lit ] . +// +func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { + // mantissa + mant := exact.MakeFromLiteral(p.parseInt(), token.INT, 0) + if mant == nil { + panic("invalid mantissa") + } + + if p.lit == "p" { + // exponent (base 2) + p.next() + exp, err := strconv.ParseInt(p.parseInt(), 10, 0) + if err != nil { + p.error(err) + } + if exp < 0 { + denom := exact.MakeInt64(1) + denom = exact.Shift(denom, token.SHL, uint(-exp)) + typ = types.Typ[types.UntypedFloat] + val = exact.BinaryOp(mant, token.QUO, denom) + return + } + if exp > 0 { + mant = exact.Shift(mant, token.SHL, uint(exp)) + } + typ = types.Typ[types.UntypedFloat] + val = mant + return + } + + typ = types.Typ[types.UntypedInt] + val = mant + return +} + +// ConstDecl = "const" ExportedName [ Type ] "=" Literal . +// Literal = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit . +// bool_lit = "true" | "false" . +// complex_lit = "(" float_lit "+" float_lit "i" ")" . +// rune_lit = "(" int_lit "+" int_lit ")" . +// string_lit = `"` { unicode_char } `"` . +// +func (p *parser) parseConstDecl() { + p.expectKeyword("const") + pkg, name := p.parseExportedName() + + var typ0 types.Type + if p.tok != '=' { + // constant types are never structured - no need for parent type + typ0 = p.parseType(nil) + } + + p.expect('=') + var typ types.Type + var val exact.Value + switch p.tok { + case scanner.Ident: + // bool_lit + if p.lit != "true" && p.lit != "false" { + p.error("expected true or false") + } + typ = types.Typ[types.UntypedBool] + val = exact.MakeBool(p.lit == "true") + p.next() + + case '-', scanner.Int: + // int_lit + typ, val = p.parseNumber() + + case '(': + // complex_lit or rune_lit + p.next() + if p.tok == scanner.Char { + p.next() + p.expect('+') + typ = types.Typ[types.UntypedRune] + _, val = p.parseNumber() + p.expect(')') + break + } + _, re := p.parseNumber() + p.expect('+') + _, im := p.parseNumber() + p.expectKeyword("i") + p.expect(')') + typ = types.Typ[types.UntypedComplex] + val = exact.BinaryOp(re, token.ADD, exact.MakeImag(im)) + + case scanner.Char: + // rune_lit + typ = types.Typ[types.UntypedRune] + val = exact.MakeFromLiteral(p.lit, token.CHAR, 0) + p.next() + + case scanner.String: + // string_lit + typ = types.Typ[types.UntypedString] + val = exact.MakeFromLiteral(p.lit, token.STRING, 0) + p.next() + + default: + p.errorf("expected literal got %s", scanner.TokenString(p.tok)) + } + + if typ0 == nil { + typ0 = typ + } + + pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val)) +} + +// TypeDecl = "type" ExportedName Type . +// +func (p *parser) parseTypeDecl() { + p.expectKeyword("type") + pkg, name := p.parseExportedName() + obj := declTypeName(pkg, name) + + // The type object may have been imported before and thus already + // have a type associated with it. We still need to parse the type + // structure, but throw it away if the object already has a type. + // This ensures that all imports refer to the same type object for + // a given type declaration. + typ := p.parseType(pkg) + + if name := obj.Type().(*types.Named); name.Underlying() == nil { + name.SetUnderlying(typ) + } +} + +// VarDecl = "var" ExportedName Type . +// +func (p *parser) parseVarDecl() { + p.expectKeyword("var") + pkg, name := p.parseExportedName() + typ := p.parseType(pkg) + pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ)) +} + +// Func = Signature [ Body ] . +// Body = "{" ... "}" . +// +func (p *parser) parseFunc(recv *types.Var) *types.Signature { + sig := p.parseSignature(recv) + if p.tok == '{' { + p.next() + for i := 1; i > 0; p.next() { + switch p.tok { + case '{': + i++ + case '}': + i-- + } + } + } + return sig +} + +// MethodDecl = "func" Receiver Name Func . +// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" . +// +func (p *parser) parseMethodDecl() { + // "func" already consumed + p.expect('(') + recv, _ := p.parseParameter() // receiver + p.expect(')') + + // determine receiver base type object + base := deref(recv.Type()).(*types.Named) + + // parse method name, signature, and possibly inlined body + _, name := p.parseName(nil, false) + sig := p.parseFunc(recv) + + // methods always belong to the same package as the base type object + pkg := base.Obj().Pkg() + + // add method to type unless type was imported before + // and method exists already + // TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small. + base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig)) +} + +// FuncDecl = "func" ExportedName Func . +// +func (p *parser) parseFuncDecl() { + // "func" already consumed + pkg, name := p.parseExportedName() + typ := p.parseFunc(nil) + pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ)) +} + +// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" . +// +func (p *parser) parseDecl() { + if p.tok == scanner.Ident { + switch p.lit { + case "import": + p.parseImportDecl() + case "const": + p.parseConstDecl() + case "type": + p.parseTypeDecl() + case "var": + p.parseVarDecl() + case "func": + p.next() // look ahead + if p.tok == '(' { + p.parseMethodDecl() + } else { + p.parseFuncDecl() + } + } + } + p.expect('\n') +} + +// ---------------------------------------------------------------------------- +// Export + +// Export = "PackageClause { Decl } "$$" . +// PackageClause = "package" PackageName [ "safe" ] "\n" . +// +func (p *parser) parseExport() *types.Package { + p.expectKeyword("package") + name := p.parsePackageName() + if p.tok == scanner.Ident && p.lit == "safe" { + // package was compiled with -u option - ignore + p.next() + } + p.expect('\n') + + pkg := p.getPkg(p.id, name) + + for p.tok != '$' && p.tok != scanner.EOF { + p.parseDecl() + } + + if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' { + // don't call next()/expect() since reading past the + // export data may cause scanner errors (e.g. NUL chars) + p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch) + } + + if n := p.scanner.ErrorCount; n != 0 { + p.errorf("expected no scanner errors, got %d", n) + } + + // Record all locally referenced packages as imports. + var imports []*types.Package + for id, pkg2 := range p.localPkgs { + if pkg2.Name() == "" { + p.errorf("%s package has no name", id) + } + if id == p.id { + continue // avoid self-edge + } + imports = append(imports, pkg2) + } + sort.Sort(byPath(imports)) + pkg.SetImports(imports) + + // package was imported completely and without errors + pkg.MarkComplete() + + return pkg +} + +type byPath []*types.Package + +func (a byPath) Len() int { return len(a) } +func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go new file mode 100644 index 00000000..0fd22bb0 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go @@ -0,0 +1,598 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Indexed package import. +// See cmd/compile/internal/gc/iexport.go for the export data format. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "fmt" + "go/constant" + "go/token" + "go/types" + "io" + "sort" +) + +type intReader struct { + *bytes.Reader + path string +} + +func (r *intReader) int64() int64 { + i, err := binary.ReadVarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +func (r *intReader) uint64() uint64 { + i, err := binary.ReadUvarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +const predeclReserved = 32 + +type itag uint64 + +const ( + // Types + definedType itag = iota + pointerType + sliceType + arrayType + chanType + mapType + signatureType + structType + interfaceType +) + +// IImportData imports a package from the serialized package data +// and returns the number of bytes consumed and a reference to the package. +// If the export data version is not recognized or the format is otherwise +// compromised, an error is returned. +func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { + const currentVersion = 0 + version := -1 + defer func() { + if e := recover(); e != nil { + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } + } + }() + + r := &intReader{bytes.NewReader(data), path} + + version = int(r.uint64()) + switch version { + case currentVersion: + default: + errorf("unknown iexport format version %d", version) + } + + sLen := int64(r.uint64()) + dLen := int64(r.uint64()) + + whence, _ := r.Seek(0, io.SeekCurrent) + stringData := data[whence : whence+sLen] + declData := data[whence+sLen : whence+sLen+dLen] + r.Seek(sLen+dLen, io.SeekCurrent) + + p := iimporter{ + ipath: path, + + stringData: stringData, + stringCache: make(map[uint64]string), + pkgCache: make(map[uint64]*types.Package), + + declData: declData, + pkgIndex: make(map[*types.Package]map[string]uint64), + typCache: make(map[uint64]types.Type), + + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, + } + + for i, pt := range predeclared { + p.typCache[uint64(i)] = pt + } + + pkgList := make([]*types.Package, r.uint64()) + for i := range pkgList { + pkgPathOff := r.uint64() + pkgPath := p.stringAt(pkgPathOff) + pkgName := p.stringAt(r.uint64()) + _ = r.uint64() // package height; unused by go/types + + if pkgPath == "" { + pkgPath = path + } + pkg := imports[pkgPath] + if pkg == nil { + pkg = types.NewPackage(pkgPath, pkgName) + imports[pkgPath] = pkg + } else if pkg.Name() != pkgName { + errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path) + } + + p.pkgCache[pkgPathOff] = pkg + + nameIndex := make(map[string]uint64) + for nSyms := r.uint64(); nSyms > 0; nSyms-- { + name := p.stringAt(r.uint64()) + nameIndex[name] = r.uint64() + } + + p.pkgIndex[pkg] = nameIndex + pkgList[i] = pkg + } + + localpkg := pkgList[0] + + names := make([]string, 0, len(p.pkgIndex[localpkg])) + for name := range p.pkgIndex[localpkg] { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + p.doDecl(localpkg, name) + } + + for _, typ := range p.interfaceList { + typ.Complete() + } + + // record all referenced packages as imports + list := append(([]*types.Package)(nil), pkgList[1:]...) + sort.Sort(byPath(list)) + localpkg.SetImports(list) + + // package was imported completely and without errors + localpkg.MarkComplete() + + consumed, _ := r.Seek(0, io.SeekCurrent) + return int(consumed), localpkg, nil +} + +type iimporter struct { + ipath string + + stringData []byte + stringCache map[uint64]string + pkgCache map[uint64]*types.Package + + declData []byte + pkgIndex map[*types.Package]map[string]uint64 + typCache map[uint64]types.Type + + fake fakeFileSet + interfaceList []*types.Interface +} + +func (p *iimporter) doDecl(pkg *types.Package, name string) { + // See if we've already imported this declaration. + if obj := pkg.Scope().Lookup(name); obj != nil { + return + } + + off, ok := p.pkgIndex[pkg][name] + if !ok { + errorf("%v.%v not in index", pkg, name) + } + + r := &importReader{p: p, currPkg: pkg} + r.declReader.Reset(p.declData[off:]) + + r.obj(name) +} + +func (p *iimporter) stringAt(off uint64) string { + if s, ok := p.stringCache[off]; ok { + return s + } + + slen, n := binary.Uvarint(p.stringData[off:]) + if n <= 0 { + errorf("varint failed") + } + spos := off + uint64(n) + s := string(p.stringData[spos : spos+slen]) + p.stringCache[off] = s + return s +} + +func (p *iimporter) pkgAt(off uint64) *types.Package { + if pkg, ok := p.pkgCache[off]; ok { + return pkg + } + path := p.stringAt(off) + errorf("missing package %q in %q", path, p.ipath) + return nil +} + +func (p *iimporter) typAt(off uint64, base *types.Named) types.Type { + if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) { + return t + } + + if off < predeclReserved { + errorf("predeclared type missing from cache: %v", off) + } + + r := &importReader{p: p} + r.declReader.Reset(p.declData[off-predeclReserved:]) + t := r.doType(base) + + if base == nil || !isInterface(t) { + p.typCache[off] = t + } + return t +} + +type importReader struct { + p *iimporter + declReader bytes.Reader + currPkg *types.Package + prevFile string + prevLine int64 +} + +func (r *importReader) obj(name string) { + tag := r.byte() + pos := r.pos() + + switch tag { + case 'A': + typ := r.typ() + + r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) + + case 'C': + typ, val := r.value() + + r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) + + case 'F': + sig := r.signature(nil) + + r.declare(types.NewFunc(pos, r.currPkg, name, sig)) + + case 'T': + // Types can be recursive. We need to setup a stub + // declaration before recursing. + obj := types.NewTypeName(pos, r.currPkg, name, nil) + named := types.NewNamed(obj, nil, nil) + r.declare(obj) + + underlying := r.p.typAt(r.uint64(), named).Underlying() + named.SetUnderlying(underlying) + + if !isInterface(underlying) { + for n := r.uint64(); n > 0; n-- { + mpos := r.pos() + mname := r.ident() + recv := r.param() + msig := r.signature(recv) + + named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig)) + } + } + + case 'V': + typ := r.typ() + + r.declare(types.NewVar(pos, r.currPkg, name, typ)) + + default: + errorf("unexpected tag: %v", tag) + } +} + +func (r *importReader) declare(obj types.Object) { + obj.Pkg().Scope().Insert(obj) +} + +func (r *importReader) value() (typ types.Type, val constant.Value) { + typ = r.typ() + + switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType { + case types.IsBoolean: + val = constant.MakeBool(r.bool()) + + case types.IsString: + val = constant.MakeString(r.string()) + + case types.IsInteger: + val = r.mpint(b) + + case types.IsFloat: + val = r.mpfloat(b) + + case types.IsComplex: + re := r.mpfloat(b) + im := r.mpfloat(b) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + + default: + errorf("unexpected type %v", typ) // panics + panic("unreachable") + } + + return +} + +func intSize(b *types.Basic) (signed bool, maxBytes uint) { + if (b.Info() & types.IsUntyped) != 0 { + return true, 64 + } + + switch b.Kind() { + case types.Float32, types.Complex64: + return true, 3 + case types.Float64, types.Complex128: + return true, 7 + } + + signed = (b.Info() & types.IsUnsigned) == 0 + switch b.Kind() { + case types.Int8, types.Uint8: + maxBytes = 1 + case types.Int16, types.Uint16: + maxBytes = 2 + case types.Int32, types.Uint32: + maxBytes = 4 + default: + maxBytes = 8 + } + + return +} + +func (r *importReader) mpint(b *types.Basic) constant.Value { + signed, maxBytes := intSize(b) + + maxSmall := 256 - maxBytes + if signed { + maxSmall = 256 - 2*maxBytes + } + if maxBytes == 1 { + maxSmall = 256 + } + + n, _ := r.declReader.ReadByte() + if uint(n) < maxSmall { + v := int64(n) + if signed { + v >>= 1 + if n&1 != 0 { + v = ^v + } + } + return constant.MakeInt64(v) + } + + v := -n + if signed { + v = -(n &^ 1) >> 1 + } + if v < 1 || uint(v) > maxBytes { + errorf("weird decoding: %v, %v => %v", n, signed, v) + } + + buf := make([]byte, v) + io.ReadFull(&r.declReader, buf) + + // convert to little endian + // TODO(gri) go/constant should have a more direct conversion function + // (e.g., once it supports a big.Float based implementation) + for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { + buf[i], buf[j] = buf[j], buf[i] + } + + x := constant.MakeFromBytes(buf) + if signed && n&1 != 0 { + x = constant.UnaryOp(token.SUB, x, 0) + } + return x +} + +func (r *importReader) mpfloat(b *types.Basic) constant.Value { + x := r.mpint(b) + if constant.Sign(x) == 0 { + return x + } + + exp := r.int64() + switch { + case exp > 0: + x = constant.Shift(x, token.SHL, uint(exp)) + case exp < 0: + d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) + x = constant.BinaryOp(x, token.QUO, d) + } + return x +} + +func (r *importReader) ident() string { + return r.string() +} + +func (r *importReader) qualifiedIdent() (*types.Package, string) { + name := r.string() + pkg := r.pkg() + return pkg, name +} + +func (r *importReader) pos() token.Pos { + delta := r.int64() + if delta != deltaNewFile { + r.prevLine += delta + } else if l := r.int64(); l == -1 { + r.prevLine += deltaNewFile + } else { + r.prevFile = r.string() + r.prevLine = l + } + + if r.prevFile == "" && r.prevLine == 0 { + return token.NoPos + } + + return r.p.fake.pos(r.prevFile, int(r.prevLine)) +} + +func (r *importReader) typ() types.Type { + return r.p.typAt(r.uint64(), nil) +} + +func isInterface(t types.Type) bool { + _, ok := t.(*types.Interface) + return ok +} + +func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) } +func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } + +func (r *importReader) doType(base *types.Named) types.Type { + switch k := r.kind(); k { + default: + errorf("unexpected kind tag in %q: %v", r.p.ipath, k) + return nil + + case definedType: + pkg, name := r.qualifiedIdent() + r.p.doDecl(pkg, name) + return pkg.Scope().Lookup(name).(*types.TypeName).Type() + case pointerType: + return types.NewPointer(r.typ()) + case sliceType: + return types.NewSlice(r.typ()) + case arrayType: + n := r.uint64() + return types.NewArray(r.typ(), int64(n)) + case chanType: + dir := chanDir(int(r.uint64())) + return types.NewChan(dir, r.typ()) + case mapType: + return types.NewMap(r.typ(), r.typ()) + case signatureType: + r.currPkg = r.pkg() + return r.signature(nil) + + case structType: + r.currPkg = r.pkg() + + fields := make([]*types.Var, r.uint64()) + tags := make([]string, len(fields)) + for i := range fields { + fpos := r.pos() + fname := r.ident() + ftyp := r.typ() + emb := r.bool() + tag := r.string() + + fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb) + tags[i] = tag + } + return types.NewStruct(fields, tags) + + case interfaceType: + r.currPkg = r.pkg() + + embeddeds := make([]types.Type, r.uint64()) + for i := range embeddeds { + _ = r.pos() + embeddeds[i] = r.typ() + } + + methods := make([]*types.Func, r.uint64()) + for i := range methods { + mpos := r.pos() + mname := r.ident() + + // TODO(mdempsky): Matches bimport.go, but I + // don't agree with this. + var recv *types.Var + if base != nil { + recv = types.NewVar(token.NoPos, r.currPkg, "", base) + } + + msig := r.signature(recv) + methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig) + } + + typ := newInterface(methods, embeddeds) + r.p.interfaceList = append(r.p.interfaceList, typ) + return typ + } +} + +func (r *importReader) kind() itag { + return itag(r.uint64()) +} + +func (r *importReader) signature(recv *types.Var) *types.Signature { + params := r.paramList() + results := r.paramList() + variadic := params.Len() > 0 && r.bool() + return types.NewSignature(recv, params, results, variadic) +} + +func (r *importReader) paramList() *types.Tuple { + xs := make([]*types.Var, r.uint64()) + for i := range xs { + xs[i] = r.param() + } + return types.NewTuple(xs...) +} + +func (r *importReader) param() *types.Var { + pos := r.pos() + name := r.ident() + typ := r.typ() + return types.NewParam(pos, r.currPkg, name, typ) +} + +func (r *importReader) bool() bool { + return r.uint64() != 0 +} + +func (r *importReader) int64() int64 { + n, err := binary.ReadVarint(&r.declReader) + if err != nil { + errorf("readVarint: %v", err) + } + return n +} + +func (r *importReader) uint64() uint64 { + n, err := binary.ReadUvarint(&r.declReader) + if err != nil { + errorf("readUvarint: %v", err) + } + return n +} + +func (r *importReader) byte() byte { + x, err := r.declReader.ReadByte() + if err != nil { + errorf("declReader.ReadByte: %v", err) + } + return x +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go new file mode 100644 index 00000000..225ffeed --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go @@ -0,0 +1,13 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 + +package gcimporter + +import "go/types" + +func isAlias(obj *types.TypeName) bool { + return false // there are no type aliases before Go 1.9 +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go new file mode 100644 index 00000000..c2025d84 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go @@ -0,0 +1,13 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package gcimporter + +import "go/types" + +func isAlias(obj *types.TypeName) bool { + return obj.IsAlias() +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go new file mode 100644 index 00000000..463f2522 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go @@ -0,0 +1,21 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + named := make([]*types.Named, len(embeddeds)) + for i, e := range embeddeds { + var ok bool + named[i], ok = e.(*types.Named) + if !ok { + panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") + } + } + return types.NewInterface(methods, named) +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go new file mode 100644 index 00000000..ab28b95c --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go @@ -0,0 +1,13 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + return types.NewInterfaceType(methods, embeddeds) +} From d82ff3ea2fa0b6f180f3e7a031d746559351490d Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 21:58:00 +0800 Subject: [PATCH 006/133] fix gomod parser --- Godeps/Godeps.json | 4 +-- .../visualfc/gotools/pkg/gomod/gomod.go | 26 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index deec7360..bf409303 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,11 +8,11 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "7ab499df0956c934555c5da7f1469262a0f1032b" + "Rev": "931b579bd3fde2bd4c8da63824f3cfe54135c6a2" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "7ab499df0956c934555c5da7f1469262a0f1032b" + "Rev": "931b579bd3fde2bd4c8da63824f3cfe54135c6a2" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 7e259b6d..3d0aec55 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -65,21 +65,25 @@ type Module struct { func parseModuleJson(data []byte) ModuleList { var ms ModuleList var index int + var last byte = '\n' for i, v := range data { - switch v { - case '{': - index = i - case '}': - var m Module - err := json.Unmarshal(data[index:i+1], &m) - if err == nil { - if m.Main { - ms.Module = m - } else { - ms.Require = append(ms.Require, &m) + if last == '\n' { + switch v { + case '{': + index = i + case '}': + var m Module + err := json.Unmarshal(data[index:i+1], &m) + if err == nil { + if m.Main { + ms.Module = m + } else { + ms.Require = append(ms.Require, &m) + } } } } + last = v } return ms } From 4fb222381f03bfb933e36f91d5e50fe35ec1c821 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 24 Jul 2018 22:45:31 +0800 Subject: [PATCH 007/133] update gomod vendor --- Godeps/Godeps.json | 4 ++-- .../visualfc/gotools/pkg/gomod/gomod.go | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index bf409303..1b71bfee 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,11 +8,11 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "931b579bd3fde2bd4c8da63824f3cfe54135c6a2" + "Rev": "d9a6026b05ff176eafbe53805b5f3200b325d810" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "931b579bd3fde2bd4c8da63824f3cfe54135c6a2" + "Rev": "d9a6026b05ff176eafbe53805b5f3200b325d810" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 3d0aec55..7a259d00 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -60,18 +60,23 @@ type Module struct { Time string Dir string Main bool + Replace *Module } func parseModuleJson(data []byte) ModuleList { var ms ModuleList var index int - var last byte = '\n' + var tag int for i, v := range data { - if last == '\n' { - switch v { - case '{': + switch v { + case '{': + if tag == 0 { index = i - case '}': + } + tag++ + case '}': + tag-- + if tag == 0 { var m Module err := json.Unmarshal(data[index:i+1], &m) if err == nil { @@ -83,7 +88,6 @@ func parseModuleJson(data []byte) ModuleList { } } } - last = v } return ms } From ff80ac4e6bbbd2909d6b1244bc11e4bff3b86217 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 25 Jul 2018 12:45:29 +0800 Subject: [PATCH 008/133] update dep --- Godeps/Godeps.json | 4 ++-- declcache.go | 2 +- package.go | 2 +- .../visualfc/gotools/pkg/gomod/gomod.go | 18 +++++++++++++++--- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 1b71bfee..fcfc02d8 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,11 +8,11 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "d9a6026b05ff176eafbe53805b5f3200b325d810" + "Rev": "41d10b46bc904224b927b068aeece0acdf1eef2b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "d9a6026b05ff176eafbe53805b5f3200b325d810" + "Rev": "41d10b46bc904224b927b068aeece0acdf1eef2b" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", diff --git a/declcache.go b/declcache.go index 6e919545..bfbe106d 100644 --- a/declcache.go +++ b/declcache.go @@ -392,7 +392,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool } if g_daemon != nil && g_daemon.modList != nil { - pkg, _ := g_daemon.modList.LookupModule(imp) + pkg, _, _ := g_daemon.modList.LookupModule(imp) if pkg != nil { if *g_debug { log.Println("lookup module", pkg.Path, pkg.Dir) diff --git a/package.go b/package.go index aa835d1d..53773ff2 100644 --- a/package.go +++ b/package.go @@ -120,7 +120,7 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { var tp types_parser var srcDir string if g_daemon.modList != nil { - pkg, dir := g_daemon.modList.LookupModule(m.import_name) + pkg, _, dir := g_daemon.modList.LookupModule(m.import_name) if pkg != nil { srcDir = dir if *g_debug { diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 7a259d00..a64b1a5e 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -45,13 +45,25 @@ type ModuleList struct { Require []*Module } -func (m *ModuleList) LookupModule(pkgname string) (*Module, string) { +func makePath(path, dir string, addin string) string { + dir = filepath.FromSlash(dir) + pos := strings.Index(dir, "mod/"+path+"@") + return filepath.Join(dir[pos:], addin) +} + +func (m *ModuleList) LookupModule(pkgname string) (require *Module, path string, dir string) { for _, r := range m.Require { if strings.HasPrefix(pkgname, r.Path) { - return r, filepath.Join(r.Dir, pkgname[len(r.Path):]) + addin := pkgname[len(r.Path):] + if r.Replace != nil { + path = makePath(r.Replace.Path, r.Dir, addin) + } else { + path = makePath(r.Path, r.Dir, addin) + } + return r, path, filepath.Join(r.Dir, addin) } } - return nil, "" + return nil, "", "" } type Module struct { From f276d6ce1efbfcbdba14a760ddf3542d8855f7ac Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 25 Jul 2018 16:08:31 +0800 Subject: [PATCH 009/133] fix gomod for window --- Godeps/Godeps.json | 6 +++--- vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index fcfc02d8..b797d254 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -3,16 +3,16 @@ "GoVersion": "go1.11", "GodepVersion": "v80", "Packages": [ - "." + "./..." ], "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "41d10b46bc904224b927b068aeece0acdf1eef2b" + "Rev": "3ba8efc2c3492ad53d9f0270709cff8fa0d3d822" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "41d10b46bc904224b927b068aeece0acdf1eef2b" + "Rev": "3ba8efc2c3492ad53d9f0270709cff8fa0d3d822" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index a64b1a5e..651ca691 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -46,8 +46,11 @@ type ModuleList struct { } func makePath(path, dir string, addin string) string { - dir = filepath.FromSlash(dir) + dir = filepath.ToSlash(dir) pos := strings.Index(dir, "mod/"+path+"@") + if pos == -1 { + return path + } return filepath.Join(dir[pos:], addin) } From fac1dda5ced17610b785b848ddba458b2e496678 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 26 Jul 2018 07:53:53 +0800 Subject: [PATCH 010/133] clean code --- package_types.go | 164 ----------------------------------------------- 1 file changed, 164 deletions(-) diff --git a/package_types.go b/package_types.go index 5d16d97b..43e40b06 100644 --- a/package_types.go +++ b/package_types.go @@ -2,15 +2,10 @@ package main import ( "bytes" - "fmt" - "go/ast" "go/build" "go/importer" "go/token" "go/types" - "log" - "regexp" - "strings" "github.com/visualfc/gotools/pkg/srcimporter" "golang.org/x/tools/go/gcexportdata" @@ -21,55 +16,6 @@ type types_parser struct { pkg *types.Package } -func typeToAst(typ types.Type) ast.Expr { - switch t := (typ).(type) { - case *types.Basic: - return ast.NewIdent(t.Name()) - case *types.Named: - switch ut := t.Underlying().(type) { - case *types.Basic: - return ast.NewIdent(typ.String()) - case *types.Interface: - case *types.Struct: - default: - log.Fatalf("%T\n", ut) - } - } - return nil -} - -func objToAst(obj types.Object) ast.Decl { - switch ot := (obj).(type) { - case *types.Const: - typ := typeToAst(ot.Type()) - return &ast.GenDecl{ - Tok: token.CONST, - Specs: []ast.Spec{ - &ast.ValueSpec{ - Names: []*ast.Ident{ast.NewIdent(obj.Name())}, - Type: typ, - Values: []ast.Expr{&ast.BasicLit{Kind: token.INT, Value: ot.Val().String()}}, - }, - }, - } - case *types.Var: - typ := typeToAst(ot.Type()) - return &ast.GenDecl{ - Tok: token.VAR, - Specs: []ast.Spec{ - &ast.ValueSpec{ - Names: []*ast.Ident{ast.NewIdent(obj.Name())}, - Type: typ, - }, - }, - } - default: - //fmt.Println(typ) - _ = ot - } - return nil -} - func (p *types_parser) init(path string, dir string, pfc *package_file_cache, source bool) { if source { im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) @@ -84,27 +30,6 @@ func (p *types_parser) init(path string, dir string, pfc *package_file_cache, so p.pfc = pfc } -func MakeTuple(re *regexp.Regexp, params *types.Tuple) string { - var info string - for i := 0; i < params.Len(); i++ { - v := params.At(i) - name := v.Name() - if name == "" { - name = fmt.Sprintf("param%v", i+1) - } - if i > 0 { - info += "," - } - typ := v.Type().String() - typ = re.ReplaceAllStringFunc(typ, func(s string) string { - s = strings.Replace(s, ".", "\".", 1) - return "@\"" + s - }) - info += name + " " + typ - } - return info -} - func (p *types_parser) exportData() []byte { if p.pkg == nil { return nil @@ -114,92 +39,3 @@ func (p *types_parser) exportData() []byte { gcexportdata.Write(&buf, fset, p.pkg) return buf.Bytes() } - -func (p *types_parser) export() []byte { - var ar []string - ar = append(ar, "package "+p.pkg.Name()) - - ar = append(ar, `func @"".Expand(s string,mapping func(string) string)(param1 string)`) - ar = append(ar, "\n") - return []byte(strings.Join(ar, "\n")) - - scope := p.pkg.Scope() - re, _ := regexp.Compile("[\\w]+\\.[\\w]+") - for _, name := range scope.Names() { - obj := scope.Lookup(name) - var info string - switch typ := (obj).(type) { - case *types.Func: - sig := typ.Type().(*types.Signature) - if sig.Recv() != nil { - log.Fatalln(obj.String()) - } - info = `func @"".` + obj.Name() - info += "(" - if sig.Params() != nil { - info += MakeTuple(re, sig.Params()) - } - info += ")" - if sig.Results() != nil { - info += "(" - info += MakeTuple(re, sig.Results()) - info += ")" - } - case *types.Const: - info = `const @"".` + obj.Name() + "=" + typ.Val().String() - case *types.Var: - info = strings.Replace(obj.String(), p.pkg.Name()+".", `@"".`, 1) - info = re.ReplaceAllStringFunc(info, func(s string) string { - s = strings.Replace(s, ".", "\".", 1) - return "@\"" + s - }) - info = strings.Replace(info, " untyped ", " ", -1) - //str = "type @\"\".ScanState interface{Read(buf []byte) (n int, err error);SkipSpace()}" - //str = "func @\"\".test(f func() bool))" //; Token(skipSpace bool, f func(rune) bool) (token []byte, err error); UnreadRune() error; Width() (wid int, ok bool)}" - case *types.TypeName: - //log.Println(typ.Type().Underlying()) - switch tt := typ.Type().Underlying().(type) { - case *types.Interface: - info = "type @\"\"." + obj.Name() + " interface{}" - case *types.Struct: - info = "type @\"\"." + obj.Name() + " struct{}" - case *types.Basic: - info = strings.Replace(obj.String(), p.pkg.Name()+".", `@"".`, 1) - info = re.ReplaceAllStringFunc(info, func(s string) string { - s = strings.Replace(s, ".", "\".", 1) - return "@\"" + s - }) - default: - info = "type @\"\"." + obj.Name() + " " + typ.Type().String() - log.Fatalf("TypeName %T\n", tt) - } - default: - log.Fatalf("types %T\n", typ) - } - //info = `func @"".Create(name string)(param1 *@"os".File,param2 error)` - info = `func @"".Expand(s string,mapping func(string) string)(param1 string)` - log.Println(info) - if info != "" { - ar = append(ar, info) - } - } - ar = append(ar, "\n") - - return []byte(strings.Join(ar, "\n")) -} - -func (p *types_parser) parse_export(callback func(pkg string, decl ast.Decl)) { - if p.pkg == nil { - return - } - scope := p.pkg.Scope() - var pname = "!" + p.pfc.name + "!" + p.pkg.Name() - for _, name := range scope.Names() { - obj := scope.Lookup(name) - decl := objToAst(obj) - if decl == nil { - continue - } - callback(pname, decl) - } -} From a2ba3a9de348fd69245ee6c39d3720dcca4f8578 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 26 Jul 2018 10:47:36 +0800 Subject: [PATCH 011/133] update gocode --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f68b5ba..72119f55 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## An autocompletion daemon for the Go programming language -**IMPORTANT: consider switching to https://github.com/mdempsky/gocode if you have problems starting with Go version 1.10, due to changes in binary packages architecture (introduction of package cache) I'm not going to adjust gocode for it for quite some time. There is a higher chance that fork under the given link will have some solution to the problem sooner or later.** +Now support Go1.11 Go modules. Gocode is a helper tool which is intended to be integrated with your source code editor, like vim, neovim and emacs. It provides several advanced capabilities, which currently includes: From 12725f462772945a0284788d47b7f6edc2911f7c Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 27 Jul 2018 15:46:41 +0800 Subject: [PATCH 012/133] fix vendor parser --- gocode_test.go | 38 +++++++++++++++++++++++++++++++++++--- package.go | 29 +++++++++++++++-------------- package_types.go | 34 +++++++++++++++++++++++++--------- 3 files changed, 75 insertions(+), 26 deletions(-) diff --git a/gocode_test.go b/gocode_test.go index fd63aed9..01c4fee5 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -1,15 +1,47 @@ package main import ( + "fmt" "go/build" + "io/ioutil" + "os" "testing" ) func TestGocode(t *testing.T) { var ctx package_lookup_context ctx.Context = build.Default + dir, _ := os.Getwd() + bp, err := build.ImportDir(dir, build.FindOnly) + if err != nil { + return + } + ctx.CurrentPackagePath = bp.ImportPath + *g_debug = true - resolveKnownPackageIdent("fmt", "gocode.go", &ctx) - resolveKnownPackageIdent("os", "gocode.go", &ctx) - resolveKnownPackageIdent("http", "gocode.go", &ctx) + //resolveKnownPackageIdent("fmt", "gocode.go", &ctx) + //resolveKnownPackageIdent("os", "gocode.go", &ctx) + //resolveKnownPackageIdent("http", "gocode.go", &ctx) + //resolvePackageIdent("go/build", "gocode_test.go", &ctx) + //resolvePackageIdent("github.com/visualfc/gotools/pkg/srcimporter", "package_types.go", &ctx) + + declcache := new_decl_cache(&ctx) + pkgcache := new_package_cache() + autocomplete := new_auto_complete_context(pkgcache, declcache) + data, err := ioutil.ReadFile("package_types.go") + if err != nil { + t.Fatal(err) + } + ar, n := autocomplete.apropos(data, "./package_types.go", 359) + fmt.Println(ar, n) +} + +func resolvePackageIdent(importPath string, filename string, context *package_lookup_context) *package_file_cache { + path, ok := abs_path_for_package(filename, importPath, context) + if !ok { + return nil + } + p := new_package_file_cache(path, importPath) + p.update_cache() + return p } diff --git a/package.go b/package.go index 53773ff2..8485410e 100644 --- a/package.go +++ b/package.go @@ -101,15 +101,6 @@ func (m *package_file_cache) update_cache() { func (m *package_file_cache) process_package_data(data []byte, source bool) { m.scope = new_named_scope(g_universe_scope, m.name) - // find import section - if !source { - i := bytes.Index(data, []byte{'\n', '$', '$'}) - if i == -1 { - panic(fmt.Sprintf("Can't find the import section in the package file %s", m.name)) - } - data = data[i+len("\n$$"):] - } - // main package m.main = new_decl(m.name, decl_package, nil) // create map for other packages @@ -128,30 +119,40 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { } } } - tp.init(m.import_name, srcDir, m, true) + tp.initSource(m.import_name, srcDir, m) data = tp.exportData() if data == nil { + log.Println("error parser data source", m.import_name) return } var p gc_bin_parser p.init(data, m) pp = &p } else { - if data[0] == 'B' { + i := bytes.Index(data, []byte{'\n', '$', '$'}) + if i == -1 { + panic(fmt.Sprintf("Can't find the import section in the package file %s", m.name)) + } + offset := i + len("\n$$") + if data[offset] == 'B' { // binary format, skip 'B\n' - data = data[2:] - if data[0] == 'i' { + //data = data[2:] + if data[offset+2] == 'i' { var tp types_parser - tp.init(m.import_name, "", m, false) + tp.initData(m.import_name, data, m) data = tp.exportData() if data == nil { + log.Println("error parser data binary", m.import_name) return } + } else { + data = data[offset+2:] } var p gc_bin_parser p.init(data, m) pp = &p } else { + data = data[offset:] // textual format, find the beginning of the package clause i := bytes.Index(data, []byte{'p', 'a', 'c', 'k', 'a', 'g', 'e'}) if i == -1 { diff --git a/package_types.go b/package_types.go index 43e40b06..72a977b7 100644 --- a/package_types.go +++ b/package_types.go @@ -6,6 +6,7 @@ import ( "go/importer" "go/token" "go/types" + "io" "github.com/visualfc/gotools/pkg/srcimporter" "golang.org/x/tools/go/gcexportdata" @@ -16,20 +17,35 @@ type types_parser struct { pkg *types.Package } -func (p *types_parser) init(path string, dir string, pfc *package_file_cache, source bool) { - if source { - im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) - if dir != "" { - p.pkg, _ = im.ImportFrom(path, dir, 0) - } else { - p.pkg, _ = im.Import(path) - } +func (p *types_parser) initSource(path string, dir string, pfc *package_file_cache) { + im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) + if dir != "" { + p.pkg, _ = im.ImportFrom(path, dir, 0) } else { - p.pkg, _ = importer.Default().Import(path) + p.pkg, _ = im.Import(path) } p.pfc = pfc } +func (p *types_parser) initData(path string, data []byte, pfc *package_file_cache) { + p.pkg, _ = importer.For("gc", func(path string) (io.ReadCloser, error) { + return NewMemReadClose(data), nil + }).Import(path) + p.pfc = pfc +} + +type MemReadClose struct { + *bytes.Buffer +} + +func (m *MemReadClose) Close() error { + return nil +} + +func NewMemReadClose(data []byte) *MemReadClose { + return &MemReadClose{bytes.NewBuffer(data)} +} + func (p *types_parser) exportData() []byte { if p.pkg == nil { return nil From 01e40e736d9a8042f0d350eecef45f8df29d3f86 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 27 Jul 2018 16:32:58 +0800 Subject: [PATCH 013/133] package_file_cache add vendor_name --- cursorcontext.go | 4 ++-- declcache.go | 36 +++++++++++++++++++----------------- gocode_test.go | 8 ++++---- package.go | 22 ++++++++++++++-------- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/cursorcontext.go b/cursorcontext.go index 92c036b1..f77ebb7c 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -426,12 +426,12 @@ func resolveKnownPackageIdent(ident string, filename string, context *package_lo return nil } - path, ok := abs_path_for_package(filename, importPath, context) + path, vname, ok := abs_path_for_package(filename, importPath, context) if !ok { return nil } - p := new_package_file_cache(path, importPath) + p := new_package_file_cache(path, importPath, vname) p.update_cache() return p } diff --git a/declcache.go b/declcache.go index bfbe106d..1715a53f 100644 --- a/declcache.go +++ b/declcache.go @@ -22,6 +22,7 @@ type package_import struct { alias string abspath string path string + vpath string } // Parses import declarations until the first non-import declaration and fills @@ -33,9 +34,9 @@ func collect_package_imports(filename string, decls []ast.Decl, context *package for _, spec := range gd.Specs { imp := spec.(*ast.ImportSpec) path, alias := path_and_alias(imp) - abspath, ok := abs_path_for_package(filename, path, context) + abspath, vpath, ok := abs_path_for_package(filename, path, context) if ok && alias != "_" { - pi = append(pi, package_import{alias, abspath, path}) + pi = append(pi, package_import{alias, abspath, path, vpath}) } } } else { @@ -149,17 +150,17 @@ func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) { }) } -func abs_path_for_package(filename, p string, context *package_lookup_context) (string, bool) { +func abs_path_for_package(filename, p string, context *package_lookup_context) (string, string, bool) { dir, _ := filepath.Split(filename) if len(p) == 0 { - return "", false + return "", "", false } if p[0] == '.' { - return fmt.Sprintf("%s.a", filepath.Join(dir, p)), true + return fmt.Sprintf("%s.a", filepath.Join(dir, p)), "", true } pkg, ok := find_go_dag_package(p, dir) if ok { - return pkg, true + return pkg, "", true } return find_global_file(p, context) } @@ -282,14 +283,15 @@ func log_build_context(context *package_lookup_context) { // find_global_file returns the file path of the compiled package corresponding to the specified // import, and a boolean stating whether such path is valid. // TODO: Return only one value, possibly empty string if not found. -func find_global_file(imp string, context *package_lookup_context) (string, bool) { +// pkgpath, update importpath, bool +func find_global_file(imp string, context *package_lookup_context) (string, string, bool) { // gocode synthetically generates the builtin package // "unsafe", since the "unsafe.a" package doesn't really exist. // Thus, when the user request for the package "unsafe" we // would return synthetic global file that would be used // just as a key name to find this synthetic package if imp == "unsafe" { - return "unsafe", true + return "unsafe", "", true } pkgfile := fmt.Sprintf("%s.a", imp) @@ -300,14 +302,14 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool pkg_path := filepath.Join(p, pkgfile) if file_exists(pkg_path) { log_found_package_maybe(imp, pkg_path) - return pkg_path, true + return pkg_path, "", true } // Also check the relevant pkg/OS_ARCH dir for the libpath, if provided. pkgdir := fmt.Sprintf("%s_%s", context.GOOS, context.GOARCH) pkg_path = filepath.Join(p, "pkg", pkgdir, pkgfile) if file_exists(pkg_path) { log_found_package_maybe(imp, pkg_path) - return pkg_path, true + return pkg_path, "", true } } } @@ -322,7 +324,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool pkg_path := filepath.Join(pkgdir, pkgfile) if file_exists(pkg_path) { log_found_package_maybe(imp, pkg_path) - return pkg_path, true + return pkg_path, "", true } } @@ -352,7 +354,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool if !fi.IsDir() && filepath.Ext(fi.Name()) == ".a" { pkg_path := filepath.Join(root, impath, fi.Name()) log_found_package_maybe(imp, pkg_path) - return pkg_path, true + return pkg_path, "", true } } } @@ -376,8 +378,8 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool try_autobuild(p) if file_exists(p.PkgObj) { log_found_package_maybe(imp, p.PkgObj) - return p.PkgObj, true } + return p.PkgObj, p.ImportPath, true } if package_path == "" { break @@ -392,12 +394,12 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool } if g_daemon != nil && g_daemon.modList != nil { - pkg, _, _ := g_daemon.modList.LookupModule(imp) + pkg, path, _ := g_daemon.modList.LookupModule(imp) if pkg != nil { if *g_debug { log.Println("lookup module", pkg.Path, pkg.Dir) } - return imp, true + return imp, path, true } } @@ -405,8 +407,8 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool try_autobuild(p) if file_exists(p.PkgObj) { log_found_package_maybe(imp, p.PkgObj) - return p.PkgObj, true } + return p.PkgObj, "", true } if *g_debug { @@ -414,7 +416,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, bool log.Println("Gocode's build context is:") log_build_context(context) } - return "", false + return "", "", false } func package_name(file *ast.File) string { diff --git a/gocode_test.go b/gocode_test.go index 01c4fee5..b7ca8dd2 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -19,12 +19,12 @@ func TestGocode(t *testing.T) { ctx.CurrentPackagePath = bp.ImportPath *g_debug = true + g_config.Autobuild = false //resolveKnownPackageIdent("fmt", "gocode.go", &ctx) //resolveKnownPackageIdent("os", "gocode.go", &ctx) //resolveKnownPackageIdent("http", "gocode.go", &ctx) - //resolvePackageIdent("go/build", "gocode_test.go", &ctx) //resolvePackageIdent("github.com/visualfc/gotools/pkg/srcimporter", "package_types.go", &ctx) - + //return declcache := new_decl_cache(&ctx) pkgcache := new_package_cache() autocomplete := new_auto_complete_context(pkgcache, declcache) @@ -37,11 +37,11 @@ func TestGocode(t *testing.T) { } func resolvePackageIdent(importPath string, filename string, context *package_lookup_context) *package_file_cache { - path, ok := abs_path_for_package(filename, importPath, context) + pkg, vname, ok := abs_path_for_package(filename, importPath, context) if !ok { return nil } - p := new_package_file_cache(path, importPath) + p := new_package_file_cache(pkg, importPath, vname) p.update_cache() return p } diff --git a/package.go b/package.go index 8485410e..69508efe 100644 --- a/package.go +++ b/package.go @@ -23,6 +23,7 @@ type package_parser interface { type package_file_cache struct { name string // file name import_name string + vendor_name string mtime int64 defalias string @@ -31,10 +32,11 @@ type package_file_cache struct { others map[string]*decl } -func new_package_file_cache(absname, name string) *package_file_cache { +func new_package_file_cache(absname, name string, vname string) *package_file_cache { m := new(package_file_cache) m.name = absname m.import_name = name + m.vendor_name = vname m.mtime = 0 m.defalias = "" return m @@ -79,9 +81,6 @@ func (m *package_file_cache) update_cache() { fname := m.find_file() stat, err := os.Stat(fname) if err != nil { - if *g_debug { - log.Println("update cache source", m.import_name) - } m.process_package_data(nil, true) return } @@ -110,7 +109,7 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { if source { var tp types_parser var srcDir string - if g_daemon.modList != nil { + if g_daemon != nil && g_daemon.modList != nil { pkg, _, dir := g_daemon.modList.LookupModule(m.import_name) if pkg != nil { srcDir = dir @@ -119,10 +118,17 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { } } } - tp.initSource(m.import_name, srcDir, m) + importPath := m.import_name + if m.vendor_name != "" { + importPath = m.vendor_name + } + tp.initSource(importPath, srcDir, m) data = tp.exportData() + if *g_debug { + log.Printf("parser source %q %q\n", importPath, srcDir) + } if data == nil { - log.Println("error parser data source", m.import_name) + log.Println("error parser data source", importPath) return } var p gc_bin_parser @@ -266,7 +272,7 @@ func (c package_cache) append_packages(ps map[string]*package_file_cache, pkgs [ if mod, ok := c[m.abspath]; ok { ps[m.abspath] = mod } else { - mod = new_package_file_cache(m.abspath, m.path) + mod = new_package_file_cache(m.abspath, m.path, m.vpath) ps[m.abspath] = mod c[m.abspath] = mod } From df8d547f9eaae3b122a8c35d0d32f18ea75ea558 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 28 Jul 2018 06:02:47 +0800 Subject: [PATCH 014/133] import github.com/visualfc/types to parser source --- autocompletecontext.go | 17 ++++++++++---- cursorcontext.go | 4 ++-- gocode_test.go | 6 ++--- package.go | 14 ++++++------ package_types.go | 51 ++++++++++++++++++++++++++++++++++-------- 5 files changed, 67 insertions(+), 25 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index d5d4bc47..84be9a86 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "go/ast" + "go/build" "go/parser" "go/token" "log" @@ -12,7 +13,10 @@ import ( "runtime" "sort" "strings" + "sync" "time" + + pkgwalk "github.com/visualfc/gotools/types" ) //------------------------------------------------------------------------- @@ -153,6 +157,9 @@ type auto_complete_context struct { pcache package_cache // packages cache declcache *decl_cache // top-level declarations cache + fset *token.FileSet + walker *pkgwalk.PkgWalker + mutex sync.Mutex } func new_auto_complete_context(pcache package_cache, declcache *decl_cache) *auto_complete_context { @@ -160,6 +167,8 @@ func new_auto_complete_context(pcache package_cache, declcache *decl_cache) *aut c.current = new_auto_complete_file("", declcache.context) c.pcache = pcache c.declcache = declcache + c.fset = token.NewFileSet() + c.walker = pkgwalk.NewPkgWalker(&build.Default) return c } @@ -175,7 +184,7 @@ func (c *auto_complete_context) update_caches() { c.pcache.append_packages(ps, other.packages) } - update_packages(ps) + c.update_packages(ps) // fix imports for all files fixup_packages(c.current.filescope, c.current.packages, c.pcache) @@ -380,7 +389,7 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int if !ok { var d *decl if ident, ok := cc.expr.(*ast.Ident); ok && g_config.UnimportedPackages { - p := resolveKnownPackageIdent(ident.Name, c.current.name, c.current.context) + p := c.resolveKnownPackageIdent(ident.Name, c.current.name, c.current.context) if p != nil { c.pcache[p.name] = p d = p.main @@ -441,7 +450,7 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int return b.candidates, partial } -func update_packages(ps map[string]*package_file_cache) { +func (c *auto_complete_context) update_packages(ps map[string]*package_file_cache) { // initiate package cache update done := make(chan bool) for _, p := range ps { @@ -452,7 +461,7 @@ func update_packages(ps map[string]*package_file_cache) { done <- false } }() - p.update_cache() + p.update_cache(c) done <- true }(p) } diff --git a/cursorcontext.go b/cursorcontext.go index f77ebb7c..d3eef643 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -420,7 +420,7 @@ func (c *auto_complete_context) deduce_cursor_context(file []byte, cursor int) ( // package name has nothing to do with package file name, that's why we need to // scan the packages. And many of them will have conflicts. Can we make a smart // prediction algorithm which will prefer certain packages over another ones? -func resolveKnownPackageIdent(ident string, filename string, context *package_lookup_context) *package_file_cache { +func (c *auto_complete_context) resolveKnownPackageIdent(ident string, filename string, context *package_lookup_context) *package_file_cache { importPath, ok := knownPackageIdents[ident] if !ok { return nil @@ -432,7 +432,7 @@ func resolveKnownPackageIdent(ident string, filename string, context *package_lo } p := new_package_file_cache(path, importPath, vname) - p.update_cache() + p.update_cache(c) return p } diff --git a/gocode_test.go b/gocode_test.go index b7ca8dd2..413047f6 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -32,16 +32,16 @@ func TestGocode(t *testing.T) { if err != nil { t.Fatal(err) } - ar, n := autocomplete.apropos(data, "./package_types.go", 359) + ar, n := autocomplete.apropos(data, "./package_types.go", 714) fmt.Println(ar, n) } -func resolvePackageIdent(importPath string, filename string, context *package_lookup_context) *package_file_cache { +func resolvePackageIdent(importPath string, filename string, c *auto_complete_context, context *package_lookup_context) *package_file_cache { pkg, vname, ok := abs_path_for_package(filename, importPath, context) if !ok { return nil } p := new_package_file_cache(pkg, importPath, vname) - p.update_cache() + p.update_cache(c) return p } diff --git a/package.go b/package.go index 69508efe..4bdf7540 100644 --- a/package.go +++ b/package.go @@ -74,14 +74,14 @@ func (m *package_file_cache) find_file() string { return m.name } -func (m *package_file_cache) update_cache() { +func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.mtime == -1 { return } fname := m.find_file() stat, err := os.Stat(fname) if err != nil { - m.process_package_data(nil, true) + m.process_package_data(c, nil, true) return } @@ -93,11 +93,11 @@ func (m *package_file_cache) update_cache() { if err != nil { return } - m.process_package_data(data, false) + m.process_package_data(c, data, false) } } -func (m *package_file_cache) process_package_data(data []byte, source bool) { +func (m *package_file_cache) process_package_data(c *auto_complete_context, data []byte, source bool) { m.scope = new_named_scope(g_universe_scope, m.name) // main package @@ -122,7 +122,7 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { if m.vendor_name != "" { importPath = m.vendor_name } - tp.initSource(importPath, srcDir, m) + tp.initSource(importPath, srcDir, m, c) data = tp.exportData() if *g_debug { log.Printf("parser source %q %q\n", importPath, srcDir) @@ -145,7 +145,7 @@ func (m *package_file_cache) process_package_data(data []byte, source bool) { //data = data[2:] if data[offset+2] == 'i' { var tp types_parser - tp.initData(m.import_name, data, m) + tp.initData(m.import_name, data, m, c) data = tp.exportData() if data == nil { log.Println("error parser data binary", m.import_name) @@ -293,6 +293,6 @@ $$ func (c package_cache) add_builtin_unsafe_package() { pkg := new_package_file_cache_forever("unsafe", "unsafe") - pkg.process_package_data(g_builtin_unsafe_package, false) + pkg.process_package_data(nil, g_builtin_unsafe_package, false) c["unsafe"] = pkg } diff --git a/package_types.go b/package_types.go index 72a977b7..3916d0b4 100644 --- a/package_types.go +++ b/package_types.go @@ -2,13 +2,13 @@ package main import ( "bytes" - "go/build" "go/importer" "go/token" "go/types" "io" + "log" - "github.com/visualfc/gotools/pkg/srcimporter" + pkgwalk "github.com/visualfc/gotools/types" "golang.org/x/tools/go/gcexportdata" ) @@ -17,21 +17,54 @@ type types_parser struct { pkg *types.Package } -func (p *types_parser) initSource(path string, dir string, pfc *package_file_cache) { - im := srcimporter.New(&build.Default, token.NewFileSet(), make(map[string]*types.Package)) - if dir != "" { - p.pkg, _ = im.ImportFrom(path, dir, 0) - } else { - p.pkg, _ = im.Import(path) +func DefaultPkgConfig() *pkgwalk.PkgConfig { + conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} + // conf.Info = &types.Info{ + // Uses: make(map[*ast.Ident]types.Object), + // Defs: make(map[*ast.Ident]types.Object), + // Selections: make(map[*ast.SelectorExpr]*types.Selection), + // Types: make(map[ast.Expr]types.TypeAndValue), + // Scopes: make(map[ast.Node]*types.Scope), + // Implicits: make(map[ast.Node]types.Object), + // } + // conf.XInfo = &types.Info{ + // Uses: make(map[*ast.Ident]types.Object), + // Defs: make(map[*ast.Ident]types.Object), + // Selections: make(map[*ast.SelectorExpr]*types.Selection), + // Implicits: make(map[ast.Node]types.Object), + // } + return conf +} + +func (p *types_parser) initSource(path string, dir string, pfc *package_file_cache, c *auto_complete_context) { + //conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: false, WithTestFiles: true} + // conf.Info = &types.Info{} + // conf.XInfo = &types.Info{} + c.mutex.Lock() + defer c.mutex.Unlock() + conf := DefaultPkgConfig() + pkg, err := c.walker.Import(".", path, conf) + if err != nil { + log.Println(err) } + p.pkg = pkg + // im := srcimporter.New(&build.Default, c.fset, c.packages) + // if dir != "" { + // p.pkg, _ = im.ImportFrom(path, dir, 0) + // } else { + // p.pkg, _ = im.Import(path) + // } p.pfc = pfc } -func (p *types_parser) initData(path string, data []byte, pfc *package_file_cache) { +func (p *types_parser) initData(path string, data []byte, pfc *package_file_cache, c *auto_complete_context) { p.pkg, _ = importer.For("gc", func(path string) (io.ReadCloser, error) { return NewMemReadClose(data), nil }).Import(path) p.pfc = pfc + if p.pkg != nil { + c.walker.Imported[p.pkg.Path()] = p.pkg + } } type MemReadClose struct { From b9acfb2ee5218b66fce5ebba74a23bc03a7ab080 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 28 Jul 2018 09:30:03 +0800 Subject: [PATCH 015/133] pkgwalk parser --- autocompletecontext.go | 14 +++++++++++ gocode_test.go | 25 ++++++++++++++++++- package.go | 4 +-- package_types.go | 4 +-- server.go | 8 ++++++ .../visualfc/gotools/pkg/gomod/gomod.go | 13 ++++++++++ 6 files changed, 63 insertions(+), 5 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 84be9a86..2b1ab211 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -453,6 +453,20 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int func (c *auto_complete_context) update_packages(ps map[string]*package_file_cache) { // initiate package cache update done := make(chan bool) + /* + if g_daemon.modList != nil { + for _, r := range g_daemon.modList.Require { + for _, p := range ps { + path, _ := r.Check(p.import_name) + if path != "" { + conf := DefaultPkgConfig() + c.walker.ImportHelper(".", path, p.import_name, conf) + log.Println("-->", path) + } + } + } + } + */ for _, p := range ps { go func(p *package_file_cache) { defer func() { diff --git a/gocode_test.go b/gocode_test.go index 413047f6..dff994d6 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -4,11 +4,12 @@ import ( "fmt" "go/build" "io/ioutil" + "log" "os" "testing" ) -func TestGocode(t *testing.T) { +func _TestGocode(t *testing.T) { var ctx package_lookup_context ctx.Context = build.Default dir, _ := os.Getwd() @@ -36,6 +37,28 @@ func TestGocode(t *testing.T) { fmt.Println(ar, n) } +func TestModule(t *testing.T) { + *g_debug = true + + d := &daemon{} + d.pkgcache = new_package_cache() + d.declcache = new_decl_cache(&d.context) + d.autocomplete = new_auto_complete_context(d.pkgcache, d.declcache) + g_daemon = d + + ar, n := test_auto_complete(&build.Default, "./package_types.go", 1809) + //ar, n := test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 502) + fmt.Println(ar, n) +} + +func test_auto_complete(ctx *build.Context, filename string, pos int) (c []candidate, d int) { + data, err := ioutil.ReadFile(filename) + if err != nil { + log.Fatalln(err) + } + return server_auto_complete(data, filename, pos, pack_build_context(ctx)) +} + func resolvePackageIdent(importPath string, filename string, c *auto_complete_context, context *package_lookup_context) *package_file_cache { pkg, vname, ok := abs_path_for_package(filename, importPath, context) if !ok { diff --git a/package.go b/package.go index 4bdf7540..6b28ad77 100644 --- a/package.go +++ b/package.go @@ -114,7 +114,7 @@ func (m *package_file_cache) process_package_data(c *auto_complete_context, data if pkg != nil { srcDir = dir if *g_debug { - log.Println(m.import_name, srcDir) + log.Println("->", m.import_name, srcDir) } } } @@ -122,7 +122,7 @@ func (m *package_file_cache) process_package_data(c *auto_complete_context, data if m.vendor_name != "" { importPath = m.vendor_name } - tp.initSource(importPath, srcDir, m, c) + tp.initSource(m.import_name, importPath, srcDir, m, c) data = tp.exportData() if *g_debug { log.Printf("parser source %q %q\n", importPath, srcDir) diff --git a/package_types.go b/package_types.go index 3916d0b4..d56f2181 100644 --- a/package_types.go +++ b/package_types.go @@ -36,14 +36,14 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { return conf } -func (p *types_parser) initSource(path string, dir string, pfc *package_file_cache, c *auto_complete_context) { +func (p *types_parser) initSource(import_path string, path string, dir string, pfc *package_file_cache, c *auto_complete_context) { //conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: false, WithTestFiles: true} // conf.Info = &types.Info{} // conf.XInfo = &types.Info{} c.mutex.Lock() defer c.mutex.Unlock() conf := DefaultPkgConfig() - pkg, err := c.walker.Import(".", path, conf) + pkg, err := c.walker.ImportHelper(".", path, import_path, conf) if err != nil { log.Println(err) } diff --git a/server.go b/server.go index 3c4e4441..9891edbb 100644 --- a/server.go +++ b/server.go @@ -14,6 +14,7 @@ import ( "time" "github.com/visualfc/gotools/pkg/gomod" + pkgwalk "github.com/visualfc/gotools/types" ) func do_server() int { @@ -185,6 +186,13 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack log.Printf("Go project path not found: %s", err) } g_daemon.modList = gomod.LooupModList(filepath.Dir(filename)) + dir := filepath.Dir(filename) + conf := DefaultPkgConfig() + conf.Cursor = pkgwalk.NewFileCursor(filename, cursor) + if dir == "." { + dir, _ = os.Getwd() + } + g_daemon.autocomplete.walker.Import("", dir, conf) } if *g_debug { var buf bytes.Buffer diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 651ca691..2443b681 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -78,6 +78,19 @@ type Module struct { Replace *Module } +func (r *Module) Check(pkgname string) (path string, dir string) { + if strings.HasPrefix(pkgname, r.Path) { + addin := pkgname[len(r.Path):] + if r.Replace != nil { + path = makePath(r.Replace.Path, r.Dir, addin) + } else { + path = makePath(r.Path, r.Dir, addin) + } + return path, filepath.Join(r.Dir, addin) + } + return +} + func parseModuleJson(data []byte) ModuleList { var ms ModuleList var index int From aa1aaaef14ccace45e3c50eb938bef89cbf0920e Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 28 Jul 2018 12:56:02 +0800 Subject: [PATCH 016/133] fix lookup mod --- declcache.go | 8 +++++++- gocode_test.go | 2 +- server.go | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/declcache.go b/declcache.go index 1715a53f..75665c29 100644 --- a/declcache.go +++ b/declcache.go @@ -393,6 +393,12 @@ func find_global_file(imp string, context *package_lookup_context) (string, stri } } + for _, v := range g_daemon.autocomplete.walker.Imported { + if v.Path() == imp { + return imp, v.Path(), true + } + } + if g_daemon != nil && g_daemon.modList != nil { pkg, path, _ := g_daemon.modList.LookupModule(imp) if pkg != nil { @@ -408,7 +414,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, stri if file_exists(p.PkgObj) { log_found_package_maybe(imp, p.PkgObj) } - return p.PkgObj, "", true + return p.PkgObj, p.ImportPath, true } if *g_debug { diff --git a/gocode_test.go b/gocode_test.go index dff994d6..fc044e3b 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -38,7 +38,7 @@ func _TestGocode(t *testing.T) { } func TestModule(t *testing.T) { - *g_debug = true + //*g_debug = true d := &daemon{} d.pkgcache = new_package_cache() diff --git a/server.go b/server.go index 9891edbb..08a43c59 100644 --- a/server.go +++ b/server.go @@ -185,7 +185,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack } else if *g_debug { log.Printf("Go project path not found: %s", err) } - g_daemon.modList = gomod.LooupModList(filepath.Dir(filename)) + //g_daemon.modList = gomod.LooupModList(filepath.Dir(filename)) dir := filepath.Dir(filename) conf := DefaultPkgConfig() conf.Cursor = pkgwalk.NewFileCursor(filename, cursor) From a213f28f82d5c0707a2d3c920c18d8288be6be78 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 1 Aug 2018 21:16:42 +0800 Subject: [PATCH 017/133] fix pkgwalk context --- autocompletecontext.go | 21 +++--------- gocode_test.go | 33 +++++++++++++++--- package.go | 77 ++++++++++++++++++++++++++++++++++++++++++ package_types.go | 14 -------- server.go | 24 +++++++------ 5 files changed, 123 insertions(+), 46 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 2b1ab211..f58037d0 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "go/ast" - "go/build" "go/parser" "go/token" "log" @@ -159,16 +158,17 @@ type auto_complete_context struct { declcache *decl_cache // top-level declarations cache fset *token.FileSet walker *pkgwalk.PkgWalker + updated []string mutex sync.Mutex } -func new_auto_complete_context(pcache package_cache, declcache *decl_cache) *auto_complete_context { +func new_auto_complete_context(ctx *package_lookup_context, pcache package_cache, declcache *decl_cache) *auto_complete_context { c := new(auto_complete_context) c.current = new_auto_complete_file("", declcache.context) c.pcache = pcache c.declcache = declcache c.fset = token.NewFileSet() - c.walker = pkgwalk.NewPkgWalker(&build.Default) + c.walker = pkgwalk.NewPkgWalker(&ctx.Context) return c } @@ -453,20 +453,7 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int func (c *auto_complete_context) update_packages(ps map[string]*package_file_cache) { // initiate package cache update done := make(chan bool) - /* - if g_daemon.modList != nil { - for _, r := range g_daemon.modList.Require { - for _, p := range ps { - path, _ := r.Check(p.import_name) - if path != "" { - conf := DefaultPkgConfig() - c.walker.ImportHelper(".", path, p.import_name, conf) - log.Println("-->", path) - } - } - } - } - */ + for _, p := range ps { go func(p *package_file_cache) { defer func() { diff --git a/gocode_test.go b/gocode_test.go index fc044e3b..cdcd3abc 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -17,8 +17,8 @@ func _TestGocode(t *testing.T) { if err != nil { return } - ctx.CurrentPackagePath = bp.ImportPath + ctx.CurrentPackagePath = bp.ImportPath *g_debug = true g_config.Autobuild = false //resolveKnownPackageIdent("fmt", "gocode.go", &ctx) @@ -28,7 +28,7 @@ func _TestGocode(t *testing.T) { //return declcache := new_decl_cache(&ctx) pkgcache := new_package_cache() - autocomplete := new_auto_complete_context(pkgcache, declcache) + autocomplete := new_auto_complete_context(&ctx, pkgcache, declcache) data, err := ioutil.ReadFile("package_types.go") if err != nil { t.Fatal(err) @@ -37,18 +37,41 @@ func _TestGocode(t *testing.T) { fmt.Println(ar, n) } +func test1(a string) { + +} + func TestModule(t *testing.T) { //*g_debug = true d := &daemon{} d.pkgcache = new_package_cache() d.declcache = new_decl_cache(&d.context) - d.autocomplete = new_auto_complete_context(d.pkgcache, d.declcache) + d.autocomplete = new_auto_complete_context(&d.context, d.pkgcache, d.declcache) g_daemon = d - ar, n := test_auto_complete(&build.Default, "./package_types.go", 1809) - //ar, n := test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 502) + //ar, n := test_auto_complete(&build.Default, "./package_types.go", 1809) + //ar, n := test_auto_complete(&build.Default, "./server.go", 1443) + //test_auto_complete(&build.Default, "./server.go", 1443) + + //ar, n = + ar, n := test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 567) + for name, v := range d.autocomplete.walker.Imported { + log.Println(name, v.Path()) + } fmt.Println(ar, n) + //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) + //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) + //ar, n := test_auto_complete(&build.Default, "/Users/vfc/dev/liteide/liteidex/src/github.com/visualfc/gotools/main.go", 1449) + //fmt.Println(ar, n) + // p, up, _ := d.autocomplete.walker.Check("/Users/vfc/go/vtest", nil) + // log.Println(p, up) + // p, up, _ = d.autocomplete.walker.Check(".", nil) + // log.Println(p, up) +} + +func testv(a string) { + } func test_auto_complete(ctx *build.Context, filename string, pos int) (c []candidate, d int) { diff --git a/package.go b/package.go index 6b28ad77..6075a9fe 100644 --- a/package.go +++ b/package.go @@ -4,9 +4,13 @@ import ( "bytes" "fmt" "go/ast" + "go/token" + "go/types" "log" "os" "strings" + + "golang.org/x/tools/go/gcexportdata" ) type package_parser interface { @@ -74,10 +78,35 @@ func (m *package_file_cache) find_file() string { return m.name } +func checkMustUpdate(c *auto_complete_context, name string) bool { + for _, v := range c.updated { + if v == name { + return true + } + } + return false +} + func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.mtime == -1 { return } + + import_path := m.import_name + if m.vendor_name != "" { + import_path = m.vendor_name + } + if pkg := c.walker.Imported[import_path]; pkg != nil { + // if !checkMustUpdate(c, import_path) { + // } + if pkg.Name() == "" { + log.Println("error parser", import_path) + return + } + m.process_package_types(c, pkg) + return + } + fname := m.find_file() stat, err := os.Stat(fname) if err != nil { @@ -97,6 +126,54 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { } } +func (m *package_file_cache) process_package_types(c *auto_complete_context, pkg *types.Package) { + m.scope = new_named_scope(g_universe_scope, m.name) + + // main package + m.main = new_decl(m.name, decl_package, nil) + // create map for other packages + m.others = make(map[string]*decl) + + var pp package_parser + fset := token.NewFileSet() + var buf bytes.Buffer + gcexportdata.Write(&buf, fset, pkg) + var p gc_bin_parser + p.init(buf.Bytes(), m) + pp = &p + + prefix := "!" + m.name + "!" + pp.parse_export(func(pkg string, decl ast.Decl) { + anonymify_ast(decl, decl_foreign, m.scope) + if pkg == "" || strings.HasPrefix(pkg, prefix) { + // main package + add_ast_decl_to_package(m.main, decl, m.scope) + } else { + // others + if _, ok := m.others[pkg]; !ok { + m.others[pkg] = new_decl(pkg, decl_package, nil) + } + add_ast_decl_to_package(m.others[pkg], decl, m.scope) + } + }) + + // hack, add ourselves to the package scope + mainName := "!" + m.name + "!" + m.defalias + m.add_package_to_scope(mainName, m.name) + + // replace dummy package decls in package scope to actual packages + for key := range m.scope.entities { + if !strings.HasPrefix(key, "!") { + continue + } + pkg, ok := m.others[key] + if !ok && key == mainName { + pkg = m.main + } + m.scope.replace_decl(key, pkg) + } +} + func (m *package_file_cache) process_package_data(c *auto_complete_context, data []byte, source bool) { m.scope = new_named_scope(g_universe_scope, m.name) diff --git a/package_types.go b/package_types.go index d56f2181..54b140f3 100644 --- a/package_types.go +++ b/package_types.go @@ -19,20 +19,6 @@ type types_parser struct { func DefaultPkgConfig() *pkgwalk.PkgConfig { conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} - // conf.Info = &types.Info{ - // Uses: make(map[*ast.Ident]types.Object), - // Defs: make(map[*ast.Ident]types.Object), - // Selections: make(map[*ast.SelectorExpr]*types.Selection), - // Types: make(map[ast.Expr]types.TypeAndValue), - // Scopes: make(map[ast.Node]*types.Scope), - // Implicits: make(map[ast.Node]types.Object), - // } - // conf.XInfo = &types.Info{ - // Uses: make(map[*ast.Ident]types.Object), - // Defs: make(map[*ast.Ident]types.Object), - // Selections: make(map[*ast.SelectorExpr]*types.Selection), - // Implicits: make(map[ast.Node]types.Object), - // } return conf } diff --git a/server.go b/server.go index 08a43c59..45f07a2a 100644 --- a/server.go +++ b/server.go @@ -76,14 +76,14 @@ func new_daemon(network, address string) *daemon { d.cmd_in = make(chan int, 1) d.pkgcache = new_package_cache() d.declcache = new_decl_cache(&d.context) - d.autocomplete = new_auto_complete_context(d.pkgcache, d.declcache) + d.autocomplete = new_auto_complete_context(&d.context, d.pkgcache, d.declcache) return d } func (this *daemon) drop_cache() { this.pkgcache = new_package_cache() this.declcache = new_decl_cache(&this.context) - this.autocomplete = new_auto_complete_context(this.pkgcache, this.declcache) + this.autocomplete = new_auto_complete_context(&this.context, this.pkgcache, this.declcache) } const ( @@ -176,7 +176,11 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack case "go": // get current package path for GO15VENDOREXPERIMENT hack g_daemon.context.CurrentPackagePath = "" - pkg, err := g_daemon.context.ImportDir(filepath.Dir(filename), build.FindOnly) + dir := filepath.Dir(filename) + if dir == "." { + dir, _ = os.Getwd() + } + pkg, err := g_daemon.context.ImportDir(dir, build.FindOnly) if err == nil { if *g_debug { log.Printf("Go project path: %s", pkg.ImportPath) @@ -185,14 +189,14 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack } else if *g_debug { log.Printf("Go project path not found: %s", err) } - //g_daemon.modList = gomod.LooupModList(filepath.Dir(filename)) - dir := filepath.Dir(filename) + + //g_daemon.modList = gomod.LooupModList(dir) + conf := DefaultPkgConfig() - conf.Cursor = pkgwalk.NewFileCursor(filename, cursor) - if dir == "." { - dir, _ = os.Getwd() - } - g_daemon.autocomplete.walker.Import("", dir, conf) + conf.WithTestFiles = true + conf.Cursor = pkgwalk.NewFileCursor(file, filename, cursor) + _, g_daemon.autocomplete.updated, _ = g_daemon.autocomplete.walker.Check(dir, conf) + log.Println(g_daemon.autocomplete.updated) } if *g_debug { var buf bytes.Buffer From 227f3aa876173b261670de36b73632861bf9abad Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 2 Aug 2018 09:36:50 +0800 Subject: [PATCH 018/133] gocode, update mtime by pkgwalk --- autocompletecontext.go | 1 - gocode_test.go | 4 +--- package.go | 17 ++++++----------- server.go | 3 +-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index f58037d0..d3b06187 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -158,7 +158,6 @@ type auto_complete_context struct { declcache *decl_cache // top-level declarations cache fset *token.FileSet walker *pkgwalk.PkgWalker - updated []string mutex sync.Mutex } diff --git a/gocode_test.go b/gocode_test.go index cdcd3abc..c975113a 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -56,9 +56,7 @@ func TestModule(t *testing.T) { //ar, n = ar, n := test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 567) - for name, v := range d.autocomplete.walker.Imported { - log.Println(name, v.Path()) - } + test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 568) fmt.Println(ar, n) //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) diff --git a/package.go b/package.go index 6075a9fe..b392b62d 100644 --- a/package.go +++ b/package.go @@ -78,15 +78,6 @@ func (m *package_file_cache) find_file() string { return m.name } -func checkMustUpdate(c *auto_complete_context, name string) bool { - for _, v := range c.updated { - if v == name { - return true - } - } - return false -} - func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.mtime == -1 { return @@ -97,12 +88,16 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { import_path = m.vendor_name } if pkg := c.walker.Imported[import_path]; pkg != nil { - // if !checkMustUpdate(c, import_path) { - // } if pkg.Name() == "" { log.Println("error parser", import_path) return } + if t, ok := c.walker.ImportedMod[import_path]; ok { + if m.mtime == t { + return + } + m.mtime = t + } m.process_package_types(c, pkg) return } diff --git a/server.go b/server.go index 45f07a2a..ba89fd76 100644 --- a/server.go +++ b/server.go @@ -195,8 +195,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack conf := DefaultPkgConfig() conf.WithTestFiles = true conf.Cursor = pkgwalk.NewFileCursor(file, filename, cursor) - _, g_daemon.autocomplete.updated, _ = g_daemon.autocomplete.walker.Check(dir, conf) - log.Println(g_daemon.autocomplete.updated) + g_daemon.autocomplete.walker.Check(dir, conf) } if *g_debug { var buf bytes.Buffer From 173b4532437bfe43142d9af5b9538cfb83929c79 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 2 Aug 2018 10:49:59 +0800 Subject: [PATCH 019/133] clean vendor --- Godeps/Godeps.json | 28 +- declcache.go | 10 - package.go | 9 - server.go | 2 - .../visualfc/gotools/pkg/buildctx/context.go | 55 + .../visualfc/gotools/pkg/command/command.go | 317 + .../visualfc/gotools/pkg/command/version.go | 33 + .../visualfc/gotools/pkg/gomod/gomod.go | 13 - .../visualfc/gotools/pkg/pkgutil/pkgutil.go | 240 + .../visualfc/gotools/pkg/stdlib/go13.go | 19 + .../visualfc/gotools/pkg/stdlib/go14.go | 19 + .../visualfc/gotools/pkg/stdlib/mkpkglist.go | 173 + .../visualfc/gotools/pkg/stdlib/mkstdlib.go | 99 + .../visualfc/gotools/pkg/stdlib/pkglist.go | 49 + .../visualfc/gotools/pkg/stdlib/zstdlib.go | 9442 +++++++++++++++++ .../visualfc/gotools/types/types.go | 1403 +++ .../x/tools/go/buildutil/allpackages.go | 198 + .../x/tools/go/buildutil/fakecontext.go | 109 + .../x/tools/go/buildutil/overlay.go | 103 + .../golang.org/x/tools/go/buildutil/tags.go | 75 + .../golang.org/x/tools/go/buildutil/util.go | 212 + 21 files changed, 12572 insertions(+), 36 deletions(-) create mode 100644 vendor/github.com/visualfc/gotools/pkg/buildctx/context.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/command/command.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/command/version.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go create mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go create mode 100644 vendor/github.com/visualfc/gotools/types/types.go create mode 100644 vendor/golang.org/x/tools/go/buildutil/allpackages.go create mode 100644 vendor/golang.org/x/tools/go/buildutil/fakecontext.go create mode 100644 vendor/golang.org/x/tools/go/buildutil/overlay.go create mode 100644 vendor/golang.org/x/tools/go/buildutil/tags.go create mode 100644 vendor/golang.org/x/tools/go/buildutil/util.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index b797d254..90633fdf 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -6,13 +6,37 @@ "./..." ], "Deps": [ + { + "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkg/command", + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "3ba8efc2c3492ad53d9f0270709cff8fa0d3d822" + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "3ba8efc2c3492ad53d9f0270709cff8fa0d3d822" + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, + { + "ImportPath": "github.com/visualfc/gotools/types", + "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + }, + { + "ImportPath": "golang.org/x/tools/go/buildutil", + "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", diff --git a/declcache.go b/declcache.go index 75665c29..a3edf1ee 100644 --- a/declcache.go +++ b/declcache.go @@ -399,16 +399,6 @@ func find_global_file(imp string, context *package_lookup_context) (string, stri } } - if g_daemon != nil && g_daemon.modList != nil { - pkg, path, _ := g_daemon.modList.LookupModule(imp) - if pkg != nil { - if *g_debug { - log.Println("lookup module", pkg.Path, pkg.Dir) - } - return imp, path, true - } - } - if p, err := context.Import(imp, "", build.AllowBinary|build.FindOnly); err == nil { try_autobuild(p) if file_exists(p.PkgObj) { diff --git a/package.go b/package.go index b392b62d..3fbebed2 100644 --- a/package.go +++ b/package.go @@ -181,15 +181,6 @@ func (m *package_file_cache) process_package_data(c *auto_complete_context, data if source { var tp types_parser var srcDir string - if g_daemon != nil && g_daemon.modList != nil { - pkg, _, dir := g_daemon.modList.LookupModule(m.import_name) - if pkg != nil { - srcDir = dir - if *g_debug { - log.Println("->", m.import_name, srcDir) - } - } - } importPath := m.import_name if m.vendor_name != "" { importPath = m.vendor_name diff --git a/server.go b/server.go index ba89fd76..390b0ca1 100644 --- a/server.go +++ b/server.go @@ -13,7 +13,6 @@ import ( "runtime" "time" - "github.com/visualfc/gotools/pkg/gomod" pkgwalk "github.com/visualfc/gotools/types" ) @@ -61,7 +60,6 @@ type daemon struct { pkgcache package_cache declcache *decl_cache context package_lookup_context - modList *gomod.ModuleList } func new_daemon(network, address string) *daemon { diff --git a/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go b/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go new file mode 100644 index 00000000..4fbfe572 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go @@ -0,0 +1,55 @@ +// Copyright 2011-2018 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package buildctx + +import ( + "go/build" + "os" +) + +var ( + fnLookupEnv = os.LookupEnv +) + +func SetLookupEnv(fn func(key string) (string, bool)) { + if fn != nil { + fnLookupEnv = fn + } else { + fnLookupEnv = os.LookupEnv + } +} + +func Default() *build.Context { + return &build.Default +} + +func System() *build.Context { + return NewContext(fnLookupEnv) +} + +func NewContext(env func(key string) (string, bool)) *build.Context { + c := build.Default + if v, ok := env("GOARCH"); ok { + c.GOARCH = v + } + if v, ok := env("GOOS"); ok { + c.GOOS = v + } + if v, ok := env("GOROOT"); ok { + c.GOROOT = v + } + if v, ok := env("GOPATH"); ok { + c.GOPATH = v + } + if v, ok := env("CGO_ENABLED"); ok { + switch v { + case "1": + c.CgoEnabled = true + case "0": + c.CgoEnabled = false + } + } + return &c +} diff --git a/vendor/github.com/visualfc/gotools/pkg/command/command.go b/vendor/github.com/visualfc/gotools/pkg/command/command.go new file mode 100644 index 00000000..7007d224 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/command/command.go @@ -0,0 +1,317 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//modify 2013-2014 visualfc + +package command + +import ( + "bytes" + "flag" + "fmt" + "io" + "log" + "os" + "strings" + "text/template" + "unicode" + "unicode/utf8" +) + +// A Command is an implementation of a go command +// like go build or go fix. +type Command struct { + // Run runs the command. + // The args are the arguments after the command name. + Run func(cmd *Command, args []string) error + + // UsageLine is the one-line usage message. + // The first word in the line is taken to be the command name. + UsageLine string + + // Short is the short description shown in the 'go help' output. + Short string + + // Long is the long message shown in the 'go help ' output. + Long string + + // Flag is a set of flags specific to this command. + Flag flag.FlagSet + + // CustomFlags indicates that the command will do its own + // flag parsing. + CustomFlags bool + + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// Name returns the command's name: the first word in the usage line. +func (c *Command) Name() string { + name := c.UsageLine + i := strings.Index(name, " ") + if i >= 0 { + name = name[:i] + } + return name +} + +func (c *Command) Usage() { + fmt.Fprintf(c.Stderr, "usage: %s %s\n", AppName, c.UsageLine) + c.Flag.SetOutput(c.Stderr) + c.Flag.PrintDefaults() + //fmt.Fprintf(os.Stderr, "%s\n", strings.TrimSpace(c.Long)) + //os.Exit(2) +} + +func (c *Command) PrintUsage() { + fmt.Fprintf(c.Stderr, "usage: %s %s\n", AppName, c.UsageLine) + c.Flag.SetOutput(c.Stderr) + c.Flag.PrintDefaults() +} + +// Runnable reports whether the command can be run; otherwise +// it is a documentation pseudo-command such as importpath. +func (c *Command) Runnable() bool { + return c.Run != nil +} + +func (c *Command) Println(args ...interface{}) { + fmt.Fprintln(c.Stdout, args...) +} + +func (c *Command) Printf(format string, args ...interface{}) { + fmt.Fprintf(c.Stdout, format, args...) +} + +var commands []*Command + +func Register(cmd *Command) { + commands = append(commands, cmd) +} + +func CommandList() (cmds []string) { + for _, cmd := range commands { + cmds = append(cmds, cmd.Name()) + } + return +} + +var ( + Stdout io.Writer = os.Stdout + Stderr io.Writer = os.Stderr + Stdin io.Reader = os.Stdin +) + +func RunArgs(arguments []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error { + flag.CommandLine.VisitAll(func(f *flag.Flag) { + f.Value.Set(f.DefValue) + }) + flag.CommandLine.Parse(arguments) + args := flag.Args() + if len(args) < 1 { + printUsage(os.Stderr) + return os.ErrInvalid + } + + if len(args) == 1 && strings.TrimSpace(args[0]) == "" { + printUsage(os.Stderr) + return os.ErrInvalid + } + + if args[0] == "help" { + if !help(args[1:]) { + return os.ErrInvalid + } + return nil + } + + for _, cmd := range commands { + if cmd.Name() == args[0] && cmd.Run != nil { + cmd.Flag.VisitAll(func(f *flag.Flag) { + f.Value.Set(f.DefValue) + }) + cmd.Flag.Usage = func() { cmd.Usage() } + cmd.Stdin = stdin + cmd.Stdout = stdout + cmd.Stderr = stderr + if cmd.CustomFlags { + args = args[1:] + } else { + err := cmd.Flag.Parse(args[1:]) + if err != nil { + return err + } + args = cmd.Flag.Args() + } + return cmd.Run(cmd, args) + } + } + + fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n", + AppName, args[0], AppName) + return os.ErrInvalid +} + +func Main() { + flag.Usage = func() { + printUsage(os.Stderr) + } + flag.Parse() + log.SetFlags(0) + + args := flag.Args() + if len(args) < 1 { + flag.Usage() + Exit(2) + } + + if len(args) == 1 && strings.TrimSpace(args[0]) == "" { + flag.Usage() + Exit(2) + } + + if args[0] == "help" { + if !help(args[1:]) { + os.Exit(2) + } + return + } + + for _, cmd := range commands { + if cmd.Name() == args[0] && cmd.Run != nil { + cmd.Stdin = Stdin + cmd.Stdout = Stdout + cmd.Stderr = Stderr + if cmd.CustomFlags { + args = args[1:] + } else { + err := cmd.Flag.Parse(args[1:]) + if err != nil { + Exit(2) + } + args = cmd.Flag.Args() + } + cmd.Flag.Usage = func() { cmd.Usage() } + err := cmd.Run(cmd, args) + if err != nil { + fmt.Fprintln(cmd.Stderr, err) + Exit(2) + } + Exit(0) + return + } + } + + fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n", + AppName, args[0], AppName) + Exit(2) +} + +var AppInfo string = "LiteIDE golang tool." +var AppName string = "tools" + +var usageTemplate = ` +Usage: + + {{AppName}} command [arguments] + +The commands are: +{{range .}}{{if .Runnable}} + {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}} + +Use "{{AppName}} help [command]" for more information about a command. + +Additional help topics: +{{range .}}{{if not .Runnable}} + {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}} + +Use "{{AppName}} help [topic]" for more information about that topic. + +` + +var helpTemplate = `{{if .Runnable}}usage: {{AppName}} {{.UsageLine}} + +{{end}}{{.Long | trim}} +` + +var documentationTemplate = `// +/* +{{range .}}{{if .Short}}{{.Short | capitalize}} + +{{end}}{{if .Runnable}}Usage: + + {{AppName}} {{.UsageLine}} + +{{end}}{{.Long | trim}} + + +{{end}}*/ +package main +` + +// tmpl executes the given template text on data, writing the result to w. +func tmpl(w io.Writer, text string, data interface{}) { + t := template.New("top") + t.Funcs(template.FuncMap{"trim": strings.TrimSpace, "capitalize": capitalize}) + template.Must(t.Parse(text)) + if err := t.Execute(w, data); err != nil { + panic(err) + } +} + +func capitalize(s string) string { + if s == "" { + return s + } + r, n := utf8.DecodeRuneInString(s) + return string(unicode.ToTitle(r)) + s[n:] +} + +func printUsage(w io.Writer) { + if len(AppInfo) > 0 { + fmt.Fprintln(w, AppInfo) + } + tmpl(w, strings.Replace(usageTemplate, "{{AppName}}", AppName, -1), commands) +} + +// help implements the 'help' command. +func help(args []string) bool { + if len(args) == 0 { + printUsage(os.Stdout) + // not exit 2: succeeded at 'go help'. + return true + } + if len(args) != 1 { + fmt.Fprintf(os.Stderr, "usage: %s help command\n\nToo many arguments given.\n", AppName) + return false + } + + arg := args[0] + + // 'go help documentation' generates doc.go. + if arg == "documentation" { + buf := new(bytes.Buffer) + printUsage(buf) + usage := &Command{Long: buf.String()} + tmpl(os.Stdout, strings.Replace(documentationTemplate, "{{AppName}}", AppName, -1), append([]*Command{usage}, commands...)) + return false + } + + for _, cmd := range commands { + if cmd.Name() == arg { + tmpl(os.Stdout, strings.Replace(helpTemplate, "{{AppName}}", AppName, -1), cmd) + // not exit 2: succeeded at 'go help cmd'. + return true + } + } + + fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run '%s help'.\n", arg, AppName) + return false +} + +func Exit(code int) { + os.Exit(code) +} diff --git a/vendor/github.com/visualfc/gotools/pkg/command/version.go b/vendor/github.com/visualfc/gotools/pkg/command/version.go new file mode 100644 index 00000000..0a887809 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/command/version.go @@ -0,0 +1,33 @@ +// Copyright 2011-2015 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package command + +import ( + "os" + "runtime" +) + +func init() { + Register(cmdVersion) +} + +var AppVersion string = "1.0" + +var cmdVersion = &Command{ + Run: runVersion, + UsageLine: "version", + Short: "print tool version", + Long: `Version prints the version.`, +} + +func runVersion(cmd *Command, args []string) error { + if len(args) != 0 { + cmd.PrintUsage() + return os.ErrInvalid + } + + cmd.Printf("%s version %s [%s %s/%s]\n", AppName, AppVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH) + return nil +} diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 2443b681..651ca691 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -78,19 +78,6 @@ type Module struct { Replace *Module } -func (r *Module) Check(pkgname string) (path string, dir string) { - if strings.HasPrefix(pkgname, r.Path) { - addin := pkgname[len(r.Path):] - if r.Replace != nil { - path = makePath(r.Replace.Path, r.Dir, addin) - } else { - path = makePath(r.Path, r.Dir, addin) - } - return path, filepath.Join(r.Dir, addin) - } - return -} - func parseModuleJson(data []byte) ModuleList { var ms ModuleList var index int diff --git a/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go b/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go new file mode 100644 index 00000000..cbfa267c --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go @@ -0,0 +1,240 @@ +package pkgutil + +import ( + "fmt" + "go/build" + "io/ioutil" + "os" + "path/filepath" + "regexp" + "strings" +) + +//var go15VendorExperiment = os.Getenv("GO15VENDOREXPERIMENT") == "1" + +func IsVendorExperiment() bool { + return true +} + +// matchPattern(pattern)(name) reports whether +// name matches pattern. Pattern is a limited glob +// pattern in which '...' means 'any string' and there +// is no other special syntax. +func matchPattern(pattern string) func(name string) bool { + re := regexp.QuoteMeta(pattern) + re = strings.Replace(re, `\.\.\.`, `.*`, -1) + // Special case: foo/... matches foo too. + if strings.HasSuffix(re, `/.*`) { + re = re[:len(re)-len(`/.*`)] + `(/.*)?` + } + reg := regexp.MustCompile(`^` + re + `$`) + return func(name string) bool { + return reg.MatchString(name) + } +} + +// hasPathPrefix reports whether the path s begins with the +// elements in prefix. +func hasPathPrefix(s, prefix string) bool { + switch { + default: + return false + case len(s) == len(prefix): + return s == prefix + case len(s) > len(prefix): + if prefix != "" && prefix[len(prefix)-1] == '/' { + return strings.HasPrefix(s, prefix) + } + return s[len(prefix)] == '/' && s[:len(prefix)] == prefix + } +} + +// hasFilePathPrefix reports whether the filesystem path s begins with the +// elements in prefix. +func hasFilePathPrefix(s, prefix string) bool { + sv := strings.ToUpper(filepath.VolumeName(s)) + pv := strings.ToUpper(filepath.VolumeName(prefix)) + s = s[len(sv):] + prefix = prefix[len(pv):] + switch { + default: + return false + case sv != pv: + return false + case len(s) == len(prefix): + return s == prefix + case len(s) > len(prefix): + if prefix != "" && prefix[len(prefix)-1] == filepath.Separator { + return strings.HasPrefix(s, prefix) + } + return s[len(prefix)] == filepath.Separator && s[:len(prefix)] == prefix + } +} + +// treeCanMatchPattern(pattern)(name) reports whether +// name or children of name can possibly match pattern. +// Pattern is the same limited glob accepted by matchPattern. +func treeCanMatchPattern(pattern string) func(name string) bool { + wildCard := false + if i := strings.Index(pattern, "..."); i >= 0 { + wildCard = true + pattern = pattern[:i] + } + return func(name string) bool { + return len(name) <= len(pattern) && hasPathPrefix(pattern, name) || + wildCard && strings.HasPrefix(name, pattern) + } +} + +var isDirCache = map[string]bool{} + +func isDir(path string) bool { + result, ok := isDirCache[path] + if ok { + return result + } + + fi, err := os.Stat(path) + result = err == nil && fi.IsDir() + isDirCache[path] = result + return result +} + +type Package struct { + Root string + Dir string + ImportPath string +} + +func ImportFile(fileName string) *Package { + return ImportDir(filepath.Dir(fileName)) +} + +func ImportDir(dir string) *Package { + pkg, err := build.ImportDir(dir, build.FindOnly) + if err != nil { + return &Package{"", dir, ""} + } + return &Package{pkg.Root, pkg.Dir, pkg.ImportPath} +} + +func ImportDirEx(ctx *build.Context, dir string) *Package { + pkg, err := ctx.ImportDir(dir, build.FindOnly) + if err != nil { + return &Package{"", dir, ""} + } + return &Package{pkg.Root, pkg.Dir, pkg.ImportPath} +} + +// expandPath returns the symlink-expanded form of path. +func expandPath(p string) string { + x, err := filepath.EvalSymlinks(p) + if err == nil { + return x + } + return p +} + +// vendoredImportPath returns the expansion of path when it appears in parent. +// If parent is x/y/z, then path might expand to x/y/z/vendor/path, x/y/vendor/path, +// x/vendor/path, vendor/path, or else stay path if none of those exist. +// vendoredImportPath returns the expanded path or, if no expansion is found, the original. +func VendoredImportPath(parent *Package, path string) (found string, err error) { + if parent == nil || parent.Root == "" { + return path, nil + } + + dir := filepath.Clean(parent.Dir) + root := filepath.Join(parent.Root, "src") + if !hasFilePathPrefix(dir, root) { + // Look for symlinks before reporting error. + dir = expandPath(dir) + root = expandPath(root) + } + if !hasFilePathPrefix(dir, root) || len(dir) <= len(root) || dir[len(root)] != filepath.Separator { + return "", fmt.Errorf("invalid vendoredImportPath: dir=%q root=%q separator=%q", dir, root, string(filepath.Separator)) + } + + vpath := "vendor/" + path + for i := len(dir); i >= len(root); i-- { + if i < len(dir) && dir[i] != filepath.Separator { + continue + } + // Note: checking for the vendor directory before checking + // for the vendor/path directory helps us hit the + // isDir cache more often. It also helps us prepare a more useful + // list of places we looked, to report when an import is not found. + if !isDir(filepath.Join(dir[:i], "vendor")) { + continue + } + targ := filepath.Join(dir[:i], vpath) + if isDir(targ) && hasGoFiles(targ) { + importPath := parent.ImportPath + if importPath == "command-line-arguments" { + // If parent.ImportPath is 'command-line-arguments'. + // set to relative directory to root (also chopped root directory) + importPath = dir[len(root)+1:] + } + // We started with parent's dir c:\gopath\src\foo\bar\baz\quux\xyzzy. + // We know the import path for parent's dir. + // We chopped off some number of path elements and + // added vendor\path to produce c:\gopath\src\foo\bar\baz\vendor\path. + // Now we want to know the import path for that directory. + // Construct it by chopping the same number of path elements + // (actually the same number of bytes) from parent's import path + // and then append /vendor/path. + chopped := len(dir) - i + if chopped == len(importPath)+1 { + // We walked up from c:\gopath\src\foo\bar + // and found c:\gopath\src\vendor\path. + // We chopped \foo\bar (length 8) but the import path is "foo/bar" (length 7). + // Use "vendor/path" without any prefix. + return vpath, nil + } + return importPath[:len(importPath)-chopped] + "/" + vpath, nil + } + } + return path, nil +} + +// hasGoFiles reports whether dir contains any files with names ending in .go. +// For a vendor check we must exclude directories that contain no .go files. +// Otherwise it is not possible to vendor just a/b/c and still import the +// non-vendored a/b. See golang.org/issue/13832. +func hasGoFiles(dir string) bool { + fis, _ := ioutil.ReadDir(dir) + for _, fi := range fis { + if !fi.IsDir() && strings.HasSuffix(fi.Name(), ".go") { + return true + } + } + return false +} + +// findVendor looks for the last non-terminating "vendor" path element in the given import path. +// If there isn't one, findVendor returns ok=false. +// Otherwise, findVendor returns ok=true and the index of the "vendor". +// +// Note that terminating "vendor" elements don't count: "x/vendor" is its own package, +// not the vendored copy of an import "" (the empty import path). +// This will allow people to have packages or commands named vendor. +// This may help reduce breakage, or it may just be confusing. We'll see. +func findVendor(path string) (index int, ok bool) { + // Two cases, depending on internal at start of string or not. + // The order matters: we must return the index of the final element, + // because the final one is where the effective import path starts. + switch { + case strings.Contains(path, "/vendor/"): + return strings.LastIndex(path, "/vendor/") + 1, true + case strings.HasPrefix(path, "vendor/"): + return 0, true + } + return 0, false +} + +func VendorPathToImportPath(path string) string { + if i, ok := findVendor(path); ok { + return path[i+len("vendor/"):] + } + return path +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go new file mode 100644 index 00000000..d81ad917 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go @@ -0,0 +1,19 @@ +// +build !go1.4 + +package stdlib + +import ( + "go/build" + "os" + "path/filepath" +) + +func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) { + realpath := filepath.Join(context.GOROOT, "src", "pkg", path) + if _, err := os.Stat(realpath); err != nil { + realpath = filepath.Join(context.GOROOT, "src", path) + } + pkg, err := context.ImportDir(realpath, 0) + pkg.ImportPath = path + return pkg, err +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go new file mode 100644 index 00000000..9bd79d27 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go @@ -0,0 +1,19 @@ +// +build go1.4 + +package stdlib + +import ( + "go/build" + "os" + "path/filepath" +) + +func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) { + realpath := filepath.Join(context.GOROOT, "src", path) + if _, err := os.Stat(realpath); err != nil { + realpath = filepath.Join(context.GOROOT, "src/pkg", path) + } + pkg, err := context.ImportDir(realpath, 0) + pkg.ImportPath = path + return pkg, err +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go new file mode 100644 index 00000000..efe7a922 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go @@ -0,0 +1,173 @@ +// +build ignore + +package main + +import ( + "fmt" + "strings" +) + +var pkgList = ` +archive/tar +archive/zip +bufio +bytes +compress/bzip2 +compress/flate +compress/gzip +compress/lzw +compress/zlib +container/heap +container/list +container/ring +context +crypto +crypto/aes +crypto/cipher +crypto/des +crypto/dsa +crypto/ecdsa +crypto/elliptic +crypto/hmac +crypto/md5 +crypto/rand +crypto/rc4 +crypto/rsa +crypto/sha1 +crypto/sha256 +crypto/sha512 +crypto/subtle +crypto/tls +crypto/x509 +crypto/x509/pkix +database/sql +database/sql/driver +debug/dwarf +debug/elf +debug/gosym +debug/macho +debug/pe +debug/plan9obj +encoding +encoding/ascii85 +encoding/asn1 +encoding/base32 +encoding/base64 +encoding/binary +encoding/csv +encoding/gob +encoding/hex +encoding/json +encoding/pem +encoding/xml +errors +expvar +flag +fmt +go/ast +go/build +go/constant +go/doc +go/format +go/importer +go/parser +go/printer +go/scanner +go/token +go/types +hash +hash/adler32 +hash/crc32 +hash/crc64 +hash/fnv +html +html/template +image +image/color +image/color/palette +image/draw +image/gif +image/jpeg +image/png +index/suffixarray +io +io/ioutil +log +log/syslog +math +math/big +math/bits +math/cmplx +math/rand +mime +mime/multipart +mime/quotedprintable +net +net/http +net/http/cgi +net/http/cookiejar +net/http/fcgi +net/http/httptest +net/http/httptrace +net/http/httputil +net/http/pprof +net/mail +net/rpc +net/rpc/jsonrpc +net/smtp +net/textproto +net/url +os +os/exec +os/signal +os/user +path +path/filepath +plugin +reflect +regexp +regexp/syntax +runtime +runtime/cgo +runtime/debug +runtime/pprof +runtime/race +runtime/trace +sort +strconv +strings +sync +sync/atomic +syscall +testing +testing/iotest +testing/quick +text/scanner +text/tabwriter +text/template +text/template/parse +time +unicode +unicode/utf16 +unicode/utf8 +unsafe +` + +func main() { + //fmt.Println(pkgList) + var list []string + index := 0 + for _, v := range strings.Split(pkgList, "\n") { + v = strings.TrimSpace(v) + if v == "" { + continue + } + v = "\"" + v + "\"" + if index%4 == 0 && index != 0 { + v = "\n" + v + } + list = append(list, v) + index++ + } + fmt.Println(strings.Join(list, ",")) +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go new file mode 100644 index 00000000..2191f8d4 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go @@ -0,0 +1,99 @@ +// +build ignore + +// mkstdlib generates the zstdlib.go file, containing the Go standard +// library API symbols. It's baked into the binary to avoid scanning +// GOPATH in the common case. +package main + +import ( + "bufio" + "bytes" + "fmt" + "go/format" + "io" + "io/ioutil" + "log" + "os" + "path" + "path/filepath" + "regexp" + "sort" + "strings" +) + +func mustOpen(name string) io.Reader { + f, err := os.Open(name) + if err != nil { + log.Fatal(err) + } + return f +} + +func api(base string) string { + return filepath.Join(os.Getenv("GOROOT"), "api", base) +} + +var sym = regexp.MustCompile(`^pkg (\S+).*?, (?:var|func|type|const) ([A-Z]\w*)`) + +func main() { + var buf bytes.Buffer + outf := func(format string, args ...interface{}) { + fmt.Fprintf(&buf, format, args...) + } + outf("// AUTO-GENERATED BY mkstdlib.go\n\n") + outf("package stdlib\n") + outf("var Symbols = map[string]string{\n") + f := io.MultiReader( + mustOpen(api("go1.txt")), + mustOpen(api("go1.1.txt")), + mustOpen(api("go1.2.txt")), + mustOpen(api("go1.3.txt")), + mustOpen(api("go1.4.txt")), + mustOpen(api("go1.5.txt")), + mustOpen(api("go1.6.txt")), + mustOpen(api("go1.7.txt")), + mustOpen(api("go1.8.txt")), + mustOpen(api("go1.9.txt")), + ) + sc := bufio.NewScanner(f) + fullImport := map[string]string{} // "zip.NewReader" => "archive/zip" + ambiguous := map[string]bool{} + var keys []string + for sc.Scan() { + l := sc.Text() + has := func(v string) bool { return strings.Contains(l, v) } + if has("struct, ") || has("interface, ") || has(", method (") { + continue + } + if m := sym.FindStringSubmatch(l); m != nil { + full := m[1] + key := path.Base(full) + "." + m[2] + if exist, ok := fullImport[key]; ok { + if exist != full { + ambiguous[key] = true + } + } else { + fullImport[key] = full + keys = append(keys, key) + } + } + } + if err := sc.Err(); err != nil { + log.Fatal(err) + } + sort.Strings(keys) + for _, key := range keys { + if ambiguous[key] { + outf("\t// %q is ambiguous\n", key) + } else { + outf("\t%q: %q,\n", key, fullImport[key]) + } + } + outf("}\n") + fmtbuf, err := format.Source(buf.Bytes()) + if err != nil { + log.Fatal(err) + } + //os.Stdout.Write(fmtbuf) + ioutil.WriteFile("./zstdlib.go", fmtbuf, 0777) +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go new file mode 100644 index 00000000..da5e5790 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go @@ -0,0 +1,49 @@ +package stdlib + +var Packages = []string{ + "archive/tar", "archive/zip", "bufio", "bytes", + "compress/bzip2", "compress/flate", "compress/gzip", "compress/lzw", + "compress/zlib", "container/heap", "container/list", "container/ring", + "context", "crypto", "crypto/aes", "crypto/cipher", + "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/elliptic", + "crypto/hmac", "crypto/md5", "crypto/rand", "crypto/rc4", + "crypto/rsa", "crypto/sha1", "crypto/sha256", "crypto/sha512", + "crypto/subtle", "crypto/tls", "crypto/x509", "crypto/x509/pkix", + "database/sql", "database/sql/driver", "debug/dwarf", "debug/elf", + "debug/gosym", "debug/macho", "debug/pe", "debug/plan9obj", + "encoding", "encoding/ascii85", "encoding/asn1", "encoding/base32", + "encoding/base64", "encoding/binary", "encoding/csv", "encoding/gob", + "encoding/hex", "encoding/json", "encoding/pem", "encoding/xml", + "errors", "expvar", "flag", "fmt", + "go/ast", "go/build", "go/constant", "go/doc", + "go/format", "go/importer", "go/parser", "go/printer", + "go/scanner", "go/token", "go/types", "hash", + "hash/adler32", "hash/crc32", "hash/crc64", "hash/fnv", + "html", "html/template", "image", "image/color", + "image/color/palette", "image/draw", "image/gif", "image/jpeg", + "image/png", "index/suffixarray", "io", "io/ioutil", + "log", "log/syslog", "math", "math/big", + "math/bits", "math/cmplx", "math/rand", "mime", + "mime/multipart", "mime/quotedprintable", "net", "net/http", + "net/http/cgi", "net/http/cookiejar", "net/http/fcgi", "net/http/httptest", + "net/http/httptrace", "net/http/httputil", "net/http/pprof", "net/mail", + "net/rpc", "net/rpc/jsonrpc", "net/smtp", "net/textproto", + "net/url", "os", "os/exec", "os/signal", + "os/user", "path", "path/filepath", "plugin", + "reflect", "regexp", "regexp/syntax", "runtime", + "runtime/cgo", "runtime/debug", "runtime/pprof", "runtime/race", + "runtime/trace", "sort", "strconv", "strings", + "sync", "sync/atomic", "syscall", "testing", + "testing/iotest", "testing/quick", "text/scanner", "text/tabwriter", + "text/template", "text/template/parse", "time", "unicode", + "unicode/utf16", "unicode/utf8", "unsafe", +} + +func IsStdPkg(pkg string) bool { + for _, v := range Packages { + if v == pkg { + return true + } + } + return false +} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go new file mode 100644 index 00000000..633fb43a --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go @@ -0,0 +1,9442 @@ +// AUTO-GENERATED BY mkstdlib.go + +package stdlib + +var Symbols = map[string]string{ + "adler32.Checksum": "hash/adler32", + "adler32.New": "hash/adler32", + "adler32.Size": "hash/adler32", + "aes.BlockSize": "crypto/aes", + "aes.KeySizeError": "crypto/aes", + "aes.NewCipher": "crypto/aes", + "ascii85.CorruptInputError": "encoding/ascii85", + "ascii85.Decode": "encoding/ascii85", + "ascii85.Encode": "encoding/ascii85", + "ascii85.MaxEncodedLen": "encoding/ascii85", + "ascii85.NewDecoder": "encoding/ascii85", + "ascii85.NewEncoder": "encoding/ascii85", + "asn1.BitString": "encoding/asn1", + "asn1.ClassApplication": "encoding/asn1", + "asn1.ClassContextSpecific": "encoding/asn1", + "asn1.ClassPrivate": "encoding/asn1", + "asn1.ClassUniversal": "encoding/asn1", + "asn1.Enumerated": "encoding/asn1", + "asn1.Flag": "encoding/asn1", + "asn1.Marshal": "encoding/asn1", + "asn1.NullBytes": "encoding/asn1", + "asn1.NullRawValue": "encoding/asn1", + "asn1.ObjectIdentifier": "encoding/asn1", + "asn1.RawContent": "encoding/asn1", + "asn1.RawValue": "encoding/asn1", + "asn1.StructuralError": "encoding/asn1", + "asn1.SyntaxError": "encoding/asn1", + "asn1.TagBitString": "encoding/asn1", + "asn1.TagBoolean": "encoding/asn1", + "asn1.TagEnum": "encoding/asn1", + "asn1.TagGeneralString": "encoding/asn1", + "asn1.TagGeneralizedTime": "encoding/asn1", + "asn1.TagIA5String": "encoding/asn1", + "asn1.TagInteger": "encoding/asn1", + "asn1.TagNull": "encoding/asn1", + "asn1.TagOID": "encoding/asn1", + "asn1.TagOctetString": "encoding/asn1", + "asn1.TagPrintableString": "encoding/asn1", + "asn1.TagSequence": "encoding/asn1", + "asn1.TagSet": "encoding/asn1", + "asn1.TagT61String": "encoding/asn1", + "asn1.TagUTCTime": "encoding/asn1", + "asn1.TagUTF8String": "encoding/asn1", + "asn1.Unmarshal": "encoding/asn1", + "asn1.UnmarshalWithParams": "encoding/asn1", + "ast.ArrayType": "go/ast", + "ast.AssignStmt": "go/ast", + "ast.Bad": "go/ast", + "ast.BadDecl": "go/ast", + "ast.BadExpr": "go/ast", + "ast.BadStmt": "go/ast", + "ast.BasicLit": "go/ast", + "ast.BinaryExpr": "go/ast", + "ast.BlockStmt": "go/ast", + "ast.BranchStmt": "go/ast", + "ast.CallExpr": "go/ast", + "ast.CaseClause": "go/ast", + "ast.ChanDir": "go/ast", + "ast.ChanType": "go/ast", + "ast.CommClause": "go/ast", + "ast.Comment": "go/ast", + "ast.CommentGroup": "go/ast", + "ast.CommentMap": "go/ast", + "ast.CompositeLit": "go/ast", + "ast.Con": "go/ast", + "ast.DeclStmt": "go/ast", + "ast.DeferStmt": "go/ast", + "ast.Ellipsis": "go/ast", + "ast.EmptyStmt": "go/ast", + "ast.ExprStmt": "go/ast", + "ast.Field": "go/ast", + "ast.FieldFilter": "go/ast", + "ast.FieldList": "go/ast", + "ast.File": "go/ast", + "ast.FileExports": "go/ast", + "ast.Filter": "go/ast", + "ast.FilterDecl": "go/ast", + "ast.FilterFile": "go/ast", + "ast.FilterFuncDuplicates": "go/ast", + "ast.FilterImportDuplicates": "go/ast", + "ast.FilterPackage": "go/ast", + "ast.FilterUnassociatedComments": "go/ast", + "ast.ForStmt": "go/ast", + "ast.Fprint": "go/ast", + "ast.Fun": "go/ast", + "ast.FuncDecl": "go/ast", + "ast.FuncLit": "go/ast", + "ast.FuncType": "go/ast", + "ast.GenDecl": "go/ast", + "ast.GoStmt": "go/ast", + "ast.Ident": "go/ast", + "ast.IfStmt": "go/ast", + "ast.ImportSpec": "go/ast", + "ast.Importer": "go/ast", + "ast.IncDecStmt": "go/ast", + "ast.IndexExpr": "go/ast", + "ast.Inspect": "go/ast", + "ast.InterfaceType": "go/ast", + "ast.IsExported": "go/ast", + "ast.KeyValueExpr": "go/ast", + "ast.LabeledStmt": "go/ast", + "ast.Lbl": "go/ast", + "ast.MapType": "go/ast", + "ast.MergeMode": "go/ast", + "ast.MergePackageFiles": "go/ast", + "ast.NewCommentMap": "go/ast", + "ast.NewIdent": "go/ast", + "ast.NewObj": "go/ast", + "ast.NewPackage": "go/ast", + "ast.NewScope": "go/ast", + "ast.Node": "go/ast", + "ast.NotNilFilter": "go/ast", + "ast.ObjKind": "go/ast", + "ast.Object": "go/ast", + "ast.Package": "go/ast", + "ast.PackageExports": "go/ast", + "ast.ParenExpr": "go/ast", + "ast.Pkg": "go/ast", + "ast.Print": "go/ast", + "ast.RECV": "go/ast", + "ast.RangeStmt": "go/ast", + "ast.ReturnStmt": "go/ast", + "ast.SEND": "go/ast", + "ast.Scope": "go/ast", + "ast.SelectStmt": "go/ast", + "ast.SelectorExpr": "go/ast", + "ast.SendStmt": "go/ast", + "ast.SliceExpr": "go/ast", + "ast.SortImports": "go/ast", + "ast.StarExpr": "go/ast", + "ast.StructType": "go/ast", + "ast.SwitchStmt": "go/ast", + "ast.Typ": "go/ast", + "ast.TypeAssertExpr": "go/ast", + "ast.TypeSpec": "go/ast", + "ast.TypeSwitchStmt": "go/ast", + "ast.UnaryExpr": "go/ast", + "ast.ValueSpec": "go/ast", + "ast.Var": "go/ast", + "ast.Visitor": "go/ast", + "ast.Walk": "go/ast", + "atomic.AddInt32": "sync/atomic", + "atomic.AddInt64": "sync/atomic", + "atomic.AddUint32": "sync/atomic", + "atomic.AddUint64": "sync/atomic", + "atomic.AddUintptr": "sync/atomic", + "atomic.CompareAndSwapInt32": "sync/atomic", + "atomic.CompareAndSwapInt64": "sync/atomic", + "atomic.CompareAndSwapPointer": "sync/atomic", + "atomic.CompareAndSwapUint32": "sync/atomic", + "atomic.CompareAndSwapUint64": "sync/atomic", + "atomic.CompareAndSwapUintptr": "sync/atomic", + "atomic.LoadInt32": "sync/atomic", + "atomic.LoadInt64": "sync/atomic", + "atomic.LoadPointer": "sync/atomic", + "atomic.LoadUint32": "sync/atomic", + "atomic.LoadUint64": "sync/atomic", + "atomic.LoadUintptr": "sync/atomic", + "atomic.StoreInt32": "sync/atomic", + "atomic.StoreInt64": "sync/atomic", + "atomic.StorePointer": "sync/atomic", + "atomic.StoreUint32": "sync/atomic", + "atomic.StoreUint64": "sync/atomic", + "atomic.StoreUintptr": "sync/atomic", + "atomic.SwapInt32": "sync/atomic", + "atomic.SwapInt64": "sync/atomic", + "atomic.SwapPointer": "sync/atomic", + "atomic.SwapUint32": "sync/atomic", + "atomic.SwapUint64": "sync/atomic", + "atomic.SwapUintptr": "sync/atomic", + "atomic.Value": "sync/atomic", + "base32.CorruptInputError": "encoding/base32", + "base32.Encoding": "encoding/base32", + "base32.HexEncoding": "encoding/base32", + "base32.NewDecoder": "encoding/base32", + "base32.NewEncoder": "encoding/base32", + "base32.NewEncoding": "encoding/base32", + "base32.NoPadding": "encoding/base32", + "base32.StdEncoding": "encoding/base32", + "base32.StdPadding": "encoding/base32", + "base64.CorruptInputError": "encoding/base64", + "base64.Encoding": "encoding/base64", + "base64.NewDecoder": "encoding/base64", + "base64.NewEncoder": "encoding/base64", + "base64.NewEncoding": "encoding/base64", + "base64.NoPadding": "encoding/base64", + "base64.RawStdEncoding": "encoding/base64", + "base64.RawURLEncoding": "encoding/base64", + "base64.StdEncoding": "encoding/base64", + "base64.StdPadding": "encoding/base64", + "base64.URLEncoding": "encoding/base64", + "big.Above": "math/big", + "big.Accuracy": "math/big", + "big.AwayFromZero": "math/big", + "big.Below": "math/big", + "big.ErrNaN": "math/big", + "big.Exact": "math/big", + "big.Float": "math/big", + "big.Int": "math/big", + "big.Jacobi": "math/big", + "big.MaxBase": "math/big", + "big.MaxExp": "math/big", + "big.MaxPrec": "math/big", + "big.MinExp": "math/big", + "big.NewFloat": "math/big", + "big.NewInt": "math/big", + "big.NewRat": "math/big", + "big.ParseFloat": "math/big", + "big.Rat": "math/big", + "big.RoundingMode": "math/big", + "big.ToNearestAway": "math/big", + "big.ToNearestEven": "math/big", + "big.ToNegativeInf": "math/big", + "big.ToPositiveInf": "math/big", + "big.ToZero": "math/big", + "big.Word": "math/big", + "binary.BigEndian": "encoding/binary", + "binary.ByteOrder": "encoding/binary", + "binary.LittleEndian": "encoding/binary", + "binary.MaxVarintLen16": "encoding/binary", + "binary.MaxVarintLen32": "encoding/binary", + "binary.MaxVarintLen64": "encoding/binary", + "binary.PutUvarint": "encoding/binary", + "binary.PutVarint": "encoding/binary", + "binary.Read": "encoding/binary", + "binary.ReadUvarint": "encoding/binary", + "binary.ReadVarint": "encoding/binary", + "binary.Size": "encoding/binary", + "binary.Uvarint": "encoding/binary", + "binary.Varint": "encoding/binary", + "binary.Write": "encoding/binary", + "bits.LeadingZeros": "math/bits", + "bits.LeadingZeros16": "math/bits", + "bits.LeadingZeros32": "math/bits", + "bits.LeadingZeros64": "math/bits", + "bits.LeadingZeros8": "math/bits", + "bits.Len": "math/bits", + "bits.Len16": "math/bits", + "bits.Len32": "math/bits", + "bits.Len64": "math/bits", + "bits.Len8": "math/bits", + "bits.OnesCount": "math/bits", + "bits.OnesCount16": "math/bits", + "bits.OnesCount32": "math/bits", + "bits.OnesCount64": "math/bits", + "bits.OnesCount8": "math/bits", + "bits.Reverse": "math/bits", + "bits.Reverse16": "math/bits", + "bits.Reverse32": "math/bits", + "bits.Reverse64": "math/bits", + "bits.Reverse8": "math/bits", + "bits.ReverseBytes": "math/bits", + "bits.ReverseBytes16": "math/bits", + "bits.ReverseBytes32": "math/bits", + "bits.ReverseBytes64": "math/bits", + "bits.RotateLeft": "math/bits", + "bits.RotateLeft16": "math/bits", + "bits.RotateLeft32": "math/bits", + "bits.RotateLeft64": "math/bits", + "bits.RotateLeft8": "math/bits", + "bits.TrailingZeros": "math/bits", + "bits.TrailingZeros16": "math/bits", + "bits.TrailingZeros32": "math/bits", + "bits.TrailingZeros64": "math/bits", + "bits.TrailingZeros8": "math/bits", + "bits.UintSize": "math/bits", + "bufio.ErrAdvanceTooFar": "bufio", + "bufio.ErrBufferFull": "bufio", + "bufio.ErrFinalToken": "bufio", + "bufio.ErrInvalidUnreadByte": "bufio", + "bufio.ErrInvalidUnreadRune": "bufio", + "bufio.ErrNegativeAdvance": "bufio", + "bufio.ErrNegativeCount": "bufio", + "bufio.ErrTooLong": "bufio", + "bufio.MaxScanTokenSize": "bufio", + "bufio.NewReadWriter": "bufio", + "bufio.NewReader": "bufio", + "bufio.NewReaderSize": "bufio", + "bufio.NewScanner": "bufio", + "bufio.NewWriter": "bufio", + "bufio.NewWriterSize": "bufio", + "bufio.ReadWriter": "bufio", + "bufio.Reader": "bufio", + "bufio.ScanBytes": "bufio", + "bufio.ScanLines": "bufio", + "bufio.ScanRunes": "bufio", + "bufio.ScanWords": "bufio", + "bufio.Scanner": "bufio", + "bufio.SplitFunc": "bufio", + "bufio.Writer": "bufio", + "build.AllowBinary": "go/build", + "build.ArchChar": "go/build", + "build.Context": "go/build", + "build.Default": "go/build", + "build.FindOnly": "go/build", + "build.IgnoreVendor": "go/build", + "build.Import": "go/build", + "build.ImportComment": "go/build", + "build.ImportDir": "go/build", + "build.ImportMode": "go/build", + "build.IsLocalImport": "go/build", + "build.MultiplePackageError": "go/build", + "build.NoGoError": "go/build", + "build.Package": "go/build", + "build.ToolDir": "go/build", + "bytes.Buffer": "bytes", + "bytes.Compare": "bytes", + "bytes.Contains": "bytes", + "bytes.ContainsAny": "bytes", + "bytes.ContainsRune": "bytes", + "bytes.Count": "bytes", + "bytes.Equal": "bytes", + "bytes.EqualFold": "bytes", + "bytes.ErrTooLarge": "bytes", + "bytes.Fields": "bytes", + "bytes.FieldsFunc": "bytes", + "bytes.HasPrefix": "bytes", + "bytes.HasSuffix": "bytes", + "bytes.Index": "bytes", + "bytes.IndexAny": "bytes", + "bytes.IndexByte": "bytes", + "bytes.IndexFunc": "bytes", + "bytes.IndexRune": "bytes", + "bytes.Join": "bytes", + "bytes.LastIndex": "bytes", + "bytes.LastIndexAny": "bytes", + "bytes.LastIndexByte": "bytes", + "bytes.LastIndexFunc": "bytes", + "bytes.Map": "bytes", + "bytes.MinRead": "bytes", + "bytes.NewBuffer": "bytes", + "bytes.NewBufferString": "bytes", + "bytes.NewReader": "bytes", + "bytes.Reader": "bytes", + "bytes.Repeat": "bytes", + "bytes.Replace": "bytes", + "bytes.Runes": "bytes", + "bytes.Split": "bytes", + "bytes.SplitAfter": "bytes", + "bytes.SplitAfterN": "bytes", + "bytes.SplitN": "bytes", + "bytes.Title": "bytes", + "bytes.ToLower": "bytes", + "bytes.ToLowerSpecial": "bytes", + "bytes.ToTitle": "bytes", + "bytes.ToTitleSpecial": "bytes", + "bytes.ToUpper": "bytes", + "bytes.ToUpperSpecial": "bytes", + "bytes.Trim": "bytes", + "bytes.TrimFunc": "bytes", + "bytes.TrimLeft": "bytes", + "bytes.TrimLeftFunc": "bytes", + "bytes.TrimPrefix": "bytes", + "bytes.TrimRight": "bytes", + "bytes.TrimRightFunc": "bytes", + "bytes.TrimSpace": "bytes", + "bytes.TrimSuffix": "bytes", + "bzip2.NewReader": "compress/bzip2", + "bzip2.StructuralError": "compress/bzip2", + "cgi.Handler": "net/http/cgi", + "cgi.Request": "net/http/cgi", + "cgi.RequestFromMap": "net/http/cgi", + "cgi.Serve": "net/http/cgi", + "cipher.AEAD": "crypto/cipher", + "cipher.Block": "crypto/cipher", + "cipher.BlockMode": "crypto/cipher", + "cipher.NewCBCDecrypter": "crypto/cipher", + "cipher.NewCBCEncrypter": "crypto/cipher", + "cipher.NewCFBDecrypter": "crypto/cipher", + "cipher.NewCFBEncrypter": "crypto/cipher", + "cipher.NewCTR": "crypto/cipher", + "cipher.NewGCM": "crypto/cipher", + "cipher.NewGCMWithNonceSize": "crypto/cipher", + "cipher.NewOFB": "crypto/cipher", + "cipher.Stream": "crypto/cipher", + "cipher.StreamReader": "crypto/cipher", + "cipher.StreamWriter": "crypto/cipher", + "cmplx.Abs": "math/cmplx", + "cmplx.Acos": "math/cmplx", + "cmplx.Acosh": "math/cmplx", + "cmplx.Asin": "math/cmplx", + "cmplx.Asinh": "math/cmplx", + "cmplx.Atan": "math/cmplx", + "cmplx.Atanh": "math/cmplx", + "cmplx.Conj": "math/cmplx", + "cmplx.Cos": "math/cmplx", + "cmplx.Cosh": "math/cmplx", + "cmplx.Cot": "math/cmplx", + "cmplx.Exp": "math/cmplx", + "cmplx.Inf": "math/cmplx", + "cmplx.IsInf": "math/cmplx", + "cmplx.IsNaN": "math/cmplx", + "cmplx.Log": "math/cmplx", + "cmplx.Log10": "math/cmplx", + "cmplx.NaN": "math/cmplx", + "cmplx.Phase": "math/cmplx", + "cmplx.Polar": "math/cmplx", + "cmplx.Pow": "math/cmplx", + "cmplx.Rect": "math/cmplx", + "cmplx.Sin": "math/cmplx", + "cmplx.Sinh": "math/cmplx", + "cmplx.Sqrt": "math/cmplx", + "cmplx.Tan": "math/cmplx", + "cmplx.Tanh": "math/cmplx", + "color.Alpha": "image/color", + "color.Alpha16": "image/color", + "color.Alpha16Model": "image/color", + "color.AlphaModel": "image/color", + "color.Black": "image/color", + "color.CMYK": "image/color", + "color.CMYKModel": "image/color", + "color.CMYKToRGB": "image/color", + "color.Color": "image/color", + "color.Gray": "image/color", + "color.Gray16": "image/color", + "color.Gray16Model": "image/color", + "color.GrayModel": "image/color", + "color.Model": "image/color", + "color.ModelFunc": "image/color", + "color.NRGBA": "image/color", + "color.NRGBA64": "image/color", + "color.NRGBA64Model": "image/color", + "color.NRGBAModel": "image/color", + "color.NYCbCrA": "image/color", + "color.NYCbCrAModel": "image/color", + "color.Opaque": "image/color", + "color.Palette": "image/color", + "color.RGBA": "image/color", + "color.RGBA64": "image/color", + "color.RGBA64Model": "image/color", + "color.RGBAModel": "image/color", + "color.RGBToCMYK": "image/color", + "color.RGBToYCbCr": "image/color", + "color.Transparent": "image/color", + "color.White": "image/color", + "color.YCbCr": "image/color", + "color.YCbCrModel": "image/color", + "color.YCbCrToRGB": "image/color", + "constant.BinaryOp": "go/constant", + "constant.BitLen": "go/constant", + "constant.Bool": "go/constant", + "constant.BoolVal": "go/constant", + "constant.Bytes": "go/constant", + "constant.Compare": "go/constant", + "constant.Complex": "go/constant", + "constant.Denom": "go/constant", + "constant.Float": "go/constant", + "constant.Float32Val": "go/constant", + "constant.Float64Val": "go/constant", + "constant.Imag": "go/constant", + "constant.Int": "go/constant", + "constant.Int64Val": "go/constant", + "constant.Kind": "go/constant", + "constant.MakeBool": "go/constant", + "constant.MakeFloat64": "go/constant", + "constant.MakeFromBytes": "go/constant", + "constant.MakeFromLiteral": "go/constant", + "constant.MakeImag": "go/constant", + "constant.MakeInt64": "go/constant", + "constant.MakeString": "go/constant", + "constant.MakeUint64": "go/constant", + "constant.MakeUnknown": "go/constant", + "constant.Num": "go/constant", + "constant.Real": "go/constant", + "constant.Shift": "go/constant", + "constant.Sign": "go/constant", + "constant.String": "go/constant", + "constant.StringVal": "go/constant", + "constant.ToComplex": "go/constant", + "constant.ToFloat": "go/constant", + "constant.ToInt": "go/constant", + "constant.Uint64Val": "go/constant", + "constant.UnaryOp": "go/constant", + "constant.Unknown": "go/constant", + "context.Background": "context", + "context.CancelFunc": "context", + "context.Canceled": "context", + "context.Context": "context", + "context.DeadlineExceeded": "context", + "context.TODO": "context", + "context.WithCancel": "context", + "context.WithDeadline": "context", + "context.WithTimeout": "context", + "context.WithValue": "context", + "cookiejar.Jar": "net/http/cookiejar", + "cookiejar.New": "net/http/cookiejar", + "cookiejar.Options": "net/http/cookiejar", + "cookiejar.PublicSuffixList": "net/http/cookiejar", + "crc32.Castagnoli": "hash/crc32", + "crc32.Checksum": "hash/crc32", + "crc32.ChecksumIEEE": "hash/crc32", + "crc32.IEEE": "hash/crc32", + "crc32.IEEETable": "hash/crc32", + "crc32.Koopman": "hash/crc32", + "crc32.MakeTable": "hash/crc32", + "crc32.New": "hash/crc32", + "crc32.NewIEEE": "hash/crc32", + "crc32.Size": "hash/crc32", + "crc32.Table": "hash/crc32", + "crc32.Update": "hash/crc32", + "crc64.Checksum": "hash/crc64", + "crc64.ECMA": "hash/crc64", + "crc64.ISO": "hash/crc64", + "crc64.MakeTable": "hash/crc64", + "crc64.New": "hash/crc64", + "crc64.Size": "hash/crc64", + "crc64.Table": "hash/crc64", + "crc64.Update": "hash/crc64", + "crypto.BLAKE2b_256": "crypto", + "crypto.BLAKE2b_384": "crypto", + "crypto.BLAKE2b_512": "crypto", + "crypto.BLAKE2s_256": "crypto", + "crypto.Decrypter": "crypto", + "crypto.DecrypterOpts": "crypto", + "crypto.Hash": "crypto", + "crypto.MD4": "crypto", + "crypto.MD5": "crypto", + "crypto.MD5SHA1": "crypto", + "crypto.PrivateKey": "crypto", + "crypto.PublicKey": "crypto", + "crypto.RIPEMD160": "crypto", + "crypto.RegisterHash": "crypto", + "crypto.SHA1": "crypto", + "crypto.SHA224": "crypto", + "crypto.SHA256": "crypto", + "crypto.SHA384": "crypto", + "crypto.SHA3_224": "crypto", + "crypto.SHA3_256": "crypto", + "crypto.SHA3_384": "crypto", + "crypto.SHA3_512": "crypto", + "crypto.SHA512": "crypto", + "crypto.SHA512_224": "crypto", + "crypto.SHA512_256": "crypto", + "crypto.Signer": "crypto", + "crypto.SignerOpts": "crypto", + "csv.ErrBareQuote": "encoding/csv", + "csv.ErrFieldCount": "encoding/csv", + "csv.ErrQuote": "encoding/csv", + "csv.ErrTrailingComma": "encoding/csv", + "csv.NewReader": "encoding/csv", + "csv.NewWriter": "encoding/csv", + "csv.ParseError": "encoding/csv", + "csv.Reader": "encoding/csv", + "csv.Writer": "encoding/csv", + "debug.FreeOSMemory": "runtime/debug", + "debug.GCStats": "runtime/debug", + "debug.PrintStack": "runtime/debug", + "debug.ReadGCStats": "runtime/debug", + "debug.SetGCPercent": "runtime/debug", + "debug.SetMaxStack": "runtime/debug", + "debug.SetMaxThreads": "runtime/debug", + "debug.SetPanicOnFault": "runtime/debug", + "debug.SetTraceback": "runtime/debug", + "debug.Stack": "runtime/debug", + "debug.WriteHeapDump": "runtime/debug", + "des.BlockSize": "crypto/des", + "des.KeySizeError": "crypto/des", + "des.NewCipher": "crypto/des", + "des.NewTripleDESCipher": "crypto/des", + "doc.AllDecls": "go/doc", + "doc.AllMethods": "go/doc", + "doc.Example": "go/doc", + "doc.Examples": "go/doc", + "doc.Filter": "go/doc", + "doc.Func": "go/doc", + "doc.IllegalPrefixes": "go/doc", + "doc.IsPredeclared": "go/doc", + "doc.Mode": "go/doc", + "doc.New": "go/doc", + "doc.Note": "go/doc", + "doc.Package": "go/doc", + "doc.Synopsis": "go/doc", + "doc.ToHTML": "go/doc", + "doc.ToText": "go/doc", + "doc.Type": "go/doc", + "doc.Value": "go/doc", + "draw.Draw": "image/draw", + "draw.DrawMask": "image/draw", + "draw.Drawer": "image/draw", + "draw.FloydSteinberg": "image/draw", + "draw.Image": "image/draw", + "draw.Op": "image/draw", + "draw.Over": "image/draw", + "draw.Quantizer": "image/draw", + "draw.Src": "image/draw", + "driver.Bool": "database/sql/driver", + "driver.ColumnConverter": "database/sql/driver", + "driver.Conn": "database/sql/driver", + "driver.ConnBeginTx": "database/sql/driver", + "driver.ConnPrepareContext": "database/sql/driver", + "driver.DefaultParameterConverter": "database/sql/driver", + "driver.Driver": "database/sql/driver", + "driver.ErrBadConn": "database/sql/driver", + "driver.ErrRemoveArgument": "database/sql/driver", + "driver.ErrSkip": "database/sql/driver", + "driver.Execer": "database/sql/driver", + "driver.ExecerContext": "database/sql/driver", + "driver.Int32": "database/sql/driver", + "driver.IsScanValue": "database/sql/driver", + "driver.IsValue": "database/sql/driver", + "driver.IsolationLevel": "database/sql/driver", + "driver.NamedValue": "database/sql/driver", + "driver.NamedValueChecker": "database/sql/driver", + "driver.NotNull": "database/sql/driver", + "driver.Null": "database/sql/driver", + "driver.Pinger": "database/sql/driver", + "driver.Queryer": "database/sql/driver", + "driver.QueryerContext": "database/sql/driver", + "driver.Result": "database/sql/driver", + "driver.ResultNoRows": "database/sql/driver", + "driver.Rows": "database/sql/driver", + "driver.RowsAffected": "database/sql/driver", + "driver.RowsColumnTypeDatabaseTypeName": "database/sql/driver", + "driver.RowsColumnTypeLength": "database/sql/driver", + "driver.RowsColumnTypeNullable": "database/sql/driver", + "driver.RowsColumnTypePrecisionScale": "database/sql/driver", + "driver.RowsColumnTypeScanType": "database/sql/driver", + "driver.RowsNextResultSet": "database/sql/driver", + "driver.Stmt": "database/sql/driver", + "driver.StmtExecContext": "database/sql/driver", + "driver.StmtQueryContext": "database/sql/driver", + "driver.String": "database/sql/driver", + "driver.Tx": "database/sql/driver", + "driver.TxOptions": "database/sql/driver", + "driver.Value": "database/sql/driver", + "driver.ValueConverter": "database/sql/driver", + "driver.Valuer": "database/sql/driver", + "dsa.ErrInvalidPublicKey": "crypto/dsa", + "dsa.GenerateKey": "crypto/dsa", + "dsa.GenerateParameters": "crypto/dsa", + "dsa.L1024N160": "crypto/dsa", + "dsa.L2048N224": "crypto/dsa", + "dsa.L2048N256": "crypto/dsa", + "dsa.L3072N256": "crypto/dsa", + "dsa.ParameterSizes": "crypto/dsa", + "dsa.Parameters": "crypto/dsa", + "dsa.PrivateKey": "crypto/dsa", + "dsa.PublicKey": "crypto/dsa", + "dsa.Sign": "crypto/dsa", + "dsa.Verify": "crypto/dsa", + "dwarf.AddrType": "debug/dwarf", + "dwarf.ArrayType": "debug/dwarf", + "dwarf.Attr": "debug/dwarf", + "dwarf.AttrAbstractOrigin": "debug/dwarf", + "dwarf.AttrAccessibility": "debug/dwarf", + "dwarf.AttrAddrClass": "debug/dwarf", + "dwarf.AttrAllocated": "debug/dwarf", + "dwarf.AttrArtificial": "debug/dwarf", + "dwarf.AttrAssociated": "debug/dwarf", + "dwarf.AttrBaseTypes": "debug/dwarf", + "dwarf.AttrBitOffset": "debug/dwarf", + "dwarf.AttrBitSize": "debug/dwarf", + "dwarf.AttrByteSize": "debug/dwarf", + "dwarf.AttrCallColumn": "debug/dwarf", + "dwarf.AttrCallFile": "debug/dwarf", + "dwarf.AttrCallLine": "debug/dwarf", + "dwarf.AttrCalling": "debug/dwarf", + "dwarf.AttrCommonRef": "debug/dwarf", + "dwarf.AttrCompDir": "debug/dwarf", + "dwarf.AttrConstValue": "debug/dwarf", + "dwarf.AttrContainingType": "debug/dwarf", + "dwarf.AttrCount": "debug/dwarf", + "dwarf.AttrDataLocation": "debug/dwarf", + "dwarf.AttrDataMemberLoc": "debug/dwarf", + "dwarf.AttrDeclColumn": "debug/dwarf", + "dwarf.AttrDeclFile": "debug/dwarf", + "dwarf.AttrDeclLine": "debug/dwarf", + "dwarf.AttrDeclaration": "debug/dwarf", + "dwarf.AttrDefaultValue": "debug/dwarf", + "dwarf.AttrDescription": "debug/dwarf", + "dwarf.AttrDiscr": "debug/dwarf", + "dwarf.AttrDiscrList": "debug/dwarf", + "dwarf.AttrDiscrValue": "debug/dwarf", + "dwarf.AttrEncoding": "debug/dwarf", + "dwarf.AttrEntrypc": "debug/dwarf", + "dwarf.AttrExtension": "debug/dwarf", + "dwarf.AttrExternal": "debug/dwarf", + "dwarf.AttrFrameBase": "debug/dwarf", + "dwarf.AttrFriend": "debug/dwarf", + "dwarf.AttrHighpc": "debug/dwarf", + "dwarf.AttrIdentifierCase": "debug/dwarf", + "dwarf.AttrImport": "debug/dwarf", + "dwarf.AttrInline": "debug/dwarf", + "dwarf.AttrIsOptional": "debug/dwarf", + "dwarf.AttrLanguage": "debug/dwarf", + "dwarf.AttrLocation": "debug/dwarf", + "dwarf.AttrLowerBound": "debug/dwarf", + "dwarf.AttrLowpc": "debug/dwarf", + "dwarf.AttrMacroInfo": "debug/dwarf", + "dwarf.AttrName": "debug/dwarf", + "dwarf.AttrNamelistItem": "debug/dwarf", + "dwarf.AttrOrdering": "debug/dwarf", + "dwarf.AttrPriority": "debug/dwarf", + "dwarf.AttrProducer": "debug/dwarf", + "dwarf.AttrPrototyped": "debug/dwarf", + "dwarf.AttrRanges": "debug/dwarf", + "dwarf.AttrReturnAddr": "debug/dwarf", + "dwarf.AttrSegment": "debug/dwarf", + "dwarf.AttrSibling": "debug/dwarf", + "dwarf.AttrSpecification": "debug/dwarf", + "dwarf.AttrStartScope": "debug/dwarf", + "dwarf.AttrStaticLink": "debug/dwarf", + "dwarf.AttrStmtList": "debug/dwarf", + "dwarf.AttrStride": "debug/dwarf", + "dwarf.AttrStrideSize": "debug/dwarf", + "dwarf.AttrStringLength": "debug/dwarf", + "dwarf.AttrTrampoline": "debug/dwarf", + "dwarf.AttrType": "debug/dwarf", + "dwarf.AttrUpperBound": "debug/dwarf", + "dwarf.AttrUseLocation": "debug/dwarf", + "dwarf.AttrUseUTF8": "debug/dwarf", + "dwarf.AttrVarParam": "debug/dwarf", + "dwarf.AttrVirtuality": "debug/dwarf", + "dwarf.AttrVisibility": "debug/dwarf", + "dwarf.AttrVtableElemLoc": "debug/dwarf", + "dwarf.BasicType": "debug/dwarf", + "dwarf.BoolType": "debug/dwarf", + "dwarf.CharType": "debug/dwarf", + "dwarf.Class": "debug/dwarf", + "dwarf.ClassAddress": "debug/dwarf", + "dwarf.ClassBlock": "debug/dwarf", + "dwarf.ClassConstant": "debug/dwarf", + "dwarf.ClassExprLoc": "debug/dwarf", + "dwarf.ClassFlag": "debug/dwarf", + "dwarf.ClassLinePtr": "debug/dwarf", + "dwarf.ClassLocListPtr": "debug/dwarf", + "dwarf.ClassMacPtr": "debug/dwarf", + "dwarf.ClassRangeListPtr": "debug/dwarf", + "dwarf.ClassReference": "debug/dwarf", + "dwarf.ClassReferenceAlt": "debug/dwarf", + "dwarf.ClassReferenceSig": "debug/dwarf", + "dwarf.ClassString": "debug/dwarf", + "dwarf.ClassStringAlt": "debug/dwarf", + "dwarf.ClassUnknown": "debug/dwarf", + "dwarf.CommonType": "debug/dwarf", + "dwarf.ComplexType": "debug/dwarf", + "dwarf.Data": "debug/dwarf", + "dwarf.DecodeError": "debug/dwarf", + "dwarf.DotDotDotType": "debug/dwarf", + "dwarf.Entry": "debug/dwarf", + "dwarf.EnumType": "debug/dwarf", + "dwarf.EnumValue": "debug/dwarf", + "dwarf.ErrUnknownPC": "debug/dwarf", + "dwarf.Field": "debug/dwarf", + "dwarf.FloatType": "debug/dwarf", + "dwarf.FuncType": "debug/dwarf", + "dwarf.IntType": "debug/dwarf", + "dwarf.LineEntry": "debug/dwarf", + "dwarf.LineFile": "debug/dwarf", + "dwarf.LineReader": "debug/dwarf", + "dwarf.LineReaderPos": "debug/dwarf", + "dwarf.New": "debug/dwarf", + "dwarf.Offset": "debug/dwarf", + "dwarf.PtrType": "debug/dwarf", + "dwarf.QualType": "debug/dwarf", + "dwarf.Reader": "debug/dwarf", + "dwarf.StructField": "debug/dwarf", + "dwarf.StructType": "debug/dwarf", + "dwarf.Tag": "debug/dwarf", + "dwarf.TagAccessDeclaration": "debug/dwarf", + "dwarf.TagArrayType": "debug/dwarf", + "dwarf.TagBaseType": "debug/dwarf", + "dwarf.TagCatchDwarfBlock": "debug/dwarf", + "dwarf.TagClassType": "debug/dwarf", + "dwarf.TagCommonDwarfBlock": "debug/dwarf", + "dwarf.TagCommonInclusion": "debug/dwarf", + "dwarf.TagCompileUnit": "debug/dwarf", + "dwarf.TagCondition": "debug/dwarf", + "dwarf.TagConstType": "debug/dwarf", + "dwarf.TagConstant": "debug/dwarf", + "dwarf.TagDwarfProcedure": "debug/dwarf", + "dwarf.TagEntryPoint": "debug/dwarf", + "dwarf.TagEnumerationType": "debug/dwarf", + "dwarf.TagEnumerator": "debug/dwarf", + "dwarf.TagFileType": "debug/dwarf", + "dwarf.TagFormalParameter": "debug/dwarf", + "dwarf.TagFriend": "debug/dwarf", + "dwarf.TagImportedDeclaration": "debug/dwarf", + "dwarf.TagImportedModule": "debug/dwarf", + "dwarf.TagImportedUnit": "debug/dwarf", + "dwarf.TagInheritance": "debug/dwarf", + "dwarf.TagInlinedSubroutine": "debug/dwarf", + "dwarf.TagInterfaceType": "debug/dwarf", + "dwarf.TagLabel": "debug/dwarf", + "dwarf.TagLexDwarfBlock": "debug/dwarf", + "dwarf.TagMember": "debug/dwarf", + "dwarf.TagModule": "debug/dwarf", + "dwarf.TagMutableType": "debug/dwarf", + "dwarf.TagNamelist": "debug/dwarf", + "dwarf.TagNamelistItem": "debug/dwarf", + "dwarf.TagNamespace": "debug/dwarf", + "dwarf.TagPackedType": "debug/dwarf", + "dwarf.TagPartialUnit": "debug/dwarf", + "dwarf.TagPointerType": "debug/dwarf", + "dwarf.TagPtrToMemberType": "debug/dwarf", + "dwarf.TagReferenceType": "debug/dwarf", + "dwarf.TagRestrictType": "debug/dwarf", + "dwarf.TagRvalueReferenceType": "debug/dwarf", + "dwarf.TagSetType": "debug/dwarf", + "dwarf.TagSharedType": "debug/dwarf", + "dwarf.TagStringType": "debug/dwarf", + "dwarf.TagStructType": "debug/dwarf", + "dwarf.TagSubprogram": "debug/dwarf", + "dwarf.TagSubrangeType": "debug/dwarf", + "dwarf.TagSubroutineType": "debug/dwarf", + "dwarf.TagTemplateAlias": "debug/dwarf", + "dwarf.TagTemplateTypeParameter": "debug/dwarf", + "dwarf.TagTemplateValueParameter": "debug/dwarf", + "dwarf.TagThrownType": "debug/dwarf", + "dwarf.TagTryDwarfBlock": "debug/dwarf", + "dwarf.TagTypeUnit": "debug/dwarf", + "dwarf.TagTypedef": "debug/dwarf", + "dwarf.TagUnionType": "debug/dwarf", + "dwarf.TagUnspecifiedParameters": "debug/dwarf", + "dwarf.TagUnspecifiedType": "debug/dwarf", + "dwarf.TagVariable": "debug/dwarf", + "dwarf.TagVariant": "debug/dwarf", + "dwarf.TagVariantPart": "debug/dwarf", + "dwarf.TagVolatileType": "debug/dwarf", + "dwarf.TagWithStmt": "debug/dwarf", + "dwarf.Type": "debug/dwarf", + "dwarf.TypedefType": "debug/dwarf", + "dwarf.UcharType": "debug/dwarf", + "dwarf.UintType": "debug/dwarf", + "dwarf.UnspecifiedType": "debug/dwarf", + "dwarf.VoidType": "debug/dwarf", + "ecdsa.GenerateKey": "crypto/ecdsa", + "ecdsa.PrivateKey": "crypto/ecdsa", + "ecdsa.PublicKey": "crypto/ecdsa", + "ecdsa.Sign": "crypto/ecdsa", + "ecdsa.Verify": "crypto/ecdsa", + "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf", + "elf.COMPRESS_HIOS": "debug/elf", + "elf.COMPRESS_HIPROC": "debug/elf", + "elf.COMPRESS_LOOS": "debug/elf", + "elf.COMPRESS_LOPROC": "debug/elf", + "elf.COMPRESS_ZLIB": "debug/elf", + "elf.Chdr32": "debug/elf", + "elf.Chdr64": "debug/elf", + "elf.Class": "debug/elf", + "elf.CompressionType": "debug/elf", + "elf.DF_BIND_NOW": "debug/elf", + "elf.DF_ORIGIN": "debug/elf", + "elf.DF_STATIC_TLS": "debug/elf", + "elf.DF_SYMBOLIC": "debug/elf", + "elf.DF_TEXTREL": "debug/elf", + "elf.DT_BIND_NOW": "debug/elf", + "elf.DT_DEBUG": "debug/elf", + "elf.DT_ENCODING": "debug/elf", + "elf.DT_FINI": "debug/elf", + "elf.DT_FINI_ARRAY": "debug/elf", + "elf.DT_FINI_ARRAYSZ": "debug/elf", + "elf.DT_FLAGS": "debug/elf", + "elf.DT_HASH": "debug/elf", + "elf.DT_HIOS": "debug/elf", + "elf.DT_HIPROC": "debug/elf", + "elf.DT_INIT": "debug/elf", + "elf.DT_INIT_ARRAY": "debug/elf", + "elf.DT_INIT_ARRAYSZ": "debug/elf", + "elf.DT_JMPREL": "debug/elf", + "elf.DT_LOOS": "debug/elf", + "elf.DT_LOPROC": "debug/elf", + "elf.DT_NEEDED": "debug/elf", + "elf.DT_NULL": "debug/elf", + "elf.DT_PLTGOT": "debug/elf", + "elf.DT_PLTREL": "debug/elf", + "elf.DT_PLTRELSZ": "debug/elf", + "elf.DT_PREINIT_ARRAY": "debug/elf", + "elf.DT_PREINIT_ARRAYSZ": "debug/elf", + "elf.DT_REL": "debug/elf", + "elf.DT_RELA": "debug/elf", + "elf.DT_RELAENT": "debug/elf", + "elf.DT_RELASZ": "debug/elf", + "elf.DT_RELENT": "debug/elf", + "elf.DT_RELSZ": "debug/elf", + "elf.DT_RPATH": "debug/elf", + "elf.DT_RUNPATH": "debug/elf", + "elf.DT_SONAME": "debug/elf", + "elf.DT_STRSZ": "debug/elf", + "elf.DT_STRTAB": "debug/elf", + "elf.DT_SYMBOLIC": "debug/elf", + "elf.DT_SYMENT": "debug/elf", + "elf.DT_SYMTAB": "debug/elf", + "elf.DT_TEXTREL": "debug/elf", + "elf.DT_VERNEED": "debug/elf", + "elf.DT_VERNEEDNUM": "debug/elf", + "elf.DT_VERSYM": "debug/elf", + "elf.Data": "debug/elf", + "elf.Dyn32": "debug/elf", + "elf.Dyn64": "debug/elf", + "elf.DynFlag": "debug/elf", + "elf.DynTag": "debug/elf", + "elf.EI_ABIVERSION": "debug/elf", + "elf.EI_CLASS": "debug/elf", + "elf.EI_DATA": "debug/elf", + "elf.EI_NIDENT": "debug/elf", + "elf.EI_OSABI": "debug/elf", + "elf.EI_PAD": "debug/elf", + "elf.EI_VERSION": "debug/elf", + "elf.ELFCLASS32": "debug/elf", + "elf.ELFCLASS64": "debug/elf", + "elf.ELFCLASSNONE": "debug/elf", + "elf.ELFDATA2LSB": "debug/elf", + "elf.ELFDATA2MSB": "debug/elf", + "elf.ELFDATANONE": "debug/elf", + "elf.ELFMAG": "debug/elf", + "elf.ELFOSABI_86OPEN": "debug/elf", + "elf.ELFOSABI_AIX": "debug/elf", + "elf.ELFOSABI_ARM": "debug/elf", + "elf.ELFOSABI_FREEBSD": "debug/elf", + "elf.ELFOSABI_HPUX": "debug/elf", + "elf.ELFOSABI_HURD": "debug/elf", + "elf.ELFOSABI_IRIX": "debug/elf", + "elf.ELFOSABI_LINUX": "debug/elf", + "elf.ELFOSABI_MODESTO": "debug/elf", + "elf.ELFOSABI_NETBSD": "debug/elf", + "elf.ELFOSABI_NONE": "debug/elf", + "elf.ELFOSABI_NSK": "debug/elf", + "elf.ELFOSABI_OPENBSD": "debug/elf", + "elf.ELFOSABI_OPENVMS": "debug/elf", + "elf.ELFOSABI_SOLARIS": "debug/elf", + "elf.ELFOSABI_STANDALONE": "debug/elf", + "elf.ELFOSABI_TRU64": "debug/elf", + "elf.EM_386": "debug/elf", + "elf.EM_486": "debug/elf", + "elf.EM_68HC12": "debug/elf", + "elf.EM_68K": "debug/elf", + "elf.EM_860": "debug/elf", + "elf.EM_88K": "debug/elf", + "elf.EM_960": "debug/elf", + "elf.EM_AARCH64": "debug/elf", + "elf.EM_ALPHA": "debug/elf", + "elf.EM_ALPHA_STD": "debug/elf", + "elf.EM_ARC": "debug/elf", + "elf.EM_ARM": "debug/elf", + "elf.EM_COLDFIRE": "debug/elf", + "elf.EM_FR20": "debug/elf", + "elf.EM_H8S": "debug/elf", + "elf.EM_H8_300": "debug/elf", + "elf.EM_H8_300H": "debug/elf", + "elf.EM_H8_500": "debug/elf", + "elf.EM_IA_64": "debug/elf", + "elf.EM_M32": "debug/elf", + "elf.EM_ME16": "debug/elf", + "elf.EM_MIPS": "debug/elf", + "elf.EM_MIPS_RS3_LE": "debug/elf", + "elf.EM_MIPS_RS4_BE": "debug/elf", + "elf.EM_MIPS_X": "debug/elf", + "elf.EM_MMA": "debug/elf", + "elf.EM_NCPU": "debug/elf", + "elf.EM_NDR1": "debug/elf", + "elf.EM_NONE": "debug/elf", + "elf.EM_PARISC": "debug/elf", + "elf.EM_PCP": "debug/elf", + "elf.EM_PPC": "debug/elf", + "elf.EM_PPC64": "debug/elf", + "elf.EM_RCE": "debug/elf", + "elf.EM_RH32": "debug/elf", + "elf.EM_S370": "debug/elf", + "elf.EM_S390": "debug/elf", + "elf.EM_SH": "debug/elf", + "elf.EM_SPARC": "debug/elf", + "elf.EM_SPARC32PLUS": "debug/elf", + "elf.EM_SPARCV9": "debug/elf", + "elf.EM_ST100": "debug/elf", + "elf.EM_STARCORE": "debug/elf", + "elf.EM_TINYJ": "debug/elf", + "elf.EM_TRICORE": "debug/elf", + "elf.EM_V800": "debug/elf", + "elf.EM_VPP500": "debug/elf", + "elf.EM_X86_64": "debug/elf", + "elf.ET_CORE": "debug/elf", + "elf.ET_DYN": "debug/elf", + "elf.ET_EXEC": "debug/elf", + "elf.ET_HIOS": "debug/elf", + "elf.ET_HIPROC": "debug/elf", + "elf.ET_LOOS": "debug/elf", + "elf.ET_LOPROC": "debug/elf", + "elf.ET_NONE": "debug/elf", + "elf.ET_REL": "debug/elf", + "elf.EV_CURRENT": "debug/elf", + "elf.EV_NONE": "debug/elf", + "elf.ErrNoSymbols": "debug/elf", + "elf.File": "debug/elf", + "elf.FileHeader": "debug/elf", + "elf.FormatError": "debug/elf", + "elf.Header32": "debug/elf", + "elf.Header64": "debug/elf", + "elf.ImportedSymbol": "debug/elf", + "elf.Machine": "debug/elf", + "elf.NT_FPREGSET": "debug/elf", + "elf.NT_PRPSINFO": "debug/elf", + "elf.NT_PRSTATUS": "debug/elf", + "elf.NType": "debug/elf", + "elf.NewFile": "debug/elf", + "elf.OSABI": "debug/elf", + "elf.Open": "debug/elf", + "elf.PF_MASKOS": "debug/elf", + "elf.PF_MASKPROC": "debug/elf", + "elf.PF_R": "debug/elf", + "elf.PF_W": "debug/elf", + "elf.PF_X": "debug/elf", + "elf.PT_DYNAMIC": "debug/elf", + "elf.PT_HIOS": "debug/elf", + "elf.PT_HIPROC": "debug/elf", + "elf.PT_INTERP": "debug/elf", + "elf.PT_LOAD": "debug/elf", + "elf.PT_LOOS": "debug/elf", + "elf.PT_LOPROC": "debug/elf", + "elf.PT_NOTE": "debug/elf", + "elf.PT_NULL": "debug/elf", + "elf.PT_PHDR": "debug/elf", + "elf.PT_SHLIB": "debug/elf", + "elf.PT_TLS": "debug/elf", + "elf.Prog": "debug/elf", + "elf.Prog32": "debug/elf", + "elf.Prog64": "debug/elf", + "elf.ProgFlag": "debug/elf", + "elf.ProgHeader": "debug/elf", + "elf.ProgType": "debug/elf", + "elf.R_386": "debug/elf", + "elf.R_386_32": "debug/elf", + "elf.R_386_COPY": "debug/elf", + "elf.R_386_GLOB_DAT": "debug/elf", + "elf.R_386_GOT32": "debug/elf", + "elf.R_386_GOTOFF": "debug/elf", + "elf.R_386_GOTPC": "debug/elf", + "elf.R_386_JMP_SLOT": "debug/elf", + "elf.R_386_NONE": "debug/elf", + "elf.R_386_PC32": "debug/elf", + "elf.R_386_PLT32": "debug/elf", + "elf.R_386_RELATIVE": "debug/elf", + "elf.R_386_TLS_DTPMOD32": "debug/elf", + "elf.R_386_TLS_DTPOFF32": "debug/elf", + "elf.R_386_TLS_GD": "debug/elf", + "elf.R_386_TLS_GD_32": "debug/elf", + "elf.R_386_TLS_GD_CALL": "debug/elf", + "elf.R_386_TLS_GD_POP": "debug/elf", + "elf.R_386_TLS_GD_PUSH": "debug/elf", + "elf.R_386_TLS_GOTIE": "debug/elf", + "elf.R_386_TLS_IE": "debug/elf", + "elf.R_386_TLS_IE_32": "debug/elf", + "elf.R_386_TLS_LDM": "debug/elf", + "elf.R_386_TLS_LDM_32": "debug/elf", + "elf.R_386_TLS_LDM_CALL": "debug/elf", + "elf.R_386_TLS_LDM_POP": "debug/elf", + "elf.R_386_TLS_LDM_PUSH": "debug/elf", + "elf.R_386_TLS_LDO_32": "debug/elf", + "elf.R_386_TLS_LE": "debug/elf", + "elf.R_386_TLS_LE_32": "debug/elf", + "elf.R_386_TLS_TPOFF": "debug/elf", + "elf.R_386_TLS_TPOFF32": "debug/elf", + "elf.R_390": "debug/elf", + "elf.R_390_12": "debug/elf", + "elf.R_390_16": "debug/elf", + "elf.R_390_20": "debug/elf", + "elf.R_390_32": "debug/elf", + "elf.R_390_64": "debug/elf", + "elf.R_390_8": "debug/elf", + "elf.R_390_COPY": "debug/elf", + "elf.R_390_GLOB_DAT": "debug/elf", + "elf.R_390_GOT12": "debug/elf", + "elf.R_390_GOT16": "debug/elf", + "elf.R_390_GOT20": "debug/elf", + "elf.R_390_GOT32": "debug/elf", + "elf.R_390_GOT64": "debug/elf", + "elf.R_390_GOTENT": "debug/elf", + "elf.R_390_GOTOFF": "debug/elf", + "elf.R_390_GOTOFF16": "debug/elf", + "elf.R_390_GOTOFF64": "debug/elf", + "elf.R_390_GOTPC": "debug/elf", + "elf.R_390_GOTPCDBL": "debug/elf", + "elf.R_390_GOTPLT12": "debug/elf", + "elf.R_390_GOTPLT16": "debug/elf", + "elf.R_390_GOTPLT20": "debug/elf", + "elf.R_390_GOTPLT32": "debug/elf", + "elf.R_390_GOTPLT64": "debug/elf", + "elf.R_390_GOTPLTENT": "debug/elf", + "elf.R_390_GOTPLTOFF16": "debug/elf", + "elf.R_390_GOTPLTOFF32": "debug/elf", + "elf.R_390_GOTPLTOFF64": "debug/elf", + "elf.R_390_JMP_SLOT": "debug/elf", + "elf.R_390_NONE": "debug/elf", + "elf.R_390_PC16": "debug/elf", + "elf.R_390_PC16DBL": "debug/elf", + "elf.R_390_PC32": "debug/elf", + "elf.R_390_PC32DBL": "debug/elf", + "elf.R_390_PC64": "debug/elf", + "elf.R_390_PLT16DBL": "debug/elf", + "elf.R_390_PLT32": "debug/elf", + "elf.R_390_PLT32DBL": "debug/elf", + "elf.R_390_PLT64": "debug/elf", + "elf.R_390_RELATIVE": "debug/elf", + "elf.R_390_TLS_DTPMOD": "debug/elf", + "elf.R_390_TLS_DTPOFF": "debug/elf", + "elf.R_390_TLS_GD32": "debug/elf", + "elf.R_390_TLS_GD64": "debug/elf", + "elf.R_390_TLS_GDCALL": "debug/elf", + "elf.R_390_TLS_GOTIE12": "debug/elf", + "elf.R_390_TLS_GOTIE20": "debug/elf", + "elf.R_390_TLS_GOTIE32": "debug/elf", + "elf.R_390_TLS_GOTIE64": "debug/elf", + "elf.R_390_TLS_IE32": "debug/elf", + "elf.R_390_TLS_IE64": "debug/elf", + "elf.R_390_TLS_IEENT": "debug/elf", + "elf.R_390_TLS_LDCALL": "debug/elf", + "elf.R_390_TLS_LDM32": "debug/elf", + "elf.R_390_TLS_LDM64": "debug/elf", + "elf.R_390_TLS_LDO32": "debug/elf", + "elf.R_390_TLS_LDO64": "debug/elf", + "elf.R_390_TLS_LE32": "debug/elf", + "elf.R_390_TLS_LE64": "debug/elf", + "elf.R_390_TLS_LOAD": "debug/elf", + "elf.R_390_TLS_TPOFF": "debug/elf", + "elf.R_AARCH64": "debug/elf", + "elf.R_AARCH64_ABS16": "debug/elf", + "elf.R_AARCH64_ABS32": "debug/elf", + "elf.R_AARCH64_ABS64": "debug/elf", + "elf.R_AARCH64_ADD_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_ADR_GOT_PAGE": "debug/elf", + "elf.R_AARCH64_ADR_PREL_LO21": "debug/elf", + "elf.R_AARCH64_ADR_PREL_PG_HI21": "debug/elf", + "elf.R_AARCH64_ADR_PREL_PG_HI21_NC": "debug/elf", + "elf.R_AARCH64_CALL26": "debug/elf", + "elf.R_AARCH64_CONDBR19": "debug/elf", + "elf.R_AARCH64_COPY": "debug/elf", + "elf.R_AARCH64_GLOB_DAT": "debug/elf", + "elf.R_AARCH64_GOT_LD_PREL19": "debug/elf", + "elf.R_AARCH64_IRELATIVE": "debug/elf", + "elf.R_AARCH64_JUMP26": "debug/elf", + "elf.R_AARCH64_JUMP_SLOT": "debug/elf", + "elf.R_AARCH64_LD64_GOT_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST128_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST16_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST32_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST64_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST8_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LD_PREL_LO19": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G0": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G1": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G2": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G0": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G0_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G1": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G1_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G2": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G2_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G3": "debug/elf", + "elf.R_AARCH64_NONE": "debug/elf", + "elf.R_AARCH64_NULL": "debug/elf", + "elf.R_AARCH64_P32_ABS16": "debug/elf", + "elf.R_AARCH64_P32_ABS32": "debug/elf", + "elf.R_AARCH64_P32_ADD_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_ADR_GOT_PAGE": "debug/elf", + "elf.R_AARCH64_P32_ADR_PREL_LO21": "debug/elf", + "elf.R_AARCH64_P32_ADR_PREL_PG_HI21": "debug/elf", + "elf.R_AARCH64_P32_CALL26": "debug/elf", + "elf.R_AARCH64_P32_CONDBR19": "debug/elf", + "elf.R_AARCH64_P32_COPY": "debug/elf", + "elf.R_AARCH64_P32_GLOB_DAT": "debug/elf", + "elf.R_AARCH64_P32_GOT_LD_PREL19": "debug/elf", + "elf.R_AARCH64_P32_IRELATIVE": "debug/elf", + "elf.R_AARCH64_P32_JUMP26": "debug/elf", + "elf.R_AARCH64_P32_JUMP_SLOT": "debug/elf", + "elf.R_AARCH64_P32_LD32_GOT_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST128_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST16_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST32_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST64_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST8_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LD_PREL_LO19": "debug/elf", + "elf.R_AARCH64_P32_MOVW_SABS_G0": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G0": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G0_NC": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G1": "debug/elf", + "elf.R_AARCH64_P32_PREL16": "debug/elf", + "elf.R_AARCH64_P32_PREL32": "debug/elf", + "elf.R_AARCH64_P32_RELATIVE": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADR_PREL21": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_CALL": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_LD32_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_LD_PREL19": "debug/elf", + "elf.R_AARCH64_P32_TLSGD_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSGD_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", + "elf.R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_HI12": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_LO12": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G0": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G1": "debug/elf", + "elf.R_AARCH64_P32_TLS_DTPMOD": "debug/elf", + "elf.R_AARCH64_P32_TLS_DTPREL": "debug/elf", + "elf.R_AARCH64_P32_TLS_TPREL": "debug/elf", + "elf.R_AARCH64_P32_TSTBR14": "debug/elf", + "elf.R_AARCH64_PREL16": "debug/elf", + "elf.R_AARCH64_PREL32": "debug/elf", + "elf.R_AARCH64_PREL64": "debug/elf", + "elf.R_AARCH64_RELATIVE": "debug/elf", + "elf.R_AARCH64_TLSDESC": "debug/elf", + "elf.R_AARCH64_TLSDESC_ADD": "debug/elf", + "elf.R_AARCH64_TLSDESC_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSDESC_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_TLSDESC_ADR_PREL21": "debug/elf", + "elf.R_AARCH64_TLSDESC_CALL": "debug/elf", + "elf.R_AARCH64_TLSDESC_LD64_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSDESC_LDR": "debug/elf", + "elf.R_AARCH64_TLSDESC_LD_PREL19": "debug/elf", + "elf.R_AARCH64_TLSDESC_OFF_G0_NC": "debug/elf", + "elf.R_AARCH64_TLSDESC_OFF_G1": "debug/elf", + "elf.R_AARCH64_TLSGD_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSGD_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", + "elf.R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", + "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC": "debug/elf", + "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G1": "debug/elf", + "elf.R_AARCH64_TLSLE_ADD_TPREL_HI12": "debug/elf", + "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12": "debug/elf", + "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0": "debug/elf", + "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0_NC": "debug/elf", + "elf.R_AARCH64_TLSLE_MOVW_TPREL_G1": "debug/elf", + "elf.R_AARCH64_TLSLE_MOVW_TPREL_G1_NC": "debug/elf", + "elf.R_AARCH64_TLSLE_MOVW_TPREL_G2": "debug/elf", + "elf.R_AARCH64_TLS_DTPMOD64": "debug/elf", + "elf.R_AARCH64_TLS_DTPREL64": "debug/elf", + "elf.R_AARCH64_TLS_TPREL64": "debug/elf", + "elf.R_AARCH64_TSTBR14": "debug/elf", + "elf.R_ALPHA": "debug/elf", + "elf.R_ALPHA_BRADDR": "debug/elf", + "elf.R_ALPHA_COPY": "debug/elf", + "elf.R_ALPHA_GLOB_DAT": "debug/elf", + "elf.R_ALPHA_GPDISP": "debug/elf", + "elf.R_ALPHA_GPREL32": "debug/elf", + "elf.R_ALPHA_GPRELHIGH": "debug/elf", + "elf.R_ALPHA_GPRELLOW": "debug/elf", + "elf.R_ALPHA_GPVALUE": "debug/elf", + "elf.R_ALPHA_HINT": "debug/elf", + "elf.R_ALPHA_IMMED_BR_HI32": "debug/elf", + "elf.R_ALPHA_IMMED_GP_16": "debug/elf", + "elf.R_ALPHA_IMMED_GP_HI32": "debug/elf", + "elf.R_ALPHA_IMMED_LO32": "debug/elf", + "elf.R_ALPHA_IMMED_SCN_HI32": "debug/elf", + "elf.R_ALPHA_JMP_SLOT": "debug/elf", + "elf.R_ALPHA_LITERAL": "debug/elf", + "elf.R_ALPHA_LITUSE": "debug/elf", + "elf.R_ALPHA_NONE": "debug/elf", + "elf.R_ALPHA_OP_PRSHIFT": "debug/elf", + "elf.R_ALPHA_OP_PSUB": "debug/elf", + "elf.R_ALPHA_OP_PUSH": "debug/elf", + "elf.R_ALPHA_OP_STORE": "debug/elf", + "elf.R_ALPHA_REFLONG": "debug/elf", + "elf.R_ALPHA_REFQUAD": "debug/elf", + "elf.R_ALPHA_RELATIVE": "debug/elf", + "elf.R_ALPHA_SREL16": "debug/elf", + "elf.R_ALPHA_SREL32": "debug/elf", + "elf.R_ALPHA_SREL64": "debug/elf", + "elf.R_ARM": "debug/elf", + "elf.R_ARM_ABS12": "debug/elf", + "elf.R_ARM_ABS16": "debug/elf", + "elf.R_ARM_ABS32": "debug/elf", + "elf.R_ARM_ABS8": "debug/elf", + "elf.R_ARM_AMP_VCALL9": "debug/elf", + "elf.R_ARM_COPY": "debug/elf", + "elf.R_ARM_GLOB_DAT": "debug/elf", + "elf.R_ARM_GNU_VTENTRY": "debug/elf", + "elf.R_ARM_GNU_VTINHERIT": "debug/elf", + "elf.R_ARM_GOT32": "debug/elf", + "elf.R_ARM_GOTOFF": "debug/elf", + "elf.R_ARM_GOTPC": "debug/elf", + "elf.R_ARM_JUMP_SLOT": "debug/elf", + "elf.R_ARM_NONE": "debug/elf", + "elf.R_ARM_PC13": "debug/elf", + "elf.R_ARM_PC24": "debug/elf", + "elf.R_ARM_PLT32": "debug/elf", + "elf.R_ARM_RABS32": "debug/elf", + "elf.R_ARM_RBASE": "debug/elf", + "elf.R_ARM_REL32": "debug/elf", + "elf.R_ARM_RELATIVE": "debug/elf", + "elf.R_ARM_RPC24": "debug/elf", + "elf.R_ARM_RREL32": "debug/elf", + "elf.R_ARM_RSBREL32": "debug/elf", + "elf.R_ARM_SBREL32": "debug/elf", + "elf.R_ARM_SWI24": "debug/elf", + "elf.R_ARM_THM_ABS5": "debug/elf", + "elf.R_ARM_THM_PC22": "debug/elf", + "elf.R_ARM_THM_PC8": "debug/elf", + "elf.R_ARM_THM_RPC22": "debug/elf", + "elf.R_ARM_THM_SWI8": "debug/elf", + "elf.R_ARM_THM_XPC22": "debug/elf", + "elf.R_ARM_XPC25": "debug/elf", + "elf.R_INFO": "debug/elf", + "elf.R_INFO32": "debug/elf", + "elf.R_MIPS": "debug/elf", + "elf.R_MIPS_16": "debug/elf", + "elf.R_MIPS_26": "debug/elf", + "elf.R_MIPS_32": "debug/elf", + "elf.R_MIPS_64": "debug/elf", + "elf.R_MIPS_ADD_IMMEDIATE": "debug/elf", + "elf.R_MIPS_CALL16": "debug/elf", + "elf.R_MIPS_CALL_HI16": "debug/elf", + "elf.R_MIPS_CALL_LO16": "debug/elf", + "elf.R_MIPS_DELETE": "debug/elf", + "elf.R_MIPS_GOT16": "debug/elf", + "elf.R_MIPS_GOT_DISP": "debug/elf", + "elf.R_MIPS_GOT_HI16": "debug/elf", + "elf.R_MIPS_GOT_LO16": "debug/elf", + "elf.R_MIPS_GOT_OFST": "debug/elf", + "elf.R_MIPS_GOT_PAGE": "debug/elf", + "elf.R_MIPS_GPREL16": "debug/elf", + "elf.R_MIPS_GPREL32": "debug/elf", + "elf.R_MIPS_HI16": "debug/elf", + "elf.R_MIPS_HIGHER": "debug/elf", + "elf.R_MIPS_HIGHEST": "debug/elf", + "elf.R_MIPS_INSERT_A": "debug/elf", + "elf.R_MIPS_INSERT_B": "debug/elf", + "elf.R_MIPS_JALR": "debug/elf", + "elf.R_MIPS_LITERAL": "debug/elf", + "elf.R_MIPS_LO16": "debug/elf", + "elf.R_MIPS_NONE": "debug/elf", + "elf.R_MIPS_PC16": "debug/elf", + "elf.R_MIPS_PJUMP": "debug/elf", + "elf.R_MIPS_REL16": "debug/elf", + "elf.R_MIPS_REL32": "debug/elf", + "elf.R_MIPS_RELGOT": "debug/elf", + "elf.R_MIPS_SCN_DISP": "debug/elf", + "elf.R_MIPS_SHIFT5": "debug/elf", + "elf.R_MIPS_SHIFT6": "debug/elf", + "elf.R_MIPS_SUB": "debug/elf", + "elf.R_MIPS_TLS_DTPMOD32": "debug/elf", + "elf.R_MIPS_TLS_DTPMOD64": "debug/elf", + "elf.R_MIPS_TLS_DTPREL32": "debug/elf", + "elf.R_MIPS_TLS_DTPREL64": "debug/elf", + "elf.R_MIPS_TLS_DTPREL_HI16": "debug/elf", + "elf.R_MIPS_TLS_DTPREL_LO16": "debug/elf", + "elf.R_MIPS_TLS_GD": "debug/elf", + "elf.R_MIPS_TLS_GOTTPREL": "debug/elf", + "elf.R_MIPS_TLS_LDM": "debug/elf", + "elf.R_MIPS_TLS_TPREL32": "debug/elf", + "elf.R_MIPS_TLS_TPREL64": "debug/elf", + "elf.R_MIPS_TLS_TPREL_HI16": "debug/elf", + "elf.R_MIPS_TLS_TPREL_LO16": "debug/elf", + "elf.R_PPC": "debug/elf", + "elf.R_PPC64": "debug/elf", + "elf.R_PPC64_ADDR14": "debug/elf", + "elf.R_PPC64_ADDR14_BRNTAKEN": "debug/elf", + "elf.R_PPC64_ADDR14_BRTAKEN": "debug/elf", + "elf.R_PPC64_ADDR16": "debug/elf", + "elf.R_PPC64_ADDR16_DS": "debug/elf", + "elf.R_PPC64_ADDR16_HA": "debug/elf", + "elf.R_PPC64_ADDR16_HI": "debug/elf", + "elf.R_PPC64_ADDR16_HIGHER": "debug/elf", + "elf.R_PPC64_ADDR16_HIGHERA": "debug/elf", + "elf.R_PPC64_ADDR16_HIGHEST": "debug/elf", + "elf.R_PPC64_ADDR16_HIGHESTA": "debug/elf", + "elf.R_PPC64_ADDR16_LO": "debug/elf", + "elf.R_PPC64_ADDR16_LO_DS": "debug/elf", + "elf.R_PPC64_ADDR24": "debug/elf", + "elf.R_PPC64_ADDR32": "debug/elf", + "elf.R_PPC64_ADDR64": "debug/elf", + "elf.R_PPC64_DTPMOD64": "debug/elf", + "elf.R_PPC64_DTPREL16": "debug/elf", + "elf.R_PPC64_DTPREL16_DS": "debug/elf", + "elf.R_PPC64_DTPREL16_HA": "debug/elf", + "elf.R_PPC64_DTPREL16_HI": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGHER": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGHERA": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGHEST": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGHESTA": "debug/elf", + "elf.R_PPC64_DTPREL16_LO": "debug/elf", + "elf.R_PPC64_DTPREL16_LO_DS": "debug/elf", + "elf.R_PPC64_DTPREL64": "debug/elf", + "elf.R_PPC64_GOT16": "debug/elf", + "elf.R_PPC64_GOT16_DS": "debug/elf", + "elf.R_PPC64_GOT16_HA": "debug/elf", + "elf.R_PPC64_GOT16_HI": "debug/elf", + "elf.R_PPC64_GOT16_LO": "debug/elf", + "elf.R_PPC64_GOT16_LO_DS": "debug/elf", + "elf.R_PPC64_GOT_DTPREL16_DS": "debug/elf", + "elf.R_PPC64_GOT_DTPREL16_HA": "debug/elf", + "elf.R_PPC64_GOT_DTPREL16_HI": "debug/elf", + "elf.R_PPC64_GOT_DTPREL16_LO_DS": "debug/elf", + "elf.R_PPC64_GOT_TLSGD16": "debug/elf", + "elf.R_PPC64_GOT_TLSGD16_HA": "debug/elf", + "elf.R_PPC64_GOT_TLSGD16_HI": "debug/elf", + "elf.R_PPC64_GOT_TLSGD16_LO": "debug/elf", + "elf.R_PPC64_GOT_TLSLD16": "debug/elf", + "elf.R_PPC64_GOT_TLSLD16_HA": "debug/elf", + "elf.R_PPC64_GOT_TLSLD16_HI": "debug/elf", + "elf.R_PPC64_GOT_TLSLD16_LO": "debug/elf", + "elf.R_PPC64_GOT_TPREL16_DS": "debug/elf", + "elf.R_PPC64_GOT_TPREL16_HA": "debug/elf", + "elf.R_PPC64_GOT_TPREL16_HI": "debug/elf", + "elf.R_PPC64_GOT_TPREL16_LO_DS": "debug/elf", + "elf.R_PPC64_JMP_SLOT": "debug/elf", + "elf.R_PPC64_NONE": "debug/elf", + "elf.R_PPC64_REL14": "debug/elf", + "elf.R_PPC64_REL14_BRNTAKEN": "debug/elf", + "elf.R_PPC64_REL14_BRTAKEN": "debug/elf", + "elf.R_PPC64_REL16": "debug/elf", + "elf.R_PPC64_REL16_HA": "debug/elf", + "elf.R_PPC64_REL16_HI": "debug/elf", + "elf.R_PPC64_REL16_LO": "debug/elf", + "elf.R_PPC64_REL24": "debug/elf", + "elf.R_PPC64_REL32": "debug/elf", + "elf.R_PPC64_REL64": "debug/elf", + "elf.R_PPC64_TLS": "debug/elf", + "elf.R_PPC64_TLSGD": "debug/elf", + "elf.R_PPC64_TLSLD": "debug/elf", + "elf.R_PPC64_TOC": "debug/elf", + "elf.R_PPC64_TOC16": "debug/elf", + "elf.R_PPC64_TOC16_DS": "debug/elf", + "elf.R_PPC64_TOC16_HA": "debug/elf", + "elf.R_PPC64_TOC16_HI": "debug/elf", + "elf.R_PPC64_TOC16_LO": "debug/elf", + "elf.R_PPC64_TOC16_LO_DS": "debug/elf", + "elf.R_PPC64_TPREL16": "debug/elf", + "elf.R_PPC64_TPREL16_DS": "debug/elf", + "elf.R_PPC64_TPREL16_HA": "debug/elf", + "elf.R_PPC64_TPREL16_HI": "debug/elf", + "elf.R_PPC64_TPREL16_HIGHER": "debug/elf", + "elf.R_PPC64_TPREL16_HIGHERA": "debug/elf", + "elf.R_PPC64_TPREL16_HIGHEST": "debug/elf", + "elf.R_PPC64_TPREL16_HIGHESTA": "debug/elf", + "elf.R_PPC64_TPREL16_LO": "debug/elf", + "elf.R_PPC64_TPREL16_LO_DS": "debug/elf", + "elf.R_PPC64_TPREL64": "debug/elf", + "elf.R_PPC_ADDR14": "debug/elf", + "elf.R_PPC_ADDR14_BRNTAKEN": "debug/elf", + "elf.R_PPC_ADDR14_BRTAKEN": "debug/elf", + "elf.R_PPC_ADDR16": "debug/elf", + "elf.R_PPC_ADDR16_HA": "debug/elf", + "elf.R_PPC_ADDR16_HI": "debug/elf", + "elf.R_PPC_ADDR16_LO": "debug/elf", + "elf.R_PPC_ADDR24": "debug/elf", + "elf.R_PPC_ADDR32": "debug/elf", + "elf.R_PPC_COPY": "debug/elf", + "elf.R_PPC_DTPMOD32": "debug/elf", + "elf.R_PPC_DTPREL16": "debug/elf", + "elf.R_PPC_DTPREL16_HA": "debug/elf", + "elf.R_PPC_DTPREL16_HI": "debug/elf", + "elf.R_PPC_DTPREL16_LO": "debug/elf", + "elf.R_PPC_DTPREL32": "debug/elf", + "elf.R_PPC_EMB_BIT_FLD": "debug/elf", + "elf.R_PPC_EMB_MRKREF": "debug/elf", + "elf.R_PPC_EMB_NADDR16": "debug/elf", + "elf.R_PPC_EMB_NADDR16_HA": "debug/elf", + "elf.R_PPC_EMB_NADDR16_HI": "debug/elf", + "elf.R_PPC_EMB_NADDR16_LO": "debug/elf", + "elf.R_PPC_EMB_NADDR32": "debug/elf", + "elf.R_PPC_EMB_RELSDA": "debug/elf", + "elf.R_PPC_EMB_RELSEC16": "debug/elf", + "elf.R_PPC_EMB_RELST_HA": "debug/elf", + "elf.R_PPC_EMB_RELST_HI": "debug/elf", + "elf.R_PPC_EMB_RELST_LO": "debug/elf", + "elf.R_PPC_EMB_SDA21": "debug/elf", + "elf.R_PPC_EMB_SDA2I16": "debug/elf", + "elf.R_PPC_EMB_SDA2REL": "debug/elf", + "elf.R_PPC_EMB_SDAI16": "debug/elf", + "elf.R_PPC_GLOB_DAT": "debug/elf", + "elf.R_PPC_GOT16": "debug/elf", + "elf.R_PPC_GOT16_HA": "debug/elf", + "elf.R_PPC_GOT16_HI": "debug/elf", + "elf.R_PPC_GOT16_LO": "debug/elf", + "elf.R_PPC_GOT_TLSGD16": "debug/elf", + "elf.R_PPC_GOT_TLSGD16_HA": "debug/elf", + "elf.R_PPC_GOT_TLSGD16_HI": "debug/elf", + "elf.R_PPC_GOT_TLSGD16_LO": "debug/elf", + "elf.R_PPC_GOT_TLSLD16": "debug/elf", + "elf.R_PPC_GOT_TLSLD16_HA": "debug/elf", + "elf.R_PPC_GOT_TLSLD16_HI": "debug/elf", + "elf.R_PPC_GOT_TLSLD16_LO": "debug/elf", + "elf.R_PPC_GOT_TPREL16": "debug/elf", + "elf.R_PPC_GOT_TPREL16_HA": "debug/elf", + "elf.R_PPC_GOT_TPREL16_HI": "debug/elf", + "elf.R_PPC_GOT_TPREL16_LO": "debug/elf", + "elf.R_PPC_JMP_SLOT": "debug/elf", + "elf.R_PPC_LOCAL24PC": "debug/elf", + "elf.R_PPC_NONE": "debug/elf", + "elf.R_PPC_PLT16_HA": "debug/elf", + "elf.R_PPC_PLT16_HI": "debug/elf", + "elf.R_PPC_PLT16_LO": "debug/elf", + "elf.R_PPC_PLT32": "debug/elf", + "elf.R_PPC_PLTREL24": "debug/elf", + "elf.R_PPC_PLTREL32": "debug/elf", + "elf.R_PPC_REL14": "debug/elf", + "elf.R_PPC_REL14_BRNTAKEN": "debug/elf", + "elf.R_PPC_REL14_BRTAKEN": "debug/elf", + "elf.R_PPC_REL24": "debug/elf", + "elf.R_PPC_REL32": "debug/elf", + "elf.R_PPC_RELATIVE": "debug/elf", + "elf.R_PPC_SDAREL16": "debug/elf", + "elf.R_PPC_SECTOFF": "debug/elf", + "elf.R_PPC_SECTOFF_HA": "debug/elf", + "elf.R_PPC_SECTOFF_HI": "debug/elf", + "elf.R_PPC_SECTOFF_LO": "debug/elf", + "elf.R_PPC_TLS": "debug/elf", + "elf.R_PPC_TPREL16": "debug/elf", + "elf.R_PPC_TPREL16_HA": "debug/elf", + "elf.R_PPC_TPREL16_HI": "debug/elf", + "elf.R_PPC_TPREL16_LO": "debug/elf", + "elf.R_PPC_TPREL32": "debug/elf", + "elf.R_PPC_UADDR16": "debug/elf", + "elf.R_PPC_UADDR32": "debug/elf", + "elf.R_SPARC": "debug/elf", + "elf.R_SPARC_10": "debug/elf", + "elf.R_SPARC_11": "debug/elf", + "elf.R_SPARC_13": "debug/elf", + "elf.R_SPARC_16": "debug/elf", + "elf.R_SPARC_22": "debug/elf", + "elf.R_SPARC_32": "debug/elf", + "elf.R_SPARC_5": "debug/elf", + "elf.R_SPARC_6": "debug/elf", + "elf.R_SPARC_64": "debug/elf", + "elf.R_SPARC_7": "debug/elf", + "elf.R_SPARC_8": "debug/elf", + "elf.R_SPARC_COPY": "debug/elf", + "elf.R_SPARC_DISP16": "debug/elf", + "elf.R_SPARC_DISP32": "debug/elf", + "elf.R_SPARC_DISP64": "debug/elf", + "elf.R_SPARC_DISP8": "debug/elf", + "elf.R_SPARC_GLOB_DAT": "debug/elf", + "elf.R_SPARC_GLOB_JMP": "debug/elf", + "elf.R_SPARC_GOT10": "debug/elf", + "elf.R_SPARC_GOT13": "debug/elf", + "elf.R_SPARC_GOT22": "debug/elf", + "elf.R_SPARC_H44": "debug/elf", + "elf.R_SPARC_HH22": "debug/elf", + "elf.R_SPARC_HI22": "debug/elf", + "elf.R_SPARC_HIPLT22": "debug/elf", + "elf.R_SPARC_HIX22": "debug/elf", + "elf.R_SPARC_HM10": "debug/elf", + "elf.R_SPARC_JMP_SLOT": "debug/elf", + "elf.R_SPARC_L44": "debug/elf", + "elf.R_SPARC_LM22": "debug/elf", + "elf.R_SPARC_LO10": "debug/elf", + "elf.R_SPARC_LOPLT10": "debug/elf", + "elf.R_SPARC_LOX10": "debug/elf", + "elf.R_SPARC_M44": "debug/elf", + "elf.R_SPARC_NONE": "debug/elf", + "elf.R_SPARC_OLO10": "debug/elf", + "elf.R_SPARC_PC10": "debug/elf", + "elf.R_SPARC_PC22": "debug/elf", + "elf.R_SPARC_PCPLT10": "debug/elf", + "elf.R_SPARC_PCPLT22": "debug/elf", + "elf.R_SPARC_PCPLT32": "debug/elf", + "elf.R_SPARC_PC_HH22": "debug/elf", + "elf.R_SPARC_PC_HM10": "debug/elf", + "elf.R_SPARC_PC_LM22": "debug/elf", + "elf.R_SPARC_PLT32": "debug/elf", + "elf.R_SPARC_PLT64": "debug/elf", + "elf.R_SPARC_REGISTER": "debug/elf", + "elf.R_SPARC_RELATIVE": "debug/elf", + "elf.R_SPARC_UA16": "debug/elf", + "elf.R_SPARC_UA32": "debug/elf", + "elf.R_SPARC_UA64": "debug/elf", + "elf.R_SPARC_WDISP16": "debug/elf", + "elf.R_SPARC_WDISP19": "debug/elf", + "elf.R_SPARC_WDISP22": "debug/elf", + "elf.R_SPARC_WDISP30": "debug/elf", + "elf.R_SPARC_WPLT30": "debug/elf", + "elf.R_SYM32": "debug/elf", + "elf.R_SYM64": "debug/elf", + "elf.R_TYPE32": "debug/elf", + "elf.R_TYPE64": "debug/elf", + "elf.R_X86_64": "debug/elf", + "elf.R_X86_64_16": "debug/elf", + "elf.R_X86_64_32": "debug/elf", + "elf.R_X86_64_32S": "debug/elf", + "elf.R_X86_64_64": "debug/elf", + "elf.R_X86_64_8": "debug/elf", + "elf.R_X86_64_COPY": "debug/elf", + "elf.R_X86_64_DTPMOD64": "debug/elf", + "elf.R_X86_64_DTPOFF32": "debug/elf", + "elf.R_X86_64_DTPOFF64": "debug/elf", + "elf.R_X86_64_GLOB_DAT": "debug/elf", + "elf.R_X86_64_GOT32": "debug/elf", + "elf.R_X86_64_GOTPCREL": "debug/elf", + "elf.R_X86_64_GOTTPOFF": "debug/elf", + "elf.R_X86_64_JMP_SLOT": "debug/elf", + "elf.R_X86_64_NONE": "debug/elf", + "elf.R_X86_64_PC16": "debug/elf", + "elf.R_X86_64_PC32": "debug/elf", + "elf.R_X86_64_PC8": "debug/elf", + "elf.R_X86_64_PLT32": "debug/elf", + "elf.R_X86_64_RELATIVE": "debug/elf", + "elf.R_X86_64_TLSGD": "debug/elf", + "elf.R_X86_64_TLSLD": "debug/elf", + "elf.R_X86_64_TPOFF32": "debug/elf", + "elf.R_X86_64_TPOFF64": "debug/elf", + "elf.Rel32": "debug/elf", + "elf.Rel64": "debug/elf", + "elf.Rela32": "debug/elf", + "elf.Rela64": "debug/elf", + "elf.SHF_ALLOC": "debug/elf", + "elf.SHF_COMPRESSED": "debug/elf", + "elf.SHF_EXECINSTR": "debug/elf", + "elf.SHF_GROUP": "debug/elf", + "elf.SHF_INFO_LINK": "debug/elf", + "elf.SHF_LINK_ORDER": "debug/elf", + "elf.SHF_MASKOS": "debug/elf", + "elf.SHF_MASKPROC": "debug/elf", + "elf.SHF_MERGE": "debug/elf", + "elf.SHF_OS_NONCONFORMING": "debug/elf", + "elf.SHF_STRINGS": "debug/elf", + "elf.SHF_TLS": "debug/elf", + "elf.SHF_WRITE": "debug/elf", + "elf.SHN_ABS": "debug/elf", + "elf.SHN_COMMON": "debug/elf", + "elf.SHN_HIOS": "debug/elf", + "elf.SHN_HIPROC": "debug/elf", + "elf.SHN_HIRESERVE": "debug/elf", + "elf.SHN_LOOS": "debug/elf", + "elf.SHN_LOPROC": "debug/elf", + "elf.SHN_LORESERVE": "debug/elf", + "elf.SHN_UNDEF": "debug/elf", + "elf.SHN_XINDEX": "debug/elf", + "elf.SHT_DYNAMIC": "debug/elf", + "elf.SHT_DYNSYM": "debug/elf", + "elf.SHT_FINI_ARRAY": "debug/elf", + "elf.SHT_GNU_ATTRIBUTES": "debug/elf", + "elf.SHT_GNU_HASH": "debug/elf", + "elf.SHT_GNU_LIBLIST": "debug/elf", + "elf.SHT_GNU_VERDEF": "debug/elf", + "elf.SHT_GNU_VERNEED": "debug/elf", + "elf.SHT_GNU_VERSYM": "debug/elf", + "elf.SHT_GROUP": "debug/elf", + "elf.SHT_HASH": "debug/elf", + "elf.SHT_HIOS": "debug/elf", + "elf.SHT_HIPROC": "debug/elf", + "elf.SHT_HIUSER": "debug/elf", + "elf.SHT_INIT_ARRAY": "debug/elf", + "elf.SHT_LOOS": "debug/elf", + "elf.SHT_LOPROC": "debug/elf", + "elf.SHT_LOUSER": "debug/elf", + "elf.SHT_NOBITS": "debug/elf", + "elf.SHT_NOTE": "debug/elf", + "elf.SHT_NULL": "debug/elf", + "elf.SHT_PREINIT_ARRAY": "debug/elf", + "elf.SHT_PROGBITS": "debug/elf", + "elf.SHT_REL": "debug/elf", + "elf.SHT_RELA": "debug/elf", + "elf.SHT_SHLIB": "debug/elf", + "elf.SHT_STRTAB": "debug/elf", + "elf.SHT_SYMTAB": "debug/elf", + "elf.SHT_SYMTAB_SHNDX": "debug/elf", + "elf.STB_GLOBAL": "debug/elf", + "elf.STB_HIOS": "debug/elf", + "elf.STB_HIPROC": "debug/elf", + "elf.STB_LOCAL": "debug/elf", + "elf.STB_LOOS": "debug/elf", + "elf.STB_LOPROC": "debug/elf", + "elf.STB_WEAK": "debug/elf", + "elf.STT_COMMON": "debug/elf", + "elf.STT_FILE": "debug/elf", + "elf.STT_FUNC": "debug/elf", + "elf.STT_HIOS": "debug/elf", + "elf.STT_HIPROC": "debug/elf", + "elf.STT_LOOS": "debug/elf", + "elf.STT_LOPROC": "debug/elf", + "elf.STT_NOTYPE": "debug/elf", + "elf.STT_OBJECT": "debug/elf", + "elf.STT_SECTION": "debug/elf", + "elf.STT_TLS": "debug/elf", + "elf.STV_DEFAULT": "debug/elf", + "elf.STV_HIDDEN": "debug/elf", + "elf.STV_INTERNAL": "debug/elf", + "elf.STV_PROTECTED": "debug/elf", + "elf.ST_BIND": "debug/elf", + "elf.ST_INFO": "debug/elf", + "elf.ST_TYPE": "debug/elf", + "elf.ST_VISIBILITY": "debug/elf", + "elf.Section": "debug/elf", + "elf.Section32": "debug/elf", + "elf.Section64": "debug/elf", + "elf.SectionFlag": "debug/elf", + "elf.SectionHeader": "debug/elf", + "elf.SectionIndex": "debug/elf", + "elf.SectionType": "debug/elf", + "elf.Sym32": "debug/elf", + "elf.Sym32Size": "debug/elf", + "elf.Sym64": "debug/elf", + "elf.Sym64Size": "debug/elf", + "elf.SymBind": "debug/elf", + "elf.SymType": "debug/elf", + "elf.SymVis": "debug/elf", + "elf.Symbol": "debug/elf", + "elf.Type": "debug/elf", + "elf.Version": "debug/elf", + "elliptic.Curve": "crypto/elliptic", + "elliptic.CurveParams": "crypto/elliptic", + "elliptic.GenerateKey": "crypto/elliptic", + "elliptic.Marshal": "crypto/elliptic", + "elliptic.P224": "crypto/elliptic", + "elliptic.P256": "crypto/elliptic", + "elliptic.P384": "crypto/elliptic", + "elliptic.P521": "crypto/elliptic", + "elliptic.Unmarshal": "crypto/elliptic", + "encoding.BinaryMarshaler": "encoding", + "encoding.BinaryUnmarshaler": "encoding", + "encoding.TextMarshaler": "encoding", + "encoding.TextUnmarshaler": "encoding", + "errors.New": "errors", + "exec.Cmd": "os/exec", + "exec.Command": "os/exec", + "exec.CommandContext": "os/exec", + "exec.ErrNotFound": "os/exec", + "exec.Error": "os/exec", + "exec.ExitError": "os/exec", + "exec.LookPath": "os/exec", + "expvar.Do": "expvar", + "expvar.Float": "expvar", + "expvar.Func": "expvar", + "expvar.Get": "expvar", + "expvar.Handler": "expvar", + "expvar.Int": "expvar", + "expvar.KeyValue": "expvar", + "expvar.Map": "expvar", + "expvar.NewFloat": "expvar", + "expvar.NewInt": "expvar", + "expvar.NewMap": "expvar", + "expvar.NewString": "expvar", + "expvar.Publish": "expvar", + "expvar.String": "expvar", + "expvar.Var": "expvar", + "fcgi.ErrConnClosed": "net/http/fcgi", + "fcgi.ErrRequestAborted": "net/http/fcgi", + "fcgi.ProcessEnv": "net/http/fcgi", + "fcgi.Serve": "net/http/fcgi", + "filepath.Abs": "path/filepath", + "filepath.Base": "path/filepath", + "filepath.Clean": "path/filepath", + "filepath.Dir": "path/filepath", + "filepath.ErrBadPattern": "path/filepath", + "filepath.EvalSymlinks": "path/filepath", + "filepath.Ext": "path/filepath", + "filepath.FromSlash": "path/filepath", + "filepath.Glob": "path/filepath", + "filepath.HasPrefix": "path/filepath", + "filepath.IsAbs": "path/filepath", + "filepath.Join": "path/filepath", + "filepath.ListSeparator": "path/filepath", + "filepath.Match": "path/filepath", + "filepath.Rel": "path/filepath", + "filepath.Separator": "path/filepath", + "filepath.SkipDir": "path/filepath", + "filepath.Split": "path/filepath", + "filepath.SplitList": "path/filepath", + "filepath.ToSlash": "path/filepath", + "filepath.VolumeName": "path/filepath", + "filepath.Walk": "path/filepath", + "filepath.WalkFunc": "path/filepath", + "flag.Arg": "flag", + "flag.Args": "flag", + "flag.Bool": "flag", + "flag.BoolVar": "flag", + "flag.CommandLine": "flag", + "flag.ContinueOnError": "flag", + "flag.Duration": "flag", + "flag.DurationVar": "flag", + "flag.ErrHelp": "flag", + "flag.ErrorHandling": "flag", + "flag.ExitOnError": "flag", + "flag.Flag": "flag", + "flag.FlagSet": "flag", + "flag.Float64": "flag", + "flag.Float64Var": "flag", + "flag.Getter": "flag", + "flag.Int": "flag", + "flag.Int64": "flag", + "flag.Int64Var": "flag", + "flag.IntVar": "flag", + "flag.Lookup": "flag", + "flag.NArg": "flag", + "flag.NFlag": "flag", + "flag.NewFlagSet": "flag", + "flag.PanicOnError": "flag", + "flag.Parse": "flag", + "flag.Parsed": "flag", + "flag.PrintDefaults": "flag", + "flag.Set": "flag", + "flag.String": "flag", + "flag.StringVar": "flag", + "flag.Uint": "flag", + "flag.Uint64": "flag", + "flag.Uint64Var": "flag", + "flag.UintVar": "flag", + "flag.UnquoteUsage": "flag", + "flag.Usage": "flag", + "flag.Value": "flag", + "flag.Var": "flag", + "flag.Visit": "flag", + "flag.VisitAll": "flag", + "flate.BestCompression": "compress/flate", + "flate.BestSpeed": "compress/flate", + "flate.CorruptInputError": "compress/flate", + "flate.DefaultCompression": "compress/flate", + "flate.HuffmanOnly": "compress/flate", + "flate.InternalError": "compress/flate", + "flate.NewReader": "compress/flate", + "flate.NewReaderDict": "compress/flate", + "flate.NewWriter": "compress/flate", + "flate.NewWriterDict": "compress/flate", + "flate.NoCompression": "compress/flate", + "flate.ReadError": "compress/flate", + "flate.Reader": "compress/flate", + "flate.Resetter": "compress/flate", + "flate.WriteError": "compress/flate", + "flate.Writer": "compress/flate", + "fmt.Errorf": "fmt", + "fmt.Formatter": "fmt", + "fmt.Fprint": "fmt", + "fmt.Fprintf": "fmt", + "fmt.Fprintln": "fmt", + "fmt.Fscan": "fmt", + "fmt.Fscanf": "fmt", + "fmt.Fscanln": "fmt", + "fmt.GoStringer": "fmt", + "fmt.Print": "fmt", + "fmt.Printf": "fmt", + "fmt.Println": "fmt", + "fmt.Scan": "fmt", + "fmt.ScanState": "fmt", + "fmt.Scanf": "fmt", + "fmt.Scanln": "fmt", + "fmt.Scanner": "fmt", + "fmt.Sprint": "fmt", + "fmt.Sprintf": "fmt", + "fmt.Sprintln": "fmt", + "fmt.Sscan": "fmt", + "fmt.Sscanf": "fmt", + "fmt.Sscanln": "fmt", + "fmt.State": "fmt", + "fmt.Stringer": "fmt", + "fnv.New128": "hash/fnv", + "fnv.New128a": "hash/fnv", + "fnv.New32": "hash/fnv", + "fnv.New32a": "hash/fnv", + "fnv.New64": "hash/fnv", + "fnv.New64a": "hash/fnv", + "format.Node": "go/format", + "format.Source": "go/format", + "gif.Decode": "image/gif", + "gif.DecodeAll": "image/gif", + "gif.DecodeConfig": "image/gif", + "gif.DisposalBackground": "image/gif", + "gif.DisposalNone": "image/gif", + "gif.DisposalPrevious": "image/gif", + "gif.Encode": "image/gif", + "gif.EncodeAll": "image/gif", + "gif.GIF": "image/gif", + "gif.Options": "image/gif", + "gob.CommonType": "encoding/gob", + "gob.Decoder": "encoding/gob", + "gob.Encoder": "encoding/gob", + "gob.GobDecoder": "encoding/gob", + "gob.GobEncoder": "encoding/gob", + "gob.NewDecoder": "encoding/gob", + "gob.NewEncoder": "encoding/gob", + "gob.Register": "encoding/gob", + "gob.RegisterName": "encoding/gob", + "gosym.DecodingError": "debug/gosym", + "gosym.Func": "debug/gosym", + "gosym.LineTable": "debug/gosym", + "gosym.NewLineTable": "debug/gosym", + "gosym.NewTable": "debug/gosym", + "gosym.Obj": "debug/gosym", + "gosym.Sym": "debug/gosym", + "gosym.Table": "debug/gosym", + "gosym.UnknownFileError": "debug/gosym", + "gosym.UnknownLineError": "debug/gosym", + "gzip.BestCompression": "compress/gzip", + "gzip.BestSpeed": "compress/gzip", + "gzip.DefaultCompression": "compress/gzip", + "gzip.ErrChecksum": "compress/gzip", + "gzip.ErrHeader": "compress/gzip", + "gzip.Header": "compress/gzip", + "gzip.HuffmanOnly": "compress/gzip", + "gzip.NewReader": "compress/gzip", + "gzip.NewWriter": "compress/gzip", + "gzip.NewWriterLevel": "compress/gzip", + "gzip.NoCompression": "compress/gzip", + "gzip.Reader": "compress/gzip", + "gzip.Writer": "compress/gzip", + "hash.Hash": "hash", + "hash.Hash32": "hash", + "hash.Hash64": "hash", + "heap.Fix": "container/heap", + "heap.Init": "container/heap", + "heap.Interface": "container/heap", + "heap.Pop": "container/heap", + "heap.Push": "container/heap", + "heap.Remove": "container/heap", + "hex.Decode": "encoding/hex", + "hex.DecodeString": "encoding/hex", + "hex.DecodedLen": "encoding/hex", + "hex.Dump": "encoding/hex", + "hex.Dumper": "encoding/hex", + "hex.Encode": "encoding/hex", + "hex.EncodeToString": "encoding/hex", + "hex.EncodedLen": "encoding/hex", + "hex.ErrLength": "encoding/hex", + "hex.InvalidByteError": "encoding/hex", + "hmac.Equal": "crypto/hmac", + "hmac.New": "crypto/hmac", + "html.EscapeString": "html", + "html.UnescapeString": "html", + "http.CanonicalHeaderKey": "net/http", + "http.Client": "net/http", + "http.CloseNotifier": "net/http", + "http.ConnState": "net/http", + "http.Cookie": "net/http", + "http.CookieJar": "net/http", + "http.DefaultClient": "net/http", + "http.DefaultMaxHeaderBytes": "net/http", + "http.DefaultMaxIdleConnsPerHost": "net/http", + "http.DefaultServeMux": "net/http", + "http.DefaultTransport": "net/http", + "http.DetectContentType": "net/http", + "http.Dir": "net/http", + "http.ErrAbortHandler": "net/http", + "http.ErrBodyNotAllowed": "net/http", + "http.ErrBodyReadAfterClose": "net/http", + "http.ErrContentLength": "net/http", + "http.ErrHandlerTimeout": "net/http", + "http.ErrHeaderTooLong": "net/http", + "http.ErrHijacked": "net/http", + "http.ErrLineTooLong": "net/http", + "http.ErrMissingBoundary": "net/http", + "http.ErrMissingContentLength": "net/http", + "http.ErrMissingFile": "net/http", + "http.ErrNoCookie": "net/http", + "http.ErrNoLocation": "net/http", + "http.ErrNotMultipart": "net/http", + "http.ErrNotSupported": "net/http", + "http.ErrServerClosed": "net/http", + "http.ErrShortBody": "net/http", + "http.ErrSkipAltProtocol": "net/http", + "http.ErrUnexpectedTrailer": "net/http", + "http.ErrUseLastResponse": "net/http", + "http.ErrWriteAfterFlush": "net/http", + "http.Error": "net/http", + "http.File": "net/http", + "http.FileServer": "net/http", + "http.FileSystem": "net/http", + "http.Flusher": "net/http", + "http.Get": "net/http", + "http.Handle": "net/http", + "http.HandleFunc": "net/http", + "http.Handler": "net/http", + "http.HandlerFunc": "net/http", + "http.Head": "net/http", + "http.Header": "net/http", + "http.Hijacker": "net/http", + "http.ListenAndServe": "net/http", + "http.ListenAndServeTLS": "net/http", + "http.LocalAddrContextKey": "net/http", + "http.MaxBytesReader": "net/http", + "http.MethodConnect": "net/http", + "http.MethodDelete": "net/http", + "http.MethodGet": "net/http", + "http.MethodHead": "net/http", + "http.MethodOptions": "net/http", + "http.MethodPatch": "net/http", + "http.MethodPost": "net/http", + "http.MethodPut": "net/http", + "http.MethodTrace": "net/http", + "http.NewFileTransport": "net/http", + "http.NewRequest": "net/http", + "http.NewServeMux": "net/http", + "http.NoBody": "net/http", + "http.NotFound": "net/http", + "http.NotFoundHandler": "net/http", + "http.ParseHTTPVersion": "net/http", + "http.ParseTime": "net/http", + "http.Post": "net/http", + "http.PostForm": "net/http", + "http.ProtocolError": "net/http", + "http.ProxyFromEnvironment": "net/http", + "http.ProxyURL": "net/http", + "http.PushOptions": "net/http", + "http.Pusher": "net/http", + "http.ReadRequest": "net/http", + "http.ReadResponse": "net/http", + "http.Redirect": "net/http", + "http.RedirectHandler": "net/http", + "http.Request": "net/http", + "http.Response": "net/http", + "http.ResponseWriter": "net/http", + "http.RoundTripper": "net/http", + "http.Serve": "net/http", + "http.ServeContent": "net/http", + "http.ServeFile": "net/http", + "http.ServeMux": "net/http", + "http.ServeTLS": "net/http", + "http.Server": "net/http", + "http.ServerContextKey": "net/http", + "http.SetCookie": "net/http", + "http.StateActive": "net/http", + "http.StateClosed": "net/http", + "http.StateHijacked": "net/http", + "http.StateIdle": "net/http", + "http.StateNew": "net/http", + "http.StatusAccepted": "net/http", + "http.StatusAlreadyReported": "net/http", + "http.StatusBadGateway": "net/http", + "http.StatusBadRequest": "net/http", + "http.StatusConflict": "net/http", + "http.StatusContinue": "net/http", + "http.StatusCreated": "net/http", + "http.StatusExpectationFailed": "net/http", + "http.StatusFailedDependency": "net/http", + "http.StatusForbidden": "net/http", + "http.StatusFound": "net/http", + "http.StatusGatewayTimeout": "net/http", + "http.StatusGone": "net/http", + "http.StatusHTTPVersionNotSupported": "net/http", + "http.StatusIMUsed": "net/http", + "http.StatusInsufficientStorage": "net/http", + "http.StatusInternalServerError": "net/http", + "http.StatusLengthRequired": "net/http", + "http.StatusLocked": "net/http", + "http.StatusLoopDetected": "net/http", + "http.StatusMethodNotAllowed": "net/http", + "http.StatusMovedPermanently": "net/http", + "http.StatusMultiStatus": "net/http", + "http.StatusMultipleChoices": "net/http", + "http.StatusNetworkAuthenticationRequired": "net/http", + "http.StatusNoContent": "net/http", + "http.StatusNonAuthoritativeInfo": "net/http", + "http.StatusNotAcceptable": "net/http", + "http.StatusNotExtended": "net/http", + "http.StatusNotFound": "net/http", + "http.StatusNotImplemented": "net/http", + "http.StatusNotModified": "net/http", + "http.StatusOK": "net/http", + "http.StatusPartialContent": "net/http", + "http.StatusPaymentRequired": "net/http", + "http.StatusPermanentRedirect": "net/http", + "http.StatusPreconditionFailed": "net/http", + "http.StatusPreconditionRequired": "net/http", + "http.StatusProcessing": "net/http", + "http.StatusProxyAuthRequired": "net/http", + "http.StatusRequestEntityTooLarge": "net/http", + "http.StatusRequestHeaderFieldsTooLarge": "net/http", + "http.StatusRequestTimeout": "net/http", + "http.StatusRequestURITooLong": "net/http", + "http.StatusRequestedRangeNotSatisfiable": "net/http", + "http.StatusResetContent": "net/http", + "http.StatusSeeOther": "net/http", + "http.StatusServiceUnavailable": "net/http", + "http.StatusSwitchingProtocols": "net/http", + "http.StatusTeapot": "net/http", + "http.StatusTemporaryRedirect": "net/http", + "http.StatusText": "net/http", + "http.StatusTooManyRequests": "net/http", + "http.StatusUnauthorized": "net/http", + "http.StatusUnavailableForLegalReasons": "net/http", + "http.StatusUnprocessableEntity": "net/http", + "http.StatusUnsupportedMediaType": "net/http", + "http.StatusUpgradeRequired": "net/http", + "http.StatusUseProxy": "net/http", + "http.StatusVariantAlsoNegotiates": "net/http", + "http.StripPrefix": "net/http", + "http.TimeFormat": "net/http", + "http.TimeoutHandler": "net/http", + "http.TrailerPrefix": "net/http", + "http.Transport": "net/http", + "httptest.DefaultRemoteAddr": "net/http/httptest", + "httptest.NewRecorder": "net/http/httptest", + "httptest.NewRequest": "net/http/httptest", + "httptest.NewServer": "net/http/httptest", + "httptest.NewTLSServer": "net/http/httptest", + "httptest.NewUnstartedServer": "net/http/httptest", + "httptest.ResponseRecorder": "net/http/httptest", + "httptest.Server": "net/http/httptest", + "httptrace.ClientTrace": "net/http/httptrace", + "httptrace.ContextClientTrace": "net/http/httptrace", + "httptrace.DNSDoneInfo": "net/http/httptrace", + "httptrace.DNSStartInfo": "net/http/httptrace", + "httptrace.GotConnInfo": "net/http/httptrace", + "httptrace.WithClientTrace": "net/http/httptrace", + "httptrace.WroteRequestInfo": "net/http/httptrace", + "httputil.BufferPool": "net/http/httputil", + "httputil.ClientConn": "net/http/httputil", + "httputil.DumpRequest": "net/http/httputil", + "httputil.DumpRequestOut": "net/http/httputil", + "httputil.DumpResponse": "net/http/httputil", + "httputil.ErrClosed": "net/http/httputil", + "httputil.ErrLineTooLong": "net/http/httputil", + "httputil.ErrPersistEOF": "net/http/httputil", + "httputil.ErrPipeline": "net/http/httputil", + "httputil.NewChunkedReader": "net/http/httputil", + "httputil.NewChunkedWriter": "net/http/httputil", + "httputil.NewClientConn": "net/http/httputil", + "httputil.NewProxyClientConn": "net/http/httputil", + "httputil.NewServerConn": "net/http/httputil", + "httputil.NewSingleHostReverseProxy": "net/http/httputil", + "httputil.ReverseProxy": "net/http/httputil", + "httputil.ServerConn": "net/http/httputil", + "image.Alpha": "image", + "image.Alpha16": "image", + "image.Black": "image", + "image.CMYK": "image", + "image.Config": "image", + "image.Decode": "image", + "image.DecodeConfig": "image", + "image.ErrFormat": "image", + "image.Gray": "image", + "image.Gray16": "image", + "image.Image": "image", + "image.NRGBA": "image", + "image.NRGBA64": "image", + "image.NYCbCrA": "image", + "image.NewAlpha": "image", + "image.NewAlpha16": "image", + "image.NewCMYK": "image", + "image.NewGray": "image", + "image.NewGray16": "image", + "image.NewNRGBA": "image", + "image.NewNRGBA64": "image", + "image.NewNYCbCrA": "image", + "image.NewPaletted": "image", + "image.NewRGBA": "image", + "image.NewRGBA64": "image", + "image.NewUniform": "image", + "image.NewYCbCr": "image", + "image.Opaque": "image", + "image.Paletted": "image", + "image.PalettedImage": "image", + "image.Point": "image", + "image.Pt": "image", + "image.RGBA": "image", + "image.RGBA64": "image", + "image.Rect": "image", + "image.Rectangle": "image", + "image.RegisterFormat": "image", + "image.Transparent": "image", + "image.Uniform": "image", + "image.White": "image", + "image.YCbCr": "image", + "image.YCbCrSubsampleRatio": "image", + "image.YCbCrSubsampleRatio410": "image", + "image.YCbCrSubsampleRatio411": "image", + "image.YCbCrSubsampleRatio420": "image", + "image.YCbCrSubsampleRatio422": "image", + "image.YCbCrSubsampleRatio440": "image", + "image.YCbCrSubsampleRatio444": "image", + "image.ZP": "image", + "image.ZR": "image", + "importer.Default": "go/importer", + "importer.For": "go/importer", + "importer.Lookup": "go/importer", + "io.ByteReader": "io", + "io.ByteScanner": "io", + "io.ByteWriter": "io", + "io.Closer": "io", + "io.Copy": "io", + "io.CopyBuffer": "io", + "io.CopyN": "io", + "io.EOF": "io", + "io.ErrClosedPipe": "io", + "io.ErrNoProgress": "io", + "io.ErrShortBuffer": "io", + "io.ErrShortWrite": "io", + "io.ErrUnexpectedEOF": "io", + "io.LimitReader": "io", + "io.LimitedReader": "io", + "io.MultiReader": "io", + "io.MultiWriter": "io", + "io.NewSectionReader": "io", + "io.Pipe": "io", + "io.PipeReader": "io", + "io.PipeWriter": "io", + "io.ReadAtLeast": "io", + "io.ReadCloser": "io", + "io.ReadFull": "io", + "io.ReadSeeker": "io", + "io.ReadWriteCloser": "io", + "io.ReadWriteSeeker": "io", + "io.ReadWriter": "io", + "io.Reader": "io", + "io.ReaderAt": "io", + "io.ReaderFrom": "io", + "io.RuneReader": "io", + "io.RuneScanner": "io", + "io.SectionReader": "io", + "io.SeekCurrent": "io", + "io.SeekEnd": "io", + "io.SeekStart": "io", + "io.Seeker": "io", + "io.TeeReader": "io", + "io.WriteCloser": "io", + "io.WriteSeeker": "io", + "io.WriteString": "io", + "io.Writer": "io", + "io.WriterAt": "io", + "io.WriterTo": "io", + "iotest.DataErrReader": "testing/iotest", + "iotest.ErrTimeout": "testing/iotest", + "iotest.HalfReader": "testing/iotest", + "iotest.NewReadLogger": "testing/iotest", + "iotest.NewWriteLogger": "testing/iotest", + "iotest.OneByteReader": "testing/iotest", + "iotest.TimeoutReader": "testing/iotest", + "iotest.TruncateWriter": "testing/iotest", + "ioutil.Discard": "io/ioutil", + "ioutil.NopCloser": "io/ioutil", + "ioutil.ReadAll": "io/ioutil", + "ioutil.ReadDir": "io/ioutil", + "ioutil.ReadFile": "io/ioutil", + "ioutil.TempDir": "io/ioutil", + "ioutil.TempFile": "io/ioutil", + "ioutil.WriteFile": "io/ioutil", + "jpeg.Decode": "image/jpeg", + "jpeg.DecodeConfig": "image/jpeg", + "jpeg.DefaultQuality": "image/jpeg", + "jpeg.Encode": "image/jpeg", + "jpeg.FormatError": "image/jpeg", + "jpeg.Options": "image/jpeg", + "jpeg.Reader": "image/jpeg", + "jpeg.UnsupportedError": "image/jpeg", + "json.Compact": "encoding/json", + "json.Decoder": "encoding/json", + "json.Delim": "encoding/json", + "json.Encoder": "encoding/json", + "json.HTMLEscape": "encoding/json", + "json.Indent": "encoding/json", + "json.InvalidUTF8Error": "encoding/json", + "json.InvalidUnmarshalError": "encoding/json", + "json.Marshal": "encoding/json", + "json.MarshalIndent": "encoding/json", + "json.Marshaler": "encoding/json", + "json.MarshalerError": "encoding/json", + "json.NewDecoder": "encoding/json", + "json.NewEncoder": "encoding/json", + "json.Number": "encoding/json", + "json.RawMessage": "encoding/json", + "json.SyntaxError": "encoding/json", + "json.Token": "encoding/json", + "json.Unmarshal": "encoding/json", + "json.UnmarshalFieldError": "encoding/json", + "json.UnmarshalTypeError": "encoding/json", + "json.Unmarshaler": "encoding/json", + "json.UnsupportedTypeError": "encoding/json", + "json.UnsupportedValueError": "encoding/json", + "json.Valid": "encoding/json", + "jsonrpc.Dial": "net/rpc/jsonrpc", + "jsonrpc.NewClient": "net/rpc/jsonrpc", + "jsonrpc.NewClientCodec": "net/rpc/jsonrpc", + "jsonrpc.NewServerCodec": "net/rpc/jsonrpc", + "jsonrpc.ServeConn": "net/rpc/jsonrpc", + "list.Element": "container/list", + "list.List": "container/list", + "list.New": "container/list", + "log.Fatal": "log", + "log.Fatalf": "log", + "log.Fatalln": "log", + "log.Flags": "log", + "log.LUTC": "log", + "log.Ldate": "log", + "log.Llongfile": "log", + "log.Lmicroseconds": "log", + "log.Logger": "log", + "log.Lshortfile": "log", + "log.LstdFlags": "log", + "log.Ltime": "log", + "log.New": "log", + "log.Output": "log", + "log.Panic": "log", + "log.Panicf": "log", + "log.Panicln": "log", + "log.Prefix": "log", + "log.Print": "log", + "log.Printf": "log", + "log.Println": "log", + "log.SetFlags": "log", + "log.SetOutput": "log", + "log.SetPrefix": "log", + "lzw.LSB": "compress/lzw", + "lzw.MSB": "compress/lzw", + "lzw.NewReader": "compress/lzw", + "lzw.NewWriter": "compress/lzw", + "lzw.Order": "compress/lzw", + "macho.Cpu": "debug/macho", + "macho.Cpu386": "debug/macho", + "macho.CpuAmd64": "debug/macho", + "macho.CpuArm": "debug/macho", + "macho.CpuPpc": "debug/macho", + "macho.CpuPpc64": "debug/macho", + "macho.Dylib": "debug/macho", + "macho.DylibCmd": "debug/macho", + "macho.Dysymtab": "debug/macho", + "macho.DysymtabCmd": "debug/macho", + "macho.ErrNotFat": "debug/macho", + "macho.FatArch": "debug/macho", + "macho.FatArchHeader": "debug/macho", + "macho.FatFile": "debug/macho", + "macho.File": "debug/macho", + "macho.FileHeader": "debug/macho", + "macho.FormatError": "debug/macho", + "macho.Load": "debug/macho", + "macho.LoadBytes": "debug/macho", + "macho.LoadCmd": "debug/macho", + "macho.LoadCmdDylib": "debug/macho", + "macho.LoadCmdDylinker": "debug/macho", + "macho.LoadCmdDysymtab": "debug/macho", + "macho.LoadCmdSegment": "debug/macho", + "macho.LoadCmdSegment64": "debug/macho", + "macho.LoadCmdSymtab": "debug/macho", + "macho.LoadCmdThread": "debug/macho", + "macho.LoadCmdUnixThread": "debug/macho", + "macho.Magic32": "debug/macho", + "macho.Magic64": "debug/macho", + "macho.MagicFat": "debug/macho", + "macho.NewFatFile": "debug/macho", + "macho.NewFile": "debug/macho", + "macho.Nlist32": "debug/macho", + "macho.Nlist64": "debug/macho", + "macho.Open": "debug/macho", + "macho.OpenFat": "debug/macho", + "macho.Regs386": "debug/macho", + "macho.RegsAMD64": "debug/macho", + "macho.Section": "debug/macho", + "macho.Section32": "debug/macho", + "macho.Section64": "debug/macho", + "macho.SectionHeader": "debug/macho", + "macho.Segment": "debug/macho", + "macho.Segment32": "debug/macho", + "macho.Segment64": "debug/macho", + "macho.SegmentHeader": "debug/macho", + "macho.Symbol": "debug/macho", + "macho.Symtab": "debug/macho", + "macho.SymtabCmd": "debug/macho", + "macho.Thread": "debug/macho", + "macho.Type": "debug/macho", + "macho.TypeBundle": "debug/macho", + "macho.TypeDylib": "debug/macho", + "macho.TypeExec": "debug/macho", + "macho.TypeObj": "debug/macho", + "mail.Address": "net/mail", + "mail.AddressParser": "net/mail", + "mail.ErrHeaderNotPresent": "net/mail", + "mail.Header": "net/mail", + "mail.Message": "net/mail", + "mail.ParseAddress": "net/mail", + "mail.ParseAddressList": "net/mail", + "mail.ParseDate": "net/mail", + "mail.ReadMessage": "net/mail", + "math.Abs": "math", + "math.Acos": "math", + "math.Acosh": "math", + "math.Asin": "math", + "math.Asinh": "math", + "math.Atan": "math", + "math.Atan2": "math", + "math.Atanh": "math", + "math.Cbrt": "math", + "math.Ceil": "math", + "math.Copysign": "math", + "math.Cos": "math", + "math.Cosh": "math", + "math.Dim": "math", + "math.E": "math", + "math.Erf": "math", + "math.Erfc": "math", + "math.Exp": "math", + "math.Exp2": "math", + "math.Expm1": "math", + "math.Float32bits": "math", + "math.Float32frombits": "math", + "math.Float64bits": "math", + "math.Float64frombits": "math", + "math.Floor": "math", + "math.Frexp": "math", + "math.Gamma": "math", + "math.Hypot": "math", + "math.Ilogb": "math", + "math.Inf": "math", + "math.IsInf": "math", + "math.IsNaN": "math", + "math.J0": "math", + "math.J1": "math", + "math.Jn": "math", + "math.Ldexp": "math", + "math.Lgamma": "math", + "math.Ln10": "math", + "math.Ln2": "math", + "math.Log": "math", + "math.Log10": "math", + "math.Log10E": "math", + "math.Log1p": "math", + "math.Log2": "math", + "math.Log2E": "math", + "math.Logb": "math", + "math.Max": "math", + "math.MaxFloat32": "math", + "math.MaxFloat64": "math", + "math.MaxInt16": "math", + "math.MaxInt32": "math", + "math.MaxInt64": "math", + "math.MaxInt8": "math", + "math.MaxUint16": "math", + "math.MaxUint32": "math", + "math.MaxUint64": "math", + "math.MaxUint8": "math", + "math.Min": "math", + "math.MinInt16": "math", + "math.MinInt32": "math", + "math.MinInt64": "math", + "math.MinInt8": "math", + "math.Mod": "math", + "math.Modf": "math", + "math.NaN": "math", + "math.Nextafter": "math", + "math.Nextafter32": "math", + "math.Phi": "math", + "math.Pi": "math", + "math.Pow": "math", + "math.Pow10": "math", + "math.Remainder": "math", + "math.Signbit": "math", + "math.Sin": "math", + "math.Sincos": "math", + "math.Sinh": "math", + "math.SmallestNonzeroFloat32": "math", + "math.SmallestNonzeroFloat64": "math", + "math.Sqrt": "math", + "math.Sqrt2": "math", + "math.SqrtE": "math", + "math.SqrtPhi": "math", + "math.SqrtPi": "math", + "math.Tan": "math", + "math.Tanh": "math", + "math.Trunc": "math", + "math.Y0": "math", + "math.Y1": "math", + "math.Yn": "math", + "md5.BlockSize": "crypto/md5", + "md5.New": "crypto/md5", + "md5.Size": "crypto/md5", + "md5.Sum": "crypto/md5", + "mime.AddExtensionType": "mime", + "mime.BEncoding": "mime", + "mime.ErrInvalidMediaParameter": "mime", + "mime.ExtensionsByType": "mime", + "mime.FormatMediaType": "mime", + "mime.ParseMediaType": "mime", + "mime.QEncoding": "mime", + "mime.TypeByExtension": "mime", + "mime.WordDecoder": "mime", + "mime.WordEncoder": "mime", + "multipart.ErrMessageTooLarge": "mime/multipart", + "multipart.File": "mime/multipart", + "multipart.FileHeader": "mime/multipart", + "multipart.Form": "mime/multipart", + "multipart.NewReader": "mime/multipart", + "multipart.NewWriter": "mime/multipart", + "multipart.Part": "mime/multipart", + "multipart.Reader": "mime/multipart", + "multipart.Writer": "mime/multipart", + "net.Addr": "net", + "net.AddrError": "net", + "net.Buffers": "net", + "net.CIDRMask": "net", + "net.Conn": "net", + "net.DNSConfigError": "net", + "net.DNSError": "net", + "net.DefaultResolver": "net", + "net.Dial": "net", + "net.DialIP": "net", + "net.DialTCP": "net", + "net.DialTimeout": "net", + "net.DialUDP": "net", + "net.DialUnix": "net", + "net.Dialer": "net", + "net.ErrWriteToConnected": "net", + "net.Error": "net", + "net.FileConn": "net", + "net.FileListener": "net", + "net.FilePacketConn": "net", + "net.FlagBroadcast": "net", + "net.FlagLoopback": "net", + "net.FlagMulticast": "net", + "net.FlagPointToPoint": "net", + "net.FlagUp": "net", + "net.Flags": "net", + "net.HardwareAddr": "net", + "net.IP": "net", + "net.IPAddr": "net", + "net.IPConn": "net", + "net.IPMask": "net", + "net.IPNet": "net", + "net.IPv4": "net", + "net.IPv4Mask": "net", + "net.IPv4allrouter": "net", + "net.IPv4allsys": "net", + "net.IPv4bcast": "net", + "net.IPv4len": "net", + "net.IPv4zero": "net", + "net.IPv6interfacelocalallnodes": "net", + "net.IPv6len": "net", + "net.IPv6linklocalallnodes": "net", + "net.IPv6linklocalallrouters": "net", + "net.IPv6loopback": "net", + "net.IPv6unspecified": "net", + "net.IPv6zero": "net", + "net.Interface": "net", + "net.InterfaceAddrs": "net", + "net.InterfaceByIndex": "net", + "net.InterfaceByName": "net", + "net.Interfaces": "net", + "net.InvalidAddrError": "net", + "net.JoinHostPort": "net", + "net.Listen": "net", + "net.ListenIP": "net", + "net.ListenMulticastUDP": "net", + "net.ListenPacket": "net", + "net.ListenTCP": "net", + "net.ListenUDP": "net", + "net.ListenUnix": "net", + "net.ListenUnixgram": "net", + "net.Listener": "net", + "net.LookupAddr": "net", + "net.LookupCNAME": "net", + "net.LookupHost": "net", + "net.LookupIP": "net", + "net.LookupMX": "net", + "net.LookupNS": "net", + "net.LookupPort": "net", + "net.LookupSRV": "net", + "net.LookupTXT": "net", + "net.MX": "net", + "net.NS": "net", + "net.OpError": "net", + "net.PacketConn": "net", + "net.ParseCIDR": "net", + "net.ParseError": "net", + "net.ParseIP": "net", + "net.ParseMAC": "net", + "net.Pipe": "net", + "net.ResolveIPAddr": "net", + "net.ResolveTCPAddr": "net", + "net.ResolveUDPAddr": "net", + "net.ResolveUnixAddr": "net", + "net.Resolver": "net", + "net.SRV": "net", + "net.SplitHostPort": "net", + "net.TCPAddr": "net", + "net.TCPConn": "net", + "net.TCPListener": "net", + "net.UDPAddr": "net", + "net.UDPConn": "net", + "net.UnixAddr": "net", + "net.UnixConn": "net", + "net.UnixListener": "net", + "net.UnknownNetworkError": "net", + "os.Args": "os", + "os.Chdir": "os", + "os.Chmod": "os", + "os.Chown": "os", + "os.Chtimes": "os", + "os.Clearenv": "os", + "os.Create": "os", + "os.DevNull": "os", + "os.Environ": "os", + "os.ErrClosed": "os", + "os.ErrExist": "os", + "os.ErrInvalid": "os", + "os.ErrNotExist": "os", + "os.ErrPermission": "os", + "os.Executable": "os", + "os.Exit": "os", + "os.Expand": "os", + "os.ExpandEnv": "os", + "os.File": "os", + "os.FileInfo": "os", + "os.FileMode": "os", + "os.FindProcess": "os", + "os.Getegid": "os", + "os.Getenv": "os", + "os.Geteuid": "os", + "os.Getgid": "os", + "os.Getgroups": "os", + "os.Getpagesize": "os", + "os.Getpid": "os", + "os.Getppid": "os", + "os.Getuid": "os", + "os.Getwd": "os", + "os.Hostname": "os", + "os.Interrupt": "os", + "os.IsExist": "os", + "os.IsNotExist": "os", + "os.IsPathSeparator": "os", + "os.IsPermission": "os", + "os.Kill": "os", + "os.Lchown": "os", + "os.Link": "os", + "os.LinkError": "os", + "os.LookupEnv": "os", + "os.Lstat": "os", + "os.Mkdir": "os", + "os.MkdirAll": "os", + "os.ModeAppend": "os", + "os.ModeCharDevice": "os", + "os.ModeDevice": "os", + "os.ModeDir": "os", + "os.ModeExclusive": "os", + "os.ModeNamedPipe": "os", + "os.ModePerm": "os", + "os.ModeSetgid": "os", + "os.ModeSetuid": "os", + "os.ModeSocket": "os", + "os.ModeSticky": "os", + "os.ModeSymlink": "os", + "os.ModeTemporary": "os", + "os.ModeType": "os", + "os.NewFile": "os", + "os.NewSyscallError": "os", + "os.O_APPEND": "os", + "os.O_CREATE": "os", + "os.O_EXCL": "os", + "os.O_RDONLY": "os", + "os.O_RDWR": "os", + "os.O_SYNC": "os", + "os.O_TRUNC": "os", + "os.O_WRONLY": "os", + "os.Open": "os", + "os.OpenFile": "os", + "os.PathError": "os", + "os.PathListSeparator": "os", + "os.PathSeparator": "os", + "os.Pipe": "os", + "os.ProcAttr": "os", + "os.Process": "os", + "os.ProcessState": "os", + "os.Readlink": "os", + "os.Remove": "os", + "os.RemoveAll": "os", + "os.Rename": "os", + "os.SEEK_CUR": "os", + "os.SEEK_END": "os", + "os.SEEK_SET": "os", + "os.SameFile": "os", + "os.Setenv": "os", + "os.Signal": "os", + "os.StartProcess": "os", + "os.Stat": "os", + "os.Stderr": "os", + "os.Stdin": "os", + "os.Stdout": "os", + "os.Symlink": "os", + "os.SyscallError": "os", + "os.TempDir": "os", + "os.Truncate": "os", + "os.Unsetenv": "os", + "palette.Plan9": "image/color/palette", + "palette.WebSafe": "image/color/palette", + "parse.ActionNode": "text/template/parse", + "parse.BoolNode": "text/template/parse", + "parse.BranchNode": "text/template/parse", + "parse.ChainNode": "text/template/parse", + "parse.CommandNode": "text/template/parse", + "parse.DotNode": "text/template/parse", + "parse.FieldNode": "text/template/parse", + "parse.IdentifierNode": "text/template/parse", + "parse.IfNode": "text/template/parse", + "parse.IsEmptyTree": "text/template/parse", + "parse.ListNode": "text/template/parse", + "parse.New": "text/template/parse", + "parse.NewIdentifier": "text/template/parse", + "parse.NilNode": "text/template/parse", + "parse.Node": "text/template/parse", + "parse.NodeAction": "text/template/parse", + "parse.NodeBool": "text/template/parse", + "parse.NodeChain": "text/template/parse", + "parse.NodeCommand": "text/template/parse", + "parse.NodeDot": "text/template/parse", + "parse.NodeField": "text/template/parse", + "parse.NodeIdentifier": "text/template/parse", + "parse.NodeIf": "text/template/parse", + "parse.NodeList": "text/template/parse", + "parse.NodeNil": "text/template/parse", + "parse.NodeNumber": "text/template/parse", + "parse.NodePipe": "text/template/parse", + "parse.NodeRange": "text/template/parse", + "parse.NodeString": "text/template/parse", + "parse.NodeTemplate": "text/template/parse", + "parse.NodeText": "text/template/parse", + "parse.NodeType": "text/template/parse", + "parse.NodeVariable": "text/template/parse", + "parse.NodeWith": "text/template/parse", + "parse.NumberNode": "text/template/parse", + "parse.Parse": "text/template/parse", + "parse.PipeNode": "text/template/parse", + "parse.Pos": "text/template/parse", + "parse.RangeNode": "text/template/parse", + "parse.StringNode": "text/template/parse", + "parse.TemplateNode": "text/template/parse", + "parse.TextNode": "text/template/parse", + "parse.Tree": "text/template/parse", + "parse.VariableNode": "text/template/parse", + "parse.WithNode": "text/template/parse", + "parser.AllErrors": "go/parser", + "parser.DeclarationErrors": "go/parser", + "parser.ImportsOnly": "go/parser", + "parser.Mode": "go/parser", + "parser.PackageClauseOnly": "go/parser", + "parser.ParseComments": "go/parser", + "parser.ParseDir": "go/parser", + "parser.ParseExpr": "go/parser", + "parser.ParseExprFrom": "go/parser", + "parser.ParseFile": "go/parser", + "parser.SpuriousErrors": "go/parser", + "parser.Trace": "go/parser", + "path.Base": "path", + "path.Clean": "path", + "path.Dir": "path", + "path.ErrBadPattern": "path", + "path.Ext": "path", + "path.IsAbs": "path", + "path.Join": "path", + "path.Match": "path", + "path.Split": "path", + "pe.COFFSymbol": "debug/pe", + "pe.COFFSymbolSize": "debug/pe", + "pe.DataDirectory": "debug/pe", + "pe.File": "debug/pe", + "pe.FileHeader": "debug/pe", + "pe.FormatError": "debug/pe", + "pe.IMAGE_FILE_MACHINE_AM33": "debug/pe", + "pe.IMAGE_FILE_MACHINE_AMD64": "debug/pe", + "pe.IMAGE_FILE_MACHINE_ARM": "debug/pe", + "pe.IMAGE_FILE_MACHINE_EBC": "debug/pe", + "pe.IMAGE_FILE_MACHINE_I386": "debug/pe", + "pe.IMAGE_FILE_MACHINE_IA64": "debug/pe", + "pe.IMAGE_FILE_MACHINE_M32R": "debug/pe", + "pe.IMAGE_FILE_MACHINE_MIPS16": "debug/pe", + "pe.IMAGE_FILE_MACHINE_MIPSFPU": "debug/pe", + "pe.IMAGE_FILE_MACHINE_MIPSFPU16": "debug/pe", + "pe.IMAGE_FILE_MACHINE_POWERPC": "debug/pe", + "pe.IMAGE_FILE_MACHINE_POWERPCFP": "debug/pe", + "pe.IMAGE_FILE_MACHINE_R4000": "debug/pe", + "pe.IMAGE_FILE_MACHINE_SH3": "debug/pe", + "pe.IMAGE_FILE_MACHINE_SH3DSP": "debug/pe", + "pe.IMAGE_FILE_MACHINE_SH4": "debug/pe", + "pe.IMAGE_FILE_MACHINE_SH5": "debug/pe", + "pe.IMAGE_FILE_MACHINE_THUMB": "debug/pe", + "pe.IMAGE_FILE_MACHINE_UNKNOWN": "debug/pe", + "pe.IMAGE_FILE_MACHINE_WCEMIPSV2": "debug/pe", + "pe.ImportDirectory": "debug/pe", + "pe.NewFile": "debug/pe", + "pe.Open": "debug/pe", + "pe.OptionalHeader32": "debug/pe", + "pe.OptionalHeader64": "debug/pe", + "pe.Reloc": "debug/pe", + "pe.Section": "debug/pe", + "pe.SectionHeader": "debug/pe", + "pe.SectionHeader32": "debug/pe", + "pe.StringTable": "debug/pe", + "pe.Symbol": "debug/pe", + "pem.Block": "encoding/pem", + "pem.Decode": "encoding/pem", + "pem.Encode": "encoding/pem", + "pem.EncodeToMemory": "encoding/pem", + "pkix.AlgorithmIdentifier": "crypto/x509/pkix", + "pkix.AttributeTypeAndValue": "crypto/x509/pkix", + "pkix.AttributeTypeAndValueSET": "crypto/x509/pkix", + "pkix.CertificateList": "crypto/x509/pkix", + "pkix.Extension": "crypto/x509/pkix", + "pkix.Name": "crypto/x509/pkix", + "pkix.RDNSequence": "crypto/x509/pkix", + "pkix.RelativeDistinguishedNameSET": "crypto/x509/pkix", + "pkix.RevokedCertificate": "crypto/x509/pkix", + "pkix.TBSCertificateList": "crypto/x509/pkix", + "plan9obj.File": "debug/plan9obj", + "plan9obj.FileHeader": "debug/plan9obj", + "plan9obj.Magic386": "debug/plan9obj", + "plan9obj.Magic64": "debug/plan9obj", + "plan9obj.MagicAMD64": "debug/plan9obj", + "plan9obj.MagicARM": "debug/plan9obj", + "plan9obj.NewFile": "debug/plan9obj", + "plan9obj.Open": "debug/plan9obj", + "plan9obj.Section": "debug/plan9obj", + "plan9obj.SectionHeader": "debug/plan9obj", + "plan9obj.Sym": "debug/plan9obj", + "plugin.Open": "plugin", + "plugin.Plugin": "plugin", + "plugin.Symbol": "plugin", + "png.BestCompression": "image/png", + "png.BestSpeed": "image/png", + "png.CompressionLevel": "image/png", + "png.Decode": "image/png", + "png.DecodeConfig": "image/png", + "png.DefaultCompression": "image/png", + "png.Encode": "image/png", + "png.Encoder": "image/png", + "png.EncoderBuffer": "image/png", + "png.EncoderBufferPool": "image/png", + "png.FormatError": "image/png", + "png.NoCompression": "image/png", + "png.UnsupportedError": "image/png", + "pprof.Cmdline": "net/http/pprof", + "pprof.Do": "runtime/pprof", + "pprof.ForLabels": "runtime/pprof", + "pprof.Handler": "net/http/pprof", + "pprof.Index": "net/http/pprof", + "pprof.Label": "runtime/pprof", + "pprof.LabelSet": "runtime/pprof", + "pprof.Labels": "runtime/pprof", + "pprof.Lookup": "runtime/pprof", + "pprof.NewProfile": "runtime/pprof", + // "pprof.Profile" is ambiguous + "pprof.Profiles": "runtime/pprof", + "pprof.SetGoroutineLabels": "runtime/pprof", + "pprof.StartCPUProfile": "runtime/pprof", + "pprof.StopCPUProfile": "runtime/pprof", + "pprof.Symbol": "net/http/pprof", + "pprof.Trace": "net/http/pprof", + "pprof.WithLabels": "runtime/pprof", + "pprof.WriteHeapProfile": "runtime/pprof", + "printer.CommentedNode": "go/printer", + "printer.Config": "go/printer", + "printer.Fprint": "go/printer", + "printer.Mode": "go/printer", + "printer.RawFormat": "go/printer", + "printer.SourcePos": "go/printer", + "printer.TabIndent": "go/printer", + "printer.UseSpaces": "go/printer", + "quick.Check": "testing/quick", + "quick.CheckEqual": "testing/quick", + "quick.CheckEqualError": "testing/quick", + "quick.CheckError": "testing/quick", + "quick.Config": "testing/quick", + "quick.Generator": "testing/quick", + "quick.SetupError": "testing/quick", + "quick.Value": "testing/quick", + "quotedprintable.NewReader": "mime/quotedprintable", + "quotedprintable.NewWriter": "mime/quotedprintable", + "quotedprintable.Reader": "mime/quotedprintable", + "quotedprintable.Writer": "mime/quotedprintable", + "rand.ExpFloat64": "math/rand", + "rand.Float32": "math/rand", + "rand.Float64": "math/rand", + // "rand.Int" is ambiguous + "rand.Int31": "math/rand", + "rand.Int31n": "math/rand", + "rand.Int63": "math/rand", + "rand.Int63n": "math/rand", + "rand.Intn": "math/rand", + "rand.New": "math/rand", + "rand.NewSource": "math/rand", + "rand.NewZipf": "math/rand", + "rand.NormFloat64": "math/rand", + "rand.Perm": "math/rand", + "rand.Prime": "crypto/rand", + "rand.Rand": "math/rand", + // "rand.Read" is ambiguous + "rand.Reader": "crypto/rand", + "rand.Seed": "math/rand", + "rand.Source": "math/rand", + "rand.Source64": "math/rand", + "rand.Uint32": "math/rand", + "rand.Uint64": "math/rand", + "rand.Zipf": "math/rand", + "rc4.Cipher": "crypto/rc4", + "rc4.KeySizeError": "crypto/rc4", + "rc4.NewCipher": "crypto/rc4", + "reflect.Append": "reflect", + "reflect.AppendSlice": "reflect", + "reflect.Array": "reflect", + "reflect.ArrayOf": "reflect", + "reflect.Bool": "reflect", + "reflect.BothDir": "reflect", + "reflect.Chan": "reflect", + "reflect.ChanDir": "reflect", + "reflect.ChanOf": "reflect", + "reflect.Complex128": "reflect", + "reflect.Complex64": "reflect", + "reflect.Copy": "reflect", + "reflect.DeepEqual": "reflect", + "reflect.Float32": "reflect", + "reflect.Float64": "reflect", + "reflect.Func": "reflect", + "reflect.FuncOf": "reflect", + "reflect.Indirect": "reflect", + "reflect.Int": "reflect", + "reflect.Int16": "reflect", + "reflect.Int32": "reflect", + "reflect.Int64": "reflect", + "reflect.Int8": "reflect", + "reflect.Interface": "reflect", + "reflect.Invalid": "reflect", + "reflect.Kind": "reflect", + "reflect.MakeChan": "reflect", + "reflect.MakeFunc": "reflect", + "reflect.MakeMap": "reflect", + "reflect.MakeMapWithSize": "reflect", + "reflect.MakeSlice": "reflect", + "reflect.Map": "reflect", + "reflect.MapOf": "reflect", + "reflect.Method": "reflect", + "reflect.New": "reflect", + "reflect.NewAt": "reflect", + "reflect.Ptr": "reflect", + "reflect.PtrTo": "reflect", + "reflect.RecvDir": "reflect", + "reflect.Select": "reflect", + "reflect.SelectCase": "reflect", + "reflect.SelectDefault": "reflect", + "reflect.SelectDir": "reflect", + "reflect.SelectRecv": "reflect", + "reflect.SelectSend": "reflect", + "reflect.SendDir": "reflect", + "reflect.Slice": "reflect", + "reflect.SliceHeader": "reflect", + "reflect.SliceOf": "reflect", + "reflect.String": "reflect", + "reflect.StringHeader": "reflect", + "reflect.Struct": "reflect", + "reflect.StructField": "reflect", + "reflect.StructOf": "reflect", + "reflect.StructTag": "reflect", + "reflect.Swapper": "reflect", + "reflect.TypeOf": "reflect", + "reflect.Uint": "reflect", + "reflect.Uint16": "reflect", + "reflect.Uint32": "reflect", + "reflect.Uint64": "reflect", + "reflect.Uint8": "reflect", + "reflect.Uintptr": "reflect", + "reflect.UnsafePointer": "reflect", + "reflect.Value": "reflect", + "reflect.ValueError": "reflect", + "reflect.ValueOf": "reflect", + "reflect.Zero": "reflect", + "regexp.Compile": "regexp", + "regexp.CompilePOSIX": "regexp", + "regexp.Match": "regexp", + "regexp.MatchReader": "regexp", + "regexp.MatchString": "regexp", + "regexp.MustCompile": "regexp", + "regexp.MustCompilePOSIX": "regexp", + "regexp.QuoteMeta": "regexp", + "regexp.Regexp": "regexp", + "ring.New": "container/ring", + "ring.Ring": "container/ring", + "rpc.Accept": "net/rpc", + "rpc.Call": "net/rpc", + "rpc.Client": "net/rpc", + "rpc.ClientCodec": "net/rpc", + "rpc.DefaultDebugPath": "net/rpc", + "rpc.DefaultRPCPath": "net/rpc", + "rpc.DefaultServer": "net/rpc", + "rpc.Dial": "net/rpc", + "rpc.DialHTTP": "net/rpc", + "rpc.DialHTTPPath": "net/rpc", + "rpc.ErrShutdown": "net/rpc", + "rpc.HandleHTTP": "net/rpc", + "rpc.NewClient": "net/rpc", + "rpc.NewClientWithCodec": "net/rpc", + "rpc.NewServer": "net/rpc", + "rpc.Register": "net/rpc", + "rpc.RegisterName": "net/rpc", + "rpc.Request": "net/rpc", + "rpc.Response": "net/rpc", + "rpc.ServeCodec": "net/rpc", + "rpc.ServeConn": "net/rpc", + "rpc.ServeRequest": "net/rpc", + "rpc.Server": "net/rpc", + "rpc.ServerCodec": "net/rpc", + "rpc.ServerError": "net/rpc", + "rsa.CRTValue": "crypto/rsa", + "rsa.DecryptOAEP": "crypto/rsa", + "rsa.DecryptPKCS1v15": "crypto/rsa", + "rsa.DecryptPKCS1v15SessionKey": "crypto/rsa", + "rsa.EncryptOAEP": "crypto/rsa", + "rsa.EncryptPKCS1v15": "crypto/rsa", + "rsa.ErrDecryption": "crypto/rsa", + "rsa.ErrMessageTooLong": "crypto/rsa", + "rsa.ErrVerification": "crypto/rsa", + "rsa.GenerateKey": "crypto/rsa", + "rsa.GenerateMultiPrimeKey": "crypto/rsa", + "rsa.OAEPOptions": "crypto/rsa", + "rsa.PKCS1v15DecryptOptions": "crypto/rsa", + "rsa.PSSOptions": "crypto/rsa", + "rsa.PSSSaltLengthAuto": "crypto/rsa", + "rsa.PSSSaltLengthEqualsHash": "crypto/rsa", + "rsa.PrecomputedValues": "crypto/rsa", + "rsa.PrivateKey": "crypto/rsa", + "rsa.PublicKey": "crypto/rsa", + "rsa.SignPKCS1v15": "crypto/rsa", + "rsa.SignPSS": "crypto/rsa", + "rsa.VerifyPKCS1v15": "crypto/rsa", + "rsa.VerifyPSS": "crypto/rsa", + "runtime.BlockProfile": "runtime", + "runtime.BlockProfileRecord": "runtime", + "runtime.Breakpoint": "runtime", + "runtime.CPUProfile": "runtime", + "runtime.Caller": "runtime", + "runtime.Callers": "runtime", + "runtime.CallersFrames": "runtime", + "runtime.Compiler": "runtime", + "runtime.Error": "runtime", + "runtime.Frame": "runtime", + "runtime.Frames": "runtime", + "runtime.Func": "runtime", + "runtime.FuncForPC": "runtime", + "runtime.GC": "runtime", + "runtime.GOARCH": "runtime", + "runtime.GOMAXPROCS": "runtime", + "runtime.GOOS": "runtime", + "runtime.GOROOT": "runtime", + "runtime.Goexit": "runtime", + "runtime.GoroutineProfile": "runtime", + "runtime.Gosched": "runtime", + "runtime.KeepAlive": "runtime", + "runtime.LockOSThread": "runtime", + "runtime.MemProfile": "runtime", + "runtime.MemProfileRate": "runtime", + "runtime.MemProfileRecord": "runtime", + "runtime.MemStats": "runtime", + "runtime.MutexProfile": "runtime", + "runtime.NumCPU": "runtime", + "runtime.NumCgoCall": "runtime", + "runtime.NumGoroutine": "runtime", + "runtime.ReadMemStats": "runtime", + "runtime.ReadTrace": "runtime", + "runtime.SetBlockProfileRate": "runtime", + "runtime.SetCPUProfileRate": "runtime", + "runtime.SetCgoTraceback": "runtime", + "runtime.SetFinalizer": "runtime", + "runtime.SetMutexProfileFraction": "runtime", + "runtime.Stack": "runtime", + "runtime.StackRecord": "runtime", + "runtime.StartTrace": "runtime", + "runtime.StopTrace": "runtime", + "runtime.ThreadCreateProfile": "runtime", + "runtime.TypeAssertionError": "runtime", + "runtime.UnlockOSThread": "runtime", + "runtime.Version": "runtime", + "scanner.Char": "text/scanner", + "scanner.Comment": "text/scanner", + "scanner.EOF": "text/scanner", + "scanner.Error": "go/scanner", + "scanner.ErrorHandler": "go/scanner", + "scanner.ErrorList": "go/scanner", + "scanner.Float": "text/scanner", + "scanner.GoTokens": "text/scanner", + "scanner.GoWhitespace": "text/scanner", + "scanner.Ident": "text/scanner", + "scanner.Int": "text/scanner", + "scanner.Mode": "go/scanner", + "scanner.Position": "text/scanner", + "scanner.PrintError": "go/scanner", + "scanner.RawString": "text/scanner", + "scanner.ScanChars": "text/scanner", + // "scanner.ScanComments" is ambiguous + "scanner.ScanFloats": "text/scanner", + "scanner.ScanIdents": "text/scanner", + "scanner.ScanInts": "text/scanner", + "scanner.ScanRawStrings": "text/scanner", + "scanner.ScanStrings": "text/scanner", + // "scanner.Scanner" is ambiguous + "scanner.SkipComments": "text/scanner", + "scanner.String": "text/scanner", + "scanner.TokenString": "text/scanner", + "sha1.BlockSize": "crypto/sha1", + "sha1.New": "crypto/sha1", + "sha1.Size": "crypto/sha1", + "sha1.Sum": "crypto/sha1", + "sha256.BlockSize": "crypto/sha256", + "sha256.New": "crypto/sha256", + "sha256.New224": "crypto/sha256", + "sha256.Size": "crypto/sha256", + "sha256.Size224": "crypto/sha256", + "sha256.Sum224": "crypto/sha256", + "sha256.Sum256": "crypto/sha256", + "sha512.BlockSize": "crypto/sha512", + "sha512.New": "crypto/sha512", + "sha512.New384": "crypto/sha512", + "sha512.New512_224": "crypto/sha512", + "sha512.New512_256": "crypto/sha512", + "sha512.Size": "crypto/sha512", + "sha512.Size224": "crypto/sha512", + "sha512.Size256": "crypto/sha512", + "sha512.Size384": "crypto/sha512", + "sha512.Sum384": "crypto/sha512", + "sha512.Sum512": "crypto/sha512", + "sha512.Sum512_224": "crypto/sha512", + "sha512.Sum512_256": "crypto/sha512", + "signal.Ignore": "os/signal", + "signal.Notify": "os/signal", + "signal.Reset": "os/signal", + "signal.Stop": "os/signal", + "smtp.Auth": "net/smtp", + "smtp.CRAMMD5Auth": "net/smtp", + "smtp.Client": "net/smtp", + "smtp.Dial": "net/smtp", + "smtp.NewClient": "net/smtp", + "smtp.PlainAuth": "net/smtp", + "smtp.SendMail": "net/smtp", + "smtp.ServerInfo": "net/smtp", + "sort.Float64Slice": "sort", + "sort.Float64s": "sort", + "sort.Float64sAreSorted": "sort", + "sort.IntSlice": "sort", + "sort.Interface": "sort", + "sort.Ints": "sort", + "sort.IntsAreSorted": "sort", + "sort.IsSorted": "sort", + "sort.Reverse": "sort", + "sort.Search": "sort", + "sort.SearchFloat64s": "sort", + "sort.SearchInts": "sort", + "sort.SearchStrings": "sort", + "sort.Slice": "sort", + "sort.SliceIsSorted": "sort", + "sort.SliceStable": "sort", + "sort.Sort": "sort", + "sort.Stable": "sort", + "sort.StringSlice": "sort", + "sort.Strings": "sort", + "sort.StringsAreSorted": "sort", + "sql.ColumnType": "database/sql", + "sql.Conn": "database/sql", + "sql.DB": "database/sql", + "sql.DBStats": "database/sql", + "sql.Drivers": "database/sql", + "sql.ErrConnDone": "database/sql", + "sql.ErrNoRows": "database/sql", + "sql.ErrTxDone": "database/sql", + "sql.IsolationLevel": "database/sql", + "sql.LevelDefault": "database/sql", + "sql.LevelLinearizable": "database/sql", + "sql.LevelReadCommitted": "database/sql", + "sql.LevelReadUncommitted": "database/sql", + "sql.LevelRepeatableRead": "database/sql", + "sql.LevelSerializable": "database/sql", + "sql.LevelSnapshot": "database/sql", + "sql.LevelWriteCommitted": "database/sql", + "sql.Named": "database/sql", + "sql.NamedArg": "database/sql", + "sql.NullBool": "database/sql", + "sql.NullFloat64": "database/sql", + "sql.NullInt64": "database/sql", + "sql.NullString": "database/sql", + "sql.Open": "database/sql", + "sql.Out": "database/sql", + "sql.RawBytes": "database/sql", + "sql.Register": "database/sql", + "sql.Result": "database/sql", + "sql.Row": "database/sql", + "sql.Rows": "database/sql", + "sql.Scanner": "database/sql", + "sql.Stmt": "database/sql", + "sql.Tx": "database/sql", + "sql.TxOptions": "database/sql", + "strconv.AppendBool": "strconv", + "strconv.AppendFloat": "strconv", + "strconv.AppendInt": "strconv", + "strconv.AppendQuote": "strconv", + "strconv.AppendQuoteRune": "strconv", + "strconv.AppendQuoteRuneToASCII": "strconv", + "strconv.AppendQuoteRuneToGraphic": "strconv", + "strconv.AppendQuoteToASCII": "strconv", + "strconv.AppendQuoteToGraphic": "strconv", + "strconv.AppendUint": "strconv", + "strconv.Atoi": "strconv", + "strconv.CanBackquote": "strconv", + "strconv.ErrRange": "strconv", + "strconv.ErrSyntax": "strconv", + "strconv.FormatBool": "strconv", + "strconv.FormatFloat": "strconv", + "strconv.FormatInt": "strconv", + "strconv.FormatUint": "strconv", + "strconv.IntSize": "strconv", + "strconv.IsGraphic": "strconv", + "strconv.IsPrint": "strconv", + "strconv.Itoa": "strconv", + "strconv.NumError": "strconv", + "strconv.ParseBool": "strconv", + "strconv.ParseFloat": "strconv", + "strconv.ParseInt": "strconv", + "strconv.ParseUint": "strconv", + "strconv.Quote": "strconv", + "strconv.QuoteRune": "strconv", + "strconv.QuoteRuneToASCII": "strconv", + "strconv.QuoteRuneToGraphic": "strconv", + "strconv.QuoteToASCII": "strconv", + "strconv.QuoteToGraphic": "strconv", + "strconv.Unquote": "strconv", + "strconv.UnquoteChar": "strconv", + "strings.Compare": "strings", + "strings.Contains": "strings", + "strings.ContainsAny": "strings", + "strings.ContainsRune": "strings", + "strings.Count": "strings", + "strings.EqualFold": "strings", + "strings.Fields": "strings", + "strings.FieldsFunc": "strings", + "strings.HasPrefix": "strings", + "strings.HasSuffix": "strings", + "strings.Index": "strings", + "strings.IndexAny": "strings", + "strings.IndexByte": "strings", + "strings.IndexFunc": "strings", + "strings.IndexRune": "strings", + "strings.Join": "strings", + "strings.LastIndex": "strings", + "strings.LastIndexAny": "strings", + "strings.LastIndexByte": "strings", + "strings.LastIndexFunc": "strings", + "strings.Map": "strings", + "strings.NewReader": "strings", + "strings.NewReplacer": "strings", + "strings.Reader": "strings", + "strings.Repeat": "strings", + "strings.Replace": "strings", + "strings.Replacer": "strings", + "strings.Split": "strings", + "strings.SplitAfter": "strings", + "strings.SplitAfterN": "strings", + "strings.SplitN": "strings", + "strings.Title": "strings", + "strings.ToLower": "strings", + "strings.ToLowerSpecial": "strings", + "strings.ToTitle": "strings", + "strings.ToTitleSpecial": "strings", + "strings.ToUpper": "strings", + "strings.ToUpperSpecial": "strings", + "strings.Trim": "strings", + "strings.TrimFunc": "strings", + "strings.TrimLeft": "strings", + "strings.TrimLeftFunc": "strings", + "strings.TrimPrefix": "strings", + "strings.TrimRight": "strings", + "strings.TrimRightFunc": "strings", + "strings.TrimSpace": "strings", + "strings.TrimSuffix": "strings", + "subtle.ConstantTimeByteEq": "crypto/subtle", + "subtle.ConstantTimeCompare": "crypto/subtle", + "subtle.ConstantTimeCopy": "crypto/subtle", + "subtle.ConstantTimeEq": "crypto/subtle", + "subtle.ConstantTimeLessOrEq": "crypto/subtle", + "subtle.ConstantTimeSelect": "crypto/subtle", + "suffixarray.Index": "index/suffixarray", + "suffixarray.New": "index/suffixarray", + "sync.Cond": "sync", + "sync.Locker": "sync", + "sync.Map": "sync", + "sync.Mutex": "sync", + "sync.NewCond": "sync", + "sync.Once": "sync", + "sync.Pool": "sync", + "sync.RWMutex": "sync", + "sync.WaitGroup": "sync", + "syntax.ClassNL": "regexp/syntax", + "syntax.Compile": "regexp/syntax", + "syntax.DotNL": "regexp/syntax", + "syntax.EmptyBeginLine": "regexp/syntax", + "syntax.EmptyBeginText": "regexp/syntax", + "syntax.EmptyEndLine": "regexp/syntax", + "syntax.EmptyEndText": "regexp/syntax", + "syntax.EmptyNoWordBoundary": "regexp/syntax", + "syntax.EmptyOp": "regexp/syntax", + "syntax.EmptyOpContext": "regexp/syntax", + "syntax.EmptyWordBoundary": "regexp/syntax", + "syntax.ErrInternalError": "regexp/syntax", + "syntax.ErrInvalidCharClass": "regexp/syntax", + "syntax.ErrInvalidCharRange": "regexp/syntax", + "syntax.ErrInvalidEscape": "regexp/syntax", + "syntax.ErrInvalidNamedCapture": "regexp/syntax", + "syntax.ErrInvalidPerlOp": "regexp/syntax", + "syntax.ErrInvalidRepeatOp": "regexp/syntax", + "syntax.ErrInvalidRepeatSize": "regexp/syntax", + "syntax.ErrInvalidUTF8": "regexp/syntax", + "syntax.ErrMissingBracket": "regexp/syntax", + "syntax.ErrMissingParen": "regexp/syntax", + "syntax.ErrMissingRepeatArgument": "regexp/syntax", + "syntax.ErrTrailingBackslash": "regexp/syntax", + "syntax.ErrUnexpectedParen": "regexp/syntax", + "syntax.Error": "regexp/syntax", + "syntax.ErrorCode": "regexp/syntax", + "syntax.Flags": "regexp/syntax", + "syntax.FoldCase": "regexp/syntax", + "syntax.Inst": "regexp/syntax", + "syntax.InstAlt": "regexp/syntax", + "syntax.InstAltMatch": "regexp/syntax", + "syntax.InstCapture": "regexp/syntax", + "syntax.InstEmptyWidth": "regexp/syntax", + "syntax.InstFail": "regexp/syntax", + "syntax.InstMatch": "regexp/syntax", + "syntax.InstNop": "regexp/syntax", + "syntax.InstOp": "regexp/syntax", + "syntax.InstRune": "regexp/syntax", + "syntax.InstRune1": "regexp/syntax", + "syntax.InstRuneAny": "regexp/syntax", + "syntax.InstRuneAnyNotNL": "regexp/syntax", + "syntax.IsWordChar": "regexp/syntax", + "syntax.Literal": "regexp/syntax", + "syntax.MatchNL": "regexp/syntax", + "syntax.NonGreedy": "regexp/syntax", + "syntax.OneLine": "regexp/syntax", + "syntax.Op": "regexp/syntax", + "syntax.OpAlternate": "regexp/syntax", + "syntax.OpAnyChar": "regexp/syntax", + "syntax.OpAnyCharNotNL": "regexp/syntax", + "syntax.OpBeginLine": "regexp/syntax", + "syntax.OpBeginText": "regexp/syntax", + "syntax.OpCapture": "regexp/syntax", + "syntax.OpCharClass": "regexp/syntax", + "syntax.OpConcat": "regexp/syntax", + "syntax.OpEmptyMatch": "regexp/syntax", + "syntax.OpEndLine": "regexp/syntax", + "syntax.OpEndText": "regexp/syntax", + "syntax.OpLiteral": "regexp/syntax", + "syntax.OpNoMatch": "regexp/syntax", + "syntax.OpNoWordBoundary": "regexp/syntax", + "syntax.OpPlus": "regexp/syntax", + "syntax.OpQuest": "regexp/syntax", + "syntax.OpRepeat": "regexp/syntax", + "syntax.OpStar": "regexp/syntax", + "syntax.OpWordBoundary": "regexp/syntax", + "syntax.POSIX": "regexp/syntax", + "syntax.Parse": "regexp/syntax", + "syntax.Perl": "regexp/syntax", + "syntax.PerlX": "regexp/syntax", + "syntax.Prog": "regexp/syntax", + "syntax.Regexp": "regexp/syntax", + "syntax.Simple": "regexp/syntax", + "syntax.UnicodeGroups": "regexp/syntax", + "syntax.WasDollar": "regexp/syntax", + "syscall.AF_ALG": "syscall", + "syscall.AF_APPLETALK": "syscall", + "syscall.AF_ARP": "syscall", + "syscall.AF_ASH": "syscall", + "syscall.AF_ATM": "syscall", + "syscall.AF_ATMPVC": "syscall", + "syscall.AF_ATMSVC": "syscall", + "syscall.AF_AX25": "syscall", + "syscall.AF_BLUETOOTH": "syscall", + "syscall.AF_BRIDGE": "syscall", + "syscall.AF_CAIF": "syscall", + "syscall.AF_CAN": "syscall", + "syscall.AF_CCITT": "syscall", + "syscall.AF_CHAOS": "syscall", + "syscall.AF_CNT": "syscall", + "syscall.AF_COIP": "syscall", + "syscall.AF_DATAKIT": "syscall", + "syscall.AF_DECnet": "syscall", + "syscall.AF_DLI": "syscall", + "syscall.AF_E164": "syscall", + "syscall.AF_ECMA": "syscall", + "syscall.AF_ECONET": "syscall", + "syscall.AF_ENCAP": "syscall", + "syscall.AF_FILE": "syscall", + "syscall.AF_HYLINK": "syscall", + "syscall.AF_IEEE80211": "syscall", + "syscall.AF_IEEE802154": "syscall", + "syscall.AF_IMPLINK": "syscall", + "syscall.AF_INET": "syscall", + "syscall.AF_INET6": "syscall", + "syscall.AF_INET6_SDP": "syscall", + "syscall.AF_INET_SDP": "syscall", + "syscall.AF_IPX": "syscall", + "syscall.AF_IRDA": "syscall", + "syscall.AF_ISDN": "syscall", + "syscall.AF_ISO": "syscall", + "syscall.AF_IUCV": "syscall", + "syscall.AF_KEY": "syscall", + "syscall.AF_LAT": "syscall", + "syscall.AF_LINK": "syscall", + "syscall.AF_LLC": "syscall", + "syscall.AF_LOCAL": "syscall", + "syscall.AF_MAX": "syscall", + "syscall.AF_MPLS": "syscall", + "syscall.AF_NATM": "syscall", + "syscall.AF_NDRV": "syscall", + "syscall.AF_NETBEUI": "syscall", + "syscall.AF_NETBIOS": "syscall", + "syscall.AF_NETGRAPH": "syscall", + "syscall.AF_NETLINK": "syscall", + "syscall.AF_NETROM": "syscall", + "syscall.AF_NS": "syscall", + "syscall.AF_OROUTE": "syscall", + "syscall.AF_OSI": "syscall", + "syscall.AF_PACKET": "syscall", + "syscall.AF_PHONET": "syscall", + "syscall.AF_PPP": "syscall", + "syscall.AF_PPPOX": "syscall", + "syscall.AF_PUP": "syscall", + "syscall.AF_RDS": "syscall", + "syscall.AF_RESERVED_36": "syscall", + "syscall.AF_ROSE": "syscall", + "syscall.AF_ROUTE": "syscall", + "syscall.AF_RXRPC": "syscall", + "syscall.AF_SCLUSTER": "syscall", + "syscall.AF_SECURITY": "syscall", + "syscall.AF_SIP": "syscall", + "syscall.AF_SLOW": "syscall", + "syscall.AF_SNA": "syscall", + "syscall.AF_SYSTEM": "syscall", + "syscall.AF_TIPC": "syscall", + "syscall.AF_UNIX": "syscall", + "syscall.AF_UNSPEC": "syscall", + "syscall.AF_VENDOR00": "syscall", + "syscall.AF_VENDOR01": "syscall", + "syscall.AF_VENDOR02": "syscall", + "syscall.AF_VENDOR03": "syscall", + "syscall.AF_VENDOR04": "syscall", + "syscall.AF_VENDOR05": "syscall", + "syscall.AF_VENDOR06": "syscall", + "syscall.AF_VENDOR07": "syscall", + "syscall.AF_VENDOR08": "syscall", + "syscall.AF_VENDOR09": "syscall", + "syscall.AF_VENDOR10": "syscall", + "syscall.AF_VENDOR11": "syscall", + "syscall.AF_VENDOR12": "syscall", + "syscall.AF_VENDOR13": "syscall", + "syscall.AF_VENDOR14": "syscall", + "syscall.AF_VENDOR15": "syscall", + "syscall.AF_VENDOR16": "syscall", + "syscall.AF_VENDOR17": "syscall", + "syscall.AF_VENDOR18": "syscall", + "syscall.AF_VENDOR19": "syscall", + "syscall.AF_VENDOR20": "syscall", + "syscall.AF_VENDOR21": "syscall", + "syscall.AF_VENDOR22": "syscall", + "syscall.AF_VENDOR23": "syscall", + "syscall.AF_VENDOR24": "syscall", + "syscall.AF_VENDOR25": "syscall", + "syscall.AF_VENDOR26": "syscall", + "syscall.AF_VENDOR27": "syscall", + "syscall.AF_VENDOR28": "syscall", + "syscall.AF_VENDOR29": "syscall", + "syscall.AF_VENDOR30": "syscall", + "syscall.AF_VENDOR31": "syscall", + "syscall.AF_VENDOR32": "syscall", + "syscall.AF_VENDOR33": "syscall", + "syscall.AF_VENDOR34": "syscall", + "syscall.AF_VENDOR35": "syscall", + "syscall.AF_VENDOR36": "syscall", + "syscall.AF_VENDOR37": "syscall", + "syscall.AF_VENDOR38": "syscall", + "syscall.AF_VENDOR39": "syscall", + "syscall.AF_VENDOR40": "syscall", + "syscall.AF_VENDOR41": "syscall", + "syscall.AF_VENDOR42": "syscall", + "syscall.AF_VENDOR43": "syscall", + "syscall.AF_VENDOR44": "syscall", + "syscall.AF_VENDOR45": "syscall", + "syscall.AF_VENDOR46": "syscall", + "syscall.AF_VENDOR47": "syscall", + "syscall.AF_WANPIPE": "syscall", + "syscall.AF_X25": "syscall", + "syscall.AI_CANONNAME": "syscall", + "syscall.AI_NUMERICHOST": "syscall", + "syscall.AI_PASSIVE": "syscall", + "syscall.APPLICATION_ERROR": "syscall", + "syscall.ARPHRD_ADAPT": "syscall", + "syscall.ARPHRD_APPLETLK": "syscall", + "syscall.ARPHRD_ARCNET": "syscall", + "syscall.ARPHRD_ASH": "syscall", + "syscall.ARPHRD_ATM": "syscall", + "syscall.ARPHRD_AX25": "syscall", + "syscall.ARPHRD_BIF": "syscall", + "syscall.ARPHRD_CHAOS": "syscall", + "syscall.ARPHRD_CISCO": "syscall", + "syscall.ARPHRD_CSLIP": "syscall", + "syscall.ARPHRD_CSLIP6": "syscall", + "syscall.ARPHRD_DDCMP": "syscall", + "syscall.ARPHRD_DLCI": "syscall", + "syscall.ARPHRD_ECONET": "syscall", + "syscall.ARPHRD_EETHER": "syscall", + "syscall.ARPHRD_ETHER": "syscall", + "syscall.ARPHRD_EUI64": "syscall", + "syscall.ARPHRD_FCAL": "syscall", + "syscall.ARPHRD_FCFABRIC": "syscall", + "syscall.ARPHRD_FCPL": "syscall", + "syscall.ARPHRD_FCPP": "syscall", + "syscall.ARPHRD_FDDI": "syscall", + "syscall.ARPHRD_FRAD": "syscall", + "syscall.ARPHRD_FRELAY": "syscall", + "syscall.ARPHRD_HDLC": "syscall", + "syscall.ARPHRD_HIPPI": "syscall", + "syscall.ARPHRD_HWX25": "syscall", + "syscall.ARPHRD_IEEE1394": "syscall", + "syscall.ARPHRD_IEEE802": "syscall", + "syscall.ARPHRD_IEEE80211": "syscall", + "syscall.ARPHRD_IEEE80211_PRISM": "syscall", + "syscall.ARPHRD_IEEE80211_RADIOTAP": "syscall", + "syscall.ARPHRD_IEEE802154": "syscall", + "syscall.ARPHRD_IEEE802154_PHY": "syscall", + "syscall.ARPHRD_IEEE802_TR": "syscall", + "syscall.ARPHRD_INFINIBAND": "syscall", + "syscall.ARPHRD_IPDDP": "syscall", + "syscall.ARPHRD_IPGRE": "syscall", + "syscall.ARPHRD_IRDA": "syscall", + "syscall.ARPHRD_LAPB": "syscall", + "syscall.ARPHRD_LOCALTLK": "syscall", + "syscall.ARPHRD_LOOPBACK": "syscall", + "syscall.ARPHRD_METRICOM": "syscall", + "syscall.ARPHRD_NETROM": "syscall", + "syscall.ARPHRD_NONE": "syscall", + "syscall.ARPHRD_PIMREG": "syscall", + "syscall.ARPHRD_PPP": "syscall", + "syscall.ARPHRD_PRONET": "syscall", + "syscall.ARPHRD_RAWHDLC": "syscall", + "syscall.ARPHRD_ROSE": "syscall", + "syscall.ARPHRD_RSRVD": "syscall", + "syscall.ARPHRD_SIT": "syscall", + "syscall.ARPHRD_SKIP": "syscall", + "syscall.ARPHRD_SLIP": "syscall", + "syscall.ARPHRD_SLIP6": "syscall", + "syscall.ARPHRD_STRIP": "syscall", + "syscall.ARPHRD_TUNNEL": "syscall", + "syscall.ARPHRD_TUNNEL6": "syscall", + "syscall.ARPHRD_VOID": "syscall", + "syscall.ARPHRD_X25": "syscall", + "syscall.AUTHTYPE_CLIENT": "syscall", + "syscall.AUTHTYPE_SERVER": "syscall", + "syscall.Accept": "syscall", + "syscall.Accept4": "syscall", + "syscall.AcceptEx": "syscall", + "syscall.Access": "syscall", + "syscall.Acct": "syscall", + "syscall.AddrinfoW": "syscall", + "syscall.Adjtime": "syscall", + "syscall.Adjtimex": "syscall", + "syscall.AttachLsf": "syscall", + "syscall.B0": "syscall", + "syscall.B1000000": "syscall", + "syscall.B110": "syscall", + "syscall.B115200": "syscall", + "syscall.B1152000": "syscall", + "syscall.B1200": "syscall", + "syscall.B134": "syscall", + "syscall.B14400": "syscall", + "syscall.B150": "syscall", + "syscall.B1500000": "syscall", + "syscall.B1800": "syscall", + "syscall.B19200": "syscall", + "syscall.B200": "syscall", + "syscall.B2000000": "syscall", + "syscall.B230400": "syscall", + "syscall.B2400": "syscall", + "syscall.B2500000": "syscall", + "syscall.B28800": "syscall", + "syscall.B300": "syscall", + "syscall.B3000000": "syscall", + "syscall.B3500000": "syscall", + "syscall.B38400": "syscall", + "syscall.B4000000": "syscall", + "syscall.B460800": "syscall", + "syscall.B4800": "syscall", + "syscall.B50": "syscall", + "syscall.B500000": "syscall", + "syscall.B57600": "syscall", + "syscall.B576000": "syscall", + "syscall.B600": "syscall", + "syscall.B7200": "syscall", + "syscall.B75": "syscall", + "syscall.B76800": "syscall", + "syscall.B921600": "syscall", + "syscall.B9600": "syscall", + "syscall.BASE_PROTOCOL": "syscall", + "syscall.BIOCFEEDBACK": "syscall", + "syscall.BIOCFLUSH": "syscall", + "syscall.BIOCGBLEN": "syscall", + "syscall.BIOCGDIRECTION": "syscall", + "syscall.BIOCGDIRFILT": "syscall", + "syscall.BIOCGDLT": "syscall", + "syscall.BIOCGDLTLIST": "syscall", + "syscall.BIOCGETBUFMODE": "syscall", + "syscall.BIOCGETIF": "syscall", + "syscall.BIOCGETZMAX": "syscall", + "syscall.BIOCGFEEDBACK": "syscall", + "syscall.BIOCGFILDROP": "syscall", + "syscall.BIOCGHDRCMPLT": "syscall", + "syscall.BIOCGRSIG": "syscall", + "syscall.BIOCGRTIMEOUT": "syscall", + "syscall.BIOCGSEESENT": "syscall", + "syscall.BIOCGSTATS": "syscall", + "syscall.BIOCGSTATSOLD": "syscall", + "syscall.BIOCGTSTAMP": "syscall", + "syscall.BIOCIMMEDIATE": "syscall", + "syscall.BIOCLOCK": "syscall", + "syscall.BIOCPROMISC": "syscall", + "syscall.BIOCROTZBUF": "syscall", + "syscall.BIOCSBLEN": "syscall", + "syscall.BIOCSDIRECTION": "syscall", + "syscall.BIOCSDIRFILT": "syscall", + "syscall.BIOCSDLT": "syscall", + "syscall.BIOCSETBUFMODE": "syscall", + "syscall.BIOCSETF": "syscall", + "syscall.BIOCSETFNR": "syscall", + "syscall.BIOCSETIF": "syscall", + "syscall.BIOCSETWF": "syscall", + "syscall.BIOCSETZBUF": "syscall", + "syscall.BIOCSFEEDBACK": "syscall", + "syscall.BIOCSFILDROP": "syscall", + "syscall.BIOCSHDRCMPLT": "syscall", + "syscall.BIOCSRSIG": "syscall", + "syscall.BIOCSRTIMEOUT": "syscall", + "syscall.BIOCSSEESENT": "syscall", + "syscall.BIOCSTCPF": "syscall", + "syscall.BIOCSTSTAMP": "syscall", + "syscall.BIOCSUDPF": "syscall", + "syscall.BIOCVERSION": "syscall", + "syscall.BPF_A": "syscall", + "syscall.BPF_ABS": "syscall", + "syscall.BPF_ADD": "syscall", + "syscall.BPF_ALIGNMENT": "syscall", + "syscall.BPF_ALIGNMENT32": "syscall", + "syscall.BPF_ALU": "syscall", + "syscall.BPF_AND": "syscall", + "syscall.BPF_B": "syscall", + "syscall.BPF_BUFMODE_BUFFER": "syscall", + "syscall.BPF_BUFMODE_ZBUF": "syscall", + "syscall.BPF_DFLTBUFSIZE": "syscall", + "syscall.BPF_DIRECTION_IN": "syscall", + "syscall.BPF_DIRECTION_OUT": "syscall", + "syscall.BPF_DIV": "syscall", + "syscall.BPF_H": "syscall", + "syscall.BPF_IMM": "syscall", + "syscall.BPF_IND": "syscall", + "syscall.BPF_JA": "syscall", + "syscall.BPF_JEQ": "syscall", + "syscall.BPF_JGE": "syscall", + "syscall.BPF_JGT": "syscall", + "syscall.BPF_JMP": "syscall", + "syscall.BPF_JSET": "syscall", + "syscall.BPF_K": "syscall", + "syscall.BPF_LD": "syscall", + "syscall.BPF_LDX": "syscall", + "syscall.BPF_LEN": "syscall", + "syscall.BPF_LSH": "syscall", + "syscall.BPF_MAJOR_VERSION": "syscall", + "syscall.BPF_MAXBUFSIZE": "syscall", + "syscall.BPF_MAXINSNS": "syscall", + "syscall.BPF_MEM": "syscall", + "syscall.BPF_MEMWORDS": "syscall", + "syscall.BPF_MINBUFSIZE": "syscall", + "syscall.BPF_MINOR_VERSION": "syscall", + "syscall.BPF_MISC": "syscall", + "syscall.BPF_MSH": "syscall", + "syscall.BPF_MUL": "syscall", + "syscall.BPF_NEG": "syscall", + "syscall.BPF_OR": "syscall", + "syscall.BPF_RELEASE": "syscall", + "syscall.BPF_RET": "syscall", + "syscall.BPF_RSH": "syscall", + "syscall.BPF_ST": "syscall", + "syscall.BPF_STX": "syscall", + "syscall.BPF_SUB": "syscall", + "syscall.BPF_TAX": "syscall", + "syscall.BPF_TXA": "syscall", + "syscall.BPF_T_BINTIME": "syscall", + "syscall.BPF_T_BINTIME_FAST": "syscall", + "syscall.BPF_T_BINTIME_MONOTONIC": "syscall", + "syscall.BPF_T_BINTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_FAST": "syscall", + "syscall.BPF_T_FLAG_MASK": "syscall", + "syscall.BPF_T_FORMAT_MASK": "syscall", + "syscall.BPF_T_MICROTIME": "syscall", + "syscall.BPF_T_MICROTIME_FAST": "syscall", + "syscall.BPF_T_MICROTIME_MONOTONIC": "syscall", + "syscall.BPF_T_MICROTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_MONOTONIC": "syscall", + "syscall.BPF_T_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_NANOTIME": "syscall", + "syscall.BPF_T_NANOTIME_FAST": "syscall", + "syscall.BPF_T_NANOTIME_MONOTONIC": "syscall", + "syscall.BPF_T_NANOTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_NONE": "syscall", + "syscall.BPF_T_NORMAL": "syscall", + "syscall.BPF_W": "syscall", + "syscall.BPF_X": "syscall", + "syscall.BRKINT": "syscall", + "syscall.Bind": "syscall", + "syscall.BindToDevice": "syscall", + "syscall.BpfBuflen": "syscall", + "syscall.BpfDatalink": "syscall", + "syscall.BpfHdr": "syscall", + "syscall.BpfHeadercmpl": "syscall", + "syscall.BpfInsn": "syscall", + "syscall.BpfInterface": "syscall", + "syscall.BpfJump": "syscall", + "syscall.BpfProgram": "syscall", + "syscall.BpfStat": "syscall", + "syscall.BpfStats": "syscall", + "syscall.BpfStmt": "syscall", + "syscall.BpfTimeout": "syscall", + "syscall.BpfTimeval": "syscall", + "syscall.BpfVersion": "syscall", + "syscall.BpfZbuf": "syscall", + "syscall.BpfZbufHeader": "syscall", + "syscall.ByHandleFileInformation": "syscall", + "syscall.BytePtrFromString": "syscall", + "syscall.ByteSliceFromString": "syscall", + "syscall.CCR0_FLUSH": "syscall", + "syscall.CERT_CHAIN_POLICY_AUTHENTICODE": "syscall", + "syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS": "syscall", + "syscall.CERT_CHAIN_POLICY_BASE": "syscall", + "syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "syscall", + "syscall.CERT_CHAIN_POLICY_EV": "syscall", + "syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT": "syscall", + "syscall.CERT_CHAIN_POLICY_NT_AUTH": "syscall", + "syscall.CERT_CHAIN_POLICY_SSL": "syscall", + "syscall.CERT_E_CN_NO_MATCH": "syscall", + "syscall.CERT_E_EXPIRED": "syscall", + "syscall.CERT_E_PURPOSE": "syscall", + "syscall.CERT_E_ROLE": "syscall", + "syscall.CERT_E_UNTRUSTEDROOT": "syscall", + "syscall.CERT_STORE_ADD_ALWAYS": "syscall", + "syscall.CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": "syscall", + "syscall.CERT_STORE_PROV_MEMORY": "syscall", + "syscall.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": "syscall", + "syscall.CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": "syscall", + "syscall.CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": "syscall", + "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": "syscall", + "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": "syscall", + "syscall.CERT_TRUST_INVALID_BASIC_CONSTRAINTS": "syscall", + "syscall.CERT_TRUST_INVALID_EXTENSION": "syscall", + "syscall.CERT_TRUST_INVALID_NAME_CONSTRAINTS": "syscall", + "syscall.CERT_TRUST_INVALID_POLICY_CONSTRAINTS": "syscall", + "syscall.CERT_TRUST_IS_CYCLIC": "syscall", + "syscall.CERT_TRUST_IS_EXPLICIT_DISTRUST": "syscall", + "syscall.CERT_TRUST_IS_NOT_SIGNATURE_VALID": "syscall", + "syscall.CERT_TRUST_IS_NOT_TIME_VALID": "syscall", + "syscall.CERT_TRUST_IS_NOT_VALID_FOR_USAGE": "syscall", + "syscall.CERT_TRUST_IS_OFFLINE_REVOCATION": "syscall", + "syscall.CERT_TRUST_IS_REVOKED": "syscall", + "syscall.CERT_TRUST_IS_UNTRUSTED_ROOT": "syscall", + "syscall.CERT_TRUST_NO_ERROR": "syscall", + "syscall.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": "syscall", + "syscall.CERT_TRUST_REVOCATION_STATUS_UNKNOWN": "syscall", + "syscall.CFLUSH": "syscall", + "syscall.CLOCAL": "syscall", + "syscall.CLONE_CHILD_CLEARTID": "syscall", + "syscall.CLONE_CHILD_SETTID": "syscall", + "syscall.CLONE_CSIGNAL": "syscall", + "syscall.CLONE_DETACHED": "syscall", + "syscall.CLONE_FILES": "syscall", + "syscall.CLONE_FS": "syscall", + "syscall.CLONE_IO": "syscall", + "syscall.CLONE_NEWIPC": "syscall", + "syscall.CLONE_NEWNET": "syscall", + "syscall.CLONE_NEWNS": "syscall", + "syscall.CLONE_NEWPID": "syscall", + "syscall.CLONE_NEWUSER": "syscall", + "syscall.CLONE_NEWUTS": "syscall", + "syscall.CLONE_PARENT": "syscall", + "syscall.CLONE_PARENT_SETTID": "syscall", + "syscall.CLONE_PID": "syscall", + "syscall.CLONE_PTRACE": "syscall", + "syscall.CLONE_SETTLS": "syscall", + "syscall.CLONE_SIGHAND": "syscall", + "syscall.CLONE_SYSVSEM": "syscall", + "syscall.CLONE_THREAD": "syscall", + "syscall.CLONE_UNTRACED": "syscall", + "syscall.CLONE_VFORK": "syscall", + "syscall.CLONE_VM": "syscall", + "syscall.CPUID_CFLUSH": "syscall", + "syscall.CREAD": "syscall", + "syscall.CREATE_ALWAYS": "syscall", + "syscall.CREATE_NEW": "syscall", + "syscall.CREATE_NEW_PROCESS_GROUP": "syscall", + "syscall.CREATE_UNICODE_ENVIRONMENT": "syscall", + "syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL": "syscall", + "syscall.CRYPT_DELETEKEYSET": "syscall", + "syscall.CRYPT_MACHINE_KEYSET": "syscall", + "syscall.CRYPT_NEWKEYSET": "syscall", + "syscall.CRYPT_SILENT": "syscall", + "syscall.CRYPT_VERIFYCONTEXT": "syscall", + "syscall.CS5": "syscall", + "syscall.CS6": "syscall", + "syscall.CS7": "syscall", + "syscall.CS8": "syscall", + "syscall.CSIZE": "syscall", + "syscall.CSTART": "syscall", + "syscall.CSTATUS": "syscall", + "syscall.CSTOP": "syscall", + "syscall.CSTOPB": "syscall", + "syscall.CSUSP": "syscall", + "syscall.CTL_MAXNAME": "syscall", + "syscall.CTL_NET": "syscall", + "syscall.CTL_QUERY": "syscall", + "syscall.CTRL_BREAK_EVENT": "syscall", + "syscall.CTRL_C_EVENT": "syscall", + "syscall.CancelIo": "syscall", + "syscall.CancelIoEx": "syscall", + "syscall.CertAddCertificateContextToStore": "syscall", + "syscall.CertChainContext": "syscall", + "syscall.CertChainElement": "syscall", + "syscall.CertChainPara": "syscall", + "syscall.CertChainPolicyPara": "syscall", + "syscall.CertChainPolicyStatus": "syscall", + "syscall.CertCloseStore": "syscall", + "syscall.CertContext": "syscall", + "syscall.CertCreateCertificateContext": "syscall", + "syscall.CertEnhKeyUsage": "syscall", + "syscall.CertEnumCertificatesInStore": "syscall", + "syscall.CertFreeCertificateChain": "syscall", + "syscall.CertFreeCertificateContext": "syscall", + "syscall.CertGetCertificateChain": "syscall", + "syscall.CertOpenStore": "syscall", + "syscall.CertOpenSystemStore": "syscall", + "syscall.CertRevocationInfo": "syscall", + "syscall.CertSimpleChain": "syscall", + "syscall.CertTrustStatus": "syscall", + "syscall.CertUsageMatch": "syscall", + "syscall.CertVerifyCertificateChainPolicy": "syscall", + "syscall.Chdir": "syscall", + "syscall.CheckBpfVersion": "syscall", + "syscall.Chflags": "syscall", + "syscall.Chmod": "syscall", + "syscall.Chown": "syscall", + "syscall.Chroot": "syscall", + "syscall.Clearenv": "syscall", + "syscall.Close": "syscall", + "syscall.CloseHandle": "syscall", + "syscall.CloseOnExec": "syscall", + "syscall.Closesocket": "syscall", + "syscall.CmsgLen": "syscall", + "syscall.CmsgSpace": "syscall", + "syscall.Cmsghdr": "syscall", + "syscall.CommandLineToArgv": "syscall", + "syscall.ComputerName": "syscall", + "syscall.Conn": "syscall", + "syscall.Connect": "syscall", + "syscall.ConnectEx": "syscall", + "syscall.ConvertSidToStringSid": "syscall", + "syscall.ConvertStringSidToSid": "syscall", + "syscall.CopySid": "syscall", + "syscall.Creat": "syscall", + "syscall.CreateDirectory": "syscall", + "syscall.CreateFile": "syscall", + "syscall.CreateFileMapping": "syscall", + "syscall.CreateHardLink": "syscall", + "syscall.CreateIoCompletionPort": "syscall", + "syscall.CreatePipe": "syscall", + "syscall.CreateProcess": "syscall", + "syscall.CreateSymbolicLink": "syscall", + "syscall.CreateToolhelp32Snapshot": "syscall", + "syscall.Credential": "syscall", + "syscall.CryptAcquireContext": "syscall", + "syscall.CryptGenRandom": "syscall", + "syscall.CryptReleaseContext": "syscall", + "syscall.DIOCBSFLUSH": "syscall", + "syscall.DIOCOSFPFLUSH": "syscall", + "syscall.DLL": "syscall", + "syscall.DLLError": "syscall", + "syscall.DLT_A429": "syscall", + "syscall.DLT_A653_ICM": "syscall", + "syscall.DLT_AIRONET_HEADER": "syscall", + "syscall.DLT_AOS": "syscall", + "syscall.DLT_APPLE_IP_OVER_IEEE1394": "syscall", + "syscall.DLT_ARCNET": "syscall", + "syscall.DLT_ARCNET_LINUX": "syscall", + "syscall.DLT_ATM_CLIP": "syscall", + "syscall.DLT_ATM_RFC1483": "syscall", + "syscall.DLT_AURORA": "syscall", + "syscall.DLT_AX25": "syscall", + "syscall.DLT_AX25_KISS": "syscall", + "syscall.DLT_BACNET_MS_TP": "syscall", + "syscall.DLT_BLUETOOTH_HCI_H4": "syscall", + "syscall.DLT_BLUETOOTH_HCI_H4_WITH_PHDR": "syscall", + "syscall.DLT_CAN20B": "syscall", + "syscall.DLT_CAN_SOCKETCAN": "syscall", + "syscall.DLT_CHAOS": "syscall", + "syscall.DLT_CHDLC": "syscall", + "syscall.DLT_CISCO_IOS": "syscall", + "syscall.DLT_C_HDLC": "syscall", + "syscall.DLT_C_HDLC_WITH_DIR": "syscall", + "syscall.DLT_DBUS": "syscall", + "syscall.DLT_DECT": "syscall", + "syscall.DLT_DOCSIS": "syscall", + "syscall.DLT_DVB_CI": "syscall", + "syscall.DLT_ECONET": "syscall", + "syscall.DLT_EN10MB": "syscall", + "syscall.DLT_EN3MB": "syscall", + "syscall.DLT_ENC": "syscall", + "syscall.DLT_ERF": "syscall", + "syscall.DLT_ERF_ETH": "syscall", + "syscall.DLT_ERF_POS": "syscall", + "syscall.DLT_FC_2": "syscall", + "syscall.DLT_FC_2_WITH_FRAME_DELIMS": "syscall", + "syscall.DLT_FDDI": "syscall", + "syscall.DLT_FLEXRAY": "syscall", + "syscall.DLT_FRELAY": "syscall", + "syscall.DLT_FRELAY_WITH_DIR": "syscall", + "syscall.DLT_GCOM_SERIAL": "syscall", + "syscall.DLT_GCOM_T1E1": "syscall", + "syscall.DLT_GPF_F": "syscall", + "syscall.DLT_GPF_T": "syscall", + "syscall.DLT_GPRS_LLC": "syscall", + "syscall.DLT_GSMTAP_ABIS": "syscall", + "syscall.DLT_GSMTAP_UM": "syscall", + "syscall.DLT_HDLC": "syscall", + "syscall.DLT_HHDLC": "syscall", + "syscall.DLT_HIPPI": "syscall", + "syscall.DLT_IBM_SN": "syscall", + "syscall.DLT_IBM_SP": "syscall", + "syscall.DLT_IEEE802": "syscall", + "syscall.DLT_IEEE802_11": "syscall", + "syscall.DLT_IEEE802_11_RADIO": "syscall", + "syscall.DLT_IEEE802_11_RADIO_AVS": "syscall", + "syscall.DLT_IEEE802_15_4": "syscall", + "syscall.DLT_IEEE802_15_4_LINUX": "syscall", + "syscall.DLT_IEEE802_15_4_NOFCS": "syscall", + "syscall.DLT_IEEE802_15_4_NONASK_PHY": "syscall", + "syscall.DLT_IEEE802_16_MAC_CPS": "syscall", + "syscall.DLT_IEEE802_16_MAC_CPS_RADIO": "syscall", + "syscall.DLT_IPFILTER": "syscall", + "syscall.DLT_IPMB": "syscall", + "syscall.DLT_IPMB_LINUX": "syscall", + "syscall.DLT_IPNET": "syscall", + "syscall.DLT_IPOIB": "syscall", + "syscall.DLT_IPV4": "syscall", + "syscall.DLT_IPV6": "syscall", + "syscall.DLT_IP_OVER_FC": "syscall", + "syscall.DLT_JUNIPER_ATM1": "syscall", + "syscall.DLT_JUNIPER_ATM2": "syscall", + "syscall.DLT_JUNIPER_ATM_CEMIC": "syscall", + "syscall.DLT_JUNIPER_CHDLC": "syscall", + "syscall.DLT_JUNIPER_ES": "syscall", + "syscall.DLT_JUNIPER_ETHER": "syscall", + "syscall.DLT_JUNIPER_FIBRECHANNEL": "syscall", + "syscall.DLT_JUNIPER_FRELAY": "syscall", + "syscall.DLT_JUNIPER_GGSN": "syscall", + "syscall.DLT_JUNIPER_ISM": "syscall", + "syscall.DLT_JUNIPER_MFR": "syscall", + "syscall.DLT_JUNIPER_MLFR": "syscall", + "syscall.DLT_JUNIPER_MLPPP": "syscall", + "syscall.DLT_JUNIPER_MONITOR": "syscall", + "syscall.DLT_JUNIPER_PIC_PEER": "syscall", + "syscall.DLT_JUNIPER_PPP": "syscall", + "syscall.DLT_JUNIPER_PPPOE": "syscall", + "syscall.DLT_JUNIPER_PPPOE_ATM": "syscall", + "syscall.DLT_JUNIPER_SERVICES": "syscall", + "syscall.DLT_JUNIPER_SRX_E2E": "syscall", + "syscall.DLT_JUNIPER_ST": "syscall", + "syscall.DLT_JUNIPER_VP": "syscall", + "syscall.DLT_JUNIPER_VS": "syscall", + "syscall.DLT_LAPB_WITH_DIR": "syscall", + "syscall.DLT_LAPD": "syscall", + "syscall.DLT_LIN": "syscall", + "syscall.DLT_LINUX_EVDEV": "syscall", + "syscall.DLT_LINUX_IRDA": "syscall", + "syscall.DLT_LINUX_LAPD": "syscall", + "syscall.DLT_LINUX_PPP_WITHDIRECTION": "syscall", + "syscall.DLT_LINUX_SLL": "syscall", + "syscall.DLT_LOOP": "syscall", + "syscall.DLT_LTALK": "syscall", + "syscall.DLT_MATCHING_MAX": "syscall", + "syscall.DLT_MATCHING_MIN": "syscall", + "syscall.DLT_MFR": "syscall", + "syscall.DLT_MOST": "syscall", + "syscall.DLT_MPEG_2_TS": "syscall", + "syscall.DLT_MPLS": "syscall", + "syscall.DLT_MTP2": "syscall", + "syscall.DLT_MTP2_WITH_PHDR": "syscall", + "syscall.DLT_MTP3": "syscall", + "syscall.DLT_MUX27010": "syscall", + "syscall.DLT_NETANALYZER": "syscall", + "syscall.DLT_NETANALYZER_TRANSPARENT": "syscall", + "syscall.DLT_NFC_LLCP": "syscall", + "syscall.DLT_NFLOG": "syscall", + "syscall.DLT_NG40": "syscall", + "syscall.DLT_NULL": "syscall", + "syscall.DLT_PCI_EXP": "syscall", + "syscall.DLT_PFLOG": "syscall", + "syscall.DLT_PFSYNC": "syscall", + "syscall.DLT_PPI": "syscall", + "syscall.DLT_PPP": "syscall", + "syscall.DLT_PPP_BSDOS": "syscall", + "syscall.DLT_PPP_ETHER": "syscall", + "syscall.DLT_PPP_PPPD": "syscall", + "syscall.DLT_PPP_SERIAL": "syscall", + "syscall.DLT_PPP_WITH_DIR": "syscall", + "syscall.DLT_PPP_WITH_DIRECTION": "syscall", + "syscall.DLT_PRISM_HEADER": "syscall", + "syscall.DLT_PRONET": "syscall", + "syscall.DLT_RAIF1": "syscall", + "syscall.DLT_RAW": "syscall", + "syscall.DLT_RAWAF_MASK": "syscall", + "syscall.DLT_RIO": "syscall", + "syscall.DLT_SCCP": "syscall", + "syscall.DLT_SITA": "syscall", + "syscall.DLT_SLIP": "syscall", + "syscall.DLT_SLIP_BSDOS": "syscall", + "syscall.DLT_STANAG_5066_D_PDU": "syscall", + "syscall.DLT_SUNATM": "syscall", + "syscall.DLT_SYMANTEC_FIREWALL": "syscall", + "syscall.DLT_TZSP": "syscall", + "syscall.DLT_USB": "syscall", + "syscall.DLT_USB_LINUX": "syscall", + "syscall.DLT_USB_LINUX_MMAPPED": "syscall", + "syscall.DLT_USER0": "syscall", + "syscall.DLT_USER1": "syscall", + "syscall.DLT_USER10": "syscall", + "syscall.DLT_USER11": "syscall", + "syscall.DLT_USER12": "syscall", + "syscall.DLT_USER13": "syscall", + "syscall.DLT_USER14": "syscall", + "syscall.DLT_USER15": "syscall", + "syscall.DLT_USER2": "syscall", + "syscall.DLT_USER3": "syscall", + "syscall.DLT_USER4": "syscall", + "syscall.DLT_USER5": "syscall", + "syscall.DLT_USER6": "syscall", + "syscall.DLT_USER7": "syscall", + "syscall.DLT_USER8": "syscall", + "syscall.DLT_USER9": "syscall", + "syscall.DLT_WIHART": "syscall", + "syscall.DLT_X2E_SERIAL": "syscall", + "syscall.DLT_X2E_XORAYA": "syscall", + "syscall.DNSMXData": "syscall", + "syscall.DNSPTRData": "syscall", + "syscall.DNSRecord": "syscall", + "syscall.DNSSRVData": "syscall", + "syscall.DNSTXTData": "syscall", + "syscall.DNS_INFO_NO_RECORDS": "syscall", + "syscall.DNS_TYPE_A": "syscall", + "syscall.DNS_TYPE_A6": "syscall", + "syscall.DNS_TYPE_AAAA": "syscall", + "syscall.DNS_TYPE_ADDRS": "syscall", + "syscall.DNS_TYPE_AFSDB": "syscall", + "syscall.DNS_TYPE_ALL": "syscall", + "syscall.DNS_TYPE_ANY": "syscall", + "syscall.DNS_TYPE_ATMA": "syscall", + "syscall.DNS_TYPE_AXFR": "syscall", + "syscall.DNS_TYPE_CERT": "syscall", + "syscall.DNS_TYPE_CNAME": "syscall", + "syscall.DNS_TYPE_DHCID": "syscall", + "syscall.DNS_TYPE_DNAME": "syscall", + "syscall.DNS_TYPE_DNSKEY": "syscall", + "syscall.DNS_TYPE_DS": "syscall", + "syscall.DNS_TYPE_EID": "syscall", + "syscall.DNS_TYPE_GID": "syscall", + "syscall.DNS_TYPE_GPOS": "syscall", + "syscall.DNS_TYPE_HINFO": "syscall", + "syscall.DNS_TYPE_ISDN": "syscall", + "syscall.DNS_TYPE_IXFR": "syscall", + "syscall.DNS_TYPE_KEY": "syscall", + "syscall.DNS_TYPE_KX": "syscall", + "syscall.DNS_TYPE_LOC": "syscall", + "syscall.DNS_TYPE_MAILA": "syscall", + "syscall.DNS_TYPE_MAILB": "syscall", + "syscall.DNS_TYPE_MB": "syscall", + "syscall.DNS_TYPE_MD": "syscall", + "syscall.DNS_TYPE_MF": "syscall", + "syscall.DNS_TYPE_MG": "syscall", + "syscall.DNS_TYPE_MINFO": "syscall", + "syscall.DNS_TYPE_MR": "syscall", + "syscall.DNS_TYPE_MX": "syscall", + "syscall.DNS_TYPE_NAPTR": "syscall", + "syscall.DNS_TYPE_NBSTAT": "syscall", + "syscall.DNS_TYPE_NIMLOC": "syscall", + "syscall.DNS_TYPE_NS": "syscall", + "syscall.DNS_TYPE_NSAP": "syscall", + "syscall.DNS_TYPE_NSAPPTR": "syscall", + "syscall.DNS_TYPE_NSEC": "syscall", + "syscall.DNS_TYPE_NULL": "syscall", + "syscall.DNS_TYPE_NXT": "syscall", + "syscall.DNS_TYPE_OPT": "syscall", + "syscall.DNS_TYPE_PTR": "syscall", + "syscall.DNS_TYPE_PX": "syscall", + "syscall.DNS_TYPE_RP": "syscall", + "syscall.DNS_TYPE_RRSIG": "syscall", + "syscall.DNS_TYPE_RT": "syscall", + "syscall.DNS_TYPE_SIG": "syscall", + "syscall.DNS_TYPE_SINK": "syscall", + "syscall.DNS_TYPE_SOA": "syscall", + "syscall.DNS_TYPE_SRV": "syscall", + "syscall.DNS_TYPE_TEXT": "syscall", + "syscall.DNS_TYPE_TKEY": "syscall", + "syscall.DNS_TYPE_TSIG": "syscall", + "syscall.DNS_TYPE_UID": "syscall", + "syscall.DNS_TYPE_UINFO": "syscall", + "syscall.DNS_TYPE_UNSPEC": "syscall", + "syscall.DNS_TYPE_WINS": "syscall", + "syscall.DNS_TYPE_WINSR": "syscall", + "syscall.DNS_TYPE_WKS": "syscall", + "syscall.DNS_TYPE_X25": "syscall", + "syscall.DT_BLK": "syscall", + "syscall.DT_CHR": "syscall", + "syscall.DT_DIR": "syscall", + "syscall.DT_FIFO": "syscall", + "syscall.DT_LNK": "syscall", + "syscall.DT_REG": "syscall", + "syscall.DT_SOCK": "syscall", + "syscall.DT_UNKNOWN": "syscall", + "syscall.DT_WHT": "syscall", + "syscall.DUPLICATE_CLOSE_SOURCE": "syscall", + "syscall.DUPLICATE_SAME_ACCESS": "syscall", + "syscall.DeleteFile": "syscall", + "syscall.DetachLsf": "syscall", + "syscall.DeviceIoControl": "syscall", + "syscall.Dirent": "syscall", + "syscall.DnsNameCompare": "syscall", + "syscall.DnsQuery": "syscall", + "syscall.DnsRecordListFree": "syscall", + "syscall.DnsSectionAdditional": "syscall", + "syscall.DnsSectionAnswer": "syscall", + "syscall.DnsSectionAuthority": "syscall", + "syscall.DnsSectionQuestion": "syscall", + "syscall.Dup": "syscall", + "syscall.Dup2": "syscall", + "syscall.Dup3": "syscall", + "syscall.DuplicateHandle": "syscall", + "syscall.E2BIG": "syscall", + "syscall.EACCES": "syscall", + "syscall.EADDRINUSE": "syscall", + "syscall.EADDRNOTAVAIL": "syscall", + "syscall.EADV": "syscall", + "syscall.EAFNOSUPPORT": "syscall", + "syscall.EAGAIN": "syscall", + "syscall.EALREADY": "syscall", + "syscall.EAUTH": "syscall", + "syscall.EBADARCH": "syscall", + "syscall.EBADE": "syscall", + "syscall.EBADEXEC": "syscall", + "syscall.EBADF": "syscall", + "syscall.EBADFD": "syscall", + "syscall.EBADMACHO": "syscall", + "syscall.EBADMSG": "syscall", + "syscall.EBADR": "syscall", + "syscall.EBADRPC": "syscall", + "syscall.EBADRQC": "syscall", + "syscall.EBADSLT": "syscall", + "syscall.EBFONT": "syscall", + "syscall.EBUSY": "syscall", + "syscall.ECANCELED": "syscall", + "syscall.ECAPMODE": "syscall", + "syscall.ECHILD": "syscall", + "syscall.ECHO": "syscall", + "syscall.ECHOCTL": "syscall", + "syscall.ECHOE": "syscall", + "syscall.ECHOK": "syscall", + "syscall.ECHOKE": "syscall", + "syscall.ECHONL": "syscall", + "syscall.ECHOPRT": "syscall", + "syscall.ECHRNG": "syscall", + "syscall.ECOMM": "syscall", + "syscall.ECONNABORTED": "syscall", + "syscall.ECONNREFUSED": "syscall", + "syscall.ECONNRESET": "syscall", + "syscall.EDEADLK": "syscall", + "syscall.EDEADLOCK": "syscall", + "syscall.EDESTADDRREQ": "syscall", + "syscall.EDEVERR": "syscall", + "syscall.EDOM": "syscall", + "syscall.EDOOFUS": "syscall", + "syscall.EDOTDOT": "syscall", + "syscall.EDQUOT": "syscall", + "syscall.EEXIST": "syscall", + "syscall.EFAULT": "syscall", + "syscall.EFBIG": "syscall", + "syscall.EFER_LMA": "syscall", + "syscall.EFER_LME": "syscall", + "syscall.EFER_NXE": "syscall", + "syscall.EFER_SCE": "syscall", + "syscall.EFTYPE": "syscall", + "syscall.EHOSTDOWN": "syscall", + "syscall.EHOSTUNREACH": "syscall", + "syscall.EHWPOISON": "syscall", + "syscall.EIDRM": "syscall", + "syscall.EILSEQ": "syscall", + "syscall.EINPROGRESS": "syscall", + "syscall.EINTR": "syscall", + "syscall.EINVAL": "syscall", + "syscall.EIO": "syscall", + "syscall.EIPSEC": "syscall", + "syscall.EISCONN": "syscall", + "syscall.EISDIR": "syscall", + "syscall.EISNAM": "syscall", + "syscall.EKEYEXPIRED": "syscall", + "syscall.EKEYREJECTED": "syscall", + "syscall.EKEYREVOKED": "syscall", + "syscall.EL2HLT": "syscall", + "syscall.EL2NSYNC": "syscall", + "syscall.EL3HLT": "syscall", + "syscall.EL3RST": "syscall", + "syscall.ELAST": "syscall", + "syscall.ELF_NGREG": "syscall", + "syscall.ELF_PRARGSZ": "syscall", + "syscall.ELIBACC": "syscall", + "syscall.ELIBBAD": "syscall", + "syscall.ELIBEXEC": "syscall", + "syscall.ELIBMAX": "syscall", + "syscall.ELIBSCN": "syscall", + "syscall.ELNRNG": "syscall", + "syscall.ELOOP": "syscall", + "syscall.EMEDIUMTYPE": "syscall", + "syscall.EMFILE": "syscall", + "syscall.EMLINK": "syscall", + "syscall.EMSGSIZE": "syscall", + "syscall.EMT_TAGOVF": "syscall", + "syscall.EMULTIHOP": "syscall", + "syscall.EMUL_ENABLED": "syscall", + "syscall.EMUL_LINUX": "syscall", + "syscall.EMUL_LINUX32": "syscall", + "syscall.EMUL_MAXID": "syscall", + "syscall.EMUL_NATIVE": "syscall", + "syscall.ENAMETOOLONG": "syscall", + "syscall.ENAVAIL": "syscall", + "syscall.ENDRUNDISC": "syscall", + "syscall.ENEEDAUTH": "syscall", + "syscall.ENETDOWN": "syscall", + "syscall.ENETRESET": "syscall", + "syscall.ENETUNREACH": "syscall", + "syscall.ENFILE": "syscall", + "syscall.ENOANO": "syscall", + "syscall.ENOATTR": "syscall", + "syscall.ENOBUFS": "syscall", + "syscall.ENOCSI": "syscall", + "syscall.ENODATA": "syscall", + "syscall.ENODEV": "syscall", + "syscall.ENOENT": "syscall", + "syscall.ENOEXEC": "syscall", + "syscall.ENOKEY": "syscall", + "syscall.ENOLCK": "syscall", + "syscall.ENOLINK": "syscall", + "syscall.ENOMEDIUM": "syscall", + "syscall.ENOMEM": "syscall", + "syscall.ENOMSG": "syscall", + "syscall.ENONET": "syscall", + "syscall.ENOPKG": "syscall", + "syscall.ENOPOLICY": "syscall", + "syscall.ENOPROTOOPT": "syscall", + "syscall.ENOSPC": "syscall", + "syscall.ENOSR": "syscall", + "syscall.ENOSTR": "syscall", + "syscall.ENOSYS": "syscall", + "syscall.ENOTBLK": "syscall", + "syscall.ENOTCAPABLE": "syscall", + "syscall.ENOTCONN": "syscall", + "syscall.ENOTDIR": "syscall", + "syscall.ENOTEMPTY": "syscall", + "syscall.ENOTNAM": "syscall", + "syscall.ENOTRECOVERABLE": "syscall", + "syscall.ENOTSOCK": "syscall", + "syscall.ENOTSUP": "syscall", + "syscall.ENOTTY": "syscall", + "syscall.ENOTUNIQ": "syscall", + "syscall.ENXIO": "syscall", + "syscall.EN_SW_CTL_INF": "syscall", + "syscall.EN_SW_CTL_PREC": "syscall", + "syscall.EN_SW_CTL_ROUND": "syscall", + "syscall.EN_SW_DATACHAIN": "syscall", + "syscall.EN_SW_DENORM": "syscall", + "syscall.EN_SW_INVOP": "syscall", + "syscall.EN_SW_OVERFLOW": "syscall", + "syscall.EN_SW_PRECLOSS": "syscall", + "syscall.EN_SW_UNDERFLOW": "syscall", + "syscall.EN_SW_ZERODIV": "syscall", + "syscall.EOPNOTSUPP": "syscall", + "syscall.EOVERFLOW": "syscall", + "syscall.EOWNERDEAD": "syscall", + "syscall.EPERM": "syscall", + "syscall.EPFNOSUPPORT": "syscall", + "syscall.EPIPE": "syscall", + "syscall.EPOLLERR": "syscall", + "syscall.EPOLLET": "syscall", + "syscall.EPOLLHUP": "syscall", + "syscall.EPOLLIN": "syscall", + "syscall.EPOLLMSG": "syscall", + "syscall.EPOLLONESHOT": "syscall", + "syscall.EPOLLOUT": "syscall", + "syscall.EPOLLPRI": "syscall", + "syscall.EPOLLRDBAND": "syscall", + "syscall.EPOLLRDHUP": "syscall", + "syscall.EPOLLRDNORM": "syscall", + "syscall.EPOLLWRBAND": "syscall", + "syscall.EPOLLWRNORM": "syscall", + "syscall.EPOLL_CLOEXEC": "syscall", + "syscall.EPOLL_CTL_ADD": "syscall", + "syscall.EPOLL_CTL_DEL": "syscall", + "syscall.EPOLL_CTL_MOD": "syscall", + "syscall.EPOLL_NONBLOCK": "syscall", + "syscall.EPROCLIM": "syscall", + "syscall.EPROCUNAVAIL": "syscall", + "syscall.EPROGMISMATCH": "syscall", + "syscall.EPROGUNAVAIL": "syscall", + "syscall.EPROTO": "syscall", + "syscall.EPROTONOSUPPORT": "syscall", + "syscall.EPROTOTYPE": "syscall", + "syscall.EPWROFF": "syscall", + "syscall.ERANGE": "syscall", + "syscall.EREMCHG": "syscall", + "syscall.EREMOTE": "syscall", + "syscall.EREMOTEIO": "syscall", + "syscall.ERESTART": "syscall", + "syscall.ERFKILL": "syscall", + "syscall.EROFS": "syscall", + "syscall.ERPCMISMATCH": "syscall", + "syscall.ERROR_ACCESS_DENIED": "syscall", + "syscall.ERROR_ALREADY_EXISTS": "syscall", + "syscall.ERROR_BROKEN_PIPE": "syscall", + "syscall.ERROR_BUFFER_OVERFLOW": "syscall", + "syscall.ERROR_DIR_NOT_EMPTY": "syscall", + "syscall.ERROR_ENVVAR_NOT_FOUND": "syscall", + "syscall.ERROR_FILE_EXISTS": "syscall", + "syscall.ERROR_FILE_NOT_FOUND": "syscall", + "syscall.ERROR_HANDLE_EOF": "syscall", + "syscall.ERROR_INSUFFICIENT_BUFFER": "syscall", + "syscall.ERROR_IO_PENDING": "syscall", + "syscall.ERROR_MOD_NOT_FOUND": "syscall", + "syscall.ERROR_MORE_DATA": "syscall", + "syscall.ERROR_NETNAME_DELETED": "syscall", + "syscall.ERROR_NOT_FOUND": "syscall", + "syscall.ERROR_NO_MORE_FILES": "syscall", + "syscall.ERROR_OPERATION_ABORTED": "syscall", + "syscall.ERROR_PATH_NOT_FOUND": "syscall", + "syscall.ERROR_PRIVILEGE_NOT_HELD": "syscall", + "syscall.ERROR_PROC_NOT_FOUND": "syscall", + "syscall.ESHLIBVERS": "syscall", + "syscall.ESHUTDOWN": "syscall", + "syscall.ESOCKTNOSUPPORT": "syscall", + "syscall.ESPIPE": "syscall", + "syscall.ESRCH": "syscall", + "syscall.ESRMNT": "syscall", + "syscall.ESTALE": "syscall", + "syscall.ESTRPIPE": "syscall", + "syscall.ETHERCAP_JUMBO_MTU": "syscall", + "syscall.ETHERCAP_VLAN_HWTAGGING": "syscall", + "syscall.ETHERCAP_VLAN_MTU": "syscall", + "syscall.ETHERMIN": "syscall", + "syscall.ETHERMTU": "syscall", + "syscall.ETHERMTU_JUMBO": "syscall", + "syscall.ETHERTYPE_8023": "syscall", + "syscall.ETHERTYPE_AARP": "syscall", + "syscall.ETHERTYPE_ACCTON": "syscall", + "syscall.ETHERTYPE_AEONIC": "syscall", + "syscall.ETHERTYPE_ALPHA": "syscall", + "syscall.ETHERTYPE_AMBER": "syscall", + "syscall.ETHERTYPE_AMOEBA": "syscall", + "syscall.ETHERTYPE_AOE": "syscall", + "syscall.ETHERTYPE_APOLLO": "syscall", + "syscall.ETHERTYPE_APOLLODOMAIN": "syscall", + "syscall.ETHERTYPE_APPLETALK": "syscall", + "syscall.ETHERTYPE_APPLITEK": "syscall", + "syscall.ETHERTYPE_ARGONAUT": "syscall", + "syscall.ETHERTYPE_ARP": "syscall", + "syscall.ETHERTYPE_AT": "syscall", + "syscall.ETHERTYPE_ATALK": "syscall", + "syscall.ETHERTYPE_ATOMIC": "syscall", + "syscall.ETHERTYPE_ATT": "syscall", + "syscall.ETHERTYPE_ATTSTANFORD": "syscall", + "syscall.ETHERTYPE_AUTOPHON": "syscall", + "syscall.ETHERTYPE_AXIS": "syscall", + "syscall.ETHERTYPE_BCLOOP": "syscall", + "syscall.ETHERTYPE_BOFL": "syscall", + "syscall.ETHERTYPE_CABLETRON": "syscall", + "syscall.ETHERTYPE_CHAOS": "syscall", + "syscall.ETHERTYPE_COMDESIGN": "syscall", + "syscall.ETHERTYPE_COMPUGRAPHIC": "syscall", + "syscall.ETHERTYPE_COUNTERPOINT": "syscall", + "syscall.ETHERTYPE_CRONUS": "syscall", + "syscall.ETHERTYPE_CRONUSVLN": "syscall", + "syscall.ETHERTYPE_DCA": "syscall", + "syscall.ETHERTYPE_DDE": "syscall", + "syscall.ETHERTYPE_DEBNI": "syscall", + "syscall.ETHERTYPE_DECAM": "syscall", + "syscall.ETHERTYPE_DECCUST": "syscall", + "syscall.ETHERTYPE_DECDIAG": "syscall", + "syscall.ETHERTYPE_DECDNS": "syscall", + "syscall.ETHERTYPE_DECDTS": "syscall", + "syscall.ETHERTYPE_DECEXPER": "syscall", + "syscall.ETHERTYPE_DECLAST": "syscall", + "syscall.ETHERTYPE_DECLTM": "syscall", + "syscall.ETHERTYPE_DECMUMPS": "syscall", + "syscall.ETHERTYPE_DECNETBIOS": "syscall", + "syscall.ETHERTYPE_DELTACON": "syscall", + "syscall.ETHERTYPE_DIDDLE": "syscall", + "syscall.ETHERTYPE_DLOG1": "syscall", + "syscall.ETHERTYPE_DLOG2": "syscall", + "syscall.ETHERTYPE_DN": "syscall", + "syscall.ETHERTYPE_DOGFIGHT": "syscall", + "syscall.ETHERTYPE_DSMD": "syscall", + "syscall.ETHERTYPE_ECMA": "syscall", + "syscall.ETHERTYPE_ENCRYPT": "syscall", + "syscall.ETHERTYPE_ES": "syscall", + "syscall.ETHERTYPE_EXCELAN": "syscall", + "syscall.ETHERTYPE_EXPERDATA": "syscall", + "syscall.ETHERTYPE_FLIP": "syscall", + "syscall.ETHERTYPE_FLOWCONTROL": "syscall", + "syscall.ETHERTYPE_FRARP": "syscall", + "syscall.ETHERTYPE_GENDYN": "syscall", + "syscall.ETHERTYPE_HAYES": "syscall", + "syscall.ETHERTYPE_HIPPI_FP": "syscall", + "syscall.ETHERTYPE_HITACHI": "syscall", + "syscall.ETHERTYPE_HP": "syscall", + "syscall.ETHERTYPE_IEEEPUP": "syscall", + "syscall.ETHERTYPE_IEEEPUPAT": "syscall", + "syscall.ETHERTYPE_IMLBL": "syscall", + "syscall.ETHERTYPE_IMLBLDIAG": "syscall", + "syscall.ETHERTYPE_IP": "syscall", + "syscall.ETHERTYPE_IPAS": "syscall", + "syscall.ETHERTYPE_IPV6": "syscall", + "syscall.ETHERTYPE_IPX": "syscall", + "syscall.ETHERTYPE_IPXNEW": "syscall", + "syscall.ETHERTYPE_KALPANA": "syscall", + "syscall.ETHERTYPE_LANBRIDGE": "syscall", + "syscall.ETHERTYPE_LANPROBE": "syscall", + "syscall.ETHERTYPE_LAT": "syscall", + "syscall.ETHERTYPE_LBACK": "syscall", + "syscall.ETHERTYPE_LITTLE": "syscall", + "syscall.ETHERTYPE_LLDP": "syscall", + "syscall.ETHERTYPE_LOGICRAFT": "syscall", + "syscall.ETHERTYPE_LOOPBACK": "syscall", + "syscall.ETHERTYPE_MATRA": "syscall", + "syscall.ETHERTYPE_MAX": "syscall", + "syscall.ETHERTYPE_MERIT": "syscall", + "syscall.ETHERTYPE_MICP": "syscall", + "syscall.ETHERTYPE_MOPDL": "syscall", + "syscall.ETHERTYPE_MOPRC": "syscall", + "syscall.ETHERTYPE_MOTOROLA": "syscall", + "syscall.ETHERTYPE_MPLS": "syscall", + "syscall.ETHERTYPE_MPLS_MCAST": "syscall", + "syscall.ETHERTYPE_MUMPS": "syscall", + "syscall.ETHERTYPE_NBPCC": "syscall", + "syscall.ETHERTYPE_NBPCLAIM": "syscall", + "syscall.ETHERTYPE_NBPCLREQ": "syscall", + "syscall.ETHERTYPE_NBPCLRSP": "syscall", + "syscall.ETHERTYPE_NBPCREQ": "syscall", + "syscall.ETHERTYPE_NBPCRSP": "syscall", + "syscall.ETHERTYPE_NBPDG": "syscall", + "syscall.ETHERTYPE_NBPDGB": "syscall", + "syscall.ETHERTYPE_NBPDLTE": "syscall", + "syscall.ETHERTYPE_NBPRAR": "syscall", + "syscall.ETHERTYPE_NBPRAS": "syscall", + "syscall.ETHERTYPE_NBPRST": "syscall", + "syscall.ETHERTYPE_NBPSCD": "syscall", + "syscall.ETHERTYPE_NBPVCD": "syscall", + "syscall.ETHERTYPE_NBS": "syscall", + "syscall.ETHERTYPE_NCD": "syscall", + "syscall.ETHERTYPE_NESTAR": "syscall", + "syscall.ETHERTYPE_NETBEUI": "syscall", + "syscall.ETHERTYPE_NOVELL": "syscall", + "syscall.ETHERTYPE_NS": "syscall", + "syscall.ETHERTYPE_NSAT": "syscall", + "syscall.ETHERTYPE_NSCOMPAT": "syscall", + "syscall.ETHERTYPE_NTRAILER": "syscall", + "syscall.ETHERTYPE_OS9": "syscall", + "syscall.ETHERTYPE_OS9NET": "syscall", + "syscall.ETHERTYPE_PACER": "syscall", + "syscall.ETHERTYPE_PAE": "syscall", + "syscall.ETHERTYPE_PCS": "syscall", + "syscall.ETHERTYPE_PLANNING": "syscall", + "syscall.ETHERTYPE_PPP": "syscall", + "syscall.ETHERTYPE_PPPOE": "syscall", + "syscall.ETHERTYPE_PPPOEDISC": "syscall", + "syscall.ETHERTYPE_PRIMENTS": "syscall", + "syscall.ETHERTYPE_PUP": "syscall", + "syscall.ETHERTYPE_PUPAT": "syscall", + "syscall.ETHERTYPE_QINQ": "syscall", + "syscall.ETHERTYPE_RACAL": "syscall", + "syscall.ETHERTYPE_RATIONAL": "syscall", + "syscall.ETHERTYPE_RAWFR": "syscall", + "syscall.ETHERTYPE_RCL": "syscall", + "syscall.ETHERTYPE_RDP": "syscall", + "syscall.ETHERTYPE_RETIX": "syscall", + "syscall.ETHERTYPE_REVARP": "syscall", + "syscall.ETHERTYPE_SCA": "syscall", + "syscall.ETHERTYPE_SECTRA": "syscall", + "syscall.ETHERTYPE_SECUREDATA": "syscall", + "syscall.ETHERTYPE_SGITW": "syscall", + "syscall.ETHERTYPE_SG_BOUNCE": "syscall", + "syscall.ETHERTYPE_SG_DIAG": "syscall", + "syscall.ETHERTYPE_SG_NETGAMES": "syscall", + "syscall.ETHERTYPE_SG_RESV": "syscall", + "syscall.ETHERTYPE_SIMNET": "syscall", + "syscall.ETHERTYPE_SLOW": "syscall", + "syscall.ETHERTYPE_SLOWPROTOCOLS": "syscall", + "syscall.ETHERTYPE_SNA": "syscall", + "syscall.ETHERTYPE_SNMP": "syscall", + "syscall.ETHERTYPE_SONIX": "syscall", + "syscall.ETHERTYPE_SPIDER": "syscall", + "syscall.ETHERTYPE_SPRITE": "syscall", + "syscall.ETHERTYPE_STP": "syscall", + "syscall.ETHERTYPE_TALARIS": "syscall", + "syscall.ETHERTYPE_TALARISMC": "syscall", + "syscall.ETHERTYPE_TCPCOMP": "syscall", + "syscall.ETHERTYPE_TCPSM": "syscall", + "syscall.ETHERTYPE_TEC": "syscall", + "syscall.ETHERTYPE_TIGAN": "syscall", + "syscall.ETHERTYPE_TRAIL": "syscall", + "syscall.ETHERTYPE_TRANSETHER": "syscall", + "syscall.ETHERTYPE_TYMSHARE": "syscall", + "syscall.ETHERTYPE_UBBST": "syscall", + "syscall.ETHERTYPE_UBDEBUG": "syscall", + "syscall.ETHERTYPE_UBDIAGLOOP": "syscall", + "syscall.ETHERTYPE_UBDL": "syscall", + "syscall.ETHERTYPE_UBNIU": "syscall", + "syscall.ETHERTYPE_UBNMC": "syscall", + "syscall.ETHERTYPE_VALID": "syscall", + "syscall.ETHERTYPE_VARIAN": "syscall", + "syscall.ETHERTYPE_VAXELN": "syscall", + "syscall.ETHERTYPE_VEECO": "syscall", + "syscall.ETHERTYPE_VEXP": "syscall", + "syscall.ETHERTYPE_VGLAB": "syscall", + "syscall.ETHERTYPE_VINES": "syscall", + "syscall.ETHERTYPE_VINESECHO": "syscall", + "syscall.ETHERTYPE_VINESLOOP": "syscall", + "syscall.ETHERTYPE_VITAL": "syscall", + "syscall.ETHERTYPE_VLAN": "syscall", + "syscall.ETHERTYPE_VLTLMAN": "syscall", + "syscall.ETHERTYPE_VPROD": "syscall", + "syscall.ETHERTYPE_VURESERVED": "syscall", + "syscall.ETHERTYPE_WATERLOO": "syscall", + "syscall.ETHERTYPE_WELLFLEET": "syscall", + "syscall.ETHERTYPE_X25": "syscall", + "syscall.ETHERTYPE_X75": "syscall", + "syscall.ETHERTYPE_XNSSM": "syscall", + "syscall.ETHERTYPE_XTP": "syscall", + "syscall.ETHER_ADDR_LEN": "syscall", + "syscall.ETHER_ALIGN": "syscall", + "syscall.ETHER_CRC_LEN": "syscall", + "syscall.ETHER_CRC_POLY_BE": "syscall", + "syscall.ETHER_CRC_POLY_LE": "syscall", + "syscall.ETHER_HDR_LEN": "syscall", + "syscall.ETHER_MAX_DIX_LEN": "syscall", + "syscall.ETHER_MAX_LEN": "syscall", + "syscall.ETHER_MAX_LEN_JUMBO": "syscall", + "syscall.ETHER_MIN_LEN": "syscall", + "syscall.ETHER_PPPOE_ENCAP_LEN": "syscall", + "syscall.ETHER_TYPE_LEN": "syscall", + "syscall.ETHER_VLAN_ENCAP_LEN": "syscall", + "syscall.ETH_P_1588": "syscall", + "syscall.ETH_P_8021Q": "syscall", + "syscall.ETH_P_802_2": "syscall", + "syscall.ETH_P_802_3": "syscall", + "syscall.ETH_P_AARP": "syscall", + "syscall.ETH_P_ALL": "syscall", + "syscall.ETH_P_AOE": "syscall", + "syscall.ETH_P_ARCNET": "syscall", + "syscall.ETH_P_ARP": "syscall", + "syscall.ETH_P_ATALK": "syscall", + "syscall.ETH_P_ATMFATE": "syscall", + "syscall.ETH_P_ATMMPOA": "syscall", + "syscall.ETH_P_AX25": "syscall", + "syscall.ETH_P_BPQ": "syscall", + "syscall.ETH_P_CAIF": "syscall", + "syscall.ETH_P_CAN": "syscall", + "syscall.ETH_P_CONTROL": "syscall", + "syscall.ETH_P_CUST": "syscall", + "syscall.ETH_P_DDCMP": "syscall", + "syscall.ETH_P_DEC": "syscall", + "syscall.ETH_P_DIAG": "syscall", + "syscall.ETH_P_DNA_DL": "syscall", + "syscall.ETH_P_DNA_RC": "syscall", + "syscall.ETH_P_DNA_RT": "syscall", + "syscall.ETH_P_DSA": "syscall", + "syscall.ETH_P_ECONET": "syscall", + "syscall.ETH_P_EDSA": "syscall", + "syscall.ETH_P_FCOE": "syscall", + "syscall.ETH_P_FIP": "syscall", + "syscall.ETH_P_HDLC": "syscall", + "syscall.ETH_P_IEEE802154": "syscall", + "syscall.ETH_P_IEEEPUP": "syscall", + "syscall.ETH_P_IEEEPUPAT": "syscall", + "syscall.ETH_P_IP": "syscall", + "syscall.ETH_P_IPV6": "syscall", + "syscall.ETH_P_IPX": "syscall", + "syscall.ETH_P_IRDA": "syscall", + "syscall.ETH_P_LAT": "syscall", + "syscall.ETH_P_LINK_CTL": "syscall", + "syscall.ETH_P_LOCALTALK": "syscall", + "syscall.ETH_P_LOOP": "syscall", + "syscall.ETH_P_MOBITEX": "syscall", + "syscall.ETH_P_MPLS_MC": "syscall", + "syscall.ETH_P_MPLS_UC": "syscall", + "syscall.ETH_P_PAE": "syscall", + "syscall.ETH_P_PAUSE": "syscall", + "syscall.ETH_P_PHONET": "syscall", + "syscall.ETH_P_PPPTALK": "syscall", + "syscall.ETH_P_PPP_DISC": "syscall", + "syscall.ETH_P_PPP_MP": "syscall", + "syscall.ETH_P_PPP_SES": "syscall", + "syscall.ETH_P_PUP": "syscall", + "syscall.ETH_P_PUPAT": "syscall", + "syscall.ETH_P_RARP": "syscall", + "syscall.ETH_P_SCA": "syscall", + "syscall.ETH_P_SLOW": "syscall", + "syscall.ETH_P_SNAP": "syscall", + "syscall.ETH_P_TEB": "syscall", + "syscall.ETH_P_TIPC": "syscall", + "syscall.ETH_P_TRAILER": "syscall", + "syscall.ETH_P_TR_802_2": "syscall", + "syscall.ETH_P_WAN_PPP": "syscall", + "syscall.ETH_P_WCCP": "syscall", + "syscall.ETH_P_X25": "syscall", + "syscall.ETIME": "syscall", + "syscall.ETIMEDOUT": "syscall", + "syscall.ETOOMANYREFS": "syscall", + "syscall.ETXTBSY": "syscall", + "syscall.EUCLEAN": "syscall", + "syscall.EUNATCH": "syscall", + "syscall.EUSERS": "syscall", + "syscall.EVFILT_AIO": "syscall", + "syscall.EVFILT_FS": "syscall", + "syscall.EVFILT_LIO": "syscall", + "syscall.EVFILT_MACHPORT": "syscall", + "syscall.EVFILT_PROC": "syscall", + "syscall.EVFILT_READ": "syscall", + "syscall.EVFILT_SIGNAL": "syscall", + "syscall.EVFILT_SYSCOUNT": "syscall", + "syscall.EVFILT_THREADMARKER": "syscall", + "syscall.EVFILT_TIMER": "syscall", + "syscall.EVFILT_USER": "syscall", + "syscall.EVFILT_VM": "syscall", + "syscall.EVFILT_VNODE": "syscall", + "syscall.EVFILT_WRITE": "syscall", + "syscall.EV_ADD": "syscall", + "syscall.EV_CLEAR": "syscall", + "syscall.EV_DELETE": "syscall", + "syscall.EV_DISABLE": "syscall", + "syscall.EV_DISPATCH": "syscall", + "syscall.EV_DROP": "syscall", + "syscall.EV_ENABLE": "syscall", + "syscall.EV_EOF": "syscall", + "syscall.EV_ERROR": "syscall", + "syscall.EV_FLAG0": "syscall", + "syscall.EV_FLAG1": "syscall", + "syscall.EV_ONESHOT": "syscall", + "syscall.EV_OOBAND": "syscall", + "syscall.EV_POLL": "syscall", + "syscall.EV_RECEIPT": "syscall", + "syscall.EV_SYSFLAGS": "syscall", + "syscall.EWINDOWS": "syscall", + "syscall.EWOULDBLOCK": "syscall", + "syscall.EXDEV": "syscall", + "syscall.EXFULL": "syscall", + "syscall.EXTA": "syscall", + "syscall.EXTB": "syscall", + "syscall.EXTPROC": "syscall", + "syscall.Environ": "syscall", + "syscall.EpollCreate": "syscall", + "syscall.EpollCreate1": "syscall", + "syscall.EpollCtl": "syscall", + "syscall.EpollEvent": "syscall", + "syscall.EpollWait": "syscall", + "syscall.Errno": "syscall", + "syscall.EscapeArg": "syscall", + "syscall.Exchangedata": "syscall", + "syscall.Exec": "syscall", + "syscall.Exit": "syscall", + "syscall.ExitProcess": "syscall", + "syscall.FD_CLOEXEC": "syscall", + "syscall.FD_SETSIZE": "syscall", + "syscall.FILE_ACTION_ADDED": "syscall", + "syscall.FILE_ACTION_MODIFIED": "syscall", + "syscall.FILE_ACTION_REMOVED": "syscall", + "syscall.FILE_ACTION_RENAMED_NEW_NAME": "syscall", + "syscall.FILE_ACTION_RENAMED_OLD_NAME": "syscall", + "syscall.FILE_APPEND_DATA": "syscall", + "syscall.FILE_ATTRIBUTE_ARCHIVE": "syscall", + "syscall.FILE_ATTRIBUTE_DIRECTORY": "syscall", + "syscall.FILE_ATTRIBUTE_HIDDEN": "syscall", + "syscall.FILE_ATTRIBUTE_NORMAL": "syscall", + "syscall.FILE_ATTRIBUTE_READONLY": "syscall", + "syscall.FILE_ATTRIBUTE_REPARSE_POINT": "syscall", + "syscall.FILE_ATTRIBUTE_SYSTEM": "syscall", + "syscall.FILE_BEGIN": "syscall", + "syscall.FILE_CURRENT": "syscall", + "syscall.FILE_END": "syscall", + "syscall.FILE_FLAG_BACKUP_SEMANTICS": "syscall", + "syscall.FILE_FLAG_OPEN_REPARSE_POINT": "syscall", + "syscall.FILE_FLAG_OVERLAPPED": "syscall", + "syscall.FILE_LIST_DIRECTORY": "syscall", + "syscall.FILE_MAP_COPY": "syscall", + "syscall.FILE_MAP_EXECUTE": "syscall", + "syscall.FILE_MAP_READ": "syscall", + "syscall.FILE_MAP_WRITE": "syscall", + "syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES": "syscall", + "syscall.FILE_NOTIFY_CHANGE_CREATION": "syscall", + "syscall.FILE_NOTIFY_CHANGE_DIR_NAME": "syscall", + "syscall.FILE_NOTIFY_CHANGE_FILE_NAME": "syscall", + "syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS": "syscall", + "syscall.FILE_NOTIFY_CHANGE_LAST_WRITE": "syscall", + "syscall.FILE_NOTIFY_CHANGE_SIZE": "syscall", + "syscall.FILE_SHARE_DELETE": "syscall", + "syscall.FILE_SHARE_READ": "syscall", + "syscall.FILE_SHARE_WRITE": "syscall", + "syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "syscall", + "syscall.FILE_SKIP_SET_EVENT_ON_HANDLE": "syscall", + "syscall.FILE_TYPE_CHAR": "syscall", + "syscall.FILE_TYPE_DISK": "syscall", + "syscall.FILE_TYPE_PIPE": "syscall", + "syscall.FILE_TYPE_REMOTE": "syscall", + "syscall.FILE_TYPE_UNKNOWN": "syscall", + "syscall.FILE_WRITE_ATTRIBUTES": "syscall", + "syscall.FLUSHO": "syscall", + "syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER": "syscall", + "syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY": "syscall", + "syscall.FORMAT_MESSAGE_FROM_HMODULE": "syscall", + "syscall.FORMAT_MESSAGE_FROM_STRING": "syscall", + "syscall.FORMAT_MESSAGE_FROM_SYSTEM": "syscall", + "syscall.FORMAT_MESSAGE_IGNORE_INSERTS": "syscall", + "syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK": "syscall", + "syscall.FSCTL_GET_REPARSE_POINT": "syscall", + "syscall.F_ADDFILESIGS": "syscall", + "syscall.F_ADDSIGS": "syscall", + "syscall.F_ALLOCATEALL": "syscall", + "syscall.F_ALLOCATECONTIG": "syscall", + "syscall.F_CANCEL": "syscall", + "syscall.F_CHKCLEAN": "syscall", + "syscall.F_CLOSEM": "syscall", + "syscall.F_DUP2FD": "syscall", + "syscall.F_DUP2FD_CLOEXEC": "syscall", + "syscall.F_DUPFD": "syscall", + "syscall.F_DUPFD_CLOEXEC": "syscall", + "syscall.F_EXLCK": "syscall", + "syscall.F_FLUSH_DATA": "syscall", + "syscall.F_FREEZE_FS": "syscall", + "syscall.F_FSCTL": "syscall", + "syscall.F_FSDIRMASK": "syscall", + "syscall.F_FSIN": "syscall", + "syscall.F_FSINOUT": "syscall", + "syscall.F_FSOUT": "syscall", + "syscall.F_FSPRIV": "syscall", + "syscall.F_FSVOID": "syscall", + "syscall.F_FULLFSYNC": "syscall", + "syscall.F_GETFD": "syscall", + "syscall.F_GETFL": "syscall", + "syscall.F_GETLEASE": "syscall", + "syscall.F_GETLK": "syscall", + "syscall.F_GETLK64": "syscall", + "syscall.F_GETLKPID": "syscall", + "syscall.F_GETNOSIGPIPE": "syscall", + "syscall.F_GETOWN": "syscall", + "syscall.F_GETOWN_EX": "syscall", + "syscall.F_GETPATH": "syscall", + "syscall.F_GETPATH_MTMINFO": "syscall", + "syscall.F_GETPIPE_SZ": "syscall", + "syscall.F_GETPROTECTIONCLASS": "syscall", + "syscall.F_GETSIG": "syscall", + "syscall.F_GLOBAL_NOCACHE": "syscall", + "syscall.F_LOCK": "syscall", + "syscall.F_LOG2PHYS": "syscall", + "syscall.F_LOG2PHYS_EXT": "syscall", + "syscall.F_MARKDEPENDENCY": "syscall", + "syscall.F_MAXFD": "syscall", + "syscall.F_NOCACHE": "syscall", + "syscall.F_NODIRECT": "syscall", + "syscall.F_NOTIFY": "syscall", + "syscall.F_OGETLK": "syscall", + "syscall.F_OK": "syscall", + "syscall.F_OSETLK": "syscall", + "syscall.F_OSETLKW": "syscall", + "syscall.F_PARAM_MASK": "syscall", + "syscall.F_PARAM_MAX": "syscall", + "syscall.F_PATHPKG_CHECK": "syscall", + "syscall.F_PEOFPOSMODE": "syscall", + "syscall.F_PREALLOCATE": "syscall", + "syscall.F_RDADVISE": "syscall", + "syscall.F_RDAHEAD": "syscall", + "syscall.F_RDLCK": "syscall", + "syscall.F_READAHEAD": "syscall", + "syscall.F_READBOOTSTRAP": "syscall", + "syscall.F_SETBACKINGSTORE": "syscall", + "syscall.F_SETFD": "syscall", + "syscall.F_SETFL": "syscall", + "syscall.F_SETLEASE": "syscall", + "syscall.F_SETLK": "syscall", + "syscall.F_SETLK64": "syscall", + "syscall.F_SETLKW": "syscall", + "syscall.F_SETLKW64": "syscall", + "syscall.F_SETLK_REMOTE": "syscall", + "syscall.F_SETNOSIGPIPE": "syscall", + "syscall.F_SETOWN": "syscall", + "syscall.F_SETOWN_EX": "syscall", + "syscall.F_SETPIPE_SZ": "syscall", + "syscall.F_SETPROTECTIONCLASS": "syscall", + "syscall.F_SETSIG": "syscall", + "syscall.F_SETSIZE": "syscall", + "syscall.F_SHLCK": "syscall", + "syscall.F_TEST": "syscall", + "syscall.F_THAW_FS": "syscall", + "syscall.F_TLOCK": "syscall", + "syscall.F_ULOCK": "syscall", + "syscall.F_UNLCK": "syscall", + "syscall.F_UNLCKSYS": "syscall", + "syscall.F_VOLPOSMODE": "syscall", + "syscall.F_WRITEBOOTSTRAP": "syscall", + "syscall.F_WRLCK": "syscall", + "syscall.Faccessat": "syscall", + "syscall.Fallocate": "syscall", + "syscall.Fbootstraptransfer_t": "syscall", + "syscall.Fchdir": "syscall", + "syscall.Fchflags": "syscall", + "syscall.Fchmod": "syscall", + "syscall.Fchmodat": "syscall", + "syscall.Fchown": "syscall", + "syscall.Fchownat": "syscall", + "syscall.FcntlFlock": "syscall", + "syscall.FdSet": "syscall", + "syscall.Fdatasync": "syscall", + "syscall.FileNotifyInformation": "syscall", + "syscall.Filetime": "syscall", + "syscall.FindClose": "syscall", + "syscall.FindFirstFile": "syscall", + "syscall.FindNextFile": "syscall", + "syscall.Flock": "syscall", + "syscall.Flock_t": "syscall", + "syscall.FlushBpf": "syscall", + "syscall.FlushFileBuffers": "syscall", + "syscall.FlushViewOfFile": "syscall", + "syscall.ForkExec": "syscall", + "syscall.ForkLock": "syscall", + "syscall.FormatMessage": "syscall", + "syscall.Fpathconf": "syscall", + "syscall.FreeAddrInfoW": "syscall", + "syscall.FreeEnvironmentStrings": "syscall", + "syscall.FreeLibrary": "syscall", + "syscall.Fsid": "syscall", + "syscall.Fstat": "syscall", + "syscall.Fstatfs": "syscall", + "syscall.Fstore_t": "syscall", + "syscall.Fsync": "syscall", + "syscall.Ftruncate": "syscall", + "syscall.FullPath": "syscall", + "syscall.Futimes": "syscall", + "syscall.Futimesat": "syscall", + "syscall.GENERIC_ALL": "syscall", + "syscall.GENERIC_EXECUTE": "syscall", + "syscall.GENERIC_READ": "syscall", + "syscall.GENERIC_WRITE": "syscall", + "syscall.GUID": "syscall", + "syscall.GetAcceptExSockaddrs": "syscall", + "syscall.GetAdaptersInfo": "syscall", + "syscall.GetAddrInfoW": "syscall", + "syscall.GetCommandLine": "syscall", + "syscall.GetComputerName": "syscall", + "syscall.GetConsoleMode": "syscall", + "syscall.GetCurrentDirectory": "syscall", + "syscall.GetCurrentProcess": "syscall", + "syscall.GetEnvironmentStrings": "syscall", + "syscall.GetEnvironmentVariable": "syscall", + "syscall.GetExitCodeProcess": "syscall", + "syscall.GetFileAttributes": "syscall", + "syscall.GetFileAttributesEx": "syscall", + "syscall.GetFileExInfoStandard": "syscall", + "syscall.GetFileExMaxInfoLevel": "syscall", + "syscall.GetFileInformationByHandle": "syscall", + "syscall.GetFileType": "syscall", + "syscall.GetFullPathName": "syscall", + "syscall.GetHostByName": "syscall", + "syscall.GetIfEntry": "syscall", + "syscall.GetLastError": "syscall", + "syscall.GetLengthSid": "syscall", + "syscall.GetLongPathName": "syscall", + "syscall.GetProcAddress": "syscall", + "syscall.GetProcessTimes": "syscall", + "syscall.GetProtoByName": "syscall", + "syscall.GetQueuedCompletionStatus": "syscall", + "syscall.GetServByName": "syscall", + "syscall.GetShortPathName": "syscall", + "syscall.GetStartupInfo": "syscall", + "syscall.GetStdHandle": "syscall", + "syscall.GetSystemTimeAsFileTime": "syscall", + "syscall.GetTempPath": "syscall", + "syscall.GetTimeZoneInformation": "syscall", + "syscall.GetTokenInformation": "syscall", + "syscall.GetUserNameEx": "syscall", + "syscall.GetUserProfileDirectory": "syscall", + "syscall.GetVersion": "syscall", + "syscall.Getcwd": "syscall", + "syscall.Getdents": "syscall", + "syscall.Getdirentries": "syscall", + "syscall.Getdtablesize": "syscall", + "syscall.Getegid": "syscall", + "syscall.Getenv": "syscall", + "syscall.Geteuid": "syscall", + "syscall.Getfsstat": "syscall", + "syscall.Getgid": "syscall", + "syscall.Getgroups": "syscall", + "syscall.Getpagesize": "syscall", + "syscall.Getpeername": "syscall", + "syscall.Getpgid": "syscall", + "syscall.Getpgrp": "syscall", + "syscall.Getpid": "syscall", + "syscall.Getppid": "syscall", + "syscall.Getpriority": "syscall", + "syscall.Getrlimit": "syscall", + "syscall.Getrusage": "syscall", + "syscall.Getsid": "syscall", + "syscall.Getsockname": "syscall", + "syscall.Getsockopt": "syscall", + "syscall.GetsockoptByte": "syscall", + "syscall.GetsockoptICMPv6Filter": "syscall", + "syscall.GetsockoptIPMreq": "syscall", + "syscall.GetsockoptIPMreqn": "syscall", + "syscall.GetsockoptIPv6MTUInfo": "syscall", + "syscall.GetsockoptIPv6Mreq": "syscall", + "syscall.GetsockoptInet4Addr": "syscall", + "syscall.GetsockoptInt": "syscall", + "syscall.GetsockoptUcred": "syscall", + "syscall.Gettid": "syscall", + "syscall.Gettimeofday": "syscall", + "syscall.Getuid": "syscall", + "syscall.Getwd": "syscall", + "syscall.Getxattr": "syscall", + "syscall.HANDLE_FLAG_INHERIT": "syscall", + "syscall.HKEY_CLASSES_ROOT": "syscall", + "syscall.HKEY_CURRENT_CONFIG": "syscall", + "syscall.HKEY_CURRENT_USER": "syscall", + "syscall.HKEY_DYN_DATA": "syscall", + "syscall.HKEY_LOCAL_MACHINE": "syscall", + "syscall.HKEY_PERFORMANCE_DATA": "syscall", + "syscall.HKEY_USERS": "syscall", + "syscall.HUPCL": "syscall", + "syscall.Handle": "syscall", + "syscall.Hostent": "syscall", + "syscall.ICANON": "syscall", + "syscall.ICMP6_FILTER": "syscall", + "syscall.ICMPV6_FILTER": "syscall", + "syscall.ICMPv6Filter": "syscall", + "syscall.ICRNL": "syscall", + "syscall.IEXTEN": "syscall", + "syscall.IFAN_ARRIVAL": "syscall", + "syscall.IFAN_DEPARTURE": "syscall", + "syscall.IFA_ADDRESS": "syscall", + "syscall.IFA_ANYCAST": "syscall", + "syscall.IFA_BROADCAST": "syscall", + "syscall.IFA_CACHEINFO": "syscall", + "syscall.IFA_F_DADFAILED": "syscall", + "syscall.IFA_F_DEPRECATED": "syscall", + "syscall.IFA_F_HOMEADDRESS": "syscall", + "syscall.IFA_F_NODAD": "syscall", + "syscall.IFA_F_OPTIMISTIC": "syscall", + "syscall.IFA_F_PERMANENT": "syscall", + "syscall.IFA_F_SECONDARY": "syscall", + "syscall.IFA_F_TEMPORARY": "syscall", + "syscall.IFA_F_TENTATIVE": "syscall", + "syscall.IFA_LABEL": "syscall", + "syscall.IFA_LOCAL": "syscall", + "syscall.IFA_MAX": "syscall", + "syscall.IFA_MULTICAST": "syscall", + "syscall.IFA_ROUTE": "syscall", + "syscall.IFA_UNSPEC": "syscall", + "syscall.IFF_ALLMULTI": "syscall", + "syscall.IFF_ALTPHYS": "syscall", + "syscall.IFF_AUTOMEDIA": "syscall", + "syscall.IFF_BROADCAST": "syscall", + "syscall.IFF_CANTCHANGE": "syscall", + "syscall.IFF_CANTCONFIG": "syscall", + "syscall.IFF_DEBUG": "syscall", + "syscall.IFF_DRV_OACTIVE": "syscall", + "syscall.IFF_DRV_RUNNING": "syscall", + "syscall.IFF_DYING": "syscall", + "syscall.IFF_DYNAMIC": "syscall", + "syscall.IFF_LINK0": "syscall", + "syscall.IFF_LINK1": "syscall", + "syscall.IFF_LINK2": "syscall", + "syscall.IFF_LOOPBACK": "syscall", + "syscall.IFF_MASTER": "syscall", + "syscall.IFF_MONITOR": "syscall", + "syscall.IFF_MULTICAST": "syscall", + "syscall.IFF_NOARP": "syscall", + "syscall.IFF_NOTRAILERS": "syscall", + "syscall.IFF_NO_PI": "syscall", + "syscall.IFF_OACTIVE": "syscall", + "syscall.IFF_ONE_QUEUE": "syscall", + "syscall.IFF_POINTOPOINT": "syscall", + "syscall.IFF_POINTTOPOINT": "syscall", + "syscall.IFF_PORTSEL": "syscall", + "syscall.IFF_PPROMISC": "syscall", + "syscall.IFF_PROMISC": "syscall", + "syscall.IFF_RENAMING": "syscall", + "syscall.IFF_RUNNING": "syscall", + "syscall.IFF_SIMPLEX": "syscall", + "syscall.IFF_SLAVE": "syscall", + "syscall.IFF_SMART": "syscall", + "syscall.IFF_STATICARP": "syscall", + "syscall.IFF_TAP": "syscall", + "syscall.IFF_TUN": "syscall", + "syscall.IFF_TUN_EXCL": "syscall", + "syscall.IFF_UP": "syscall", + "syscall.IFF_VNET_HDR": "syscall", + "syscall.IFLA_ADDRESS": "syscall", + "syscall.IFLA_BROADCAST": "syscall", + "syscall.IFLA_COST": "syscall", + "syscall.IFLA_IFALIAS": "syscall", + "syscall.IFLA_IFNAME": "syscall", + "syscall.IFLA_LINK": "syscall", + "syscall.IFLA_LINKINFO": "syscall", + "syscall.IFLA_LINKMODE": "syscall", + "syscall.IFLA_MAP": "syscall", + "syscall.IFLA_MASTER": "syscall", + "syscall.IFLA_MAX": "syscall", + "syscall.IFLA_MTU": "syscall", + "syscall.IFLA_NET_NS_PID": "syscall", + "syscall.IFLA_OPERSTATE": "syscall", + "syscall.IFLA_PRIORITY": "syscall", + "syscall.IFLA_PROTINFO": "syscall", + "syscall.IFLA_QDISC": "syscall", + "syscall.IFLA_STATS": "syscall", + "syscall.IFLA_TXQLEN": "syscall", + "syscall.IFLA_UNSPEC": "syscall", + "syscall.IFLA_WEIGHT": "syscall", + "syscall.IFLA_WIRELESS": "syscall", + "syscall.IFNAMSIZ": "syscall", + "syscall.IFT_1822": "syscall", + "syscall.IFT_A12MPPSWITCH": "syscall", + "syscall.IFT_AAL2": "syscall", + "syscall.IFT_AAL5": "syscall", + "syscall.IFT_ADSL": "syscall", + "syscall.IFT_AFLANE8023": "syscall", + "syscall.IFT_AFLANE8025": "syscall", + "syscall.IFT_ARAP": "syscall", + "syscall.IFT_ARCNET": "syscall", + "syscall.IFT_ARCNETPLUS": "syscall", + "syscall.IFT_ASYNC": "syscall", + "syscall.IFT_ATM": "syscall", + "syscall.IFT_ATMDXI": "syscall", + "syscall.IFT_ATMFUNI": "syscall", + "syscall.IFT_ATMIMA": "syscall", + "syscall.IFT_ATMLOGICAL": "syscall", + "syscall.IFT_ATMRADIO": "syscall", + "syscall.IFT_ATMSUBINTERFACE": "syscall", + "syscall.IFT_ATMVCIENDPT": "syscall", + "syscall.IFT_ATMVIRTUAL": "syscall", + "syscall.IFT_BGPPOLICYACCOUNTING": "syscall", + "syscall.IFT_BLUETOOTH": "syscall", + "syscall.IFT_BRIDGE": "syscall", + "syscall.IFT_BSC": "syscall", + "syscall.IFT_CARP": "syscall", + "syscall.IFT_CCTEMUL": "syscall", + "syscall.IFT_CELLULAR": "syscall", + "syscall.IFT_CEPT": "syscall", + "syscall.IFT_CES": "syscall", + "syscall.IFT_CHANNEL": "syscall", + "syscall.IFT_CNR": "syscall", + "syscall.IFT_COFFEE": "syscall", + "syscall.IFT_COMPOSITELINK": "syscall", + "syscall.IFT_DCN": "syscall", + "syscall.IFT_DIGITALPOWERLINE": "syscall", + "syscall.IFT_DIGITALWRAPPEROVERHEADCHANNEL": "syscall", + "syscall.IFT_DLSW": "syscall", + "syscall.IFT_DOCSCABLEDOWNSTREAM": "syscall", + "syscall.IFT_DOCSCABLEMACLAYER": "syscall", + "syscall.IFT_DOCSCABLEUPSTREAM": "syscall", + "syscall.IFT_DOCSCABLEUPSTREAMCHANNEL": "syscall", + "syscall.IFT_DS0": "syscall", + "syscall.IFT_DS0BUNDLE": "syscall", + "syscall.IFT_DS1FDL": "syscall", + "syscall.IFT_DS3": "syscall", + "syscall.IFT_DTM": "syscall", + "syscall.IFT_DUMMY": "syscall", + "syscall.IFT_DVBASILN": "syscall", + "syscall.IFT_DVBASIOUT": "syscall", + "syscall.IFT_DVBRCCDOWNSTREAM": "syscall", + "syscall.IFT_DVBRCCMACLAYER": "syscall", + "syscall.IFT_DVBRCCUPSTREAM": "syscall", + "syscall.IFT_ECONET": "syscall", + "syscall.IFT_ENC": "syscall", + "syscall.IFT_EON": "syscall", + "syscall.IFT_EPLRS": "syscall", + "syscall.IFT_ESCON": "syscall", + "syscall.IFT_ETHER": "syscall", + "syscall.IFT_FAITH": "syscall", + "syscall.IFT_FAST": "syscall", + "syscall.IFT_FASTETHER": "syscall", + "syscall.IFT_FASTETHERFX": "syscall", + "syscall.IFT_FDDI": "syscall", + "syscall.IFT_FIBRECHANNEL": "syscall", + "syscall.IFT_FRAMERELAYINTERCONNECT": "syscall", + "syscall.IFT_FRAMERELAYMPI": "syscall", + "syscall.IFT_FRDLCIENDPT": "syscall", + "syscall.IFT_FRELAY": "syscall", + "syscall.IFT_FRELAYDCE": "syscall", + "syscall.IFT_FRF16MFRBUNDLE": "syscall", + "syscall.IFT_FRFORWARD": "syscall", + "syscall.IFT_G703AT2MB": "syscall", + "syscall.IFT_G703AT64K": "syscall", + "syscall.IFT_GIF": "syscall", + "syscall.IFT_GIGABITETHERNET": "syscall", + "syscall.IFT_GR303IDT": "syscall", + "syscall.IFT_GR303RDT": "syscall", + "syscall.IFT_H323GATEKEEPER": "syscall", + "syscall.IFT_H323PROXY": "syscall", + "syscall.IFT_HDH1822": "syscall", + "syscall.IFT_HDLC": "syscall", + "syscall.IFT_HDSL2": "syscall", + "syscall.IFT_HIPERLAN2": "syscall", + "syscall.IFT_HIPPI": "syscall", + "syscall.IFT_HIPPIINTERFACE": "syscall", + "syscall.IFT_HOSTPAD": "syscall", + "syscall.IFT_HSSI": "syscall", + "syscall.IFT_HY": "syscall", + "syscall.IFT_IBM370PARCHAN": "syscall", + "syscall.IFT_IDSL": "syscall", + "syscall.IFT_IEEE1394": "syscall", + "syscall.IFT_IEEE80211": "syscall", + "syscall.IFT_IEEE80212": "syscall", + "syscall.IFT_IEEE8023ADLAG": "syscall", + "syscall.IFT_IFGSN": "syscall", + "syscall.IFT_IMT": "syscall", + "syscall.IFT_INFINIBAND": "syscall", + "syscall.IFT_INTERLEAVE": "syscall", + "syscall.IFT_IP": "syscall", + "syscall.IFT_IPFORWARD": "syscall", + "syscall.IFT_IPOVERATM": "syscall", + "syscall.IFT_IPOVERCDLC": "syscall", + "syscall.IFT_IPOVERCLAW": "syscall", + "syscall.IFT_IPSWITCH": "syscall", + "syscall.IFT_IPXIP": "syscall", + "syscall.IFT_ISDN": "syscall", + "syscall.IFT_ISDNBASIC": "syscall", + "syscall.IFT_ISDNPRIMARY": "syscall", + "syscall.IFT_ISDNS": "syscall", + "syscall.IFT_ISDNU": "syscall", + "syscall.IFT_ISO88022LLC": "syscall", + "syscall.IFT_ISO88023": "syscall", + "syscall.IFT_ISO88024": "syscall", + "syscall.IFT_ISO88025": "syscall", + "syscall.IFT_ISO88025CRFPINT": "syscall", + "syscall.IFT_ISO88025DTR": "syscall", + "syscall.IFT_ISO88025FIBER": "syscall", + "syscall.IFT_ISO88026": "syscall", + "syscall.IFT_ISUP": "syscall", + "syscall.IFT_L2VLAN": "syscall", + "syscall.IFT_L3IPVLAN": "syscall", + "syscall.IFT_L3IPXVLAN": "syscall", + "syscall.IFT_LAPB": "syscall", + "syscall.IFT_LAPD": "syscall", + "syscall.IFT_LAPF": "syscall", + "syscall.IFT_LINEGROUP": "syscall", + "syscall.IFT_LOCALTALK": "syscall", + "syscall.IFT_LOOP": "syscall", + "syscall.IFT_MEDIAMAILOVERIP": "syscall", + "syscall.IFT_MFSIGLINK": "syscall", + "syscall.IFT_MIOX25": "syscall", + "syscall.IFT_MODEM": "syscall", + "syscall.IFT_MPC": "syscall", + "syscall.IFT_MPLS": "syscall", + "syscall.IFT_MPLSTUNNEL": "syscall", + "syscall.IFT_MSDSL": "syscall", + "syscall.IFT_MVL": "syscall", + "syscall.IFT_MYRINET": "syscall", + "syscall.IFT_NFAS": "syscall", + "syscall.IFT_NSIP": "syscall", + "syscall.IFT_OPTICALCHANNEL": "syscall", + "syscall.IFT_OPTICALTRANSPORT": "syscall", + "syscall.IFT_OTHER": "syscall", + "syscall.IFT_P10": "syscall", + "syscall.IFT_P80": "syscall", + "syscall.IFT_PARA": "syscall", + "syscall.IFT_PDP": "syscall", + "syscall.IFT_PFLOG": "syscall", + "syscall.IFT_PFLOW": "syscall", + "syscall.IFT_PFSYNC": "syscall", + "syscall.IFT_PLC": "syscall", + "syscall.IFT_PON155": "syscall", + "syscall.IFT_PON622": "syscall", + "syscall.IFT_POS": "syscall", + "syscall.IFT_PPP": "syscall", + "syscall.IFT_PPPMULTILINKBUNDLE": "syscall", + "syscall.IFT_PROPATM": "syscall", + "syscall.IFT_PROPBWAP2MP": "syscall", + "syscall.IFT_PROPCNLS": "syscall", + "syscall.IFT_PROPDOCSWIRELESSDOWNSTREAM": "syscall", + "syscall.IFT_PROPDOCSWIRELESSMACLAYER": "syscall", + "syscall.IFT_PROPDOCSWIRELESSUPSTREAM": "syscall", + "syscall.IFT_PROPMUX": "syscall", + "syscall.IFT_PROPVIRTUAL": "syscall", + "syscall.IFT_PROPWIRELESSP2P": "syscall", + "syscall.IFT_PTPSERIAL": "syscall", + "syscall.IFT_PVC": "syscall", + "syscall.IFT_Q2931": "syscall", + "syscall.IFT_QLLC": "syscall", + "syscall.IFT_RADIOMAC": "syscall", + "syscall.IFT_RADSL": "syscall", + "syscall.IFT_REACHDSL": "syscall", + "syscall.IFT_RFC1483": "syscall", + "syscall.IFT_RS232": "syscall", + "syscall.IFT_RSRB": "syscall", + "syscall.IFT_SDLC": "syscall", + "syscall.IFT_SDSL": "syscall", + "syscall.IFT_SHDSL": "syscall", + "syscall.IFT_SIP": "syscall", + "syscall.IFT_SIPSIG": "syscall", + "syscall.IFT_SIPTG": "syscall", + "syscall.IFT_SLIP": "syscall", + "syscall.IFT_SMDSDXI": "syscall", + "syscall.IFT_SMDSICIP": "syscall", + "syscall.IFT_SONET": "syscall", + "syscall.IFT_SONETOVERHEADCHANNEL": "syscall", + "syscall.IFT_SONETPATH": "syscall", + "syscall.IFT_SONETVT": "syscall", + "syscall.IFT_SRP": "syscall", + "syscall.IFT_SS7SIGLINK": "syscall", + "syscall.IFT_STACKTOSTACK": "syscall", + "syscall.IFT_STARLAN": "syscall", + "syscall.IFT_STF": "syscall", + "syscall.IFT_T1": "syscall", + "syscall.IFT_TDLC": "syscall", + "syscall.IFT_TELINK": "syscall", + "syscall.IFT_TERMPAD": "syscall", + "syscall.IFT_TR008": "syscall", + "syscall.IFT_TRANSPHDLC": "syscall", + "syscall.IFT_TUNNEL": "syscall", + "syscall.IFT_ULTRA": "syscall", + "syscall.IFT_USB": "syscall", + "syscall.IFT_V11": "syscall", + "syscall.IFT_V35": "syscall", + "syscall.IFT_V36": "syscall", + "syscall.IFT_V37": "syscall", + "syscall.IFT_VDSL": "syscall", + "syscall.IFT_VIRTUALIPADDRESS": "syscall", + "syscall.IFT_VIRTUALTG": "syscall", + "syscall.IFT_VOICEDID": "syscall", + "syscall.IFT_VOICEEM": "syscall", + "syscall.IFT_VOICEEMFGD": "syscall", + "syscall.IFT_VOICEENCAP": "syscall", + "syscall.IFT_VOICEFGDEANA": "syscall", + "syscall.IFT_VOICEFXO": "syscall", + "syscall.IFT_VOICEFXS": "syscall", + "syscall.IFT_VOICEOVERATM": "syscall", + "syscall.IFT_VOICEOVERCABLE": "syscall", + "syscall.IFT_VOICEOVERFRAMERELAY": "syscall", + "syscall.IFT_VOICEOVERIP": "syscall", + "syscall.IFT_X213": "syscall", + "syscall.IFT_X25": "syscall", + "syscall.IFT_X25DDN": "syscall", + "syscall.IFT_X25HUNTGROUP": "syscall", + "syscall.IFT_X25MLP": "syscall", + "syscall.IFT_X25PLE": "syscall", + "syscall.IFT_XETHER": "syscall", + "syscall.IGNBRK": "syscall", + "syscall.IGNCR": "syscall", + "syscall.IGNORE": "syscall", + "syscall.IGNPAR": "syscall", + "syscall.IMAXBEL": "syscall", + "syscall.INFINITE": "syscall", + "syscall.INLCR": "syscall", + "syscall.INPCK": "syscall", + "syscall.INVALID_FILE_ATTRIBUTES": "syscall", + "syscall.IN_ACCESS": "syscall", + "syscall.IN_ALL_EVENTS": "syscall", + "syscall.IN_ATTRIB": "syscall", + "syscall.IN_CLASSA_HOST": "syscall", + "syscall.IN_CLASSA_MAX": "syscall", + "syscall.IN_CLASSA_NET": "syscall", + "syscall.IN_CLASSA_NSHIFT": "syscall", + "syscall.IN_CLASSB_HOST": "syscall", + "syscall.IN_CLASSB_MAX": "syscall", + "syscall.IN_CLASSB_NET": "syscall", + "syscall.IN_CLASSB_NSHIFT": "syscall", + "syscall.IN_CLASSC_HOST": "syscall", + "syscall.IN_CLASSC_NET": "syscall", + "syscall.IN_CLASSC_NSHIFT": "syscall", + "syscall.IN_CLASSD_HOST": "syscall", + "syscall.IN_CLASSD_NET": "syscall", + "syscall.IN_CLASSD_NSHIFT": "syscall", + "syscall.IN_CLOEXEC": "syscall", + "syscall.IN_CLOSE": "syscall", + "syscall.IN_CLOSE_NOWRITE": "syscall", + "syscall.IN_CLOSE_WRITE": "syscall", + "syscall.IN_CREATE": "syscall", + "syscall.IN_DELETE": "syscall", + "syscall.IN_DELETE_SELF": "syscall", + "syscall.IN_DONT_FOLLOW": "syscall", + "syscall.IN_EXCL_UNLINK": "syscall", + "syscall.IN_IGNORED": "syscall", + "syscall.IN_ISDIR": "syscall", + "syscall.IN_LINKLOCALNETNUM": "syscall", + "syscall.IN_LOOPBACKNET": "syscall", + "syscall.IN_MASK_ADD": "syscall", + "syscall.IN_MODIFY": "syscall", + "syscall.IN_MOVE": "syscall", + "syscall.IN_MOVED_FROM": "syscall", + "syscall.IN_MOVED_TO": "syscall", + "syscall.IN_MOVE_SELF": "syscall", + "syscall.IN_NONBLOCK": "syscall", + "syscall.IN_ONESHOT": "syscall", + "syscall.IN_ONLYDIR": "syscall", + "syscall.IN_OPEN": "syscall", + "syscall.IN_Q_OVERFLOW": "syscall", + "syscall.IN_RFC3021_HOST": "syscall", + "syscall.IN_RFC3021_MASK": "syscall", + "syscall.IN_RFC3021_NET": "syscall", + "syscall.IN_RFC3021_NSHIFT": "syscall", + "syscall.IN_UNMOUNT": "syscall", + "syscall.IOC_IN": "syscall", + "syscall.IOC_INOUT": "syscall", + "syscall.IOC_OUT": "syscall", + "syscall.IOC_VENDOR": "syscall", + "syscall.IOC_WS2": "syscall", + "syscall.IO_REPARSE_TAG_SYMLINK": "syscall", + "syscall.IPMreq": "syscall", + "syscall.IPMreqn": "syscall", + "syscall.IPPROTO_3PC": "syscall", + "syscall.IPPROTO_ADFS": "syscall", + "syscall.IPPROTO_AH": "syscall", + "syscall.IPPROTO_AHIP": "syscall", + "syscall.IPPROTO_APES": "syscall", + "syscall.IPPROTO_ARGUS": "syscall", + "syscall.IPPROTO_AX25": "syscall", + "syscall.IPPROTO_BHA": "syscall", + "syscall.IPPROTO_BLT": "syscall", + "syscall.IPPROTO_BRSATMON": "syscall", + "syscall.IPPROTO_CARP": "syscall", + "syscall.IPPROTO_CFTP": "syscall", + "syscall.IPPROTO_CHAOS": "syscall", + "syscall.IPPROTO_CMTP": "syscall", + "syscall.IPPROTO_COMP": "syscall", + "syscall.IPPROTO_CPHB": "syscall", + "syscall.IPPROTO_CPNX": "syscall", + "syscall.IPPROTO_DCCP": "syscall", + "syscall.IPPROTO_DDP": "syscall", + "syscall.IPPROTO_DGP": "syscall", + "syscall.IPPROTO_DIVERT": "syscall", + "syscall.IPPROTO_DIVERT_INIT": "syscall", + "syscall.IPPROTO_DIVERT_RESP": "syscall", + "syscall.IPPROTO_DONE": "syscall", + "syscall.IPPROTO_DSTOPTS": "syscall", + "syscall.IPPROTO_EGP": "syscall", + "syscall.IPPROTO_EMCON": "syscall", + "syscall.IPPROTO_ENCAP": "syscall", + "syscall.IPPROTO_EON": "syscall", + "syscall.IPPROTO_ESP": "syscall", + "syscall.IPPROTO_ETHERIP": "syscall", + "syscall.IPPROTO_FRAGMENT": "syscall", + "syscall.IPPROTO_GGP": "syscall", + "syscall.IPPROTO_GMTP": "syscall", + "syscall.IPPROTO_GRE": "syscall", + "syscall.IPPROTO_HELLO": "syscall", + "syscall.IPPROTO_HMP": "syscall", + "syscall.IPPROTO_HOPOPTS": "syscall", + "syscall.IPPROTO_ICMP": "syscall", + "syscall.IPPROTO_ICMPV6": "syscall", + "syscall.IPPROTO_IDP": "syscall", + "syscall.IPPROTO_IDPR": "syscall", + "syscall.IPPROTO_IDRP": "syscall", + "syscall.IPPROTO_IGMP": "syscall", + "syscall.IPPROTO_IGP": "syscall", + "syscall.IPPROTO_IGRP": "syscall", + "syscall.IPPROTO_IL": "syscall", + "syscall.IPPROTO_INLSP": "syscall", + "syscall.IPPROTO_INP": "syscall", + "syscall.IPPROTO_IP": "syscall", + "syscall.IPPROTO_IPCOMP": "syscall", + "syscall.IPPROTO_IPCV": "syscall", + "syscall.IPPROTO_IPEIP": "syscall", + "syscall.IPPROTO_IPIP": "syscall", + "syscall.IPPROTO_IPPC": "syscall", + "syscall.IPPROTO_IPV4": "syscall", + "syscall.IPPROTO_IPV6": "syscall", + "syscall.IPPROTO_IPV6_ICMP": "syscall", + "syscall.IPPROTO_IRTP": "syscall", + "syscall.IPPROTO_KRYPTOLAN": "syscall", + "syscall.IPPROTO_LARP": "syscall", + "syscall.IPPROTO_LEAF1": "syscall", + "syscall.IPPROTO_LEAF2": "syscall", + "syscall.IPPROTO_MAX": "syscall", + "syscall.IPPROTO_MAXID": "syscall", + "syscall.IPPROTO_MEAS": "syscall", + "syscall.IPPROTO_MH": "syscall", + "syscall.IPPROTO_MHRP": "syscall", + "syscall.IPPROTO_MICP": "syscall", + "syscall.IPPROTO_MOBILE": "syscall", + "syscall.IPPROTO_MPLS": "syscall", + "syscall.IPPROTO_MTP": "syscall", + "syscall.IPPROTO_MUX": "syscall", + "syscall.IPPROTO_ND": "syscall", + "syscall.IPPROTO_NHRP": "syscall", + "syscall.IPPROTO_NONE": "syscall", + "syscall.IPPROTO_NSP": "syscall", + "syscall.IPPROTO_NVPII": "syscall", + "syscall.IPPROTO_OLD_DIVERT": "syscall", + "syscall.IPPROTO_OSPFIGP": "syscall", + "syscall.IPPROTO_PFSYNC": "syscall", + "syscall.IPPROTO_PGM": "syscall", + "syscall.IPPROTO_PIGP": "syscall", + "syscall.IPPROTO_PIM": "syscall", + "syscall.IPPROTO_PRM": "syscall", + "syscall.IPPROTO_PUP": "syscall", + "syscall.IPPROTO_PVP": "syscall", + "syscall.IPPROTO_RAW": "syscall", + "syscall.IPPROTO_RCCMON": "syscall", + "syscall.IPPROTO_RDP": "syscall", + "syscall.IPPROTO_ROUTING": "syscall", + "syscall.IPPROTO_RSVP": "syscall", + "syscall.IPPROTO_RVD": "syscall", + "syscall.IPPROTO_SATEXPAK": "syscall", + "syscall.IPPROTO_SATMON": "syscall", + "syscall.IPPROTO_SCCSP": "syscall", + "syscall.IPPROTO_SCTP": "syscall", + "syscall.IPPROTO_SDRP": "syscall", + "syscall.IPPROTO_SEND": "syscall", + "syscall.IPPROTO_SEP": "syscall", + "syscall.IPPROTO_SKIP": "syscall", + "syscall.IPPROTO_SPACER": "syscall", + "syscall.IPPROTO_SRPC": "syscall", + "syscall.IPPROTO_ST": "syscall", + "syscall.IPPROTO_SVMTP": "syscall", + "syscall.IPPROTO_SWIPE": "syscall", + "syscall.IPPROTO_TCF": "syscall", + "syscall.IPPROTO_TCP": "syscall", + "syscall.IPPROTO_TLSP": "syscall", + "syscall.IPPROTO_TP": "syscall", + "syscall.IPPROTO_TPXX": "syscall", + "syscall.IPPROTO_TRUNK1": "syscall", + "syscall.IPPROTO_TRUNK2": "syscall", + "syscall.IPPROTO_TTP": "syscall", + "syscall.IPPROTO_UDP": "syscall", + "syscall.IPPROTO_UDPLITE": "syscall", + "syscall.IPPROTO_VINES": "syscall", + "syscall.IPPROTO_VISA": "syscall", + "syscall.IPPROTO_VMTP": "syscall", + "syscall.IPPROTO_VRRP": "syscall", + "syscall.IPPROTO_WBEXPAK": "syscall", + "syscall.IPPROTO_WBMON": "syscall", + "syscall.IPPROTO_WSN": "syscall", + "syscall.IPPROTO_XNET": "syscall", + "syscall.IPPROTO_XTP": "syscall", + "syscall.IPV6_2292DSTOPTS": "syscall", + "syscall.IPV6_2292HOPLIMIT": "syscall", + "syscall.IPV6_2292HOPOPTS": "syscall", + "syscall.IPV6_2292NEXTHOP": "syscall", + "syscall.IPV6_2292PKTINFO": "syscall", + "syscall.IPV6_2292PKTOPTIONS": "syscall", + "syscall.IPV6_2292RTHDR": "syscall", + "syscall.IPV6_ADDRFORM": "syscall", + "syscall.IPV6_ADD_MEMBERSHIP": "syscall", + "syscall.IPV6_AUTHHDR": "syscall", + "syscall.IPV6_AUTH_LEVEL": "syscall", + "syscall.IPV6_AUTOFLOWLABEL": "syscall", + "syscall.IPV6_BINDANY": "syscall", + "syscall.IPV6_BINDV6ONLY": "syscall", + "syscall.IPV6_BOUND_IF": "syscall", + "syscall.IPV6_CHECKSUM": "syscall", + "syscall.IPV6_DEFAULT_MULTICAST_HOPS": "syscall", + "syscall.IPV6_DEFAULT_MULTICAST_LOOP": "syscall", + "syscall.IPV6_DEFHLIM": "syscall", + "syscall.IPV6_DONTFRAG": "syscall", + "syscall.IPV6_DROP_MEMBERSHIP": "syscall", + "syscall.IPV6_DSTOPTS": "syscall", + "syscall.IPV6_ESP_NETWORK_LEVEL": "syscall", + "syscall.IPV6_ESP_TRANS_LEVEL": "syscall", + "syscall.IPV6_FAITH": "syscall", + "syscall.IPV6_FLOWINFO_MASK": "syscall", + "syscall.IPV6_FLOWLABEL_MASK": "syscall", + "syscall.IPV6_FRAGTTL": "syscall", + "syscall.IPV6_FW_ADD": "syscall", + "syscall.IPV6_FW_DEL": "syscall", + "syscall.IPV6_FW_FLUSH": "syscall", + "syscall.IPV6_FW_GET": "syscall", + "syscall.IPV6_FW_ZERO": "syscall", + "syscall.IPV6_HLIMDEC": "syscall", + "syscall.IPV6_HOPLIMIT": "syscall", + "syscall.IPV6_HOPOPTS": "syscall", + "syscall.IPV6_IPCOMP_LEVEL": "syscall", + "syscall.IPV6_IPSEC_POLICY": "syscall", + "syscall.IPV6_JOIN_ANYCAST": "syscall", + "syscall.IPV6_JOIN_GROUP": "syscall", + "syscall.IPV6_LEAVE_ANYCAST": "syscall", + "syscall.IPV6_LEAVE_GROUP": "syscall", + "syscall.IPV6_MAXHLIM": "syscall", + "syscall.IPV6_MAXOPTHDR": "syscall", + "syscall.IPV6_MAXPACKET": "syscall", + "syscall.IPV6_MAX_GROUP_SRC_FILTER": "syscall", + "syscall.IPV6_MAX_MEMBERSHIPS": "syscall", + "syscall.IPV6_MAX_SOCK_SRC_FILTER": "syscall", + "syscall.IPV6_MIN_MEMBERSHIPS": "syscall", + "syscall.IPV6_MMTU": "syscall", + "syscall.IPV6_MSFILTER": "syscall", + "syscall.IPV6_MTU": "syscall", + "syscall.IPV6_MTU_DISCOVER": "syscall", + "syscall.IPV6_MULTICAST_HOPS": "syscall", + "syscall.IPV6_MULTICAST_IF": "syscall", + "syscall.IPV6_MULTICAST_LOOP": "syscall", + "syscall.IPV6_NEXTHOP": "syscall", + "syscall.IPV6_OPTIONS": "syscall", + "syscall.IPV6_PATHMTU": "syscall", + "syscall.IPV6_PIPEX": "syscall", + "syscall.IPV6_PKTINFO": "syscall", + "syscall.IPV6_PMTUDISC_DO": "syscall", + "syscall.IPV6_PMTUDISC_DONT": "syscall", + "syscall.IPV6_PMTUDISC_PROBE": "syscall", + "syscall.IPV6_PMTUDISC_WANT": "syscall", + "syscall.IPV6_PORTRANGE": "syscall", + "syscall.IPV6_PORTRANGE_DEFAULT": "syscall", + "syscall.IPV6_PORTRANGE_HIGH": "syscall", + "syscall.IPV6_PORTRANGE_LOW": "syscall", + "syscall.IPV6_PREFER_TEMPADDR": "syscall", + "syscall.IPV6_RECVDSTOPTS": "syscall", + "syscall.IPV6_RECVDSTPORT": "syscall", + "syscall.IPV6_RECVERR": "syscall", + "syscall.IPV6_RECVHOPLIMIT": "syscall", + "syscall.IPV6_RECVHOPOPTS": "syscall", + "syscall.IPV6_RECVPATHMTU": "syscall", + "syscall.IPV6_RECVPKTINFO": "syscall", + "syscall.IPV6_RECVRTHDR": "syscall", + "syscall.IPV6_RECVTCLASS": "syscall", + "syscall.IPV6_ROUTER_ALERT": "syscall", + "syscall.IPV6_RTABLE": "syscall", + "syscall.IPV6_RTHDR": "syscall", + "syscall.IPV6_RTHDRDSTOPTS": "syscall", + "syscall.IPV6_RTHDR_LOOSE": "syscall", + "syscall.IPV6_RTHDR_STRICT": "syscall", + "syscall.IPV6_RTHDR_TYPE_0": "syscall", + "syscall.IPV6_RXDSTOPTS": "syscall", + "syscall.IPV6_RXHOPOPTS": "syscall", + "syscall.IPV6_SOCKOPT_RESERVED1": "syscall", + "syscall.IPV6_TCLASS": "syscall", + "syscall.IPV6_UNICAST_HOPS": "syscall", + "syscall.IPV6_USE_MIN_MTU": "syscall", + "syscall.IPV6_V6ONLY": "syscall", + "syscall.IPV6_VERSION": "syscall", + "syscall.IPV6_VERSION_MASK": "syscall", + "syscall.IPV6_XFRM_POLICY": "syscall", + "syscall.IP_ADD_MEMBERSHIP": "syscall", + "syscall.IP_ADD_SOURCE_MEMBERSHIP": "syscall", + "syscall.IP_AUTH_LEVEL": "syscall", + "syscall.IP_BINDANY": "syscall", + "syscall.IP_BLOCK_SOURCE": "syscall", + "syscall.IP_BOUND_IF": "syscall", + "syscall.IP_DEFAULT_MULTICAST_LOOP": "syscall", + "syscall.IP_DEFAULT_MULTICAST_TTL": "syscall", + "syscall.IP_DF": "syscall", + "syscall.IP_DIVERTFL": "syscall", + "syscall.IP_DONTFRAG": "syscall", + "syscall.IP_DROP_MEMBERSHIP": "syscall", + "syscall.IP_DROP_SOURCE_MEMBERSHIP": "syscall", + "syscall.IP_DUMMYNET3": "syscall", + "syscall.IP_DUMMYNET_CONFIGURE": "syscall", + "syscall.IP_DUMMYNET_DEL": "syscall", + "syscall.IP_DUMMYNET_FLUSH": "syscall", + "syscall.IP_DUMMYNET_GET": "syscall", + "syscall.IP_EF": "syscall", + "syscall.IP_ERRORMTU": "syscall", + "syscall.IP_ESP_NETWORK_LEVEL": "syscall", + "syscall.IP_ESP_TRANS_LEVEL": "syscall", + "syscall.IP_FAITH": "syscall", + "syscall.IP_FREEBIND": "syscall", + "syscall.IP_FW3": "syscall", + "syscall.IP_FW_ADD": "syscall", + "syscall.IP_FW_DEL": "syscall", + "syscall.IP_FW_FLUSH": "syscall", + "syscall.IP_FW_GET": "syscall", + "syscall.IP_FW_NAT_CFG": "syscall", + "syscall.IP_FW_NAT_DEL": "syscall", + "syscall.IP_FW_NAT_GET_CONFIG": "syscall", + "syscall.IP_FW_NAT_GET_LOG": "syscall", + "syscall.IP_FW_RESETLOG": "syscall", + "syscall.IP_FW_TABLE_ADD": "syscall", + "syscall.IP_FW_TABLE_DEL": "syscall", + "syscall.IP_FW_TABLE_FLUSH": "syscall", + "syscall.IP_FW_TABLE_GETSIZE": "syscall", + "syscall.IP_FW_TABLE_LIST": "syscall", + "syscall.IP_FW_ZERO": "syscall", + "syscall.IP_HDRINCL": "syscall", + "syscall.IP_IPCOMP_LEVEL": "syscall", + "syscall.IP_IPSECFLOWINFO": "syscall", + "syscall.IP_IPSEC_LOCAL_AUTH": "syscall", + "syscall.IP_IPSEC_LOCAL_CRED": "syscall", + "syscall.IP_IPSEC_LOCAL_ID": "syscall", + "syscall.IP_IPSEC_POLICY": "syscall", + "syscall.IP_IPSEC_REMOTE_AUTH": "syscall", + "syscall.IP_IPSEC_REMOTE_CRED": "syscall", + "syscall.IP_IPSEC_REMOTE_ID": "syscall", + "syscall.IP_MAXPACKET": "syscall", + "syscall.IP_MAX_GROUP_SRC_FILTER": "syscall", + "syscall.IP_MAX_MEMBERSHIPS": "syscall", + "syscall.IP_MAX_SOCK_MUTE_FILTER": "syscall", + "syscall.IP_MAX_SOCK_SRC_FILTER": "syscall", + "syscall.IP_MAX_SOURCE_FILTER": "syscall", + "syscall.IP_MF": "syscall", + "syscall.IP_MINFRAGSIZE": "syscall", + "syscall.IP_MINTTL": "syscall", + "syscall.IP_MIN_MEMBERSHIPS": "syscall", + "syscall.IP_MSFILTER": "syscall", + "syscall.IP_MSS": "syscall", + "syscall.IP_MTU": "syscall", + "syscall.IP_MTU_DISCOVER": "syscall", + "syscall.IP_MULTICAST_IF": "syscall", + "syscall.IP_MULTICAST_IFINDEX": "syscall", + "syscall.IP_MULTICAST_LOOP": "syscall", + "syscall.IP_MULTICAST_TTL": "syscall", + "syscall.IP_MULTICAST_VIF": "syscall", + "syscall.IP_NAT__XXX": "syscall", + "syscall.IP_OFFMASK": "syscall", + "syscall.IP_OLD_FW_ADD": "syscall", + "syscall.IP_OLD_FW_DEL": "syscall", + "syscall.IP_OLD_FW_FLUSH": "syscall", + "syscall.IP_OLD_FW_GET": "syscall", + "syscall.IP_OLD_FW_RESETLOG": "syscall", + "syscall.IP_OLD_FW_ZERO": "syscall", + "syscall.IP_ONESBCAST": "syscall", + "syscall.IP_OPTIONS": "syscall", + "syscall.IP_ORIGDSTADDR": "syscall", + "syscall.IP_PASSSEC": "syscall", + "syscall.IP_PIPEX": "syscall", + "syscall.IP_PKTINFO": "syscall", + "syscall.IP_PKTOPTIONS": "syscall", + "syscall.IP_PMTUDISC": "syscall", + "syscall.IP_PMTUDISC_DO": "syscall", + "syscall.IP_PMTUDISC_DONT": "syscall", + "syscall.IP_PMTUDISC_PROBE": "syscall", + "syscall.IP_PMTUDISC_WANT": "syscall", + "syscall.IP_PORTRANGE": "syscall", + "syscall.IP_PORTRANGE_DEFAULT": "syscall", + "syscall.IP_PORTRANGE_HIGH": "syscall", + "syscall.IP_PORTRANGE_LOW": "syscall", + "syscall.IP_RECVDSTADDR": "syscall", + "syscall.IP_RECVDSTPORT": "syscall", + "syscall.IP_RECVERR": "syscall", + "syscall.IP_RECVIF": "syscall", + "syscall.IP_RECVOPTS": "syscall", + "syscall.IP_RECVORIGDSTADDR": "syscall", + "syscall.IP_RECVPKTINFO": "syscall", + "syscall.IP_RECVRETOPTS": "syscall", + "syscall.IP_RECVRTABLE": "syscall", + "syscall.IP_RECVTOS": "syscall", + "syscall.IP_RECVTTL": "syscall", + "syscall.IP_RETOPTS": "syscall", + "syscall.IP_RF": "syscall", + "syscall.IP_ROUTER_ALERT": "syscall", + "syscall.IP_RSVP_OFF": "syscall", + "syscall.IP_RSVP_ON": "syscall", + "syscall.IP_RSVP_VIF_OFF": "syscall", + "syscall.IP_RSVP_VIF_ON": "syscall", + "syscall.IP_RTABLE": "syscall", + "syscall.IP_SENDSRCADDR": "syscall", + "syscall.IP_STRIPHDR": "syscall", + "syscall.IP_TOS": "syscall", + "syscall.IP_TRAFFIC_MGT_BACKGROUND": "syscall", + "syscall.IP_TRANSPARENT": "syscall", + "syscall.IP_TTL": "syscall", + "syscall.IP_UNBLOCK_SOURCE": "syscall", + "syscall.IP_XFRM_POLICY": "syscall", + "syscall.IPv6MTUInfo": "syscall", + "syscall.IPv6Mreq": "syscall", + "syscall.ISIG": "syscall", + "syscall.ISTRIP": "syscall", + "syscall.IUCLC": "syscall", + "syscall.IUTF8": "syscall", + "syscall.IXANY": "syscall", + "syscall.IXOFF": "syscall", + "syscall.IXON": "syscall", + "syscall.IfAddrmsg": "syscall", + "syscall.IfAnnounceMsghdr": "syscall", + "syscall.IfData": "syscall", + "syscall.IfInfomsg": "syscall", + "syscall.IfMsghdr": "syscall", + "syscall.IfaMsghdr": "syscall", + "syscall.IfmaMsghdr": "syscall", + "syscall.IfmaMsghdr2": "syscall", + "syscall.ImplementsGetwd": "syscall", + "syscall.Inet4Pktinfo": "syscall", + "syscall.Inet6Pktinfo": "syscall", + "syscall.InotifyAddWatch": "syscall", + "syscall.InotifyEvent": "syscall", + "syscall.InotifyInit": "syscall", + "syscall.InotifyInit1": "syscall", + "syscall.InotifyRmWatch": "syscall", + "syscall.InterfaceAddrMessage": "syscall", + "syscall.InterfaceAnnounceMessage": "syscall", + "syscall.InterfaceInfo": "syscall", + "syscall.InterfaceMessage": "syscall", + "syscall.InterfaceMulticastAddrMessage": "syscall", + "syscall.InvalidHandle": "syscall", + "syscall.Ioperm": "syscall", + "syscall.Iopl": "syscall", + "syscall.Iovec": "syscall", + "syscall.IpAdapterInfo": "syscall", + "syscall.IpAddrString": "syscall", + "syscall.IpAddressString": "syscall", + "syscall.IpMaskString": "syscall", + "syscall.Issetugid": "syscall", + "syscall.KEY_ALL_ACCESS": "syscall", + "syscall.KEY_CREATE_LINK": "syscall", + "syscall.KEY_CREATE_SUB_KEY": "syscall", + "syscall.KEY_ENUMERATE_SUB_KEYS": "syscall", + "syscall.KEY_EXECUTE": "syscall", + "syscall.KEY_NOTIFY": "syscall", + "syscall.KEY_QUERY_VALUE": "syscall", + "syscall.KEY_READ": "syscall", + "syscall.KEY_SET_VALUE": "syscall", + "syscall.KEY_WOW64_32KEY": "syscall", + "syscall.KEY_WOW64_64KEY": "syscall", + "syscall.KEY_WRITE": "syscall", + "syscall.Kevent": "syscall", + "syscall.Kevent_t": "syscall", + "syscall.Kill": "syscall", + "syscall.Klogctl": "syscall", + "syscall.Kqueue": "syscall", + "syscall.LANG_ENGLISH": "syscall", + "syscall.LAYERED_PROTOCOL": "syscall", + "syscall.LCNT_OVERLOAD_FLUSH": "syscall", + "syscall.LINUX_REBOOT_CMD_CAD_OFF": "syscall", + "syscall.LINUX_REBOOT_CMD_CAD_ON": "syscall", + "syscall.LINUX_REBOOT_CMD_HALT": "syscall", + "syscall.LINUX_REBOOT_CMD_KEXEC": "syscall", + "syscall.LINUX_REBOOT_CMD_POWER_OFF": "syscall", + "syscall.LINUX_REBOOT_CMD_RESTART": "syscall", + "syscall.LINUX_REBOOT_CMD_RESTART2": "syscall", + "syscall.LINUX_REBOOT_CMD_SW_SUSPEND": "syscall", + "syscall.LINUX_REBOOT_MAGIC1": "syscall", + "syscall.LINUX_REBOOT_MAGIC2": "syscall", + "syscall.LOCK_EX": "syscall", + "syscall.LOCK_NB": "syscall", + "syscall.LOCK_SH": "syscall", + "syscall.LOCK_UN": "syscall", + "syscall.LazyDLL": "syscall", + "syscall.LazyProc": "syscall", + "syscall.Lchown": "syscall", + "syscall.Linger": "syscall", + "syscall.Link": "syscall", + "syscall.Listen": "syscall", + "syscall.Listxattr": "syscall", + "syscall.LoadCancelIoEx": "syscall", + "syscall.LoadConnectEx": "syscall", + "syscall.LoadCreateSymbolicLink": "syscall", + "syscall.LoadDLL": "syscall", + "syscall.LoadGetAddrInfo": "syscall", + "syscall.LoadLibrary": "syscall", + "syscall.LoadSetFileCompletionNotificationModes": "syscall", + "syscall.LocalFree": "syscall", + "syscall.Log2phys_t": "syscall", + "syscall.LookupAccountName": "syscall", + "syscall.LookupAccountSid": "syscall", + "syscall.LookupSID": "syscall", + "syscall.LsfJump": "syscall", + "syscall.LsfSocket": "syscall", + "syscall.LsfStmt": "syscall", + "syscall.Lstat": "syscall", + "syscall.MADV_AUTOSYNC": "syscall", + "syscall.MADV_CAN_REUSE": "syscall", + "syscall.MADV_CORE": "syscall", + "syscall.MADV_DOFORK": "syscall", + "syscall.MADV_DONTFORK": "syscall", + "syscall.MADV_DONTNEED": "syscall", + "syscall.MADV_FREE": "syscall", + "syscall.MADV_FREE_REUSABLE": "syscall", + "syscall.MADV_FREE_REUSE": "syscall", + "syscall.MADV_HUGEPAGE": "syscall", + "syscall.MADV_HWPOISON": "syscall", + "syscall.MADV_MERGEABLE": "syscall", + "syscall.MADV_NOCORE": "syscall", + "syscall.MADV_NOHUGEPAGE": "syscall", + "syscall.MADV_NORMAL": "syscall", + "syscall.MADV_NOSYNC": "syscall", + "syscall.MADV_PROTECT": "syscall", + "syscall.MADV_RANDOM": "syscall", + "syscall.MADV_REMOVE": "syscall", + "syscall.MADV_SEQUENTIAL": "syscall", + "syscall.MADV_SPACEAVAIL": "syscall", + "syscall.MADV_UNMERGEABLE": "syscall", + "syscall.MADV_WILLNEED": "syscall", + "syscall.MADV_ZERO_WIRED_PAGES": "syscall", + "syscall.MAP_32BIT": "syscall", + "syscall.MAP_ALIGNED_SUPER": "syscall", + "syscall.MAP_ALIGNMENT_16MB": "syscall", + "syscall.MAP_ALIGNMENT_1TB": "syscall", + "syscall.MAP_ALIGNMENT_256TB": "syscall", + "syscall.MAP_ALIGNMENT_4GB": "syscall", + "syscall.MAP_ALIGNMENT_64KB": "syscall", + "syscall.MAP_ALIGNMENT_64PB": "syscall", + "syscall.MAP_ALIGNMENT_MASK": "syscall", + "syscall.MAP_ALIGNMENT_SHIFT": "syscall", + "syscall.MAP_ANON": "syscall", + "syscall.MAP_ANONYMOUS": "syscall", + "syscall.MAP_COPY": "syscall", + "syscall.MAP_DENYWRITE": "syscall", + "syscall.MAP_EXECUTABLE": "syscall", + "syscall.MAP_FILE": "syscall", + "syscall.MAP_FIXED": "syscall", + "syscall.MAP_FLAGMASK": "syscall", + "syscall.MAP_GROWSDOWN": "syscall", + "syscall.MAP_HASSEMAPHORE": "syscall", + "syscall.MAP_HUGETLB": "syscall", + "syscall.MAP_INHERIT": "syscall", + "syscall.MAP_INHERIT_COPY": "syscall", + "syscall.MAP_INHERIT_DEFAULT": "syscall", + "syscall.MAP_INHERIT_DONATE_COPY": "syscall", + "syscall.MAP_INHERIT_NONE": "syscall", + "syscall.MAP_INHERIT_SHARE": "syscall", + "syscall.MAP_JIT": "syscall", + "syscall.MAP_LOCKED": "syscall", + "syscall.MAP_NOCACHE": "syscall", + "syscall.MAP_NOCORE": "syscall", + "syscall.MAP_NOEXTEND": "syscall", + "syscall.MAP_NONBLOCK": "syscall", + "syscall.MAP_NORESERVE": "syscall", + "syscall.MAP_NOSYNC": "syscall", + "syscall.MAP_POPULATE": "syscall", + "syscall.MAP_PREFAULT_READ": "syscall", + "syscall.MAP_PRIVATE": "syscall", + "syscall.MAP_RENAME": "syscall", + "syscall.MAP_RESERVED0080": "syscall", + "syscall.MAP_RESERVED0100": "syscall", + "syscall.MAP_SHARED": "syscall", + "syscall.MAP_STACK": "syscall", + "syscall.MAP_TRYFIXED": "syscall", + "syscall.MAP_TYPE": "syscall", + "syscall.MAP_WIRED": "syscall", + "syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE": "syscall", + "syscall.MAXLEN_IFDESCR": "syscall", + "syscall.MAXLEN_PHYSADDR": "syscall", + "syscall.MAX_ADAPTER_ADDRESS_LENGTH": "syscall", + "syscall.MAX_ADAPTER_DESCRIPTION_LENGTH": "syscall", + "syscall.MAX_ADAPTER_NAME_LENGTH": "syscall", + "syscall.MAX_COMPUTERNAME_LENGTH": "syscall", + "syscall.MAX_INTERFACE_NAME_LEN": "syscall", + "syscall.MAX_LONG_PATH": "syscall", + "syscall.MAX_PATH": "syscall", + "syscall.MAX_PROTOCOL_CHAIN": "syscall", + "syscall.MCL_CURRENT": "syscall", + "syscall.MCL_FUTURE": "syscall", + "syscall.MNT_DETACH": "syscall", + "syscall.MNT_EXPIRE": "syscall", + "syscall.MNT_FORCE": "syscall", + "syscall.MSG_BCAST": "syscall", + "syscall.MSG_CMSG_CLOEXEC": "syscall", + "syscall.MSG_COMPAT": "syscall", + "syscall.MSG_CONFIRM": "syscall", + "syscall.MSG_CONTROLMBUF": "syscall", + "syscall.MSG_CTRUNC": "syscall", + "syscall.MSG_DONTROUTE": "syscall", + "syscall.MSG_DONTWAIT": "syscall", + "syscall.MSG_EOF": "syscall", + "syscall.MSG_EOR": "syscall", + "syscall.MSG_ERRQUEUE": "syscall", + "syscall.MSG_FASTOPEN": "syscall", + "syscall.MSG_FIN": "syscall", + "syscall.MSG_FLUSH": "syscall", + "syscall.MSG_HAVEMORE": "syscall", + "syscall.MSG_HOLD": "syscall", + "syscall.MSG_IOVUSRSPACE": "syscall", + "syscall.MSG_LENUSRSPACE": "syscall", + "syscall.MSG_MCAST": "syscall", + "syscall.MSG_MORE": "syscall", + "syscall.MSG_NAMEMBUF": "syscall", + "syscall.MSG_NBIO": "syscall", + "syscall.MSG_NEEDSA": "syscall", + "syscall.MSG_NOSIGNAL": "syscall", + "syscall.MSG_NOTIFICATION": "syscall", + "syscall.MSG_OOB": "syscall", + "syscall.MSG_PEEK": "syscall", + "syscall.MSG_PROXY": "syscall", + "syscall.MSG_RCVMORE": "syscall", + "syscall.MSG_RST": "syscall", + "syscall.MSG_SEND": "syscall", + "syscall.MSG_SYN": "syscall", + "syscall.MSG_TRUNC": "syscall", + "syscall.MSG_TRYHARD": "syscall", + "syscall.MSG_USERFLAGS": "syscall", + "syscall.MSG_WAITALL": "syscall", + "syscall.MSG_WAITFORONE": "syscall", + "syscall.MSG_WAITSTREAM": "syscall", + "syscall.MS_ACTIVE": "syscall", + "syscall.MS_ASYNC": "syscall", + "syscall.MS_BIND": "syscall", + "syscall.MS_DEACTIVATE": "syscall", + "syscall.MS_DIRSYNC": "syscall", + "syscall.MS_INVALIDATE": "syscall", + "syscall.MS_I_VERSION": "syscall", + "syscall.MS_KERNMOUNT": "syscall", + "syscall.MS_KILLPAGES": "syscall", + "syscall.MS_MANDLOCK": "syscall", + "syscall.MS_MGC_MSK": "syscall", + "syscall.MS_MGC_VAL": "syscall", + "syscall.MS_MOVE": "syscall", + "syscall.MS_NOATIME": "syscall", + "syscall.MS_NODEV": "syscall", + "syscall.MS_NODIRATIME": "syscall", + "syscall.MS_NOEXEC": "syscall", + "syscall.MS_NOSUID": "syscall", + "syscall.MS_NOUSER": "syscall", + "syscall.MS_POSIXACL": "syscall", + "syscall.MS_PRIVATE": "syscall", + "syscall.MS_RDONLY": "syscall", + "syscall.MS_REC": "syscall", + "syscall.MS_RELATIME": "syscall", + "syscall.MS_REMOUNT": "syscall", + "syscall.MS_RMT_MASK": "syscall", + "syscall.MS_SHARED": "syscall", + "syscall.MS_SILENT": "syscall", + "syscall.MS_SLAVE": "syscall", + "syscall.MS_STRICTATIME": "syscall", + "syscall.MS_SYNC": "syscall", + "syscall.MS_SYNCHRONOUS": "syscall", + "syscall.MS_UNBINDABLE": "syscall", + "syscall.Madvise": "syscall", + "syscall.MapViewOfFile": "syscall", + "syscall.MaxTokenInfoClass": "syscall", + "syscall.Mclpool": "syscall", + "syscall.MibIfRow": "syscall", + "syscall.Mkdir": "syscall", + "syscall.Mkdirat": "syscall", + "syscall.Mkfifo": "syscall", + "syscall.Mknod": "syscall", + "syscall.Mknodat": "syscall", + "syscall.Mlock": "syscall", + "syscall.Mlockall": "syscall", + "syscall.Mmap": "syscall", + "syscall.Mount": "syscall", + "syscall.MoveFile": "syscall", + "syscall.Mprotect": "syscall", + "syscall.Msghdr": "syscall", + "syscall.Munlock": "syscall", + "syscall.Munlockall": "syscall", + "syscall.Munmap": "syscall", + "syscall.MustLoadDLL": "syscall", + "syscall.NAME_MAX": "syscall", + "syscall.NETLINK_ADD_MEMBERSHIP": "syscall", + "syscall.NETLINK_AUDIT": "syscall", + "syscall.NETLINK_BROADCAST_ERROR": "syscall", + "syscall.NETLINK_CONNECTOR": "syscall", + "syscall.NETLINK_DNRTMSG": "syscall", + "syscall.NETLINK_DROP_MEMBERSHIP": "syscall", + "syscall.NETLINK_ECRYPTFS": "syscall", + "syscall.NETLINK_FIB_LOOKUP": "syscall", + "syscall.NETLINK_FIREWALL": "syscall", + "syscall.NETLINK_GENERIC": "syscall", + "syscall.NETLINK_INET_DIAG": "syscall", + "syscall.NETLINK_IP6_FW": "syscall", + "syscall.NETLINK_ISCSI": "syscall", + "syscall.NETLINK_KOBJECT_UEVENT": "syscall", + "syscall.NETLINK_NETFILTER": "syscall", + "syscall.NETLINK_NFLOG": "syscall", + "syscall.NETLINK_NO_ENOBUFS": "syscall", + "syscall.NETLINK_PKTINFO": "syscall", + "syscall.NETLINK_RDMA": "syscall", + "syscall.NETLINK_ROUTE": "syscall", + "syscall.NETLINK_SCSITRANSPORT": "syscall", + "syscall.NETLINK_SELINUX": "syscall", + "syscall.NETLINK_UNUSED": "syscall", + "syscall.NETLINK_USERSOCK": "syscall", + "syscall.NETLINK_XFRM": "syscall", + "syscall.NET_RT_DUMP": "syscall", + "syscall.NET_RT_DUMP2": "syscall", + "syscall.NET_RT_FLAGS": "syscall", + "syscall.NET_RT_IFLIST": "syscall", + "syscall.NET_RT_IFLIST2": "syscall", + "syscall.NET_RT_IFLISTL": "syscall", + "syscall.NET_RT_IFMALIST": "syscall", + "syscall.NET_RT_MAXID": "syscall", + "syscall.NET_RT_OIFLIST": "syscall", + "syscall.NET_RT_OOIFLIST": "syscall", + "syscall.NET_RT_STAT": "syscall", + "syscall.NET_RT_STATS": "syscall", + "syscall.NET_RT_TABLE": "syscall", + "syscall.NET_RT_TRASH": "syscall", + "syscall.NLA_ALIGNTO": "syscall", + "syscall.NLA_F_NESTED": "syscall", + "syscall.NLA_F_NET_BYTEORDER": "syscall", + "syscall.NLA_HDRLEN": "syscall", + "syscall.NLMSG_ALIGNTO": "syscall", + "syscall.NLMSG_DONE": "syscall", + "syscall.NLMSG_ERROR": "syscall", + "syscall.NLMSG_HDRLEN": "syscall", + "syscall.NLMSG_MIN_TYPE": "syscall", + "syscall.NLMSG_NOOP": "syscall", + "syscall.NLMSG_OVERRUN": "syscall", + "syscall.NLM_F_ACK": "syscall", + "syscall.NLM_F_APPEND": "syscall", + "syscall.NLM_F_ATOMIC": "syscall", + "syscall.NLM_F_CREATE": "syscall", + "syscall.NLM_F_DUMP": "syscall", + "syscall.NLM_F_ECHO": "syscall", + "syscall.NLM_F_EXCL": "syscall", + "syscall.NLM_F_MATCH": "syscall", + "syscall.NLM_F_MULTI": "syscall", + "syscall.NLM_F_REPLACE": "syscall", + "syscall.NLM_F_REQUEST": "syscall", + "syscall.NLM_F_ROOT": "syscall", + "syscall.NOFLSH": "syscall", + "syscall.NOTE_ABSOLUTE": "syscall", + "syscall.NOTE_ATTRIB": "syscall", + "syscall.NOTE_CHILD": "syscall", + "syscall.NOTE_DELETE": "syscall", + "syscall.NOTE_EOF": "syscall", + "syscall.NOTE_EXEC": "syscall", + "syscall.NOTE_EXIT": "syscall", + "syscall.NOTE_EXITSTATUS": "syscall", + "syscall.NOTE_EXTEND": "syscall", + "syscall.NOTE_FFAND": "syscall", + "syscall.NOTE_FFCOPY": "syscall", + "syscall.NOTE_FFCTRLMASK": "syscall", + "syscall.NOTE_FFLAGSMASK": "syscall", + "syscall.NOTE_FFNOP": "syscall", + "syscall.NOTE_FFOR": "syscall", + "syscall.NOTE_FORK": "syscall", + "syscall.NOTE_LINK": "syscall", + "syscall.NOTE_LOWAT": "syscall", + "syscall.NOTE_NONE": "syscall", + "syscall.NOTE_NSECONDS": "syscall", + "syscall.NOTE_PCTRLMASK": "syscall", + "syscall.NOTE_PDATAMASK": "syscall", + "syscall.NOTE_REAP": "syscall", + "syscall.NOTE_RENAME": "syscall", + "syscall.NOTE_RESOURCEEND": "syscall", + "syscall.NOTE_REVOKE": "syscall", + "syscall.NOTE_SECONDS": "syscall", + "syscall.NOTE_SIGNAL": "syscall", + "syscall.NOTE_TRACK": "syscall", + "syscall.NOTE_TRACKERR": "syscall", + "syscall.NOTE_TRIGGER": "syscall", + "syscall.NOTE_TRUNCATE": "syscall", + "syscall.NOTE_USECONDS": "syscall", + "syscall.NOTE_VM_ERROR": "syscall", + "syscall.NOTE_VM_PRESSURE": "syscall", + "syscall.NOTE_VM_PRESSURE_SUDDEN_TERMINATE": "syscall", + "syscall.NOTE_VM_PRESSURE_TERMINATE": "syscall", + "syscall.NOTE_WRITE": "syscall", + "syscall.NameCanonical": "syscall", + "syscall.NameCanonicalEx": "syscall", + "syscall.NameDisplay": "syscall", + "syscall.NameDnsDomain": "syscall", + "syscall.NameFullyQualifiedDN": "syscall", + "syscall.NameSamCompatible": "syscall", + "syscall.NameServicePrincipal": "syscall", + "syscall.NameUniqueId": "syscall", + "syscall.NameUnknown": "syscall", + "syscall.NameUserPrincipal": "syscall", + "syscall.Nanosleep": "syscall", + "syscall.NetApiBufferFree": "syscall", + "syscall.NetGetJoinInformation": "syscall", + "syscall.NetSetupDomainName": "syscall", + "syscall.NetSetupUnjoined": "syscall", + "syscall.NetSetupUnknownStatus": "syscall", + "syscall.NetSetupWorkgroupName": "syscall", + "syscall.NetUserGetInfo": "syscall", + "syscall.NetlinkMessage": "syscall", + "syscall.NetlinkRIB": "syscall", + "syscall.NetlinkRouteAttr": "syscall", + "syscall.NetlinkRouteRequest": "syscall", + "syscall.NewCallback": "syscall", + "syscall.NewCallbackCDecl": "syscall", + "syscall.NewLazyDLL": "syscall", + "syscall.NlAttr": "syscall", + "syscall.NlMsgerr": "syscall", + "syscall.NlMsghdr": "syscall", + "syscall.NsecToFiletime": "syscall", + "syscall.NsecToTimespec": "syscall", + "syscall.NsecToTimeval": "syscall", + "syscall.Ntohs": "syscall", + "syscall.OCRNL": "syscall", + "syscall.OFDEL": "syscall", + "syscall.OFILL": "syscall", + "syscall.OFIOGETBMAP": "syscall", + "syscall.OID_PKIX_KP_SERVER_AUTH": "syscall", + "syscall.OID_SERVER_GATED_CRYPTO": "syscall", + "syscall.OID_SGC_NETSCAPE": "syscall", + "syscall.OLCUC": "syscall", + "syscall.ONLCR": "syscall", + "syscall.ONLRET": "syscall", + "syscall.ONOCR": "syscall", + "syscall.ONOEOT": "syscall", + "syscall.OPEN_ALWAYS": "syscall", + "syscall.OPEN_EXISTING": "syscall", + "syscall.OPOST": "syscall", + "syscall.O_ACCMODE": "syscall", + "syscall.O_ALERT": "syscall", + "syscall.O_ALT_IO": "syscall", + "syscall.O_APPEND": "syscall", + "syscall.O_ASYNC": "syscall", + "syscall.O_CLOEXEC": "syscall", + "syscall.O_CREAT": "syscall", + "syscall.O_DIRECT": "syscall", + "syscall.O_DIRECTORY": "syscall", + "syscall.O_DSYNC": "syscall", + "syscall.O_EVTONLY": "syscall", + "syscall.O_EXCL": "syscall", + "syscall.O_EXEC": "syscall", + "syscall.O_EXLOCK": "syscall", + "syscall.O_FSYNC": "syscall", + "syscall.O_LARGEFILE": "syscall", + "syscall.O_NDELAY": "syscall", + "syscall.O_NOATIME": "syscall", + "syscall.O_NOCTTY": "syscall", + "syscall.O_NOFOLLOW": "syscall", + "syscall.O_NONBLOCK": "syscall", + "syscall.O_NOSIGPIPE": "syscall", + "syscall.O_POPUP": "syscall", + "syscall.O_RDONLY": "syscall", + "syscall.O_RDWR": "syscall", + "syscall.O_RSYNC": "syscall", + "syscall.O_SHLOCK": "syscall", + "syscall.O_SYMLINK": "syscall", + "syscall.O_SYNC": "syscall", + "syscall.O_TRUNC": "syscall", + "syscall.O_TTY_INIT": "syscall", + "syscall.O_WRONLY": "syscall", + "syscall.Open": "syscall", + "syscall.OpenCurrentProcessToken": "syscall", + "syscall.OpenProcess": "syscall", + "syscall.OpenProcessToken": "syscall", + "syscall.Openat": "syscall", + "syscall.Overlapped": "syscall", + "syscall.PACKET_ADD_MEMBERSHIP": "syscall", + "syscall.PACKET_BROADCAST": "syscall", + "syscall.PACKET_DROP_MEMBERSHIP": "syscall", + "syscall.PACKET_FASTROUTE": "syscall", + "syscall.PACKET_HOST": "syscall", + "syscall.PACKET_LOOPBACK": "syscall", + "syscall.PACKET_MR_ALLMULTI": "syscall", + "syscall.PACKET_MR_MULTICAST": "syscall", + "syscall.PACKET_MR_PROMISC": "syscall", + "syscall.PACKET_MULTICAST": "syscall", + "syscall.PACKET_OTHERHOST": "syscall", + "syscall.PACKET_OUTGOING": "syscall", + "syscall.PACKET_RECV_OUTPUT": "syscall", + "syscall.PACKET_RX_RING": "syscall", + "syscall.PACKET_STATISTICS": "syscall", + "syscall.PAGE_EXECUTE_READ": "syscall", + "syscall.PAGE_EXECUTE_READWRITE": "syscall", + "syscall.PAGE_EXECUTE_WRITECOPY": "syscall", + "syscall.PAGE_READONLY": "syscall", + "syscall.PAGE_READWRITE": "syscall", + "syscall.PAGE_WRITECOPY": "syscall", + "syscall.PARENB": "syscall", + "syscall.PARMRK": "syscall", + "syscall.PARODD": "syscall", + "syscall.PENDIN": "syscall", + "syscall.PFL_HIDDEN": "syscall", + "syscall.PFL_MATCHES_PROTOCOL_ZERO": "syscall", + "syscall.PFL_MULTIPLE_PROTO_ENTRIES": "syscall", + "syscall.PFL_NETWORKDIRECT_PROVIDER": "syscall", + "syscall.PFL_RECOMMENDED_PROTO_ENTRY": "syscall", + "syscall.PF_FLUSH": "syscall", + "syscall.PKCS_7_ASN_ENCODING": "syscall", + "syscall.PMC5_PIPELINE_FLUSH": "syscall", + "syscall.PRIO_PGRP": "syscall", + "syscall.PRIO_PROCESS": "syscall", + "syscall.PRIO_USER": "syscall", + "syscall.PRI_IOFLUSH": "syscall", + "syscall.PROCESS_QUERY_INFORMATION": "syscall", + "syscall.PROCESS_TERMINATE": "syscall", + "syscall.PROT_EXEC": "syscall", + "syscall.PROT_GROWSDOWN": "syscall", + "syscall.PROT_GROWSUP": "syscall", + "syscall.PROT_NONE": "syscall", + "syscall.PROT_READ": "syscall", + "syscall.PROT_WRITE": "syscall", + "syscall.PROV_DH_SCHANNEL": "syscall", + "syscall.PROV_DSS": "syscall", + "syscall.PROV_DSS_DH": "syscall", + "syscall.PROV_EC_ECDSA_FULL": "syscall", + "syscall.PROV_EC_ECDSA_SIG": "syscall", + "syscall.PROV_EC_ECNRA_FULL": "syscall", + "syscall.PROV_EC_ECNRA_SIG": "syscall", + "syscall.PROV_FORTEZZA": "syscall", + "syscall.PROV_INTEL_SEC": "syscall", + "syscall.PROV_MS_EXCHANGE": "syscall", + "syscall.PROV_REPLACE_OWF": "syscall", + "syscall.PROV_RNG": "syscall", + "syscall.PROV_RSA_AES": "syscall", + "syscall.PROV_RSA_FULL": "syscall", + "syscall.PROV_RSA_SCHANNEL": "syscall", + "syscall.PROV_RSA_SIG": "syscall", + "syscall.PROV_SPYRUS_LYNKS": "syscall", + "syscall.PROV_SSL": "syscall", + "syscall.PR_CAPBSET_DROP": "syscall", + "syscall.PR_CAPBSET_READ": "syscall", + "syscall.PR_CLEAR_SECCOMP_FILTER": "syscall", + "syscall.PR_ENDIAN_BIG": "syscall", + "syscall.PR_ENDIAN_LITTLE": "syscall", + "syscall.PR_ENDIAN_PPC_LITTLE": "syscall", + "syscall.PR_FPEMU_NOPRINT": "syscall", + "syscall.PR_FPEMU_SIGFPE": "syscall", + "syscall.PR_FP_EXC_ASYNC": "syscall", + "syscall.PR_FP_EXC_DISABLED": "syscall", + "syscall.PR_FP_EXC_DIV": "syscall", + "syscall.PR_FP_EXC_INV": "syscall", + "syscall.PR_FP_EXC_NONRECOV": "syscall", + "syscall.PR_FP_EXC_OVF": "syscall", + "syscall.PR_FP_EXC_PRECISE": "syscall", + "syscall.PR_FP_EXC_RES": "syscall", + "syscall.PR_FP_EXC_SW_ENABLE": "syscall", + "syscall.PR_FP_EXC_UND": "syscall", + "syscall.PR_GET_DUMPABLE": "syscall", + "syscall.PR_GET_ENDIAN": "syscall", + "syscall.PR_GET_FPEMU": "syscall", + "syscall.PR_GET_FPEXC": "syscall", + "syscall.PR_GET_KEEPCAPS": "syscall", + "syscall.PR_GET_NAME": "syscall", + "syscall.PR_GET_PDEATHSIG": "syscall", + "syscall.PR_GET_SECCOMP": "syscall", + "syscall.PR_GET_SECCOMP_FILTER": "syscall", + "syscall.PR_GET_SECUREBITS": "syscall", + "syscall.PR_GET_TIMERSLACK": "syscall", + "syscall.PR_GET_TIMING": "syscall", + "syscall.PR_GET_TSC": "syscall", + "syscall.PR_GET_UNALIGN": "syscall", + "syscall.PR_MCE_KILL": "syscall", + "syscall.PR_MCE_KILL_CLEAR": "syscall", + "syscall.PR_MCE_KILL_DEFAULT": "syscall", + "syscall.PR_MCE_KILL_EARLY": "syscall", + "syscall.PR_MCE_KILL_GET": "syscall", + "syscall.PR_MCE_KILL_LATE": "syscall", + "syscall.PR_MCE_KILL_SET": "syscall", + "syscall.PR_SECCOMP_FILTER_EVENT": "syscall", + "syscall.PR_SECCOMP_FILTER_SYSCALL": "syscall", + "syscall.PR_SET_DUMPABLE": "syscall", + "syscall.PR_SET_ENDIAN": "syscall", + "syscall.PR_SET_FPEMU": "syscall", + "syscall.PR_SET_FPEXC": "syscall", + "syscall.PR_SET_KEEPCAPS": "syscall", + "syscall.PR_SET_NAME": "syscall", + "syscall.PR_SET_PDEATHSIG": "syscall", + "syscall.PR_SET_PTRACER": "syscall", + "syscall.PR_SET_SECCOMP": "syscall", + "syscall.PR_SET_SECCOMP_FILTER": "syscall", + "syscall.PR_SET_SECUREBITS": "syscall", + "syscall.PR_SET_TIMERSLACK": "syscall", + "syscall.PR_SET_TIMING": "syscall", + "syscall.PR_SET_TSC": "syscall", + "syscall.PR_SET_UNALIGN": "syscall", + "syscall.PR_TASK_PERF_EVENTS_DISABLE": "syscall", + "syscall.PR_TASK_PERF_EVENTS_ENABLE": "syscall", + "syscall.PR_TIMING_STATISTICAL": "syscall", + "syscall.PR_TIMING_TIMESTAMP": "syscall", + "syscall.PR_TSC_ENABLE": "syscall", + "syscall.PR_TSC_SIGSEGV": "syscall", + "syscall.PR_UNALIGN_NOPRINT": "syscall", + "syscall.PR_UNALIGN_SIGBUS": "syscall", + "syscall.PTRACE_ARCH_PRCTL": "syscall", + "syscall.PTRACE_ATTACH": "syscall", + "syscall.PTRACE_CONT": "syscall", + "syscall.PTRACE_DETACH": "syscall", + "syscall.PTRACE_EVENT_CLONE": "syscall", + "syscall.PTRACE_EVENT_EXEC": "syscall", + "syscall.PTRACE_EVENT_EXIT": "syscall", + "syscall.PTRACE_EVENT_FORK": "syscall", + "syscall.PTRACE_EVENT_VFORK": "syscall", + "syscall.PTRACE_EVENT_VFORK_DONE": "syscall", + "syscall.PTRACE_GETCRUNCHREGS": "syscall", + "syscall.PTRACE_GETEVENTMSG": "syscall", + "syscall.PTRACE_GETFPREGS": "syscall", + "syscall.PTRACE_GETFPXREGS": "syscall", + "syscall.PTRACE_GETHBPREGS": "syscall", + "syscall.PTRACE_GETREGS": "syscall", + "syscall.PTRACE_GETREGSET": "syscall", + "syscall.PTRACE_GETSIGINFO": "syscall", + "syscall.PTRACE_GETVFPREGS": "syscall", + "syscall.PTRACE_GETWMMXREGS": "syscall", + "syscall.PTRACE_GET_THREAD_AREA": "syscall", + "syscall.PTRACE_KILL": "syscall", + "syscall.PTRACE_OLDSETOPTIONS": "syscall", + "syscall.PTRACE_O_MASK": "syscall", + "syscall.PTRACE_O_TRACECLONE": "syscall", + "syscall.PTRACE_O_TRACEEXEC": "syscall", + "syscall.PTRACE_O_TRACEEXIT": "syscall", + "syscall.PTRACE_O_TRACEFORK": "syscall", + "syscall.PTRACE_O_TRACESYSGOOD": "syscall", + "syscall.PTRACE_O_TRACEVFORK": "syscall", + "syscall.PTRACE_O_TRACEVFORKDONE": "syscall", + "syscall.PTRACE_PEEKDATA": "syscall", + "syscall.PTRACE_PEEKTEXT": "syscall", + "syscall.PTRACE_PEEKUSR": "syscall", + "syscall.PTRACE_POKEDATA": "syscall", + "syscall.PTRACE_POKETEXT": "syscall", + "syscall.PTRACE_POKEUSR": "syscall", + "syscall.PTRACE_SETCRUNCHREGS": "syscall", + "syscall.PTRACE_SETFPREGS": "syscall", + "syscall.PTRACE_SETFPXREGS": "syscall", + "syscall.PTRACE_SETHBPREGS": "syscall", + "syscall.PTRACE_SETOPTIONS": "syscall", + "syscall.PTRACE_SETREGS": "syscall", + "syscall.PTRACE_SETREGSET": "syscall", + "syscall.PTRACE_SETSIGINFO": "syscall", + "syscall.PTRACE_SETVFPREGS": "syscall", + "syscall.PTRACE_SETWMMXREGS": "syscall", + "syscall.PTRACE_SET_SYSCALL": "syscall", + "syscall.PTRACE_SET_THREAD_AREA": "syscall", + "syscall.PTRACE_SINGLEBLOCK": "syscall", + "syscall.PTRACE_SINGLESTEP": "syscall", + "syscall.PTRACE_SYSCALL": "syscall", + "syscall.PTRACE_SYSEMU": "syscall", + "syscall.PTRACE_SYSEMU_SINGLESTEP": "syscall", + "syscall.PTRACE_TRACEME": "syscall", + "syscall.PT_ATTACH": "syscall", + "syscall.PT_ATTACHEXC": "syscall", + "syscall.PT_CONTINUE": "syscall", + "syscall.PT_DATA_ADDR": "syscall", + "syscall.PT_DENY_ATTACH": "syscall", + "syscall.PT_DETACH": "syscall", + "syscall.PT_FIRSTMACH": "syscall", + "syscall.PT_FORCEQUOTA": "syscall", + "syscall.PT_KILL": "syscall", + "syscall.PT_MASK": "syscall", + "syscall.PT_READ_D": "syscall", + "syscall.PT_READ_I": "syscall", + "syscall.PT_READ_U": "syscall", + "syscall.PT_SIGEXC": "syscall", + "syscall.PT_STEP": "syscall", + "syscall.PT_TEXT_ADDR": "syscall", + "syscall.PT_TEXT_END_ADDR": "syscall", + "syscall.PT_THUPDATE": "syscall", + "syscall.PT_TRACE_ME": "syscall", + "syscall.PT_WRITE_D": "syscall", + "syscall.PT_WRITE_I": "syscall", + "syscall.PT_WRITE_U": "syscall", + "syscall.ParseDirent": "syscall", + "syscall.ParseNetlinkMessage": "syscall", + "syscall.ParseNetlinkRouteAttr": "syscall", + "syscall.ParseRoutingMessage": "syscall", + "syscall.ParseRoutingSockaddr": "syscall", + "syscall.ParseSocketControlMessage": "syscall", + "syscall.ParseUnixCredentials": "syscall", + "syscall.ParseUnixRights": "syscall", + "syscall.PathMax": "syscall", + "syscall.Pathconf": "syscall", + "syscall.Pause": "syscall", + "syscall.Pipe": "syscall", + "syscall.Pipe2": "syscall", + "syscall.PivotRoot": "syscall", + "syscall.PostQueuedCompletionStatus": "syscall", + "syscall.Pread": "syscall", + "syscall.Proc": "syscall", + "syscall.ProcAttr": "syscall", + "syscall.Process32First": "syscall", + "syscall.Process32Next": "syscall", + "syscall.ProcessEntry32": "syscall", + "syscall.ProcessInformation": "syscall", + "syscall.Protoent": "syscall", + "syscall.PtraceAttach": "syscall", + "syscall.PtraceCont": "syscall", + "syscall.PtraceDetach": "syscall", + "syscall.PtraceGetEventMsg": "syscall", + "syscall.PtraceGetRegs": "syscall", + "syscall.PtracePeekData": "syscall", + "syscall.PtracePeekText": "syscall", + "syscall.PtracePokeData": "syscall", + "syscall.PtracePokeText": "syscall", + "syscall.PtraceRegs": "syscall", + "syscall.PtraceSetOptions": "syscall", + "syscall.PtraceSetRegs": "syscall", + "syscall.PtraceSingleStep": "syscall", + "syscall.PtraceSyscall": "syscall", + "syscall.Pwrite": "syscall", + "syscall.REG_BINARY": "syscall", + "syscall.REG_DWORD": "syscall", + "syscall.REG_DWORD_BIG_ENDIAN": "syscall", + "syscall.REG_DWORD_LITTLE_ENDIAN": "syscall", + "syscall.REG_EXPAND_SZ": "syscall", + "syscall.REG_FULL_RESOURCE_DESCRIPTOR": "syscall", + "syscall.REG_LINK": "syscall", + "syscall.REG_MULTI_SZ": "syscall", + "syscall.REG_NONE": "syscall", + "syscall.REG_QWORD": "syscall", + "syscall.REG_QWORD_LITTLE_ENDIAN": "syscall", + "syscall.REG_RESOURCE_LIST": "syscall", + "syscall.REG_RESOURCE_REQUIREMENTS_LIST": "syscall", + "syscall.REG_SZ": "syscall", + "syscall.RLIMIT_AS": "syscall", + "syscall.RLIMIT_CORE": "syscall", + "syscall.RLIMIT_CPU": "syscall", + "syscall.RLIMIT_DATA": "syscall", + "syscall.RLIMIT_FSIZE": "syscall", + "syscall.RLIMIT_NOFILE": "syscall", + "syscall.RLIMIT_STACK": "syscall", + "syscall.RLIM_INFINITY": "syscall", + "syscall.RTAX_ADVMSS": "syscall", + "syscall.RTAX_AUTHOR": "syscall", + "syscall.RTAX_BRD": "syscall", + "syscall.RTAX_CWND": "syscall", + "syscall.RTAX_DST": "syscall", + "syscall.RTAX_FEATURES": "syscall", + "syscall.RTAX_FEATURE_ALLFRAG": "syscall", + "syscall.RTAX_FEATURE_ECN": "syscall", + "syscall.RTAX_FEATURE_SACK": "syscall", + "syscall.RTAX_FEATURE_TIMESTAMP": "syscall", + "syscall.RTAX_GATEWAY": "syscall", + "syscall.RTAX_GENMASK": "syscall", + "syscall.RTAX_HOPLIMIT": "syscall", + "syscall.RTAX_IFA": "syscall", + "syscall.RTAX_IFP": "syscall", + "syscall.RTAX_INITCWND": "syscall", + "syscall.RTAX_INITRWND": "syscall", + "syscall.RTAX_LABEL": "syscall", + "syscall.RTAX_LOCK": "syscall", + "syscall.RTAX_MAX": "syscall", + "syscall.RTAX_MTU": "syscall", + "syscall.RTAX_NETMASK": "syscall", + "syscall.RTAX_REORDERING": "syscall", + "syscall.RTAX_RTO_MIN": "syscall", + "syscall.RTAX_RTT": "syscall", + "syscall.RTAX_RTTVAR": "syscall", + "syscall.RTAX_SRC": "syscall", + "syscall.RTAX_SRCMASK": "syscall", + "syscall.RTAX_SSTHRESH": "syscall", + "syscall.RTAX_TAG": "syscall", + "syscall.RTAX_UNSPEC": "syscall", + "syscall.RTAX_WINDOW": "syscall", + "syscall.RTA_ALIGNTO": "syscall", + "syscall.RTA_AUTHOR": "syscall", + "syscall.RTA_BRD": "syscall", + "syscall.RTA_CACHEINFO": "syscall", + "syscall.RTA_DST": "syscall", + "syscall.RTA_FLOW": "syscall", + "syscall.RTA_GATEWAY": "syscall", + "syscall.RTA_GENMASK": "syscall", + "syscall.RTA_IFA": "syscall", + "syscall.RTA_IFP": "syscall", + "syscall.RTA_IIF": "syscall", + "syscall.RTA_LABEL": "syscall", + "syscall.RTA_MAX": "syscall", + "syscall.RTA_METRICS": "syscall", + "syscall.RTA_MULTIPATH": "syscall", + "syscall.RTA_NETMASK": "syscall", + "syscall.RTA_OIF": "syscall", + "syscall.RTA_PREFSRC": "syscall", + "syscall.RTA_PRIORITY": "syscall", + "syscall.RTA_SRC": "syscall", + "syscall.RTA_SRCMASK": "syscall", + "syscall.RTA_TABLE": "syscall", + "syscall.RTA_TAG": "syscall", + "syscall.RTA_UNSPEC": "syscall", + "syscall.RTCF_DIRECTSRC": "syscall", + "syscall.RTCF_DOREDIRECT": "syscall", + "syscall.RTCF_LOG": "syscall", + "syscall.RTCF_MASQ": "syscall", + "syscall.RTCF_NAT": "syscall", + "syscall.RTCF_VALVE": "syscall", + "syscall.RTF_ADDRCLASSMASK": "syscall", + "syscall.RTF_ADDRCONF": "syscall", + "syscall.RTF_ALLONLINK": "syscall", + "syscall.RTF_ANNOUNCE": "syscall", + "syscall.RTF_BLACKHOLE": "syscall", + "syscall.RTF_BROADCAST": "syscall", + "syscall.RTF_CACHE": "syscall", + "syscall.RTF_CLONED": "syscall", + "syscall.RTF_CLONING": "syscall", + "syscall.RTF_CONDEMNED": "syscall", + "syscall.RTF_DEFAULT": "syscall", + "syscall.RTF_DELCLONE": "syscall", + "syscall.RTF_DONE": "syscall", + "syscall.RTF_DYNAMIC": "syscall", + "syscall.RTF_FLOW": "syscall", + "syscall.RTF_FMASK": "syscall", + "syscall.RTF_GATEWAY": "syscall", + "syscall.RTF_GWFLAG_COMPAT": "syscall", + "syscall.RTF_HOST": "syscall", + "syscall.RTF_IFREF": "syscall", + "syscall.RTF_IFSCOPE": "syscall", + "syscall.RTF_INTERFACE": "syscall", + "syscall.RTF_IRTT": "syscall", + "syscall.RTF_LINKRT": "syscall", + "syscall.RTF_LLDATA": "syscall", + "syscall.RTF_LLINFO": "syscall", + "syscall.RTF_LOCAL": "syscall", + "syscall.RTF_MASK": "syscall", + "syscall.RTF_MODIFIED": "syscall", + "syscall.RTF_MPATH": "syscall", + "syscall.RTF_MPLS": "syscall", + "syscall.RTF_MSS": "syscall", + "syscall.RTF_MTU": "syscall", + "syscall.RTF_MULTICAST": "syscall", + "syscall.RTF_NAT": "syscall", + "syscall.RTF_NOFORWARD": "syscall", + "syscall.RTF_NONEXTHOP": "syscall", + "syscall.RTF_NOPMTUDISC": "syscall", + "syscall.RTF_PERMANENT_ARP": "syscall", + "syscall.RTF_PINNED": "syscall", + "syscall.RTF_POLICY": "syscall", + "syscall.RTF_PRCLONING": "syscall", + "syscall.RTF_PROTO1": "syscall", + "syscall.RTF_PROTO2": "syscall", + "syscall.RTF_PROTO3": "syscall", + "syscall.RTF_REINSTATE": "syscall", + "syscall.RTF_REJECT": "syscall", + "syscall.RTF_RNH_LOCKED": "syscall", + "syscall.RTF_SOURCE": "syscall", + "syscall.RTF_SRC": "syscall", + "syscall.RTF_STATIC": "syscall", + "syscall.RTF_STICKY": "syscall", + "syscall.RTF_THROW": "syscall", + "syscall.RTF_TUNNEL": "syscall", + "syscall.RTF_UP": "syscall", + "syscall.RTF_USETRAILERS": "syscall", + "syscall.RTF_WASCLONED": "syscall", + "syscall.RTF_WINDOW": "syscall", + "syscall.RTF_XRESOLVE": "syscall", + "syscall.RTM_ADD": "syscall", + "syscall.RTM_BASE": "syscall", + "syscall.RTM_CHANGE": "syscall", + "syscall.RTM_CHGADDR": "syscall", + "syscall.RTM_DELACTION": "syscall", + "syscall.RTM_DELADDR": "syscall", + "syscall.RTM_DELADDRLABEL": "syscall", + "syscall.RTM_DELETE": "syscall", + "syscall.RTM_DELLINK": "syscall", + "syscall.RTM_DELMADDR": "syscall", + "syscall.RTM_DELNEIGH": "syscall", + "syscall.RTM_DELQDISC": "syscall", + "syscall.RTM_DELROUTE": "syscall", + "syscall.RTM_DELRULE": "syscall", + "syscall.RTM_DELTCLASS": "syscall", + "syscall.RTM_DELTFILTER": "syscall", + "syscall.RTM_DESYNC": "syscall", + "syscall.RTM_F_CLONED": "syscall", + "syscall.RTM_F_EQUALIZE": "syscall", + "syscall.RTM_F_NOTIFY": "syscall", + "syscall.RTM_F_PREFIX": "syscall", + "syscall.RTM_GET": "syscall", + "syscall.RTM_GET2": "syscall", + "syscall.RTM_GETACTION": "syscall", + "syscall.RTM_GETADDR": "syscall", + "syscall.RTM_GETADDRLABEL": "syscall", + "syscall.RTM_GETANYCAST": "syscall", + "syscall.RTM_GETDCB": "syscall", + "syscall.RTM_GETLINK": "syscall", + "syscall.RTM_GETMULTICAST": "syscall", + "syscall.RTM_GETNEIGH": "syscall", + "syscall.RTM_GETNEIGHTBL": "syscall", + "syscall.RTM_GETQDISC": "syscall", + "syscall.RTM_GETROUTE": "syscall", + "syscall.RTM_GETRULE": "syscall", + "syscall.RTM_GETTCLASS": "syscall", + "syscall.RTM_GETTFILTER": "syscall", + "syscall.RTM_IEEE80211": "syscall", + "syscall.RTM_IFANNOUNCE": "syscall", + "syscall.RTM_IFINFO": "syscall", + "syscall.RTM_IFINFO2": "syscall", + "syscall.RTM_LLINFO_UPD": "syscall", + "syscall.RTM_LOCK": "syscall", + "syscall.RTM_LOSING": "syscall", + "syscall.RTM_MAX": "syscall", + "syscall.RTM_MAXSIZE": "syscall", + "syscall.RTM_MISS": "syscall", + "syscall.RTM_NEWACTION": "syscall", + "syscall.RTM_NEWADDR": "syscall", + "syscall.RTM_NEWADDRLABEL": "syscall", + "syscall.RTM_NEWLINK": "syscall", + "syscall.RTM_NEWMADDR": "syscall", + "syscall.RTM_NEWMADDR2": "syscall", + "syscall.RTM_NEWNDUSEROPT": "syscall", + "syscall.RTM_NEWNEIGH": "syscall", + "syscall.RTM_NEWNEIGHTBL": "syscall", + "syscall.RTM_NEWPREFIX": "syscall", + "syscall.RTM_NEWQDISC": "syscall", + "syscall.RTM_NEWROUTE": "syscall", + "syscall.RTM_NEWRULE": "syscall", + "syscall.RTM_NEWTCLASS": "syscall", + "syscall.RTM_NEWTFILTER": "syscall", + "syscall.RTM_NR_FAMILIES": "syscall", + "syscall.RTM_NR_MSGTYPES": "syscall", + "syscall.RTM_OIFINFO": "syscall", + "syscall.RTM_OLDADD": "syscall", + "syscall.RTM_OLDDEL": "syscall", + "syscall.RTM_OOIFINFO": "syscall", + "syscall.RTM_REDIRECT": "syscall", + "syscall.RTM_RESOLVE": "syscall", + "syscall.RTM_RTTUNIT": "syscall", + "syscall.RTM_SETDCB": "syscall", + "syscall.RTM_SETGATE": "syscall", + "syscall.RTM_SETLINK": "syscall", + "syscall.RTM_SETNEIGHTBL": "syscall", + "syscall.RTM_VERSION": "syscall", + "syscall.RTNH_ALIGNTO": "syscall", + "syscall.RTNH_F_DEAD": "syscall", + "syscall.RTNH_F_ONLINK": "syscall", + "syscall.RTNH_F_PERVASIVE": "syscall", + "syscall.RTNLGRP_IPV4_IFADDR": "syscall", + "syscall.RTNLGRP_IPV4_MROUTE": "syscall", + "syscall.RTNLGRP_IPV4_ROUTE": "syscall", + "syscall.RTNLGRP_IPV4_RULE": "syscall", + "syscall.RTNLGRP_IPV6_IFADDR": "syscall", + "syscall.RTNLGRP_IPV6_IFINFO": "syscall", + "syscall.RTNLGRP_IPV6_MROUTE": "syscall", + "syscall.RTNLGRP_IPV6_PREFIX": "syscall", + "syscall.RTNLGRP_IPV6_ROUTE": "syscall", + "syscall.RTNLGRP_IPV6_RULE": "syscall", + "syscall.RTNLGRP_LINK": "syscall", + "syscall.RTNLGRP_ND_USEROPT": "syscall", + "syscall.RTNLGRP_NEIGH": "syscall", + "syscall.RTNLGRP_NONE": "syscall", + "syscall.RTNLGRP_NOTIFY": "syscall", + "syscall.RTNLGRP_TC": "syscall", + "syscall.RTN_ANYCAST": "syscall", + "syscall.RTN_BLACKHOLE": "syscall", + "syscall.RTN_BROADCAST": "syscall", + "syscall.RTN_LOCAL": "syscall", + "syscall.RTN_MAX": "syscall", + "syscall.RTN_MULTICAST": "syscall", + "syscall.RTN_NAT": "syscall", + "syscall.RTN_PROHIBIT": "syscall", + "syscall.RTN_THROW": "syscall", + "syscall.RTN_UNICAST": "syscall", + "syscall.RTN_UNREACHABLE": "syscall", + "syscall.RTN_UNSPEC": "syscall", + "syscall.RTN_XRESOLVE": "syscall", + "syscall.RTPROT_BIRD": "syscall", + "syscall.RTPROT_BOOT": "syscall", + "syscall.RTPROT_DHCP": "syscall", + "syscall.RTPROT_DNROUTED": "syscall", + "syscall.RTPROT_GATED": "syscall", + "syscall.RTPROT_KERNEL": "syscall", + "syscall.RTPROT_MRT": "syscall", + "syscall.RTPROT_NTK": "syscall", + "syscall.RTPROT_RA": "syscall", + "syscall.RTPROT_REDIRECT": "syscall", + "syscall.RTPROT_STATIC": "syscall", + "syscall.RTPROT_UNSPEC": "syscall", + "syscall.RTPROT_XORP": "syscall", + "syscall.RTPROT_ZEBRA": "syscall", + "syscall.RTV_EXPIRE": "syscall", + "syscall.RTV_HOPCOUNT": "syscall", + "syscall.RTV_MTU": "syscall", + "syscall.RTV_RPIPE": "syscall", + "syscall.RTV_RTT": "syscall", + "syscall.RTV_RTTVAR": "syscall", + "syscall.RTV_SPIPE": "syscall", + "syscall.RTV_SSTHRESH": "syscall", + "syscall.RTV_WEIGHT": "syscall", + "syscall.RT_CACHING_CONTEXT": "syscall", + "syscall.RT_CLASS_DEFAULT": "syscall", + "syscall.RT_CLASS_LOCAL": "syscall", + "syscall.RT_CLASS_MAIN": "syscall", + "syscall.RT_CLASS_MAX": "syscall", + "syscall.RT_CLASS_UNSPEC": "syscall", + "syscall.RT_DEFAULT_FIB": "syscall", + "syscall.RT_NORTREF": "syscall", + "syscall.RT_SCOPE_HOST": "syscall", + "syscall.RT_SCOPE_LINK": "syscall", + "syscall.RT_SCOPE_NOWHERE": "syscall", + "syscall.RT_SCOPE_SITE": "syscall", + "syscall.RT_SCOPE_UNIVERSE": "syscall", + "syscall.RT_TABLEID_MAX": "syscall", + "syscall.RT_TABLE_COMPAT": "syscall", + "syscall.RT_TABLE_DEFAULT": "syscall", + "syscall.RT_TABLE_LOCAL": "syscall", + "syscall.RT_TABLE_MAIN": "syscall", + "syscall.RT_TABLE_MAX": "syscall", + "syscall.RT_TABLE_UNSPEC": "syscall", + "syscall.RUSAGE_CHILDREN": "syscall", + "syscall.RUSAGE_SELF": "syscall", + "syscall.RUSAGE_THREAD": "syscall", + "syscall.Radvisory_t": "syscall", + "syscall.RawConn": "syscall", + "syscall.RawSockaddr": "syscall", + "syscall.RawSockaddrAny": "syscall", + "syscall.RawSockaddrDatalink": "syscall", + "syscall.RawSockaddrInet4": "syscall", + "syscall.RawSockaddrInet6": "syscall", + "syscall.RawSockaddrLinklayer": "syscall", + "syscall.RawSockaddrNetlink": "syscall", + "syscall.RawSockaddrUnix": "syscall", + "syscall.RawSyscall": "syscall", + "syscall.RawSyscall6": "syscall", + "syscall.Read": "syscall", + "syscall.ReadConsole": "syscall", + "syscall.ReadDirectoryChanges": "syscall", + "syscall.ReadDirent": "syscall", + "syscall.ReadFile": "syscall", + "syscall.Readlink": "syscall", + "syscall.Reboot": "syscall", + "syscall.Recvfrom": "syscall", + "syscall.Recvmsg": "syscall", + "syscall.RegCloseKey": "syscall", + "syscall.RegEnumKeyEx": "syscall", + "syscall.RegOpenKeyEx": "syscall", + "syscall.RegQueryInfoKey": "syscall", + "syscall.RegQueryValueEx": "syscall", + "syscall.RemoveDirectory": "syscall", + "syscall.Removexattr": "syscall", + "syscall.Rename": "syscall", + "syscall.Renameat": "syscall", + "syscall.Revoke": "syscall", + "syscall.Rlimit": "syscall", + "syscall.Rmdir": "syscall", + "syscall.RouteMessage": "syscall", + "syscall.RouteRIB": "syscall", + "syscall.RtAttr": "syscall", + "syscall.RtGenmsg": "syscall", + "syscall.RtMetrics": "syscall", + "syscall.RtMsg": "syscall", + "syscall.RtMsghdr": "syscall", + "syscall.RtNexthop": "syscall", + "syscall.Rusage": "syscall", + "syscall.SCM_BINTIME": "syscall", + "syscall.SCM_CREDENTIALS": "syscall", + "syscall.SCM_CREDS": "syscall", + "syscall.SCM_RIGHTS": "syscall", + "syscall.SCM_TIMESTAMP": "syscall", + "syscall.SCM_TIMESTAMPING": "syscall", + "syscall.SCM_TIMESTAMPNS": "syscall", + "syscall.SCM_TIMESTAMP_MONOTONIC": "syscall", + "syscall.SHUT_RD": "syscall", + "syscall.SHUT_RDWR": "syscall", + "syscall.SHUT_WR": "syscall", + "syscall.SID": "syscall", + "syscall.SIDAndAttributes": "syscall", + "syscall.SIGABRT": "syscall", + "syscall.SIGALRM": "syscall", + "syscall.SIGBUS": "syscall", + "syscall.SIGCHLD": "syscall", + "syscall.SIGCLD": "syscall", + "syscall.SIGCONT": "syscall", + "syscall.SIGEMT": "syscall", + "syscall.SIGFPE": "syscall", + "syscall.SIGHUP": "syscall", + "syscall.SIGILL": "syscall", + "syscall.SIGINFO": "syscall", + "syscall.SIGINT": "syscall", + "syscall.SIGIO": "syscall", + "syscall.SIGIOT": "syscall", + "syscall.SIGKILL": "syscall", + "syscall.SIGLIBRT": "syscall", + "syscall.SIGLWP": "syscall", + "syscall.SIGPIPE": "syscall", + "syscall.SIGPOLL": "syscall", + "syscall.SIGPROF": "syscall", + "syscall.SIGPWR": "syscall", + "syscall.SIGQUIT": "syscall", + "syscall.SIGSEGV": "syscall", + "syscall.SIGSTKFLT": "syscall", + "syscall.SIGSTOP": "syscall", + "syscall.SIGSYS": "syscall", + "syscall.SIGTERM": "syscall", + "syscall.SIGTHR": "syscall", + "syscall.SIGTRAP": "syscall", + "syscall.SIGTSTP": "syscall", + "syscall.SIGTTIN": "syscall", + "syscall.SIGTTOU": "syscall", + "syscall.SIGUNUSED": "syscall", + "syscall.SIGURG": "syscall", + "syscall.SIGUSR1": "syscall", + "syscall.SIGUSR2": "syscall", + "syscall.SIGVTALRM": "syscall", + "syscall.SIGWINCH": "syscall", + "syscall.SIGXCPU": "syscall", + "syscall.SIGXFSZ": "syscall", + "syscall.SIOCADDDLCI": "syscall", + "syscall.SIOCADDMULTI": "syscall", + "syscall.SIOCADDRT": "syscall", + "syscall.SIOCAIFADDR": "syscall", + "syscall.SIOCAIFGROUP": "syscall", + "syscall.SIOCALIFADDR": "syscall", + "syscall.SIOCARPIPLL": "syscall", + "syscall.SIOCATMARK": "syscall", + "syscall.SIOCAUTOADDR": "syscall", + "syscall.SIOCAUTONETMASK": "syscall", + "syscall.SIOCBRDGADD": "syscall", + "syscall.SIOCBRDGADDS": "syscall", + "syscall.SIOCBRDGARL": "syscall", + "syscall.SIOCBRDGDADDR": "syscall", + "syscall.SIOCBRDGDEL": "syscall", + "syscall.SIOCBRDGDELS": "syscall", + "syscall.SIOCBRDGFLUSH": "syscall", + "syscall.SIOCBRDGFRL": "syscall", + "syscall.SIOCBRDGGCACHE": "syscall", + "syscall.SIOCBRDGGFD": "syscall", + "syscall.SIOCBRDGGHT": "syscall", + "syscall.SIOCBRDGGIFFLGS": "syscall", + "syscall.SIOCBRDGGMA": "syscall", + "syscall.SIOCBRDGGPARAM": "syscall", + "syscall.SIOCBRDGGPRI": "syscall", + "syscall.SIOCBRDGGRL": "syscall", + "syscall.SIOCBRDGGSIFS": "syscall", + "syscall.SIOCBRDGGTO": "syscall", + "syscall.SIOCBRDGIFS": "syscall", + "syscall.SIOCBRDGRTS": "syscall", + "syscall.SIOCBRDGSADDR": "syscall", + "syscall.SIOCBRDGSCACHE": "syscall", + "syscall.SIOCBRDGSFD": "syscall", + "syscall.SIOCBRDGSHT": "syscall", + "syscall.SIOCBRDGSIFCOST": "syscall", + "syscall.SIOCBRDGSIFFLGS": "syscall", + "syscall.SIOCBRDGSIFPRIO": "syscall", + "syscall.SIOCBRDGSMA": "syscall", + "syscall.SIOCBRDGSPRI": "syscall", + "syscall.SIOCBRDGSPROTO": "syscall", + "syscall.SIOCBRDGSTO": "syscall", + "syscall.SIOCBRDGSTXHC": "syscall", + "syscall.SIOCDARP": "syscall", + "syscall.SIOCDELDLCI": "syscall", + "syscall.SIOCDELMULTI": "syscall", + "syscall.SIOCDELRT": "syscall", + "syscall.SIOCDEVPRIVATE": "syscall", + "syscall.SIOCDIFADDR": "syscall", + "syscall.SIOCDIFGROUP": "syscall", + "syscall.SIOCDIFPHYADDR": "syscall", + "syscall.SIOCDLIFADDR": "syscall", + "syscall.SIOCDRARP": "syscall", + "syscall.SIOCGARP": "syscall", + "syscall.SIOCGDRVSPEC": "syscall", + "syscall.SIOCGETKALIVE": "syscall", + "syscall.SIOCGETLABEL": "syscall", + "syscall.SIOCGETPFLOW": "syscall", + "syscall.SIOCGETPFSYNC": "syscall", + "syscall.SIOCGETSGCNT": "syscall", + "syscall.SIOCGETVIFCNT": "syscall", + "syscall.SIOCGETVLAN": "syscall", + "syscall.SIOCGHIWAT": "syscall", + "syscall.SIOCGIFADDR": "syscall", + "syscall.SIOCGIFADDRPREF": "syscall", + "syscall.SIOCGIFALIAS": "syscall", + "syscall.SIOCGIFALTMTU": "syscall", + "syscall.SIOCGIFASYNCMAP": "syscall", + "syscall.SIOCGIFBOND": "syscall", + "syscall.SIOCGIFBR": "syscall", + "syscall.SIOCGIFBRDADDR": "syscall", + "syscall.SIOCGIFCAP": "syscall", + "syscall.SIOCGIFCONF": "syscall", + "syscall.SIOCGIFCOUNT": "syscall", + "syscall.SIOCGIFDATA": "syscall", + "syscall.SIOCGIFDESCR": "syscall", + "syscall.SIOCGIFDEVMTU": "syscall", + "syscall.SIOCGIFDLT": "syscall", + "syscall.SIOCGIFDSTADDR": "syscall", + "syscall.SIOCGIFENCAP": "syscall", + "syscall.SIOCGIFFIB": "syscall", + "syscall.SIOCGIFFLAGS": "syscall", + "syscall.SIOCGIFGATTR": "syscall", + "syscall.SIOCGIFGENERIC": "syscall", + "syscall.SIOCGIFGMEMB": "syscall", + "syscall.SIOCGIFGROUP": "syscall", + "syscall.SIOCGIFHARDMTU": "syscall", + "syscall.SIOCGIFHWADDR": "syscall", + "syscall.SIOCGIFINDEX": "syscall", + "syscall.SIOCGIFKPI": "syscall", + "syscall.SIOCGIFMAC": "syscall", + "syscall.SIOCGIFMAP": "syscall", + "syscall.SIOCGIFMEDIA": "syscall", + "syscall.SIOCGIFMEM": "syscall", + "syscall.SIOCGIFMETRIC": "syscall", + "syscall.SIOCGIFMTU": "syscall", + "syscall.SIOCGIFNAME": "syscall", + "syscall.SIOCGIFNETMASK": "syscall", + "syscall.SIOCGIFPDSTADDR": "syscall", + "syscall.SIOCGIFPFLAGS": "syscall", + "syscall.SIOCGIFPHYS": "syscall", + "syscall.SIOCGIFPRIORITY": "syscall", + "syscall.SIOCGIFPSRCADDR": "syscall", + "syscall.SIOCGIFRDOMAIN": "syscall", + "syscall.SIOCGIFRTLABEL": "syscall", + "syscall.SIOCGIFSLAVE": "syscall", + "syscall.SIOCGIFSTATUS": "syscall", + "syscall.SIOCGIFTIMESLOT": "syscall", + "syscall.SIOCGIFTXQLEN": "syscall", + "syscall.SIOCGIFVLAN": "syscall", + "syscall.SIOCGIFWAKEFLAGS": "syscall", + "syscall.SIOCGIFXFLAGS": "syscall", + "syscall.SIOCGLIFADDR": "syscall", + "syscall.SIOCGLIFPHYADDR": "syscall", + "syscall.SIOCGLIFPHYRTABLE": "syscall", + "syscall.SIOCGLIFPHYTTL": "syscall", + "syscall.SIOCGLINKSTR": "syscall", + "syscall.SIOCGLOWAT": "syscall", + "syscall.SIOCGPGRP": "syscall", + "syscall.SIOCGPRIVATE_0": "syscall", + "syscall.SIOCGPRIVATE_1": "syscall", + "syscall.SIOCGRARP": "syscall", + "syscall.SIOCGSPPPPARAMS": "syscall", + "syscall.SIOCGSTAMP": "syscall", + "syscall.SIOCGSTAMPNS": "syscall", + "syscall.SIOCGVH": "syscall", + "syscall.SIOCGVNETID": "syscall", + "syscall.SIOCIFCREATE": "syscall", + "syscall.SIOCIFCREATE2": "syscall", + "syscall.SIOCIFDESTROY": "syscall", + "syscall.SIOCIFGCLONERS": "syscall", + "syscall.SIOCINITIFADDR": "syscall", + "syscall.SIOCPROTOPRIVATE": "syscall", + "syscall.SIOCRSLVMULTI": "syscall", + "syscall.SIOCRTMSG": "syscall", + "syscall.SIOCSARP": "syscall", + "syscall.SIOCSDRVSPEC": "syscall", + "syscall.SIOCSETKALIVE": "syscall", + "syscall.SIOCSETLABEL": "syscall", + "syscall.SIOCSETPFLOW": "syscall", + "syscall.SIOCSETPFSYNC": "syscall", + "syscall.SIOCSETVLAN": "syscall", + "syscall.SIOCSHIWAT": "syscall", + "syscall.SIOCSIFADDR": "syscall", + "syscall.SIOCSIFADDRPREF": "syscall", + "syscall.SIOCSIFALTMTU": "syscall", + "syscall.SIOCSIFASYNCMAP": "syscall", + "syscall.SIOCSIFBOND": "syscall", + "syscall.SIOCSIFBR": "syscall", + "syscall.SIOCSIFBRDADDR": "syscall", + "syscall.SIOCSIFCAP": "syscall", + "syscall.SIOCSIFDESCR": "syscall", + "syscall.SIOCSIFDSTADDR": "syscall", + "syscall.SIOCSIFENCAP": "syscall", + "syscall.SIOCSIFFIB": "syscall", + "syscall.SIOCSIFFLAGS": "syscall", + "syscall.SIOCSIFGATTR": "syscall", + "syscall.SIOCSIFGENERIC": "syscall", + "syscall.SIOCSIFHWADDR": "syscall", + "syscall.SIOCSIFHWBROADCAST": "syscall", + "syscall.SIOCSIFKPI": "syscall", + "syscall.SIOCSIFLINK": "syscall", + "syscall.SIOCSIFLLADDR": "syscall", + "syscall.SIOCSIFMAC": "syscall", + "syscall.SIOCSIFMAP": "syscall", + "syscall.SIOCSIFMEDIA": "syscall", + "syscall.SIOCSIFMEM": "syscall", + "syscall.SIOCSIFMETRIC": "syscall", + "syscall.SIOCSIFMTU": "syscall", + "syscall.SIOCSIFNAME": "syscall", + "syscall.SIOCSIFNETMASK": "syscall", + "syscall.SIOCSIFPFLAGS": "syscall", + "syscall.SIOCSIFPHYADDR": "syscall", + "syscall.SIOCSIFPHYS": "syscall", + "syscall.SIOCSIFPRIORITY": "syscall", + "syscall.SIOCSIFRDOMAIN": "syscall", + "syscall.SIOCSIFRTLABEL": "syscall", + "syscall.SIOCSIFRVNET": "syscall", + "syscall.SIOCSIFSLAVE": "syscall", + "syscall.SIOCSIFTIMESLOT": "syscall", + "syscall.SIOCSIFTXQLEN": "syscall", + "syscall.SIOCSIFVLAN": "syscall", + "syscall.SIOCSIFVNET": "syscall", + "syscall.SIOCSIFXFLAGS": "syscall", + "syscall.SIOCSLIFPHYADDR": "syscall", + "syscall.SIOCSLIFPHYRTABLE": "syscall", + "syscall.SIOCSLIFPHYTTL": "syscall", + "syscall.SIOCSLINKSTR": "syscall", + "syscall.SIOCSLOWAT": "syscall", + "syscall.SIOCSPGRP": "syscall", + "syscall.SIOCSRARP": "syscall", + "syscall.SIOCSSPPPPARAMS": "syscall", + "syscall.SIOCSVH": "syscall", + "syscall.SIOCSVNETID": "syscall", + "syscall.SIOCZIFDATA": "syscall", + "syscall.SIO_GET_EXTENSION_FUNCTION_POINTER": "syscall", + "syscall.SIO_GET_INTERFACE_LIST": "syscall", + "syscall.SIO_KEEPALIVE_VALS": "syscall", + "syscall.SIO_UDP_CONNRESET": "syscall", + "syscall.SOCK_CLOEXEC": "syscall", + "syscall.SOCK_DCCP": "syscall", + "syscall.SOCK_DGRAM": "syscall", + "syscall.SOCK_FLAGS_MASK": "syscall", + "syscall.SOCK_MAXADDRLEN": "syscall", + "syscall.SOCK_NONBLOCK": "syscall", + "syscall.SOCK_NOSIGPIPE": "syscall", + "syscall.SOCK_PACKET": "syscall", + "syscall.SOCK_RAW": "syscall", + "syscall.SOCK_RDM": "syscall", + "syscall.SOCK_SEQPACKET": "syscall", + "syscall.SOCK_STREAM": "syscall", + "syscall.SOL_AAL": "syscall", + "syscall.SOL_ATM": "syscall", + "syscall.SOL_DECNET": "syscall", + "syscall.SOL_ICMPV6": "syscall", + "syscall.SOL_IP": "syscall", + "syscall.SOL_IPV6": "syscall", + "syscall.SOL_IRDA": "syscall", + "syscall.SOL_PACKET": "syscall", + "syscall.SOL_RAW": "syscall", + "syscall.SOL_SOCKET": "syscall", + "syscall.SOL_TCP": "syscall", + "syscall.SOL_X25": "syscall", + "syscall.SOMAXCONN": "syscall", + "syscall.SO_ACCEPTCONN": "syscall", + "syscall.SO_ACCEPTFILTER": "syscall", + "syscall.SO_ATTACH_FILTER": "syscall", + "syscall.SO_BINDANY": "syscall", + "syscall.SO_BINDTODEVICE": "syscall", + "syscall.SO_BINTIME": "syscall", + "syscall.SO_BROADCAST": "syscall", + "syscall.SO_BSDCOMPAT": "syscall", + "syscall.SO_DEBUG": "syscall", + "syscall.SO_DETACH_FILTER": "syscall", + "syscall.SO_DOMAIN": "syscall", + "syscall.SO_DONTROUTE": "syscall", + "syscall.SO_DONTTRUNC": "syscall", + "syscall.SO_ERROR": "syscall", + "syscall.SO_KEEPALIVE": "syscall", + "syscall.SO_LABEL": "syscall", + "syscall.SO_LINGER": "syscall", + "syscall.SO_LINGER_SEC": "syscall", + "syscall.SO_LISTENINCQLEN": "syscall", + "syscall.SO_LISTENQLEN": "syscall", + "syscall.SO_LISTENQLIMIT": "syscall", + "syscall.SO_MARK": "syscall", + "syscall.SO_NETPROC": "syscall", + "syscall.SO_NKE": "syscall", + "syscall.SO_NOADDRERR": "syscall", + "syscall.SO_NOHEADER": "syscall", + "syscall.SO_NOSIGPIPE": "syscall", + "syscall.SO_NOTIFYCONFLICT": "syscall", + "syscall.SO_NO_CHECK": "syscall", + "syscall.SO_NO_DDP": "syscall", + "syscall.SO_NO_OFFLOAD": "syscall", + "syscall.SO_NP_EXTENSIONS": "syscall", + "syscall.SO_NREAD": "syscall", + "syscall.SO_NWRITE": "syscall", + "syscall.SO_OOBINLINE": "syscall", + "syscall.SO_OVERFLOWED": "syscall", + "syscall.SO_PASSCRED": "syscall", + "syscall.SO_PASSSEC": "syscall", + "syscall.SO_PEERCRED": "syscall", + "syscall.SO_PEERLABEL": "syscall", + "syscall.SO_PEERNAME": "syscall", + "syscall.SO_PEERSEC": "syscall", + "syscall.SO_PRIORITY": "syscall", + "syscall.SO_PROTOCOL": "syscall", + "syscall.SO_PROTOTYPE": "syscall", + "syscall.SO_RANDOMPORT": "syscall", + "syscall.SO_RCVBUF": "syscall", + "syscall.SO_RCVBUFFORCE": "syscall", + "syscall.SO_RCVLOWAT": "syscall", + "syscall.SO_RCVTIMEO": "syscall", + "syscall.SO_RESTRICTIONS": "syscall", + "syscall.SO_RESTRICT_DENYIN": "syscall", + "syscall.SO_RESTRICT_DENYOUT": "syscall", + "syscall.SO_RESTRICT_DENYSET": "syscall", + "syscall.SO_REUSEADDR": "syscall", + "syscall.SO_REUSEPORT": "syscall", + "syscall.SO_REUSESHAREUID": "syscall", + "syscall.SO_RTABLE": "syscall", + "syscall.SO_RXQ_OVFL": "syscall", + "syscall.SO_SECURITY_AUTHENTICATION": "syscall", + "syscall.SO_SECURITY_ENCRYPTION_NETWORK": "syscall", + "syscall.SO_SECURITY_ENCRYPTION_TRANSPORT": "syscall", + "syscall.SO_SETFIB": "syscall", + "syscall.SO_SNDBUF": "syscall", + "syscall.SO_SNDBUFFORCE": "syscall", + "syscall.SO_SNDLOWAT": "syscall", + "syscall.SO_SNDTIMEO": "syscall", + "syscall.SO_SPLICE": "syscall", + "syscall.SO_TIMESTAMP": "syscall", + "syscall.SO_TIMESTAMPING": "syscall", + "syscall.SO_TIMESTAMPNS": "syscall", + "syscall.SO_TIMESTAMP_MONOTONIC": "syscall", + "syscall.SO_TYPE": "syscall", + "syscall.SO_UPCALLCLOSEWAIT": "syscall", + "syscall.SO_UPDATE_ACCEPT_CONTEXT": "syscall", + "syscall.SO_UPDATE_CONNECT_CONTEXT": "syscall", + "syscall.SO_USELOOPBACK": "syscall", + "syscall.SO_USER_COOKIE": "syscall", + "syscall.SO_VENDOR": "syscall", + "syscall.SO_WANTMORE": "syscall", + "syscall.SO_WANTOOBFLAG": "syscall", + "syscall.SSLExtraCertChainPolicyPara": "syscall", + "syscall.STANDARD_RIGHTS_ALL": "syscall", + "syscall.STANDARD_RIGHTS_EXECUTE": "syscall", + "syscall.STANDARD_RIGHTS_READ": "syscall", + "syscall.STANDARD_RIGHTS_REQUIRED": "syscall", + "syscall.STANDARD_RIGHTS_WRITE": "syscall", + "syscall.STARTF_USESHOWWINDOW": "syscall", + "syscall.STARTF_USESTDHANDLES": "syscall", + "syscall.STD_ERROR_HANDLE": "syscall", + "syscall.STD_INPUT_HANDLE": "syscall", + "syscall.STD_OUTPUT_HANDLE": "syscall", + "syscall.SUBLANG_ENGLISH_US": "syscall", + "syscall.SW_FORCEMINIMIZE": "syscall", + "syscall.SW_HIDE": "syscall", + "syscall.SW_MAXIMIZE": "syscall", + "syscall.SW_MINIMIZE": "syscall", + "syscall.SW_NORMAL": "syscall", + "syscall.SW_RESTORE": "syscall", + "syscall.SW_SHOW": "syscall", + "syscall.SW_SHOWDEFAULT": "syscall", + "syscall.SW_SHOWMAXIMIZED": "syscall", + "syscall.SW_SHOWMINIMIZED": "syscall", + "syscall.SW_SHOWMINNOACTIVE": "syscall", + "syscall.SW_SHOWNA": "syscall", + "syscall.SW_SHOWNOACTIVATE": "syscall", + "syscall.SW_SHOWNORMAL": "syscall", + "syscall.SYMBOLIC_LINK_FLAG_DIRECTORY": "syscall", + "syscall.SYNCHRONIZE": "syscall", + "syscall.SYSCTL_VERSION": "syscall", + "syscall.SYSCTL_VERS_0": "syscall", + "syscall.SYSCTL_VERS_1": "syscall", + "syscall.SYSCTL_VERS_MASK": "syscall", + "syscall.SYS_ABORT2": "syscall", + "syscall.SYS_ACCEPT": "syscall", + "syscall.SYS_ACCEPT4": "syscall", + "syscall.SYS_ACCEPT_NOCANCEL": "syscall", + "syscall.SYS_ACCESS": "syscall", + "syscall.SYS_ACCESS_EXTENDED": "syscall", + "syscall.SYS_ACCT": "syscall", + "syscall.SYS_ADD_KEY": "syscall", + "syscall.SYS_ADD_PROFIL": "syscall", + "syscall.SYS_ADJFREQ": "syscall", + "syscall.SYS_ADJTIME": "syscall", + "syscall.SYS_ADJTIMEX": "syscall", + "syscall.SYS_AFS_SYSCALL": "syscall", + "syscall.SYS_AIO_CANCEL": "syscall", + "syscall.SYS_AIO_ERROR": "syscall", + "syscall.SYS_AIO_FSYNC": "syscall", + "syscall.SYS_AIO_READ": "syscall", + "syscall.SYS_AIO_RETURN": "syscall", + "syscall.SYS_AIO_SUSPEND": "syscall", + "syscall.SYS_AIO_SUSPEND_NOCANCEL": "syscall", + "syscall.SYS_AIO_WRITE": "syscall", + "syscall.SYS_ALARM": "syscall", + "syscall.SYS_ARCH_PRCTL": "syscall", + "syscall.SYS_ARM_FADVISE64_64": "syscall", + "syscall.SYS_ARM_SYNC_FILE_RANGE": "syscall", + "syscall.SYS_ATGETMSG": "syscall", + "syscall.SYS_ATPGETREQ": "syscall", + "syscall.SYS_ATPGETRSP": "syscall", + "syscall.SYS_ATPSNDREQ": "syscall", + "syscall.SYS_ATPSNDRSP": "syscall", + "syscall.SYS_ATPUTMSG": "syscall", + "syscall.SYS_ATSOCKET": "syscall", + "syscall.SYS_AUDIT": "syscall", + "syscall.SYS_AUDITCTL": "syscall", + "syscall.SYS_AUDITON": "syscall", + "syscall.SYS_AUDIT_SESSION_JOIN": "syscall", + "syscall.SYS_AUDIT_SESSION_PORT": "syscall", + "syscall.SYS_AUDIT_SESSION_SELF": "syscall", + "syscall.SYS_BDFLUSH": "syscall", + "syscall.SYS_BIND": "syscall", + "syscall.SYS_BINDAT": "syscall", + "syscall.SYS_BREAK": "syscall", + "syscall.SYS_BRK": "syscall", + "syscall.SYS_BSDTHREAD_CREATE": "syscall", + "syscall.SYS_BSDTHREAD_REGISTER": "syscall", + "syscall.SYS_BSDTHREAD_TERMINATE": "syscall", + "syscall.SYS_CAPGET": "syscall", + "syscall.SYS_CAPSET": "syscall", + "syscall.SYS_CAP_ENTER": "syscall", + "syscall.SYS_CAP_FCNTLS_GET": "syscall", + "syscall.SYS_CAP_FCNTLS_LIMIT": "syscall", + "syscall.SYS_CAP_GETMODE": "syscall", + "syscall.SYS_CAP_GETRIGHTS": "syscall", + "syscall.SYS_CAP_IOCTLS_GET": "syscall", + "syscall.SYS_CAP_IOCTLS_LIMIT": "syscall", + "syscall.SYS_CAP_NEW": "syscall", + "syscall.SYS_CAP_RIGHTS_GET": "syscall", + "syscall.SYS_CAP_RIGHTS_LIMIT": "syscall", + "syscall.SYS_CHDIR": "syscall", + "syscall.SYS_CHFLAGS": "syscall", + "syscall.SYS_CHFLAGSAT": "syscall", + "syscall.SYS_CHMOD": "syscall", + "syscall.SYS_CHMOD_EXTENDED": "syscall", + "syscall.SYS_CHOWN": "syscall", + "syscall.SYS_CHOWN32": "syscall", + "syscall.SYS_CHROOT": "syscall", + "syscall.SYS_CHUD": "syscall", + "syscall.SYS_CLOCK_ADJTIME": "syscall", + "syscall.SYS_CLOCK_GETCPUCLOCKID2": "syscall", + "syscall.SYS_CLOCK_GETRES": "syscall", + "syscall.SYS_CLOCK_GETTIME": "syscall", + "syscall.SYS_CLOCK_NANOSLEEP": "syscall", + "syscall.SYS_CLOCK_SETTIME": "syscall", + "syscall.SYS_CLONE": "syscall", + "syscall.SYS_CLOSE": "syscall", + "syscall.SYS_CLOSEFROM": "syscall", + "syscall.SYS_CLOSE_NOCANCEL": "syscall", + "syscall.SYS_CONNECT": "syscall", + "syscall.SYS_CONNECTAT": "syscall", + "syscall.SYS_CONNECT_NOCANCEL": "syscall", + "syscall.SYS_COPYFILE": "syscall", + "syscall.SYS_CPUSET": "syscall", + "syscall.SYS_CPUSET_GETAFFINITY": "syscall", + "syscall.SYS_CPUSET_GETID": "syscall", + "syscall.SYS_CPUSET_SETAFFINITY": "syscall", + "syscall.SYS_CPUSET_SETID": "syscall", + "syscall.SYS_CREAT": "syscall", + "syscall.SYS_CREATE_MODULE": "syscall", + "syscall.SYS_CSOPS": "syscall", + "syscall.SYS_DELETE": "syscall", + "syscall.SYS_DELETE_MODULE": "syscall", + "syscall.SYS_DUP": "syscall", + "syscall.SYS_DUP2": "syscall", + "syscall.SYS_DUP3": "syscall", + "syscall.SYS_EACCESS": "syscall", + "syscall.SYS_EPOLL_CREATE": "syscall", + "syscall.SYS_EPOLL_CREATE1": "syscall", + "syscall.SYS_EPOLL_CTL": "syscall", + "syscall.SYS_EPOLL_CTL_OLD": "syscall", + "syscall.SYS_EPOLL_PWAIT": "syscall", + "syscall.SYS_EPOLL_WAIT": "syscall", + "syscall.SYS_EPOLL_WAIT_OLD": "syscall", + "syscall.SYS_EVENTFD": "syscall", + "syscall.SYS_EVENTFD2": "syscall", + "syscall.SYS_EXCHANGEDATA": "syscall", + "syscall.SYS_EXECVE": "syscall", + "syscall.SYS_EXIT": "syscall", + "syscall.SYS_EXIT_GROUP": "syscall", + "syscall.SYS_EXTATTRCTL": "syscall", + "syscall.SYS_EXTATTR_DELETE_FD": "syscall", + "syscall.SYS_EXTATTR_DELETE_FILE": "syscall", + "syscall.SYS_EXTATTR_DELETE_LINK": "syscall", + "syscall.SYS_EXTATTR_GET_FD": "syscall", + "syscall.SYS_EXTATTR_GET_FILE": "syscall", + "syscall.SYS_EXTATTR_GET_LINK": "syscall", + "syscall.SYS_EXTATTR_LIST_FD": "syscall", + "syscall.SYS_EXTATTR_LIST_FILE": "syscall", + "syscall.SYS_EXTATTR_LIST_LINK": "syscall", + "syscall.SYS_EXTATTR_SET_FD": "syscall", + "syscall.SYS_EXTATTR_SET_FILE": "syscall", + "syscall.SYS_EXTATTR_SET_LINK": "syscall", + "syscall.SYS_FACCESSAT": "syscall", + "syscall.SYS_FADVISE64": "syscall", + "syscall.SYS_FADVISE64_64": "syscall", + "syscall.SYS_FALLOCATE": "syscall", + "syscall.SYS_FANOTIFY_INIT": "syscall", + "syscall.SYS_FANOTIFY_MARK": "syscall", + "syscall.SYS_FCHDIR": "syscall", + "syscall.SYS_FCHFLAGS": "syscall", + "syscall.SYS_FCHMOD": "syscall", + "syscall.SYS_FCHMODAT": "syscall", + "syscall.SYS_FCHMOD_EXTENDED": "syscall", + "syscall.SYS_FCHOWN": "syscall", + "syscall.SYS_FCHOWN32": "syscall", + "syscall.SYS_FCHOWNAT": "syscall", + "syscall.SYS_FCHROOT": "syscall", + "syscall.SYS_FCNTL": "syscall", + "syscall.SYS_FCNTL64": "syscall", + "syscall.SYS_FCNTL_NOCANCEL": "syscall", + "syscall.SYS_FDATASYNC": "syscall", + "syscall.SYS_FEXECVE": "syscall", + "syscall.SYS_FFCLOCK_GETCOUNTER": "syscall", + "syscall.SYS_FFCLOCK_GETESTIMATE": "syscall", + "syscall.SYS_FFCLOCK_SETESTIMATE": "syscall", + "syscall.SYS_FFSCTL": "syscall", + "syscall.SYS_FGETATTRLIST": "syscall", + "syscall.SYS_FGETXATTR": "syscall", + "syscall.SYS_FHOPEN": "syscall", + "syscall.SYS_FHSTAT": "syscall", + "syscall.SYS_FHSTATFS": "syscall", + "syscall.SYS_FILEPORT_MAKEFD": "syscall", + "syscall.SYS_FILEPORT_MAKEPORT": "syscall", + "syscall.SYS_FKTRACE": "syscall", + "syscall.SYS_FLISTXATTR": "syscall", + "syscall.SYS_FLOCK": "syscall", + "syscall.SYS_FORK": "syscall", + "syscall.SYS_FPATHCONF": "syscall", + "syscall.SYS_FREEBSD6_FTRUNCATE": "syscall", + "syscall.SYS_FREEBSD6_LSEEK": "syscall", + "syscall.SYS_FREEBSD6_MMAP": "syscall", + "syscall.SYS_FREEBSD6_PREAD": "syscall", + "syscall.SYS_FREEBSD6_PWRITE": "syscall", + "syscall.SYS_FREEBSD6_TRUNCATE": "syscall", + "syscall.SYS_FREMOVEXATTR": "syscall", + "syscall.SYS_FSCTL": "syscall", + "syscall.SYS_FSETATTRLIST": "syscall", + "syscall.SYS_FSETXATTR": "syscall", + "syscall.SYS_FSGETPATH": "syscall", + "syscall.SYS_FSTAT": "syscall", + "syscall.SYS_FSTAT64": "syscall", + "syscall.SYS_FSTAT64_EXTENDED": "syscall", + "syscall.SYS_FSTATAT": "syscall", + "syscall.SYS_FSTATAT64": "syscall", + "syscall.SYS_FSTATFS": "syscall", + "syscall.SYS_FSTATFS64": "syscall", + "syscall.SYS_FSTATV": "syscall", + "syscall.SYS_FSTATVFS1": "syscall", + "syscall.SYS_FSTAT_EXTENDED": "syscall", + "syscall.SYS_FSYNC": "syscall", + "syscall.SYS_FSYNC_NOCANCEL": "syscall", + "syscall.SYS_FSYNC_RANGE": "syscall", + "syscall.SYS_FTIME": "syscall", + "syscall.SYS_FTRUNCATE": "syscall", + "syscall.SYS_FTRUNCATE64": "syscall", + "syscall.SYS_FUTEX": "syscall", + "syscall.SYS_FUTIMENS": "syscall", + "syscall.SYS_FUTIMES": "syscall", + "syscall.SYS_FUTIMESAT": "syscall", + "syscall.SYS_GETATTRLIST": "syscall", + "syscall.SYS_GETAUDIT": "syscall", + "syscall.SYS_GETAUDIT_ADDR": "syscall", + "syscall.SYS_GETAUID": "syscall", + "syscall.SYS_GETCONTEXT": "syscall", + "syscall.SYS_GETCPU": "syscall", + "syscall.SYS_GETCWD": "syscall", + "syscall.SYS_GETDENTS": "syscall", + "syscall.SYS_GETDENTS64": "syscall", + "syscall.SYS_GETDIRENTRIES": "syscall", + "syscall.SYS_GETDIRENTRIES64": "syscall", + "syscall.SYS_GETDIRENTRIESATTR": "syscall", + "syscall.SYS_GETDTABLECOUNT": "syscall", + "syscall.SYS_GETDTABLESIZE": "syscall", + "syscall.SYS_GETEGID": "syscall", + "syscall.SYS_GETEGID32": "syscall", + "syscall.SYS_GETEUID": "syscall", + "syscall.SYS_GETEUID32": "syscall", + "syscall.SYS_GETFH": "syscall", + "syscall.SYS_GETFSSTAT": "syscall", + "syscall.SYS_GETFSSTAT64": "syscall", + "syscall.SYS_GETGID": "syscall", + "syscall.SYS_GETGID32": "syscall", + "syscall.SYS_GETGROUPS": "syscall", + "syscall.SYS_GETGROUPS32": "syscall", + "syscall.SYS_GETHOSTUUID": "syscall", + "syscall.SYS_GETITIMER": "syscall", + "syscall.SYS_GETLCID": "syscall", + "syscall.SYS_GETLOGIN": "syscall", + "syscall.SYS_GETLOGINCLASS": "syscall", + "syscall.SYS_GETPEERNAME": "syscall", + "syscall.SYS_GETPGID": "syscall", + "syscall.SYS_GETPGRP": "syscall", + "syscall.SYS_GETPID": "syscall", + "syscall.SYS_GETPMSG": "syscall", + "syscall.SYS_GETPPID": "syscall", + "syscall.SYS_GETPRIORITY": "syscall", + "syscall.SYS_GETRESGID": "syscall", + "syscall.SYS_GETRESGID32": "syscall", + "syscall.SYS_GETRESUID": "syscall", + "syscall.SYS_GETRESUID32": "syscall", + "syscall.SYS_GETRLIMIT": "syscall", + "syscall.SYS_GETRTABLE": "syscall", + "syscall.SYS_GETRUSAGE": "syscall", + "syscall.SYS_GETSGROUPS": "syscall", + "syscall.SYS_GETSID": "syscall", + "syscall.SYS_GETSOCKNAME": "syscall", + "syscall.SYS_GETSOCKOPT": "syscall", + "syscall.SYS_GETTHRID": "syscall", + "syscall.SYS_GETTID": "syscall", + "syscall.SYS_GETTIMEOFDAY": "syscall", + "syscall.SYS_GETUID": "syscall", + "syscall.SYS_GETUID32": "syscall", + "syscall.SYS_GETVFSSTAT": "syscall", + "syscall.SYS_GETWGROUPS": "syscall", + "syscall.SYS_GETXATTR": "syscall", + "syscall.SYS_GET_KERNEL_SYMS": "syscall", + "syscall.SYS_GET_MEMPOLICY": "syscall", + "syscall.SYS_GET_ROBUST_LIST": "syscall", + "syscall.SYS_GET_THREAD_AREA": "syscall", + "syscall.SYS_GTTY": "syscall", + "syscall.SYS_IDENTITYSVC": "syscall", + "syscall.SYS_IDLE": "syscall", + "syscall.SYS_INITGROUPS": "syscall", + "syscall.SYS_INIT_MODULE": "syscall", + "syscall.SYS_INOTIFY_ADD_WATCH": "syscall", + "syscall.SYS_INOTIFY_INIT": "syscall", + "syscall.SYS_INOTIFY_INIT1": "syscall", + "syscall.SYS_INOTIFY_RM_WATCH": "syscall", + "syscall.SYS_IOCTL": "syscall", + "syscall.SYS_IOPERM": "syscall", + "syscall.SYS_IOPL": "syscall", + "syscall.SYS_IOPOLICYSYS": "syscall", + "syscall.SYS_IOPRIO_GET": "syscall", + "syscall.SYS_IOPRIO_SET": "syscall", + "syscall.SYS_IO_CANCEL": "syscall", + "syscall.SYS_IO_DESTROY": "syscall", + "syscall.SYS_IO_GETEVENTS": "syscall", + "syscall.SYS_IO_SETUP": "syscall", + "syscall.SYS_IO_SUBMIT": "syscall", + "syscall.SYS_IPC": "syscall", + "syscall.SYS_ISSETUGID": "syscall", + "syscall.SYS_JAIL": "syscall", + "syscall.SYS_JAIL_ATTACH": "syscall", + "syscall.SYS_JAIL_GET": "syscall", + "syscall.SYS_JAIL_REMOVE": "syscall", + "syscall.SYS_JAIL_SET": "syscall", + "syscall.SYS_KDEBUG_TRACE": "syscall", + "syscall.SYS_KENV": "syscall", + "syscall.SYS_KEVENT": "syscall", + "syscall.SYS_KEVENT64": "syscall", + "syscall.SYS_KEXEC_LOAD": "syscall", + "syscall.SYS_KEYCTL": "syscall", + "syscall.SYS_KILL": "syscall", + "syscall.SYS_KLDFIND": "syscall", + "syscall.SYS_KLDFIRSTMOD": "syscall", + "syscall.SYS_KLDLOAD": "syscall", + "syscall.SYS_KLDNEXT": "syscall", + "syscall.SYS_KLDSTAT": "syscall", + "syscall.SYS_KLDSYM": "syscall", + "syscall.SYS_KLDUNLOAD": "syscall", + "syscall.SYS_KLDUNLOADF": "syscall", + "syscall.SYS_KQUEUE": "syscall", + "syscall.SYS_KQUEUE1": "syscall", + "syscall.SYS_KTIMER_CREATE": "syscall", + "syscall.SYS_KTIMER_DELETE": "syscall", + "syscall.SYS_KTIMER_GETOVERRUN": "syscall", + "syscall.SYS_KTIMER_GETTIME": "syscall", + "syscall.SYS_KTIMER_SETTIME": "syscall", + "syscall.SYS_KTRACE": "syscall", + "syscall.SYS_LCHFLAGS": "syscall", + "syscall.SYS_LCHMOD": "syscall", + "syscall.SYS_LCHOWN": "syscall", + "syscall.SYS_LCHOWN32": "syscall", + "syscall.SYS_LGETFH": "syscall", + "syscall.SYS_LGETXATTR": "syscall", + "syscall.SYS_LINK": "syscall", + "syscall.SYS_LINKAT": "syscall", + "syscall.SYS_LIO_LISTIO": "syscall", + "syscall.SYS_LISTEN": "syscall", + "syscall.SYS_LISTXATTR": "syscall", + "syscall.SYS_LLISTXATTR": "syscall", + "syscall.SYS_LOCK": "syscall", + "syscall.SYS_LOOKUP_DCOOKIE": "syscall", + "syscall.SYS_LPATHCONF": "syscall", + "syscall.SYS_LREMOVEXATTR": "syscall", + "syscall.SYS_LSEEK": "syscall", + "syscall.SYS_LSETXATTR": "syscall", + "syscall.SYS_LSTAT": "syscall", + "syscall.SYS_LSTAT64": "syscall", + "syscall.SYS_LSTAT64_EXTENDED": "syscall", + "syscall.SYS_LSTATV": "syscall", + "syscall.SYS_LSTAT_EXTENDED": "syscall", + "syscall.SYS_LUTIMES": "syscall", + "syscall.SYS_MAC_SYSCALL": "syscall", + "syscall.SYS_MADVISE": "syscall", + "syscall.SYS_MADVISE1": "syscall", + "syscall.SYS_MAXSYSCALL": "syscall", + "syscall.SYS_MBIND": "syscall", + "syscall.SYS_MIGRATE_PAGES": "syscall", + "syscall.SYS_MINCORE": "syscall", + "syscall.SYS_MINHERIT": "syscall", + "syscall.SYS_MKCOMPLEX": "syscall", + "syscall.SYS_MKDIR": "syscall", + "syscall.SYS_MKDIRAT": "syscall", + "syscall.SYS_MKDIR_EXTENDED": "syscall", + "syscall.SYS_MKFIFO": "syscall", + "syscall.SYS_MKFIFOAT": "syscall", + "syscall.SYS_MKFIFO_EXTENDED": "syscall", + "syscall.SYS_MKNOD": "syscall", + "syscall.SYS_MKNODAT": "syscall", + "syscall.SYS_MLOCK": "syscall", + "syscall.SYS_MLOCKALL": "syscall", + "syscall.SYS_MMAP": "syscall", + "syscall.SYS_MMAP2": "syscall", + "syscall.SYS_MODCTL": "syscall", + "syscall.SYS_MODFIND": "syscall", + "syscall.SYS_MODFNEXT": "syscall", + "syscall.SYS_MODIFY_LDT": "syscall", + "syscall.SYS_MODNEXT": "syscall", + "syscall.SYS_MODSTAT": "syscall", + "syscall.SYS_MODWATCH": "syscall", + "syscall.SYS_MOUNT": "syscall", + "syscall.SYS_MOVE_PAGES": "syscall", + "syscall.SYS_MPROTECT": "syscall", + "syscall.SYS_MPX": "syscall", + "syscall.SYS_MQUERY": "syscall", + "syscall.SYS_MQ_GETSETATTR": "syscall", + "syscall.SYS_MQ_NOTIFY": "syscall", + "syscall.SYS_MQ_OPEN": "syscall", + "syscall.SYS_MQ_TIMEDRECEIVE": "syscall", + "syscall.SYS_MQ_TIMEDSEND": "syscall", + "syscall.SYS_MQ_UNLINK": "syscall", + "syscall.SYS_MREMAP": "syscall", + "syscall.SYS_MSGCTL": "syscall", + "syscall.SYS_MSGGET": "syscall", + "syscall.SYS_MSGRCV": "syscall", + "syscall.SYS_MSGRCV_NOCANCEL": "syscall", + "syscall.SYS_MSGSND": "syscall", + "syscall.SYS_MSGSND_NOCANCEL": "syscall", + "syscall.SYS_MSGSYS": "syscall", + "syscall.SYS_MSYNC": "syscall", + "syscall.SYS_MSYNC_NOCANCEL": "syscall", + "syscall.SYS_MUNLOCK": "syscall", + "syscall.SYS_MUNLOCKALL": "syscall", + "syscall.SYS_MUNMAP": "syscall", + "syscall.SYS_NAME_TO_HANDLE_AT": "syscall", + "syscall.SYS_NANOSLEEP": "syscall", + "syscall.SYS_NEWFSTATAT": "syscall", + "syscall.SYS_NFSCLNT": "syscall", + "syscall.SYS_NFSSERVCTL": "syscall", + "syscall.SYS_NFSSVC": "syscall", + "syscall.SYS_NFSTAT": "syscall", + "syscall.SYS_NICE": "syscall", + "syscall.SYS_NLSTAT": "syscall", + "syscall.SYS_NMOUNT": "syscall", + "syscall.SYS_NSTAT": "syscall", + "syscall.SYS_NTP_ADJTIME": "syscall", + "syscall.SYS_NTP_GETTIME": "syscall", + "syscall.SYS_OABI_SYSCALL_BASE": "syscall", + "syscall.SYS_OBREAK": "syscall", + "syscall.SYS_OLDFSTAT": "syscall", + "syscall.SYS_OLDLSTAT": "syscall", + "syscall.SYS_OLDOLDUNAME": "syscall", + "syscall.SYS_OLDSTAT": "syscall", + "syscall.SYS_OLDUNAME": "syscall", + "syscall.SYS_OPEN": "syscall", + "syscall.SYS_OPENAT": "syscall", + "syscall.SYS_OPENBSD_POLL": "syscall", + "syscall.SYS_OPEN_BY_HANDLE_AT": "syscall", + "syscall.SYS_OPEN_EXTENDED": "syscall", + "syscall.SYS_OPEN_NOCANCEL": "syscall", + "syscall.SYS_OVADVISE": "syscall", + "syscall.SYS_PACCEPT": "syscall", + "syscall.SYS_PATHCONF": "syscall", + "syscall.SYS_PAUSE": "syscall", + "syscall.SYS_PCICONFIG_IOBASE": "syscall", + "syscall.SYS_PCICONFIG_READ": "syscall", + "syscall.SYS_PCICONFIG_WRITE": "syscall", + "syscall.SYS_PDFORK": "syscall", + "syscall.SYS_PDGETPID": "syscall", + "syscall.SYS_PDKILL": "syscall", + "syscall.SYS_PERF_EVENT_OPEN": "syscall", + "syscall.SYS_PERSONALITY": "syscall", + "syscall.SYS_PID_HIBERNATE": "syscall", + "syscall.SYS_PID_RESUME": "syscall", + "syscall.SYS_PID_SHUTDOWN_SOCKETS": "syscall", + "syscall.SYS_PID_SUSPEND": "syscall", + "syscall.SYS_PIPE": "syscall", + "syscall.SYS_PIPE2": "syscall", + "syscall.SYS_PIVOT_ROOT": "syscall", + "syscall.SYS_PMC_CONTROL": "syscall", + "syscall.SYS_PMC_GET_INFO": "syscall", + "syscall.SYS_POLL": "syscall", + "syscall.SYS_POLLTS": "syscall", + "syscall.SYS_POLL_NOCANCEL": "syscall", + "syscall.SYS_POSIX_FADVISE": "syscall", + "syscall.SYS_POSIX_FALLOCATE": "syscall", + "syscall.SYS_POSIX_OPENPT": "syscall", + "syscall.SYS_POSIX_SPAWN": "syscall", + "syscall.SYS_PPOLL": "syscall", + "syscall.SYS_PRCTL": "syscall", + "syscall.SYS_PREAD": "syscall", + "syscall.SYS_PREAD64": "syscall", + "syscall.SYS_PREADV": "syscall", + "syscall.SYS_PREAD_NOCANCEL": "syscall", + "syscall.SYS_PRLIMIT64": "syscall", + "syscall.SYS_PROCCTL": "syscall", + "syscall.SYS_PROCESS_POLICY": "syscall", + "syscall.SYS_PROCESS_VM_READV": "syscall", + "syscall.SYS_PROCESS_VM_WRITEV": "syscall", + "syscall.SYS_PROC_INFO": "syscall", + "syscall.SYS_PROF": "syscall", + "syscall.SYS_PROFIL": "syscall", + "syscall.SYS_PSELECT": "syscall", + "syscall.SYS_PSELECT6": "syscall", + "syscall.SYS_PSET_ASSIGN": "syscall", + "syscall.SYS_PSET_CREATE": "syscall", + "syscall.SYS_PSET_DESTROY": "syscall", + "syscall.SYS_PSYNCH_CVBROAD": "syscall", + "syscall.SYS_PSYNCH_CVCLRPREPOST": "syscall", + "syscall.SYS_PSYNCH_CVSIGNAL": "syscall", + "syscall.SYS_PSYNCH_CVWAIT": "syscall", + "syscall.SYS_PSYNCH_MUTEXDROP": "syscall", + "syscall.SYS_PSYNCH_MUTEXWAIT": "syscall", + "syscall.SYS_PSYNCH_RW_DOWNGRADE": "syscall", + "syscall.SYS_PSYNCH_RW_LONGRDLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_RDLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_UNLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_UNLOCK2": "syscall", + "syscall.SYS_PSYNCH_RW_UPGRADE": "syscall", + "syscall.SYS_PSYNCH_RW_WRLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_YIELDWRLOCK": "syscall", + "syscall.SYS_PTRACE": "syscall", + "syscall.SYS_PUTPMSG": "syscall", + "syscall.SYS_PWRITE": "syscall", + "syscall.SYS_PWRITE64": "syscall", + "syscall.SYS_PWRITEV": "syscall", + "syscall.SYS_PWRITE_NOCANCEL": "syscall", + "syscall.SYS_QUERY_MODULE": "syscall", + "syscall.SYS_QUOTACTL": "syscall", + "syscall.SYS_RASCTL": "syscall", + "syscall.SYS_RCTL_ADD_RULE": "syscall", + "syscall.SYS_RCTL_GET_LIMITS": "syscall", + "syscall.SYS_RCTL_GET_RACCT": "syscall", + "syscall.SYS_RCTL_GET_RULES": "syscall", + "syscall.SYS_RCTL_REMOVE_RULE": "syscall", + "syscall.SYS_READ": "syscall", + "syscall.SYS_READAHEAD": "syscall", + "syscall.SYS_READDIR": "syscall", + "syscall.SYS_READLINK": "syscall", + "syscall.SYS_READLINKAT": "syscall", + "syscall.SYS_READV": "syscall", + "syscall.SYS_READV_NOCANCEL": "syscall", + "syscall.SYS_READ_NOCANCEL": "syscall", + "syscall.SYS_REBOOT": "syscall", + "syscall.SYS_RECV": "syscall", + "syscall.SYS_RECVFROM": "syscall", + "syscall.SYS_RECVFROM_NOCANCEL": "syscall", + "syscall.SYS_RECVMMSG": "syscall", + "syscall.SYS_RECVMSG": "syscall", + "syscall.SYS_RECVMSG_NOCANCEL": "syscall", + "syscall.SYS_REMAP_FILE_PAGES": "syscall", + "syscall.SYS_REMOVEXATTR": "syscall", + "syscall.SYS_RENAME": "syscall", + "syscall.SYS_RENAMEAT": "syscall", + "syscall.SYS_REQUEST_KEY": "syscall", + "syscall.SYS_RESTART_SYSCALL": "syscall", + "syscall.SYS_REVOKE": "syscall", + "syscall.SYS_RFORK": "syscall", + "syscall.SYS_RMDIR": "syscall", + "syscall.SYS_RTPRIO": "syscall", + "syscall.SYS_RTPRIO_THREAD": "syscall", + "syscall.SYS_RT_SIGACTION": "syscall", + "syscall.SYS_RT_SIGPENDING": "syscall", + "syscall.SYS_RT_SIGPROCMASK": "syscall", + "syscall.SYS_RT_SIGQUEUEINFO": "syscall", + "syscall.SYS_RT_SIGRETURN": "syscall", + "syscall.SYS_RT_SIGSUSPEND": "syscall", + "syscall.SYS_RT_SIGTIMEDWAIT": "syscall", + "syscall.SYS_RT_TGSIGQUEUEINFO": "syscall", + "syscall.SYS_SBRK": "syscall", + "syscall.SYS_SCHED_GETAFFINITY": "syscall", + "syscall.SYS_SCHED_GETPARAM": "syscall", + "syscall.SYS_SCHED_GETSCHEDULER": "syscall", + "syscall.SYS_SCHED_GET_PRIORITY_MAX": "syscall", + "syscall.SYS_SCHED_GET_PRIORITY_MIN": "syscall", + "syscall.SYS_SCHED_RR_GET_INTERVAL": "syscall", + "syscall.SYS_SCHED_SETAFFINITY": "syscall", + "syscall.SYS_SCHED_SETPARAM": "syscall", + "syscall.SYS_SCHED_SETSCHEDULER": "syscall", + "syscall.SYS_SCHED_YIELD": "syscall", + "syscall.SYS_SCTP_GENERIC_RECVMSG": "syscall", + "syscall.SYS_SCTP_GENERIC_SENDMSG": "syscall", + "syscall.SYS_SCTP_GENERIC_SENDMSG_IOV": "syscall", + "syscall.SYS_SCTP_PEELOFF": "syscall", + "syscall.SYS_SEARCHFS": "syscall", + "syscall.SYS_SECURITY": "syscall", + "syscall.SYS_SELECT": "syscall", + "syscall.SYS_SELECT_NOCANCEL": "syscall", + "syscall.SYS_SEMCONFIG": "syscall", + "syscall.SYS_SEMCTL": "syscall", + "syscall.SYS_SEMGET": "syscall", + "syscall.SYS_SEMOP": "syscall", + "syscall.SYS_SEMSYS": "syscall", + "syscall.SYS_SEMTIMEDOP": "syscall", + "syscall.SYS_SEM_CLOSE": "syscall", + "syscall.SYS_SEM_DESTROY": "syscall", + "syscall.SYS_SEM_GETVALUE": "syscall", + "syscall.SYS_SEM_INIT": "syscall", + "syscall.SYS_SEM_OPEN": "syscall", + "syscall.SYS_SEM_POST": "syscall", + "syscall.SYS_SEM_TRYWAIT": "syscall", + "syscall.SYS_SEM_UNLINK": "syscall", + "syscall.SYS_SEM_WAIT": "syscall", + "syscall.SYS_SEM_WAIT_NOCANCEL": "syscall", + "syscall.SYS_SEND": "syscall", + "syscall.SYS_SENDFILE": "syscall", + "syscall.SYS_SENDFILE64": "syscall", + "syscall.SYS_SENDMMSG": "syscall", + "syscall.SYS_SENDMSG": "syscall", + "syscall.SYS_SENDMSG_NOCANCEL": "syscall", + "syscall.SYS_SENDTO": "syscall", + "syscall.SYS_SENDTO_NOCANCEL": "syscall", + "syscall.SYS_SETATTRLIST": "syscall", + "syscall.SYS_SETAUDIT": "syscall", + "syscall.SYS_SETAUDIT_ADDR": "syscall", + "syscall.SYS_SETAUID": "syscall", + "syscall.SYS_SETCONTEXT": "syscall", + "syscall.SYS_SETDOMAINNAME": "syscall", + "syscall.SYS_SETEGID": "syscall", + "syscall.SYS_SETEUID": "syscall", + "syscall.SYS_SETFIB": "syscall", + "syscall.SYS_SETFSGID": "syscall", + "syscall.SYS_SETFSGID32": "syscall", + "syscall.SYS_SETFSUID": "syscall", + "syscall.SYS_SETFSUID32": "syscall", + "syscall.SYS_SETGID": "syscall", + "syscall.SYS_SETGID32": "syscall", + "syscall.SYS_SETGROUPS": "syscall", + "syscall.SYS_SETGROUPS32": "syscall", + "syscall.SYS_SETHOSTNAME": "syscall", + "syscall.SYS_SETITIMER": "syscall", + "syscall.SYS_SETLCID": "syscall", + "syscall.SYS_SETLOGIN": "syscall", + "syscall.SYS_SETLOGINCLASS": "syscall", + "syscall.SYS_SETNS": "syscall", + "syscall.SYS_SETPGID": "syscall", + "syscall.SYS_SETPRIORITY": "syscall", + "syscall.SYS_SETPRIVEXEC": "syscall", + "syscall.SYS_SETREGID": "syscall", + "syscall.SYS_SETREGID32": "syscall", + "syscall.SYS_SETRESGID": "syscall", + "syscall.SYS_SETRESGID32": "syscall", + "syscall.SYS_SETRESUID": "syscall", + "syscall.SYS_SETRESUID32": "syscall", + "syscall.SYS_SETREUID": "syscall", + "syscall.SYS_SETREUID32": "syscall", + "syscall.SYS_SETRLIMIT": "syscall", + "syscall.SYS_SETRTABLE": "syscall", + "syscall.SYS_SETSGROUPS": "syscall", + "syscall.SYS_SETSID": "syscall", + "syscall.SYS_SETSOCKOPT": "syscall", + "syscall.SYS_SETTID": "syscall", + "syscall.SYS_SETTID_WITH_PID": "syscall", + "syscall.SYS_SETTIMEOFDAY": "syscall", + "syscall.SYS_SETUID": "syscall", + "syscall.SYS_SETUID32": "syscall", + "syscall.SYS_SETWGROUPS": "syscall", + "syscall.SYS_SETXATTR": "syscall", + "syscall.SYS_SET_MEMPOLICY": "syscall", + "syscall.SYS_SET_ROBUST_LIST": "syscall", + "syscall.SYS_SET_THREAD_AREA": "syscall", + "syscall.SYS_SET_TID_ADDRESS": "syscall", + "syscall.SYS_SGETMASK": "syscall", + "syscall.SYS_SHARED_REGION_CHECK_NP": "syscall", + "syscall.SYS_SHARED_REGION_MAP_AND_SLIDE_NP": "syscall", + "syscall.SYS_SHMAT": "syscall", + "syscall.SYS_SHMCTL": "syscall", + "syscall.SYS_SHMDT": "syscall", + "syscall.SYS_SHMGET": "syscall", + "syscall.SYS_SHMSYS": "syscall", + "syscall.SYS_SHM_OPEN": "syscall", + "syscall.SYS_SHM_UNLINK": "syscall", + "syscall.SYS_SHUTDOWN": "syscall", + "syscall.SYS_SIGACTION": "syscall", + "syscall.SYS_SIGALTSTACK": "syscall", + "syscall.SYS_SIGNAL": "syscall", + "syscall.SYS_SIGNALFD": "syscall", + "syscall.SYS_SIGNALFD4": "syscall", + "syscall.SYS_SIGPENDING": "syscall", + "syscall.SYS_SIGPROCMASK": "syscall", + "syscall.SYS_SIGQUEUE": "syscall", + "syscall.SYS_SIGQUEUEINFO": "syscall", + "syscall.SYS_SIGRETURN": "syscall", + "syscall.SYS_SIGSUSPEND": "syscall", + "syscall.SYS_SIGSUSPEND_NOCANCEL": "syscall", + "syscall.SYS_SIGTIMEDWAIT": "syscall", + "syscall.SYS_SIGWAIT": "syscall", + "syscall.SYS_SIGWAITINFO": "syscall", + "syscall.SYS_SOCKET": "syscall", + "syscall.SYS_SOCKETCALL": "syscall", + "syscall.SYS_SOCKETPAIR": "syscall", + "syscall.SYS_SPLICE": "syscall", + "syscall.SYS_SSETMASK": "syscall", + "syscall.SYS_SSTK": "syscall", + "syscall.SYS_STACK_SNAPSHOT": "syscall", + "syscall.SYS_STAT": "syscall", + "syscall.SYS_STAT64": "syscall", + "syscall.SYS_STAT64_EXTENDED": "syscall", + "syscall.SYS_STATFS": "syscall", + "syscall.SYS_STATFS64": "syscall", + "syscall.SYS_STATV": "syscall", + "syscall.SYS_STATVFS1": "syscall", + "syscall.SYS_STAT_EXTENDED": "syscall", + "syscall.SYS_STIME": "syscall", + "syscall.SYS_STTY": "syscall", + "syscall.SYS_SWAPCONTEXT": "syscall", + "syscall.SYS_SWAPCTL": "syscall", + "syscall.SYS_SWAPOFF": "syscall", + "syscall.SYS_SWAPON": "syscall", + "syscall.SYS_SYMLINK": "syscall", + "syscall.SYS_SYMLINKAT": "syscall", + "syscall.SYS_SYNC": "syscall", + "syscall.SYS_SYNCFS": "syscall", + "syscall.SYS_SYNC_FILE_RANGE": "syscall", + "syscall.SYS_SYSARCH": "syscall", + "syscall.SYS_SYSCALL": "syscall", + "syscall.SYS_SYSCALL_BASE": "syscall", + "syscall.SYS_SYSFS": "syscall", + "syscall.SYS_SYSINFO": "syscall", + "syscall.SYS_SYSLOG": "syscall", + "syscall.SYS_TEE": "syscall", + "syscall.SYS_TGKILL": "syscall", + "syscall.SYS_THREAD_SELFID": "syscall", + "syscall.SYS_THR_CREATE": "syscall", + "syscall.SYS_THR_EXIT": "syscall", + "syscall.SYS_THR_KILL": "syscall", + "syscall.SYS_THR_KILL2": "syscall", + "syscall.SYS_THR_NEW": "syscall", + "syscall.SYS_THR_SELF": "syscall", + "syscall.SYS_THR_SET_NAME": "syscall", + "syscall.SYS_THR_SUSPEND": "syscall", + "syscall.SYS_THR_WAKE": "syscall", + "syscall.SYS_TIME": "syscall", + "syscall.SYS_TIMERFD_CREATE": "syscall", + "syscall.SYS_TIMERFD_GETTIME": "syscall", + "syscall.SYS_TIMERFD_SETTIME": "syscall", + "syscall.SYS_TIMER_CREATE": "syscall", + "syscall.SYS_TIMER_DELETE": "syscall", + "syscall.SYS_TIMER_GETOVERRUN": "syscall", + "syscall.SYS_TIMER_GETTIME": "syscall", + "syscall.SYS_TIMER_SETTIME": "syscall", + "syscall.SYS_TIMES": "syscall", + "syscall.SYS_TKILL": "syscall", + "syscall.SYS_TRUNCATE": "syscall", + "syscall.SYS_TRUNCATE64": "syscall", + "syscall.SYS_TUXCALL": "syscall", + "syscall.SYS_UGETRLIMIT": "syscall", + "syscall.SYS_ULIMIT": "syscall", + "syscall.SYS_UMASK": "syscall", + "syscall.SYS_UMASK_EXTENDED": "syscall", + "syscall.SYS_UMOUNT": "syscall", + "syscall.SYS_UMOUNT2": "syscall", + "syscall.SYS_UNAME": "syscall", + "syscall.SYS_UNDELETE": "syscall", + "syscall.SYS_UNLINK": "syscall", + "syscall.SYS_UNLINKAT": "syscall", + "syscall.SYS_UNMOUNT": "syscall", + "syscall.SYS_UNSHARE": "syscall", + "syscall.SYS_USELIB": "syscall", + "syscall.SYS_USTAT": "syscall", + "syscall.SYS_UTIME": "syscall", + "syscall.SYS_UTIMENSAT": "syscall", + "syscall.SYS_UTIMES": "syscall", + "syscall.SYS_UTRACE": "syscall", + "syscall.SYS_UUIDGEN": "syscall", + "syscall.SYS_VADVISE": "syscall", + "syscall.SYS_VFORK": "syscall", + "syscall.SYS_VHANGUP": "syscall", + "syscall.SYS_VM86": "syscall", + "syscall.SYS_VM86OLD": "syscall", + "syscall.SYS_VMSPLICE": "syscall", + "syscall.SYS_VM_PRESSURE_MONITOR": "syscall", + "syscall.SYS_VSERVER": "syscall", + "syscall.SYS_WAIT4": "syscall", + "syscall.SYS_WAIT4_NOCANCEL": "syscall", + "syscall.SYS_WAIT6": "syscall", + "syscall.SYS_WAITEVENT": "syscall", + "syscall.SYS_WAITID": "syscall", + "syscall.SYS_WAITID_NOCANCEL": "syscall", + "syscall.SYS_WAITPID": "syscall", + "syscall.SYS_WATCHEVENT": "syscall", + "syscall.SYS_WORKQ_KERNRETURN": "syscall", + "syscall.SYS_WORKQ_OPEN": "syscall", + "syscall.SYS_WRITE": "syscall", + "syscall.SYS_WRITEV": "syscall", + "syscall.SYS_WRITEV_NOCANCEL": "syscall", + "syscall.SYS_WRITE_NOCANCEL": "syscall", + "syscall.SYS_YIELD": "syscall", + "syscall.SYS__LLSEEK": "syscall", + "syscall.SYS__LWP_CONTINUE": "syscall", + "syscall.SYS__LWP_CREATE": "syscall", + "syscall.SYS__LWP_CTL": "syscall", + "syscall.SYS__LWP_DETACH": "syscall", + "syscall.SYS__LWP_EXIT": "syscall", + "syscall.SYS__LWP_GETNAME": "syscall", + "syscall.SYS__LWP_GETPRIVATE": "syscall", + "syscall.SYS__LWP_KILL": "syscall", + "syscall.SYS__LWP_PARK": "syscall", + "syscall.SYS__LWP_SELF": "syscall", + "syscall.SYS__LWP_SETNAME": "syscall", + "syscall.SYS__LWP_SETPRIVATE": "syscall", + "syscall.SYS__LWP_SUSPEND": "syscall", + "syscall.SYS__LWP_UNPARK": "syscall", + "syscall.SYS__LWP_UNPARK_ALL": "syscall", + "syscall.SYS__LWP_WAIT": "syscall", + "syscall.SYS__LWP_WAKEUP": "syscall", + "syscall.SYS__NEWSELECT": "syscall", + "syscall.SYS__PSET_BIND": "syscall", + "syscall.SYS__SCHED_GETAFFINITY": "syscall", + "syscall.SYS__SCHED_GETPARAM": "syscall", + "syscall.SYS__SCHED_SETAFFINITY": "syscall", + "syscall.SYS__SCHED_SETPARAM": "syscall", + "syscall.SYS__SYSCTL": "syscall", + "syscall.SYS__UMTX_LOCK": "syscall", + "syscall.SYS__UMTX_OP": "syscall", + "syscall.SYS__UMTX_UNLOCK": "syscall", + "syscall.SYS___ACL_ACLCHECK_FD": "syscall", + "syscall.SYS___ACL_ACLCHECK_FILE": "syscall", + "syscall.SYS___ACL_ACLCHECK_LINK": "syscall", + "syscall.SYS___ACL_DELETE_FD": "syscall", + "syscall.SYS___ACL_DELETE_FILE": "syscall", + "syscall.SYS___ACL_DELETE_LINK": "syscall", + "syscall.SYS___ACL_GET_FD": "syscall", + "syscall.SYS___ACL_GET_FILE": "syscall", + "syscall.SYS___ACL_GET_LINK": "syscall", + "syscall.SYS___ACL_SET_FD": "syscall", + "syscall.SYS___ACL_SET_FILE": "syscall", + "syscall.SYS___ACL_SET_LINK": "syscall", + "syscall.SYS___CLONE": "syscall", + "syscall.SYS___DISABLE_THREADSIGNAL": "syscall", + "syscall.SYS___GETCWD": "syscall", + "syscall.SYS___GETLOGIN": "syscall", + "syscall.SYS___GET_TCB": "syscall", + "syscall.SYS___MAC_EXECVE": "syscall", + "syscall.SYS___MAC_GETFSSTAT": "syscall", + "syscall.SYS___MAC_GET_FD": "syscall", + "syscall.SYS___MAC_GET_FILE": "syscall", + "syscall.SYS___MAC_GET_LCID": "syscall", + "syscall.SYS___MAC_GET_LCTX": "syscall", + "syscall.SYS___MAC_GET_LINK": "syscall", + "syscall.SYS___MAC_GET_MOUNT": "syscall", + "syscall.SYS___MAC_GET_PID": "syscall", + "syscall.SYS___MAC_GET_PROC": "syscall", + "syscall.SYS___MAC_MOUNT": "syscall", + "syscall.SYS___MAC_SET_FD": "syscall", + "syscall.SYS___MAC_SET_FILE": "syscall", + "syscall.SYS___MAC_SET_LCTX": "syscall", + "syscall.SYS___MAC_SET_LINK": "syscall", + "syscall.SYS___MAC_SET_PROC": "syscall", + "syscall.SYS___MAC_SYSCALL": "syscall", + "syscall.SYS___OLD_SEMWAIT_SIGNAL": "syscall", + "syscall.SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": "syscall", + "syscall.SYS___POSIX_CHOWN": "syscall", + "syscall.SYS___POSIX_FCHOWN": "syscall", + "syscall.SYS___POSIX_LCHOWN": "syscall", + "syscall.SYS___POSIX_RENAME": "syscall", + "syscall.SYS___PTHREAD_CANCELED": "syscall", + "syscall.SYS___PTHREAD_CHDIR": "syscall", + "syscall.SYS___PTHREAD_FCHDIR": "syscall", + "syscall.SYS___PTHREAD_KILL": "syscall", + "syscall.SYS___PTHREAD_MARKCANCEL": "syscall", + "syscall.SYS___PTHREAD_SIGMASK": "syscall", + "syscall.SYS___QUOTACTL": "syscall", + "syscall.SYS___SEMCTL": "syscall", + "syscall.SYS___SEMWAIT_SIGNAL": "syscall", + "syscall.SYS___SEMWAIT_SIGNAL_NOCANCEL": "syscall", + "syscall.SYS___SETLOGIN": "syscall", + "syscall.SYS___SETUGID": "syscall", + "syscall.SYS___SET_TCB": "syscall", + "syscall.SYS___SIGACTION_SIGTRAMP": "syscall", + "syscall.SYS___SIGTIMEDWAIT": "syscall", + "syscall.SYS___SIGWAIT": "syscall", + "syscall.SYS___SIGWAIT_NOCANCEL": "syscall", + "syscall.SYS___SYSCTL": "syscall", + "syscall.SYS___TFORK": "syscall", + "syscall.SYS___THREXIT": "syscall", + "syscall.SYS___THRSIGDIVERT": "syscall", + "syscall.SYS___THRSLEEP": "syscall", + "syscall.SYS___THRWAKEUP": "syscall", + "syscall.S_ARCH1": "syscall", + "syscall.S_ARCH2": "syscall", + "syscall.S_BLKSIZE": "syscall", + "syscall.S_IEXEC": "syscall", + "syscall.S_IFBLK": "syscall", + "syscall.S_IFCHR": "syscall", + "syscall.S_IFDIR": "syscall", + "syscall.S_IFIFO": "syscall", + "syscall.S_IFLNK": "syscall", + "syscall.S_IFMT": "syscall", + "syscall.S_IFREG": "syscall", + "syscall.S_IFSOCK": "syscall", + "syscall.S_IFWHT": "syscall", + "syscall.S_IREAD": "syscall", + "syscall.S_IRGRP": "syscall", + "syscall.S_IROTH": "syscall", + "syscall.S_IRUSR": "syscall", + "syscall.S_IRWXG": "syscall", + "syscall.S_IRWXO": "syscall", + "syscall.S_IRWXU": "syscall", + "syscall.S_ISGID": "syscall", + "syscall.S_ISTXT": "syscall", + "syscall.S_ISUID": "syscall", + "syscall.S_ISVTX": "syscall", + "syscall.S_IWGRP": "syscall", + "syscall.S_IWOTH": "syscall", + "syscall.S_IWRITE": "syscall", + "syscall.S_IWUSR": "syscall", + "syscall.S_IXGRP": "syscall", + "syscall.S_IXOTH": "syscall", + "syscall.S_IXUSR": "syscall", + "syscall.S_LOGIN_SET": "syscall", + "syscall.SecurityAttributes": "syscall", + "syscall.Seek": "syscall", + "syscall.Select": "syscall", + "syscall.Sendfile": "syscall", + "syscall.Sendmsg": "syscall", + "syscall.SendmsgN": "syscall", + "syscall.Sendto": "syscall", + "syscall.Servent": "syscall", + "syscall.SetBpf": "syscall", + "syscall.SetBpfBuflen": "syscall", + "syscall.SetBpfDatalink": "syscall", + "syscall.SetBpfHeadercmpl": "syscall", + "syscall.SetBpfImmediate": "syscall", + "syscall.SetBpfInterface": "syscall", + "syscall.SetBpfPromisc": "syscall", + "syscall.SetBpfTimeout": "syscall", + "syscall.SetCurrentDirectory": "syscall", + "syscall.SetEndOfFile": "syscall", + "syscall.SetEnvironmentVariable": "syscall", + "syscall.SetFileAttributes": "syscall", + "syscall.SetFileCompletionNotificationModes": "syscall", + "syscall.SetFilePointer": "syscall", + "syscall.SetFileTime": "syscall", + "syscall.SetHandleInformation": "syscall", + "syscall.SetKevent": "syscall", + "syscall.SetLsfPromisc": "syscall", + "syscall.SetNonblock": "syscall", + "syscall.Setdomainname": "syscall", + "syscall.Setegid": "syscall", + "syscall.Setenv": "syscall", + "syscall.Seteuid": "syscall", + "syscall.Setfsgid": "syscall", + "syscall.Setfsuid": "syscall", + "syscall.Setgid": "syscall", + "syscall.Setgroups": "syscall", + "syscall.Sethostname": "syscall", + "syscall.Setlogin": "syscall", + "syscall.Setpgid": "syscall", + "syscall.Setpriority": "syscall", + "syscall.Setprivexec": "syscall", + "syscall.Setregid": "syscall", + "syscall.Setresgid": "syscall", + "syscall.Setresuid": "syscall", + "syscall.Setreuid": "syscall", + "syscall.Setrlimit": "syscall", + "syscall.Setsid": "syscall", + "syscall.Setsockopt": "syscall", + "syscall.SetsockoptByte": "syscall", + "syscall.SetsockoptICMPv6Filter": "syscall", + "syscall.SetsockoptIPMreq": "syscall", + "syscall.SetsockoptIPMreqn": "syscall", + "syscall.SetsockoptIPv6Mreq": "syscall", + "syscall.SetsockoptInet4Addr": "syscall", + "syscall.SetsockoptInt": "syscall", + "syscall.SetsockoptLinger": "syscall", + "syscall.SetsockoptString": "syscall", + "syscall.SetsockoptTimeval": "syscall", + "syscall.Settimeofday": "syscall", + "syscall.Setuid": "syscall", + "syscall.Setxattr": "syscall", + "syscall.Shutdown": "syscall", + "syscall.SidTypeAlias": "syscall", + "syscall.SidTypeComputer": "syscall", + "syscall.SidTypeDeletedAccount": "syscall", + "syscall.SidTypeDomain": "syscall", + "syscall.SidTypeGroup": "syscall", + "syscall.SidTypeInvalid": "syscall", + "syscall.SidTypeLabel": "syscall", + "syscall.SidTypeUnknown": "syscall", + "syscall.SidTypeUser": "syscall", + "syscall.SidTypeWellKnownGroup": "syscall", + "syscall.Signal": "syscall", + "syscall.SizeofBpfHdr": "syscall", + "syscall.SizeofBpfInsn": "syscall", + "syscall.SizeofBpfProgram": "syscall", + "syscall.SizeofBpfStat": "syscall", + "syscall.SizeofBpfVersion": "syscall", + "syscall.SizeofBpfZbuf": "syscall", + "syscall.SizeofBpfZbufHeader": "syscall", + "syscall.SizeofCmsghdr": "syscall", + "syscall.SizeofICMPv6Filter": "syscall", + "syscall.SizeofIPMreq": "syscall", + "syscall.SizeofIPMreqn": "syscall", + "syscall.SizeofIPv6MTUInfo": "syscall", + "syscall.SizeofIPv6Mreq": "syscall", + "syscall.SizeofIfAddrmsg": "syscall", + "syscall.SizeofIfAnnounceMsghdr": "syscall", + "syscall.SizeofIfData": "syscall", + "syscall.SizeofIfInfomsg": "syscall", + "syscall.SizeofIfMsghdr": "syscall", + "syscall.SizeofIfaMsghdr": "syscall", + "syscall.SizeofIfmaMsghdr": "syscall", + "syscall.SizeofIfmaMsghdr2": "syscall", + "syscall.SizeofInet4Pktinfo": "syscall", + "syscall.SizeofInet6Pktinfo": "syscall", + "syscall.SizeofInotifyEvent": "syscall", + "syscall.SizeofLinger": "syscall", + "syscall.SizeofMsghdr": "syscall", + "syscall.SizeofNlAttr": "syscall", + "syscall.SizeofNlMsgerr": "syscall", + "syscall.SizeofNlMsghdr": "syscall", + "syscall.SizeofRtAttr": "syscall", + "syscall.SizeofRtGenmsg": "syscall", + "syscall.SizeofRtMetrics": "syscall", + "syscall.SizeofRtMsg": "syscall", + "syscall.SizeofRtMsghdr": "syscall", + "syscall.SizeofRtNexthop": "syscall", + "syscall.SizeofSockFilter": "syscall", + "syscall.SizeofSockFprog": "syscall", + "syscall.SizeofSockaddrAny": "syscall", + "syscall.SizeofSockaddrDatalink": "syscall", + "syscall.SizeofSockaddrInet4": "syscall", + "syscall.SizeofSockaddrInet6": "syscall", + "syscall.SizeofSockaddrLinklayer": "syscall", + "syscall.SizeofSockaddrNetlink": "syscall", + "syscall.SizeofSockaddrUnix": "syscall", + "syscall.SizeofTCPInfo": "syscall", + "syscall.SizeofUcred": "syscall", + "syscall.SlicePtrFromStrings": "syscall", + "syscall.SockFilter": "syscall", + "syscall.SockFprog": "syscall", + "syscall.SockaddrDatalink": "syscall", + "syscall.SockaddrGen": "syscall", + "syscall.SockaddrInet4": "syscall", + "syscall.SockaddrInet6": "syscall", + "syscall.SockaddrLinklayer": "syscall", + "syscall.SockaddrNetlink": "syscall", + "syscall.SockaddrUnix": "syscall", + "syscall.Socket": "syscall", + "syscall.SocketControlMessage": "syscall", + "syscall.SocketDisableIPv6": "syscall", + "syscall.Socketpair": "syscall", + "syscall.Splice": "syscall", + "syscall.StartProcess": "syscall", + "syscall.StartupInfo": "syscall", + "syscall.Stat": "syscall", + "syscall.Stat_t": "syscall", + "syscall.Statfs": "syscall", + "syscall.Statfs_t": "syscall", + "syscall.Stderr": "syscall", + "syscall.Stdin": "syscall", + "syscall.Stdout": "syscall", + "syscall.StringBytePtr": "syscall", + "syscall.StringByteSlice": "syscall", + "syscall.StringSlicePtr": "syscall", + "syscall.StringToSid": "syscall", + "syscall.StringToUTF16": "syscall", + "syscall.StringToUTF16Ptr": "syscall", + "syscall.Symlink": "syscall", + "syscall.Sync": "syscall", + "syscall.SyncFileRange": "syscall", + "syscall.SysProcAttr": "syscall", + "syscall.SysProcIDMap": "syscall", + "syscall.Syscall": "syscall", + "syscall.Syscall12": "syscall", + "syscall.Syscall15": "syscall", + "syscall.Syscall6": "syscall", + "syscall.Syscall9": "syscall", + "syscall.Sysctl": "syscall", + "syscall.SysctlUint32": "syscall", + "syscall.Sysctlnode": "syscall", + "syscall.Sysinfo": "syscall", + "syscall.Sysinfo_t": "syscall", + "syscall.Systemtime": "syscall", + "syscall.TCGETS": "syscall", + "syscall.TCIFLUSH": "syscall", + "syscall.TCIOFLUSH": "syscall", + "syscall.TCOFLUSH": "syscall", + "syscall.TCPInfo": "syscall", + "syscall.TCPKeepalive": "syscall", + "syscall.TCP_CA_NAME_MAX": "syscall", + "syscall.TCP_CONGCTL": "syscall", + "syscall.TCP_CONGESTION": "syscall", + "syscall.TCP_CONNECTIONTIMEOUT": "syscall", + "syscall.TCP_CORK": "syscall", + "syscall.TCP_DEFER_ACCEPT": "syscall", + "syscall.TCP_INFO": "syscall", + "syscall.TCP_KEEPALIVE": "syscall", + "syscall.TCP_KEEPCNT": "syscall", + "syscall.TCP_KEEPIDLE": "syscall", + "syscall.TCP_KEEPINIT": "syscall", + "syscall.TCP_KEEPINTVL": "syscall", + "syscall.TCP_LINGER2": "syscall", + "syscall.TCP_MAXBURST": "syscall", + "syscall.TCP_MAXHLEN": "syscall", + "syscall.TCP_MAXOLEN": "syscall", + "syscall.TCP_MAXSEG": "syscall", + "syscall.TCP_MAXWIN": "syscall", + "syscall.TCP_MAX_SACK": "syscall", + "syscall.TCP_MAX_WINSHIFT": "syscall", + "syscall.TCP_MD5SIG": "syscall", + "syscall.TCP_MD5SIG_MAXKEYLEN": "syscall", + "syscall.TCP_MINMSS": "syscall", + "syscall.TCP_MINMSSOVERLOAD": "syscall", + "syscall.TCP_MSS": "syscall", + "syscall.TCP_NODELAY": "syscall", + "syscall.TCP_NOOPT": "syscall", + "syscall.TCP_NOPUSH": "syscall", + "syscall.TCP_NSTATES": "syscall", + "syscall.TCP_QUICKACK": "syscall", + "syscall.TCP_RXT_CONNDROPTIME": "syscall", + "syscall.TCP_RXT_FINDROP": "syscall", + "syscall.TCP_SACK_ENABLE": "syscall", + "syscall.TCP_SYNCNT": "syscall", + "syscall.TCP_VENDOR": "syscall", + "syscall.TCP_WINDOW_CLAMP": "syscall", + "syscall.TCSAFLUSH": "syscall", + "syscall.TCSETS": "syscall", + "syscall.TF_DISCONNECT": "syscall", + "syscall.TF_REUSE_SOCKET": "syscall", + "syscall.TF_USE_DEFAULT_WORKER": "syscall", + "syscall.TF_USE_KERNEL_APC": "syscall", + "syscall.TF_USE_SYSTEM_THREAD": "syscall", + "syscall.TF_WRITE_BEHIND": "syscall", + "syscall.TH32CS_INHERIT": "syscall", + "syscall.TH32CS_SNAPALL": "syscall", + "syscall.TH32CS_SNAPHEAPLIST": "syscall", + "syscall.TH32CS_SNAPMODULE": "syscall", + "syscall.TH32CS_SNAPMODULE32": "syscall", + "syscall.TH32CS_SNAPPROCESS": "syscall", + "syscall.TH32CS_SNAPTHREAD": "syscall", + "syscall.TIME_ZONE_ID_DAYLIGHT": "syscall", + "syscall.TIME_ZONE_ID_STANDARD": "syscall", + "syscall.TIME_ZONE_ID_UNKNOWN": "syscall", + "syscall.TIOCCBRK": "syscall", + "syscall.TIOCCDTR": "syscall", + "syscall.TIOCCONS": "syscall", + "syscall.TIOCDCDTIMESTAMP": "syscall", + "syscall.TIOCDRAIN": "syscall", + "syscall.TIOCDSIMICROCODE": "syscall", + "syscall.TIOCEXCL": "syscall", + "syscall.TIOCEXT": "syscall", + "syscall.TIOCFLAG_CDTRCTS": "syscall", + "syscall.TIOCFLAG_CLOCAL": "syscall", + "syscall.TIOCFLAG_CRTSCTS": "syscall", + "syscall.TIOCFLAG_MDMBUF": "syscall", + "syscall.TIOCFLAG_PPS": "syscall", + "syscall.TIOCFLAG_SOFTCAR": "syscall", + "syscall.TIOCFLUSH": "syscall", + "syscall.TIOCGDEV": "syscall", + "syscall.TIOCGDRAINWAIT": "syscall", + "syscall.TIOCGETA": "syscall", + "syscall.TIOCGETD": "syscall", + "syscall.TIOCGFLAGS": "syscall", + "syscall.TIOCGICOUNT": "syscall", + "syscall.TIOCGLCKTRMIOS": "syscall", + "syscall.TIOCGLINED": "syscall", + "syscall.TIOCGPGRP": "syscall", + "syscall.TIOCGPTN": "syscall", + "syscall.TIOCGQSIZE": "syscall", + "syscall.TIOCGRANTPT": "syscall", + "syscall.TIOCGRS485": "syscall", + "syscall.TIOCGSERIAL": "syscall", + "syscall.TIOCGSID": "syscall", + "syscall.TIOCGSIZE": "syscall", + "syscall.TIOCGSOFTCAR": "syscall", + "syscall.TIOCGTSTAMP": "syscall", + "syscall.TIOCGWINSZ": "syscall", + "syscall.TIOCINQ": "syscall", + "syscall.TIOCIXOFF": "syscall", + "syscall.TIOCIXON": "syscall", + "syscall.TIOCLINUX": "syscall", + "syscall.TIOCMBIC": "syscall", + "syscall.TIOCMBIS": "syscall", + "syscall.TIOCMGDTRWAIT": "syscall", + "syscall.TIOCMGET": "syscall", + "syscall.TIOCMIWAIT": "syscall", + "syscall.TIOCMODG": "syscall", + "syscall.TIOCMODS": "syscall", + "syscall.TIOCMSDTRWAIT": "syscall", + "syscall.TIOCMSET": "syscall", + "syscall.TIOCM_CAR": "syscall", + "syscall.TIOCM_CD": "syscall", + "syscall.TIOCM_CTS": "syscall", + "syscall.TIOCM_DCD": "syscall", + "syscall.TIOCM_DSR": "syscall", + "syscall.TIOCM_DTR": "syscall", + "syscall.TIOCM_LE": "syscall", + "syscall.TIOCM_RI": "syscall", + "syscall.TIOCM_RNG": "syscall", + "syscall.TIOCM_RTS": "syscall", + "syscall.TIOCM_SR": "syscall", + "syscall.TIOCM_ST": "syscall", + "syscall.TIOCNOTTY": "syscall", + "syscall.TIOCNXCL": "syscall", + "syscall.TIOCOUTQ": "syscall", + "syscall.TIOCPKT": "syscall", + "syscall.TIOCPKT_DATA": "syscall", + "syscall.TIOCPKT_DOSTOP": "syscall", + "syscall.TIOCPKT_FLUSHREAD": "syscall", + "syscall.TIOCPKT_FLUSHWRITE": "syscall", + "syscall.TIOCPKT_IOCTL": "syscall", + "syscall.TIOCPKT_NOSTOP": "syscall", + "syscall.TIOCPKT_START": "syscall", + "syscall.TIOCPKT_STOP": "syscall", + "syscall.TIOCPTMASTER": "syscall", + "syscall.TIOCPTMGET": "syscall", + "syscall.TIOCPTSNAME": "syscall", + "syscall.TIOCPTYGNAME": "syscall", + "syscall.TIOCPTYGRANT": "syscall", + "syscall.TIOCPTYUNLK": "syscall", + "syscall.TIOCRCVFRAME": "syscall", + "syscall.TIOCREMOTE": "syscall", + "syscall.TIOCSBRK": "syscall", + "syscall.TIOCSCONS": "syscall", + "syscall.TIOCSCTTY": "syscall", + "syscall.TIOCSDRAINWAIT": "syscall", + "syscall.TIOCSDTR": "syscall", + "syscall.TIOCSERCONFIG": "syscall", + "syscall.TIOCSERGETLSR": "syscall", + "syscall.TIOCSERGETMULTI": "syscall", + "syscall.TIOCSERGSTRUCT": "syscall", + "syscall.TIOCSERGWILD": "syscall", + "syscall.TIOCSERSETMULTI": "syscall", + "syscall.TIOCSERSWILD": "syscall", + "syscall.TIOCSER_TEMT": "syscall", + "syscall.TIOCSETA": "syscall", + "syscall.TIOCSETAF": "syscall", + "syscall.TIOCSETAW": "syscall", + "syscall.TIOCSETD": "syscall", + "syscall.TIOCSFLAGS": "syscall", + "syscall.TIOCSIG": "syscall", + "syscall.TIOCSLCKTRMIOS": "syscall", + "syscall.TIOCSLINED": "syscall", + "syscall.TIOCSPGRP": "syscall", + "syscall.TIOCSPTLCK": "syscall", + "syscall.TIOCSQSIZE": "syscall", + "syscall.TIOCSRS485": "syscall", + "syscall.TIOCSSERIAL": "syscall", + "syscall.TIOCSSIZE": "syscall", + "syscall.TIOCSSOFTCAR": "syscall", + "syscall.TIOCSTART": "syscall", + "syscall.TIOCSTAT": "syscall", + "syscall.TIOCSTI": "syscall", + "syscall.TIOCSTOP": "syscall", + "syscall.TIOCSTSTAMP": "syscall", + "syscall.TIOCSWINSZ": "syscall", + "syscall.TIOCTIMESTAMP": "syscall", + "syscall.TIOCUCNTL": "syscall", + "syscall.TIOCVHANGUP": "syscall", + "syscall.TIOCXMTFRAME": "syscall", + "syscall.TOKEN_ADJUST_DEFAULT": "syscall", + "syscall.TOKEN_ADJUST_GROUPS": "syscall", + "syscall.TOKEN_ADJUST_PRIVILEGES": "syscall", + "syscall.TOKEN_ALL_ACCESS": "syscall", + "syscall.TOKEN_ASSIGN_PRIMARY": "syscall", + "syscall.TOKEN_DUPLICATE": "syscall", + "syscall.TOKEN_EXECUTE": "syscall", + "syscall.TOKEN_IMPERSONATE": "syscall", + "syscall.TOKEN_QUERY": "syscall", + "syscall.TOKEN_QUERY_SOURCE": "syscall", + "syscall.TOKEN_READ": "syscall", + "syscall.TOKEN_WRITE": "syscall", + "syscall.TOSTOP": "syscall", + "syscall.TRUNCATE_EXISTING": "syscall", + "syscall.TUNATTACHFILTER": "syscall", + "syscall.TUNDETACHFILTER": "syscall", + "syscall.TUNGETFEATURES": "syscall", + "syscall.TUNGETIFF": "syscall", + "syscall.TUNGETSNDBUF": "syscall", + "syscall.TUNGETVNETHDRSZ": "syscall", + "syscall.TUNSETDEBUG": "syscall", + "syscall.TUNSETGROUP": "syscall", + "syscall.TUNSETIFF": "syscall", + "syscall.TUNSETLINK": "syscall", + "syscall.TUNSETNOCSUM": "syscall", + "syscall.TUNSETOFFLOAD": "syscall", + "syscall.TUNSETOWNER": "syscall", + "syscall.TUNSETPERSIST": "syscall", + "syscall.TUNSETSNDBUF": "syscall", + "syscall.TUNSETTXFILTER": "syscall", + "syscall.TUNSETVNETHDRSZ": "syscall", + "syscall.Tee": "syscall", + "syscall.TerminateProcess": "syscall", + "syscall.Termios": "syscall", + "syscall.Tgkill": "syscall", + "syscall.Time": "syscall", + "syscall.Time_t": "syscall", + "syscall.Times": "syscall", + "syscall.Timespec": "syscall", + "syscall.TimespecToNsec": "syscall", + "syscall.Timeval": "syscall", + "syscall.Timeval32": "syscall", + "syscall.TimevalToNsec": "syscall", + "syscall.Timex": "syscall", + "syscall.Timezoneinformation": "syscall", + "syscall.Tms": "syscall", + "syscall.Token": "syscall", + "syscall.TokenAccessInformation": "syscall", + "syscall.TokenAuditPolicy": "syscall", + "syscall.TokenDefaultDacl": "syscall", + "syscall.TokenElevation": "syscall", + "syscall.TokenElevationType": "syscall", + "syscall.TokenGroups": "syscall", + "syscall.TokenGroupsAndPrivileges": "syscall", + "syscall.TokenHasRestrictions": "syscall", + "syscall.TokenImpersonationLevel": "syscall", + "syscall.TokenIntegrityLevel": "syscall", + "syscall.TokenLinkedToken": "syscall", + "syscall.TokenLogonSid": "syscall", + "syscall.TokenMandatoryPolicy": "syscall", + "syscall.TokenOrigin": "syscall", + "syscall.TokenOwner": "syscall", + "syscall.TokenPrimaryGroup": "syscall", + "syscall.TokenPrivileges": "syscall", + "syscall.TokenRestrictedSids": "syscall", + "syscall.TokenSandBoxInert": "syscall", + "syscall.TokenSessionId": "syscall", + "syscall.TokenSessionReference": "syscall", + "syscall.TokenSource": "syscall", + "syscall.TokenStatistics": "syscall", + "syscall.TokenType": "syscall", + "syscall.TokenUIAccess": "syscall", + "syscall.TokenUser": "syscall", + "syscall.TokenVirtualizationAllowed": "syscall", + "syscall.TokenVirtualizationEnabled": "syscall", + "syscall.Tokenprimarygroup": "syscall", + "syscall.Tokenuser": "syscall", + "syscall.TranslateAccountName": "syscall", + "syscall.TranslateName": "syscall", + "syscall.TransmitFile": "syscall", + "syscall.TransmitFileBuffers": "syscall", + "syscall.Truncate": "syscall", + "syscall.USAGE_MATCH_TYPE_AND": "syscall", + "syscall.USAGE_MATCH_TYPE_OR": "syscall", + "syscall.UTF16FromString": "syscall", + "syscall.UTF16PtrFromString": "syscall", + "syscall.UTF16ToString": "syscall", + "syscall.Ucred": "syscall", + "syscall.Umask": "syscall", + "syscall.Uname": "syscall", + "syscall.Undelete": "syscall", + "syscall.UnixCredentials": "syscall", + "syscall.UnixRights": "syscall", + "syscall.Unlink": "syscall", + "syscall.Unlinkat": "syscall", + "syscall.UnmapViewOfFile": "syscall", + "syscall.Unmount": "syscall", + "syscall.Unsetenv": "syscall", + "syscall.Unshare": "syscall", + "syscall.UserInfo10": "syscall", + "syscall.Ustat": "syscall", + "syscall.Ustat_t": "syscall", + "syscall.Utimbuf": "syscall", + "syscall.Utime": "syscall", + "syscall.Utimes": "syscall", + "syscall.UtimesNano": "syscall", + "syscall.Utsname": "syscall", + "syscall.VDISCARD": "syscall", + "syscall.VDSUSP": "syscall", + "syscall.VEOF": "syscall", + "syscall.VEOL": "syscall", + "syscall.VEOL2": "syscall", + "syscall.VERASE": "syscall", + "syscall.VERASE2": "syscall", + "syscall.VINTR": "syscall", + "syscall.VKILL": "syscall", + "syscall.VLNEXT": "syscall", + "syscall.VMIN": "syscall", + "syscall.VQUIT": "syscall", + "syscall.VREPRINT": "syscall", + "syscall.VSTART": "syscall", + "syscall.VSTATUS": "syscall", + "syscall.VSTOP": "syscall", + "syscall.VSUSP": "syscall", + "syscall.VSWTC": "syscall", + "syscall.VT0": "syscall", + "syscall.VT1": "syscall", + "syscall.VTDLY": "syscall", + "syscall.VTIME": "syscall", + "syscall.VWERASE": "syscall", + "syscall.VirtualLock": "syscall", + "syscall.VirtualUnlock": "syscall", + "syscall.WAIT_ABANDONED": "syscall", + "syscall.WAIT_FAILED": "syscall", + "syscall.WAIT_OBJECT_0": "syscall", + "syscall.WAIT_TIMEOUT": "syscall", + "syscall.WALL": "syscall", + "syscall.WALLSIG": "syscall", + "syscall.WALTSIG": "syscall", + "syscall.WCLONE": "syscall", + "syscall.WCONTINUED": "syscall", + "syscall.WCOREFLAG": "syscall", + "syscall.WEXITED": "syscall", + "syscall.WLINUXCLONE": "syscall", + "syscall.WNOHANG": "syscall", + "syscall.WNOTHREAD": "syscall", + "syscall.WNOWAIT": "syscall", + "syscall.WNOZOMBIE": "syscall", + "syscall.WOPTSCHECKED": "syscall", + "syscall.WORDSIZE": "syscall", + "syscall.WSABuf": "syscall", + "syscall.WSACleanup": "syscall", + "syscall.WSADESCRIPTION_LEN": "syscall", + "syscall.WSAData": "syscall", + "syscall.WSAEACCES": "syscall", + "syscall.WSAECONNABORTED": "syscall", + "syscall.WSAECONNRESET": "syscall", + "syscall.WSAEnumProtocols": "syscall", + "syscall.WSAID_CONNECTEX": "syscall", + "syscall.WSAIoctl": "syscall", + "syscall.WSAPROTOCOL_LEN": "syscall", + "syscall.WSAProtocolChain": "syscall", + "syscall.WSAProtocolInfo": "syscall", + "syscall.WSARecv": "syscall", + "syscall.WSARecvFrom": "syscall", + "syscall.WSASYS_STATUS_LEN": "syscall", + "syscall.WSASend": "syscall", + "syscall.WSASendTo": "syscall", + "syscall.WSASendto": "syscall", + "syscall.WSAStartup": "syscall", + "syscall.WSTOPPED": "syscall", + "syscall.WTRAPPED": "syscall", + "syscall.WUNTRACED": "syscall", + "syscall.Wait4": "syscall", + "syscall.WaitForSingleObject": "syscall", + "syscall.WaitStatus": "syscall", + "syscall.Win32FileAttributeData": "syscall", + "syscall.Win32finddata": "syscall", + "syscall.Write": "syscall", + "syscall.WriteConsole": "syscall", + "syscall.WriteFile": "syscall", + "syscall.X509_ASN_ENCODING": "syscall", + "syscall.XCASE": "syscall", + "syscall.XP1_CONNECTIONLESS": "syscall", + "syscall.XP1_CONNECT_DATA": "syscall", + "syscall.XP1_DISCONNECT_DATA": "syscall", + "syscall.XP1_EXPEDITED_DATA": "syscall", + "syscall.XP1_GRACEFUL_CLOSE": "syscall", + "syscall.XP1_GUARANTEED_DELIVERY": "syscall", + "syscall.XP1_GUARANTEED_ORDER": "syscall", + "syscall.XP1_IFS_HANDLES": "syscall", + "syscall.XP1_MESSAGE_ORIENTED": "syscall", + "syscall.XP1_MULTIPOINT_CONTROL_PLANE": "syscall", + "syscall.XP1_MULTIPOINT_DATA_PLANE": "syscall", + "syscall.XP1_PARTIAL_MESSAGE": "syscall", + "syscall.XP1_PSEUDO_STREAM": "syscall", + "syscall.XP1_QOS_SUPPORTED": "syscall", + "syscall.XP1_SAN_SUPPORT_SDP": "syscall", + "syscall.XP1_SUPPORT_BROADCAST": "syscall", + "syscall.XP1_SUPPORT_MULTIPOINT": "syscall", + "syscall.XP1_UNI_RECV": "syscall", + "syscall.XP1_UNI_SEND": "syscall", + "syslog.Dial": "log/syslog", + "syslog.LOG_ALERT": "log/syslog", + "syslog.LOG_AUTH": "log/syslog", + "syslog.LOG_AUTHPRIV": "log/syslog", + "syslog.LOG_CRIT": "log/syslog", + "syslog.LOG_CRON": "log/syslog", + "syslog.LOG_DAEMON": "log/syslog", + "syslog.LOG_DEBUG": "log/syslog", + "syslog.LOG_EMERG": "log/syslog", + "syslog.LOG_ERR": "log/syslog", + "syslog.LOG_FTP": "log/syslog", + "syslog.LOG_INFO": "log/syslog", + "syslog.LOG_KERN": "log/syslog", + "syslog.LOG_LOCAL0": "log/syslog", + "syslog.LOG_LOCAL1": "log/syslog", + "syslog.LOG_LOCAL2": "log/syslog", + "syslog.LOG_LOCAL3": "log/syslog", + "syslog.LOG_LOCAL4": "log/syslog", + "syslog.LOG_LOCAL5": "log/syslog", + "syslog.LOG_LOCAL6": "log/syslog", + "syslog.LOG_LOCAL7": "log/syslog", + "syslog.LOG_LPR": "log/syslog", + "syslog.LOG_MAIL": "log/syslog", + "syslog.LOG_NEWS": "log/syslog", + "syslog.LOG_NOTICE": "log/syslog", + "syslog.LOG_SYSLOG": "log/syslog", + "syslog.LOG_USER": "log/syslog", + "syslog.LOG_UUCP": "log/syslog", + "syslog.LOG_WARNING": "log/syslog", + "syslog.New": "log/syslog", + "syslog.NewLogger": "log/syslog", + "syslog.Priority": "log/syslog", + "syslog.Writer": "log/syslog", + "tabwriter.AlignRight": "text/tabwriter", + "tabwriter.Debug": "text/tabwriter", + "tabwriter.DiscardEmptyColumns": "text/tabwriter", + "tabwriter.Escape": "text/tabwriter", + "tabwriter.FilterHTML": "text/tabwriter", + "tabwriter.NewWriter": "text/tabwriter", + "tabwriter.StripEscape": "text/tabwriter", + "tabwriter.TabIndent": "text/tabwriter", + "tabwriter.Writer": "text/tabwriter", + "tar.ErrFieldTooLong": "archive/tar", + "tar.ErrHeader": "archive/tar", + "tar.ErrWriteAfterClose": "archive/tar", + "tar.ErrWriteTooLong": "archive/tar", + "tar.FileInfoHeader": "archive/tar", + "tar.Header": "archive/tar", + "tar.NewReader": "archive/tar", + "tar.NewWriter": "archive/tar", + "tar.Reader": "archive/tar", + "tar.TypeBlock": "archive/tar", + "tar.TypeChar": "archive/tar", + "tar.TypeCont": "archive/tar", + "tar.TypeDir": "archive/tar", + "tar.TypeFifo": "archive/tar", + "tar.TypeGNULongLink": "archive/tar", + "tar.TypeGNULongName": "archive/tar", + "tar.TypeGNUSparse": "archive/tar", + "tar.TypeLink": "archive/tar", + "tar.TypeReg": "archive/tar", + "tar.TypeRegA": "archive/tar", + "tar.TypeSymlink": "archive/tar", + "tar.TypeXGlobalHeader": "archive/tar", + "tar.TypeXHeader": "archive/tar", + "tar.Writer": "archive/tar", + "template.CSS": "html/template", + "template.ErrAmbigContext": "html/template", + "template.ErrBadHTML": "html/template", + "template.ErrBranchEnd": "html/template", + "template.ErrEndContext": "html/template", + "template.ErrNoSuchTemplate": "html/template", + "template.ErrOutputContext": "html/template", + "template.ErrPartialCharset": "html/template", + "template.ErrPartialEscape": "html/template", + "template.ErrPredefinedEscaper": "html/template", + "template.ErrRangeLoopReentry": "html/template", + "template.ErrSlashAmbig": "html/template", + "template.Error": "html/template", + "template.ErrorCode": "html/template", + "template.ExecError": "text/template", + // "template.FuncMap" is ambiguous + "template.HTML": "html/template", + "template.HTMLAttr": "html/template", + // "template.HTMLEscape" is ambiguous + // "template.HTMLEscapeString" is ambiguous + // "template.HTMLEscaper" is ambiguous + // "template.IsTrue" is ambiguous + "template.JS": "html/template", + // "template.JSEscape" is ambiguous + // "template.JSEscapeString" is ambiguous + // "template.JSEscaper" is ambiguous + "template.JSStr": "html/template", + // "template.Must" is ambiguous + // "template.New" is ambiguous + "template.OK": "html/template", + // "template.ParseFiles" is ambiguous + // "template.ParseGlob" is ambiguous + // "template.Template" is ambiguous + "template.URL": "html/template", + // "template.URLQueryEscaper" is ambiguous + "testing.AllocsPerRun": "testing", + "testing.B": "testing", + "testing.Benchmark": "testing", + "testing.BenchmarkResult": "testing", + "testing.Cover": "testing", + "testing.CoverBlock": "testing", + "testing.CoverMode": "testing", + "testing.Coverage": "testing", + "testing.InternalBenchmark": "testing", + "testing.InternalExample": "testing", + "testing.InternalTest": "testing", + "testing.M": "testing", + "testing.Main": "testing", + "testing.MainStart": "testing", + "testing.PB": "testing", + "testing.RegisterCover": "testing", + "testing.RunBenchmarks": "testing", + "testing.RunExamples": "testing", + "testing.RunTests": "testing", + "testing.Short": "testing", + "testing.T": "testing", + "testing.Verbose": "testing", + "textproto.CanonicalMIMEHeaderKey": "net/textproto", + "textproto.Conn": "net/textproto", + "textproto.Dial": "net/textproto", + "textproto.Error": "net/textproto", + "textproto.MIMEHeader": "net/textproto", + "textproto.NewConn": "net/textproto", + "textproto.NewReader": "net/textproto", + "textproto.NewWriter": "net/textproto", + "textproto.Pipeline": "net/textproto", + "textproto.ProtocolError": "net/textproto", + "textproto.Reader": "net/textproto", + "textproto.TrimBytes": "net/textproto", + "textproto.TrimString": "net/textproto", + "textproto.Writer": "net/textproto", + "time.ANSIC": "time", + "time.After": "time", + "time.AfterFunc": "time", + "time.April": "time", + "time.August": "time", + "time.Date": "time", + "time.December": "time", + "time.Duration": "time", + "time.February": "time", + "time.FixedZone": "time", + "time.Friday": "time", + "time.Hour": "time", + "time.January": "time", + "time.July": "time", + "time.June": "time", + "time.Kitchen": "time", + "time.LoadLocation": "time", + "time.Local": "time", + "time.Location": "time", + "time.March": "time", + "time.May": "time", + "time.Microsecond": "time", + "time.Millisecond": "time", + "time.Minute": "time", + "time.Monday": "time", + "time.Month": "time", + "time.Nanosecond": "time", + "time.NewTicker": "time", + "time.NewTimer": "time", + "time.November": "time", + "time.Now": "time", + "time.October": "time", + "time.Parse": "time", + "time.ParseDuration": "time", + "time.ParseError": "time", + "time.ParseInLocation": "time", + "time.RFC1123": "time", + "time.RFC1123Z": "time", + "time.RFC3339": "time", + "time.RFC3339Nano": "time", + "time.RFC822": "time", + "time.RFC822Z": "time", + "time.RFC850": "time", + "time.RubyDate": "time", + "time.Saturday": "time", + "time.Second": "time", + "time.September": "time", + "time.Since": "time", + "time.Sleep": "time", + "time.Stamp": "time", + "time.StampMicro": "time", + "time.StampMilli": "time", + "time.StampNano": "time", + "time.Sunday": "time", + "time.Thursday": "time", + "time.Tick": "time", + "time.Ticker": "time", + "time.Time": "time", + "time.Timer": "time", + "time.Tuesday": "time", + "time.UTC": "time", + "time.Unix": "time", + "time.UnixDate": "time", + "time.Until": "time", + "time.Wednesday": "time", + "time.Weekday": "time", + "tls.Certificate": "crypto/tls", + "tls.CertificateRequestInfo": "crypto/tls", + "tls.Client": "crypto/tls", + "tls.ClientAuthType": "crypto/tls", + "tls.ClientHelloInfo": "crypto/tls", + "tls.ClientSessionCache": "crypto/tls", + "tls.ClientSessionState": "crypto/tls", + "tls.Config": "crypto/tls", + "tls.Conn": "crypto/tls", + "tls.ConnectionState": "crypto/tls", + "tls.CurveID": "crypto/tls", + "tls.CurveP256": "crypto/tls", + "tls.CurveP384": "crypto/tls", + "tls.CurveP521": "crypto/tls", + "tls.Dial": "crypto/tls", + "tls.DialWithDialer": "crypto/tls", + "tls.ECDSAWithP256AndSHA256": "crypto/tls", + "tls.ECDSAWithP384AndSHA384": "crypto/tls", + "tls.ECDSAWithP521AndSHA512": "crypto/tls", + "tls.Listen": "crypto/tls", + "tls.LoadX509KeyPair": "crypto/tls", + "tls.NewLRUClientSessionCache": "crypto/tls", + "tls.NewListener": "crypto/tls", + "tls.NoClientCert": "crypto/tls", + "tls.PKCS1WithSHA1": "crypto/tls", + "tls.PKCS1WithSHA256": "crypto/tls", + "tls.PKCS1WithSHA384": "crypto/tls", + "tls.PKCS1WithSHA512": "crypto/tls", + "tls.PSSWithSHA256": "crypto/tls", + "tls.PSSWithSHA384": "crypto/tls", + "tls.PSSWithSHA512": "crypto/tls", + "tls.RecordHeaderError": "crypto/tls", + "tls.RenegotiateFreelyAsClient": "crypto/tls", + "tls.RenegotiateNever": "crypto/tls", + "tls.RenegotiateOnceAsClient": "crypto/tls", + "tls.RenegotiationSupport": "crypto/tls", + "tls.RequestClientCert": "crypto/tls", + "tls.RequireAndVerifyClientCert": "crypto/tls", + "tls.RequireAnyClientCert": "crypto/tls", + "tls.Server": "crypto/tls", + "tls.SignatureScheme": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.TLS_FALLBACK_SCSV": "crypto/tls", + "tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_RSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.VerifyClientCertIfGiven": "crypto/tls", + "tls.VersionSSL30": "crypto/tls", + "tls.VersionTLS10": "crypto/tls", + "tls.VersionTLS11": "crypto/tls", + "tls.VersionTLS12": "crypto/tls", + "tls.X25519": "crypto/tls", + "tls.X509KeyPair": "crypto/tls", + "token.ADD": "go/token", + "token.ADD_ASSIGN": "go/token", + "token.AND": "go/token", + "token.AND_ASSIGN": "go/token", + "token.AND_NOT": "go/token", + "token.AND_NOT_ASSIGN": "go/token", + "token.ARROW": "go/token", + "token.ASSIGN": "go/token", + "token.BREAK": "go/token", + "token.CASE": "go/token", + "token.CHAN": "go/token", + "token.CHAR": "go/token", + "token.COLON": "go/token", + "token.COMMA": "go/token", + "token.COMMENT": "go/token", + "token.CONST": "go/token", + "token.CONTINUE": "go/token", + "token.DEC": "go/token", + "token.DEFAULT": "go/token", + "token.DEFER": "go/token", + "token.DEFINE": "go/token", + "token.ELLIPSIS": "go/token", + "token.ELSE": "go/token", + "token.EOF": "go/token", + "token.EQL": "go/token", + "token.FALLTHROUGH": "go/token", + "token.FLOAT": "go/token", + "token.FOR": "go/token", + "token.FUNC": "go/token", + "token.File": "go/token", + "token.FileSet": "go/token", + "token.GEQ": "go/token", + "token.GO": "go/token", + "token.GOTO": "go/token", + "token.GTR": "go/token", + "token.HighestPrec": "go/token", + "token.IDENT": "go/token", + "token.IF": "go/token", + "token.ILLEGAL": "go/token", + "token.IMAG": "go/token", + "token.IMPORT": "go/token", + "token.INC": "go/token", + "token.INT": "go/token", + "token.INTERFACE": "go/token", + "token.LAND": "go/token", + "token.LBRACE": "go/token", + "token.LBRACK": "go/token", + "token.LEQ": "go/token", + "token.LOR": "go/token", + "token.LPAREN": "go/token", + "token.LSS": "go/token", + "token.Lookup": "go/token", + "token.LowestPrec": "go/token", + "token.MAP": "go/token", + "token.MUL": "go/token", + "token.MUL_ASSIGN": "go/token", + "token.NEQ": "go/token", + "token.NOT": "go/token", + "token.NewFileSet": "go/token", + "token.NoPos": "go/token", + "token.OR": "go/token", + "token.OR_ASSIGN": "go/token", + "token.PACKAGE": "go/token", + "token.PERIOD": "go/token", + "token.Pos": "go/token", + "token.Position": "go/token", + "token.QUO": "go/token", + "token.QUO_ASSIGN": "go/token", + "token.RANGE": "go/token", + "token.RBRACE": "go/token", + "token.RBRACK": "go/token", + "token.REM": "go/token", + "token.REM_ASSIGN": "go/token", + "token.RETURN": "go/token", + "token.RPAREN": "go/token", + "token.SELECT": "go/token", + "token.SEMICOLON": "go/token", + "token.SHL": "go/token", + "token.SHL_ASSIGN": "go/token", + "token.SHR": "go/token", + "token.SHR_ASSIGN": "go/token", + "token.STRING": "go/token", + "token.STRUCT": "go/token", + "token.SUB": "go/token", + "token.SUB_ASSIGN": "go/token", + "token.SWITCH": "go/token", + "token.TYPE": "go/token", + "token.Token": "go/token", + "token.UnaryPrec": "go/token", + "token.VAR": "go/token", + "token.XOR": "go/token", + "token.XOR_ASSIGN": "go/token", + "trace.Start": "runtime/trace", + "trace.Stop": "runtime/trace", + "types.Array": "go/types", + "types.AssertableTo": "go/types", + "types.AssignableTo": "go/types", + "types.Basic": "go/types", + "types.BasicInfo": "go/types", + "types.BasicKind": "go/types", + "types.Bool": "go/types", + "types.Builtin": "go/types", + "types.Byte": "go/types", + "types.Chan": "go/types", + "types.ChanDir": "go/types", + "types.Checker": "go/types", + "types.Comparable": "go/types", + "types.Complex128": "go/types", + "types.Complex64": "go/types", + "types.Config": "go/types", + "types.Const": "go/types", + "types.ConvertibleTo": "go/types", + "types.DefPredeclaredTestFuncs": "go/types", + "types.Default": "go/types", + "types.Error": "go/types", + "types.Eval": "go/types", + "types.ExprString": "go/types", + "types.FieldVal": "go/types", + "types.Float32": "go/types", + "types.Float64": "go/types", + "types.Func": "go/types", + "types.Id": "go/types", + "types.Identical": "go/types", + "types.IdenticalIgnoreTags": "go/types", + "types.Implements": "go/types", + "types.ImportMode": "go/types", + "types.Importer": "go/types", + "types.ImporterFrom": "go/types", + "types.Info": "go/types", + "types.Initializer": "go/types", + "types.Int": "go/types", + "types.Int16": "go/types", + "types.Int32": "go/types", + "types.Int64": "go/types", + "types.Int8": "go/types", + "types.Interface": "go/types", + "types.Invalid": "go/types", + "types.IsBoolean": "go/types", + "types.IsComplex": "go/types", + "types.IsConstType": "go/types", + "types.IsFloat": "go/types", + "types.IsInteger": "go/types", + "types.IsInterface": "go/types", + "types.IsNumeric": "go/types", + "types.IsOrdered": "go/types", + "types.IsString": "go/types", + "types.IsUnsigned": "go/types", + "types.IsUntyped": "go/types", + "types.Label": "go/types", + "types.LookupFieldOrMethod": "go/types", + "types.Map": "go/types", + "types.MethodExpr": "go/types", + "types.MethodSet": "go/types", + "types.MethodVal": "go/types", + "types.MissingMethod": "go/types", + "types.Named": "go/types", + "types.NewArray": "go/types", + "types.NewChan": "go/types", + "types.NewChecker": "go/types", + "types.NewConst": "go/types", + "types.NewField": "go/types", + "types.NewFunc": "go/types", + "types.NewInterface": "go/types", + "types.NewLabel": "go/types", + "types.NewMap": "go/types", + "types.NewMethodSet": "go/types", + "types.NewNamed": "go/types", + "types.NewPackage": "go/types", + "types.NewParam": "go/types", + "types.NewPkgName": "go/types", + "types.NewPointer": "go/types", + "types.NewScope": "go/types", + "types.NewSignature": "go/types", + "types.NewSlice": "go/types", + "types.NewStruct": "go/types", + "types.NewTuple": "go/types", + "types.NewTypeName": "go/types", + "types.NewVar": "go/types", + "types.Nil": "go/types", + "types.ObjectString": "go/types", + "types.Package": "go/types", + "types.PkgName": "go/types", + "types.Pointer": "go/types", + "types.Qualifier": "go/types", + "types.RecvOnly": "go/types", + "types.RelativeTo": "go/types", + "types.Rune": "go/types", + "types.Scope": "go/types", + "types.Selection": "go/types", + "types.SelectionKind": "go/types", + "types.SelectionString": "go/types", + "types.SendOnly": "go/types", + "types.SendRecv": "go/types", + "types.Signature": "go/types", + "types.Sizes": "go/types", + "types.SizesFor": "go/types", + "types.Slice": "go/types", + "types.StdSizes": "go/types", + "types.String": "go/types", + "types.Struct": "go/types", + "types.Tuple": "go/types", + "types.Typ": "go/types", + "types.Type": "go/types", + "types.TypeAndValue": "go/types", + "types.TypeName": "go/types", + "types.TypeString": "go/types", + "types.Uint": "go/types", + "types.Uint16": "go/types", + "types.Uint32": "go/types", + "types.Uint64": "go/types", + "types.Uint8": "go/types", + "types.Uintptr": "go/types", + "types.Universe": "go/types", + "types.Unsafe": "go/types", + "types.UnsafePointer": "go/types", + "types.UntypedBool": "go/types", + "types.UntypedComplex": "go/types", + "types.UntypedFloat": "go/types", + "types.UntypedInt": "go/types", + "types.UntypedNil": "go/types", + "types.UntypedRune": "go/types", + "types.UntypedString": "go/types", + "types.Var": "go/types", + "types.WriteExpr": "go/types", + "types.WriteSignature": "go/types", + "types.WriteType": "go/types", + "unicode.ASCII_Hex_Digit": "unicode", + "unicode.Adlam": "unicode", + "unicode.Ahom": "unicode", + "unicode.Anatolian_Hieroglyphs": "unicode", + "unicode.Arabic": "unicode", + "unicode.Armenian": "unicode", + "unicode.Avestan": "unicode", + "unicode.AzeriCase": "unicode", + "unicode.Balinese": "unicode", + "unicode.Bamum": "unicode", + "unicode.Bassa_Vah": "unicode", + "unicode.Batak": "unicode", + "unicode.Bengali": "unicode", + "unicode.Bhaiksuki": "unicode", + "unicode.Bidi_Control": "unicode", + "unicode.Bopomofo": "unicode", + "unicode.Brahmi": "unicode", + "unicode.Braille": "unicode", + "unicode.Buginese": "unicode", + "unicode.Buhid": "unicode", + "unicode.C": "unicode", + "unicode.Canadian_Aboriginal": "unicode", + "unicode.Carian": "unicode", + "unicode.CaseRange": "unicode", + "unicode.CaseRanges": "unicode", + "unicode.Categories": "unicode", + "unicode.Caucasian_Albanian": "unicode", + "unicode.Cc": "unicode", + "unicode.Cf": "unicode", + "unicode.Chakma": "unicode", + "unicode.Cham": "unicode", + "unicode.Cherokee": "unicode", + "unicode.Co": "unicode", + "unicode.Common": "unicode", + "unicode.Coptic": "unicode", + "unicode.Cs": "unicode", + "unicode.Cuneiform": "unicode", + "unicode.Cypriot": "unicode", + "unicode.Cyrillic": "unicode", + "unicode.Dash": "unicode", + "unicode.Deprecated": "unicode", + "unicode.Deseret": "unicode", + "unicode.Devanagari": "unicode", + "unicode.Diacritic": "unicode", + "unicode.Digit": "unicode", + "unicode.Duployan": "unicode", + "unicode.Egyptian_Hieroglyphs": "unicode", + "unicode.Elbasan": "unicode", + "unicode.Ethiopic": "unicode", + "unicode.Extender": "unicode", + "unicode.FoldCategory": "unicode", + "unicode.FoldScript": "unicode", + "unicode.Georgian": "unicode", + "unicode.Glagolitic": "unicode", + "unicode.Gothic": "unicode", + "unicode.Grantha": "unicode", + "unicode.GraphicRanges": "unicode", + "unicode.Greek": "unicode", + "unicode.Gujarati": "unicode", + "unicode.Gurmukhi": "unicode", + "unicode.Han": "unicode", + "unicode.Hangul": "unicode", + "unicode.Hanunoo": "unicode", + "unicode.Hatran": "unicode", + "unicode.Hebrew": "unicode", + "unicode.Hex_Digit": "unicode", + "unicode.Hiragana": "unicode", + "unicode.Hyphen": "unicode", + "unicode.IDS_Binary_Operator": "unicode", + "unicode.IDS_Trinary_Operator": "unicode", + "unicode.Ideographic": "unicode", + "unicode.Imperial_Aramaic": "unicode", + "unicode.In": "unicode", + "unicode.Inherited": "unicode", + "unicode.Inscriptional_Pahlavi": "unicode", + "unicode.Inscriptional_Parthian": "unicode", + "unicode.Is": "unicode", + "unicode.IsControl": "unicode", + "unicode.IsDigit": "unicode", + "unicode.IsGraphic": "unicode", + "unicode.IsLetter": "unicode", + "unicode.IsLower": "unicode", + "unicode.IsMark": "unicode", + "unicode.IsNumber": "unicode", + "unicode.IsOneOf": "unicode", + "unicode.IsPrint": "unicode", + "unicode.IsPunct": "unicode", + "unicode.IsSpace": "unicode", + "unicode.IsSymbol": "unicode", + "unicode.IsTitle": "unicode", + "unicode.IsUpper": "unicode", + "unicode.Javanese": "unicode", + "unicode.Join_Control": "unicode", + "unicode.Kaithi": "unicode", + "unicode.Kannada": "unicode", + "unicode.Katakana": "unicode", + "unicode.Kayah_Li": "unicode", + "unicode.Kharoshthi": "unicode", + "unicode.Khmer": "unicode", + "unicode.Khojki": "unicode", + "unicode.Khudawadi": "unicode", + "unicode.L": "unicode", + "unicode.Lao": "unicode", + "unicode.Latin": "unicode", + "unicode.Lepcha": "unicode", + "unicode.Letter": "unicode", + "unicode.Limbu": "unicode", + "unicode.Linear_A": "unicode", + "unicode.Linear_B": "unicode", + "unicode.Lisu": "unicode", + "unicode.Ll": "unicode", + "unicode.Lm": "unicode", + "unicode.Lo": "unicode", + "unicode.Logical_Order_Exception": "unicode", + "unicode.Lower": "unicode", + "unicode.LowerCase": "unicode", + "unicode.Lt": "unicode", + "unicode.Lu": "unicode", + "unicode.Lycian": "unicode", + "unicode.Lydian": "unicode", + "unicode.M": "unicode", + "unicode.Mahajani": "unicode", + "unicode.Malayalam": "unicode", + "unicode.Mandaic": "unicode", + "unicode.Manichaean": "unicode", + "unicode.Marchen": "unicode", + "unicode.Mark": "unicode", + "unicode.MaxASCII": "unicode", + "unicode.MaxCase": "unicode", + "unicode.MaxLatin1": "unicode", + "unicode.MaxRune": "unicode", + "unicode.Mc": "unicode", + "unicode.Me": "unicode", + "unicode.Meetei_Mayek": "unicode", + "unicode.Mende_Kikakui": "unicode", + "unicode.Meroitic_Cursive": "unicode", + "unicode.Meroitic_Hieroglyphs": "unicode", + "unicode.Miao": "unicode", + "unicode.Mn": "unicode", + "unicode.Modi": "unicode", + "unicode.Mongolian": "unicode", + "unicode.Mro": "unicode", + "unicode.Multani": "unicode", + "unicode.Myanmar": "unicode", + "unicode.N": "unicode", + "unicode.Nabataean": "unicode", + "unicode.Nd": "unicode", + "unicode.New_Tai_Lue": "unicode", + "unicode.Newa": "unicode", + "unicode.Nko": "unicode", + "unicode.Nl": "unicode", + "unicode.No": "unicode", + "unicode.Noncharacter_Code_Point": "unicode", + "unicode.Number": "unicode", + "unicode.Ogham": "unicode", + "unicode.Ol_Chiki": "unicode", + "unicode.Old_Hungarian": "unicode", + "unicode.Old_Italic": "unicode", + "unicode.Old_North_Arabian": "unicode", + "unicode.Old_Permic": "unicode", + "unicode.Old_Persian": "unicode", + "unicode.Old_South_Arabian": "unicode", + "unicode.Old_Turkic": "unicode", + "unicode.Oriya": "unicode", + "unicode.Osage": "unicode", + "unicode.Osmanya": "unicode", + "unicode.Other": "unicode", + "unicode.Other_Alphabetic": "unicode", + "unicode.Other_Default_Ignorable_Code_Point": "unicode", + "unicode.Other_Grapheme_Extend": "unicode", + "unicode.Other_ID_Continue": "unicode", + "unicode.Other_ID_Start": "unicode", + "unicode.Other_Lowercase": "unicode", + "unicode.Other_Math": "unicode", + "unicode.Other_Uppercase": "unicode", + "unicode.P": "unicode", + "unicode.Pahawh_Hmong": "unicode", + "unicode.Palmyrene": "unicode", + "unicode.Pattern_Syntax": "unicode", + "unicode.Pattern_White_Space": "unicode", + "unicode.Pau_Cin_Hau": "unicode", + "unicode.Pc": "unicode", + "unicode.Pd": "unicode", + "unicode.Pe": "unicode", + "unicode.Pf": "unicode", + "unicode.Phags_Pa": "unicode", + "unicode.Phoenician": "unicode", + "unicode.Pi": "unicode", + "unicode.Po": "unicode", + "unicode.Prepended_Concatenation_Mark": "unicode", + "unicode.PrintRanges": "unicode", + "unicode.Properties": "unicode", + "unicode.Ps": "unicode", + "unicode.Psalter_Pahlavi": "unicode", + "unicode.Punct": "unicode", + "unicode.Quotation_Mark": "unicode", + "unicode.Radical": "unicode", + "unicode.Range16": "unicode", + "unicode.Range32": "unicode", + "unicode.RangeTable": "unicode", + "unicode.Rejang": "unicode", + "unicode.ReplacementChar": "unicode", + "unicode.Runic": "unicode", + "unicode.S": "unicode", + "unicode.STerm": "unicode", + "unicode.Samaritan": "unicode", + "unicode.Saurashtra": "unicode", + "unicode.Sc": "unicode", + "unicode.Scripts": "unicode", + "unicode.Sentence_Terminal": "unicode", + "unicode.Sharada": "unicode", + "unicode.Shavian": "unicode", + "unicode.Siddham": "unicode", + "unicode.SignWriting": "unicode", + "unicode.SimpleFold": "unicode", + "unicode.Sinhala": "unicode", + "unicode.Sk": "unicode", + "unicode.Sm": "unicode", + "unicode.So": "unicode", + "unicode.Soft_Dotted": "unicode", + "unicode.Sora_Sompeng": "unicode", + "unicode.Space": "unicode", + "unicode.SpecialCase": "unicode", + "unicode.Sundanese": "unicode", + "unicode.Syloti_Nagri": "unicode", + "unicode.Symbol": "unicode", + "unicode.Syriac": "unicode", + "unicode.Tagalog": "unicode", + "unicode.Tagbanwa": "unicode", + "unicode.Tai_Le": "unicode", + "unicode.Tai_Tham": "unicode", + "unicode.Tai_Viet": "unicode", + "unicode.Takri": "unicode", + "unicode.Tamil": "unicode", + "unicode.Tangut": "unicode", + "unicode.Telugu": "unicode", + "unicode.Terminal_Punctuation": "unicode", + "unicode.Thaana": "unicode", + "unicode.Thai": "unicode", + "unicode.Tibetan": "unicode", + "unicode.Tifinagh": "unicode", + "unicode.Tirhuta": "unicode", + "unicode.Title": "unicode", + "unicode.TitleCase": "unicode", + "unicode.To": "unicode", + "unicode.ToLower": "unicode", + "unicode.ToTitle": "unicode", + "unicode.ToUpper": "unicode", + "unicode.TurkishCase": "unicode", + "unicode.Ugaritic": "unicode", + "unicode.Unified_Ideograph": "unicode", + "unicode.Upper": "unicode", + "unicode.UpperCase": "unicode", + "unicode.UpperLower": "unicode", + "unicode.Vai": "unicode", + "unicode.Variation_Selector": "unicode", + "unicode.Version": "unicode", + "unicode.Warang_Citi": "unicode", + "unicode.White_Space": "unicode", + "unicode.Yi": "unicode", + "unicode.Z": "unicode", + "unicode.Zl": "unicode", + "unicode.Zp": "unicode", + "unicode.Zs": "unicode", + "url.Error": "net/url", + "url.EscapeError": "net/url", + "url.InvalidHostError": "net/url", + "url.Parse": "net/url", + "url.ParseQuery": "net/url", + "url.ParseRequestURI": "net/url", + "url.PathEscape": "net/url", + "url.PathUnescape": "net/url", + "url.QueryEscape": "net/url", + "url.QueryUnescape": "net/url", + "url.URL": "net/url", + "url.User": "net/url", + "url.UserPassword": "net/url", + "url.Userinfo": "net/url", + "url.Values": "net/url", + "user.Current": "os/user", + "user.Group": "os/user", + "user.Lookup": "os/user", + "user.LookupGroup": "os/user", + "user.LookupGroupId": "os/user", + "user.LookupId": "os/user", + "user.UnknownGroupError": "os/user", + "user.UnknownGroupIdError": "os/user", + "user.UnknownUserError": "os/user", + "user.UnknownUserIdError": "os/user", + "user.User": "os/user", + "utf16.Decode": "unicode/utf16", + "utf16.DecodeRune": "unicode/utf16", + "utf16.Encode": "unicode/utf16", + "utf16.EncodeRune": "unicode/utf16", + "utf16.IsSurrogate": "unicode/utf16", + "utf8.DecodeLastRune": "unicode/utf8", + "utf8.DecodeLastRuneInString": "unicode/utf8", + "utf8.DecodeRune": "unicode/utf8", + "utf8.DecodeRuneInString": "unicode/utf8", + "utf8.EncodeRune": "unicode/utf8", + "utf8.FullRune": "unicode/utf8", + "utf8.FullRuneInString": "unicode/utf8", + "utf8.MaxRune": "unicode/utf8", + "utf8.RuneCount": "unicode/utf8", + "utf8.RuneCountInString": "unicode/utf8", + "utf8.RuneError": "unicode/utf8", + "utf8.RuneLen": "unicode/utf8", + "utf8.RuneSelf": "unicode/utf8", + "utf8.RuneStart": "unicode/utf8", + "utf8.UTFMax": "unicode/utf8", + "utf8.Valid": "unicode/utf8", + "utf8.ValidRune": "unicode/utf8", + "utf8.ValidString": "unicode/utf8", + "x509.CANotAuthorizedForThisName": "crypto/x509", + "x509.CertPool": "crypto/x509", + "x509.Certificate": "crypto/x509", + "x509.CertificateInvalidError": "crypto/x509", + "x509.CertificateRequest": "crypto/x509", + "x509.ConstraintViolationError": "crypto/x509", + "x509.CreateCertificate": "crypto/x509", + "x509.CreateCertificateRequest": "crypto/x509", + "x509.DSA": "crypto/x509", + "x509.DSAWithSHA1": "crypto/x509", + "x509.DSAWithSHA256": "crypto/x509", + "x509.DecryptPEMBlock": "crypto/x509", + "x509.ECDSA": "crypto/x509", + "x509.ECDSAWithSHA1": "crypto/x509", + "x509.ECDSAWithSHA256": "crypto/x509", + "x509.ECDSAWithSHA384": "crypto/x509", + "x509.ECDSAWithSHA512": "crypto/x509", + "x509.EncryptPEMBlock": "crypto/x509", + "x509.ErrUnsupportedAlgorithm": "crypto/x509", + "x509.Expired": "crypto/x509", + "x509.ExtKeyUsage": "crypto/x509", + "x509.ExtKeyUsageAny": "crypto/x509", + "x509.ExtKeyUsageClientAuth": "crypto/x509", + "x509.ExtKeyUsageCodeSigning": "crypto/x509", + "x509.ExtKeyUsageEmailProtection": "crypto/x509", + "x509.ExtKeyUsageIPSECEndSystem": "crypto/x509", + "x509.ExtKeyUsageIPSECTunnel": "crypto/x509", + "x509.ExtKeyUsageIPSECUser": "crypto/x509", + "x509.ExtKeyUsageMicrosoftServerGatedCrypto": "crypto/x509", + "x509.ExtKeyUsageNetscapeServerGatedCrypto": "crypto/x509", + "x509.ExtKeyUsageOCSPSigning": "crypto/x509", + "x509.ExtKeyUsageServerAuth": "crypto/x509", + "x509.ExtKeyUsageTimeStamping": "crypto/x509", + "x509.HostnameError": "crypto/x509", + "x509.IncompatibleUsage": "crypto/x509", + "x509.IncorrectPasswordError": "crypto/x509", + "x509.InsecureAlgorithmError": "crypto/x509", + "x509.InvalidReason": "crypto/x509", + "x509.IsEncryptedPEMBlock": "crypto/x509", + "x509.KeyUsage": "crypto/x509", + "x509.KeyUsageCRLSign": "crypto/x509", + "x509.KeyUsageCertSign": "crypto/x509", + "x509.KeyUsageContentCommitment": "crypto/x509", + "x509.KeyUsageDataEncipherment": "crypto/x509", + "x509.KeyUsageDecipherOnly": "crypto/x509", + "x509.KeyUsageDigitalSignature": "crypto/x509", + "x509.KeyUsageEncipherOnly": "crypto/x509", + "x509.KeyUsageKeyAgreement": "crypto/x509", + "x509.KeyUsageKeyEncipherment": "crypto/x509", + "x509.MD2WithRSA": "crypto/x509", + "x509.MD5WithRSA": "crypto/x509", + "x509.MarshalECPrivateKey": "crypto/x509", + "x509.MarshalPKCS1PrivateKey": "crypto/x509", + "x509.MarshalPKIXPublicKey": "crypto/x509", + "x509.NameMismatch": "crypto/x509", + "x509.NewCertPool": "crypto/x509", + "x509.NotAuthorizedToSign": "crypto/x509", + "x509.PEMCipher": "crypto/x509", + "x509.PEMCipher3DES": "crypto/x509", + "x509.PEMCipherAES128": "crypto/x509", + "x509.PEMCipherAES192": "crypto/x509", + "x509.PEMCipherAES256": "crypto/x509", + "x509.PEMCipherDES": "crypto/x509", + "x509.ParseCRL": "crypto/x509", + "x509.ParseCertificate": "crypto/x509", + "x509.ParseCertificateRequest": "crypto/x509", + "x509.ParseCertificates": "crypto/x509", + "x509.ParseDERCRL": "crypto/x509", + "x509.ParseECPrivateKey": "crypto/x509", + "x509.ParsePKCS1PrivateKey": "crypto/x509", + "x509.ParsePKCS8PrivateKey": "crypto/x509", + "x509.ParsePKIXPublicKey": "crypto/x509", + "x509.PublicKeyAlgorithm": "crypto/x509", + "x509.RSA": "crypto/x509", + "x509.SHA1WithRSA": "crypto/x509", + "x509.SHA256WithRSA": "crypto/x509", + "x509.SHA256WithRSAPSS": "crypto/x509", + "x509.SHA384WithRSA": "crypto/x509", + "x509.SHA384WithRSAPSS": "crypto/x509", + "x509.SHA512WithRSA": "crypto/x509", + "x509.SHA512WithRSAPSS": "crypto/x509", + "x509.SignatureAlgorithm": "crypto/x509", + "x509.SystemCertPool": "crypto/x509", + "x509.SystemRootsError": "crypto/x509", + "x509.TooManyIntermediates": "crypto/x509", + "x509.UnhandledCriticalExtension": "crypto/x509", + "x509.UnknownAuthorityError": "crypto/x509", + "x509.UnknownPublicKeyAlgorithm": "crypto/x509", + "x509.UnknownSignatureAlgorithm": "crypto/x509", + "x509.VerifyOptions": "crypto/x509", + "xml.Attr": "encoding/xml", + "xml.CharData": "encoding/xml", + "xml.Comment": "encoding/xml", + "xml.CopyToken": "encoding/xml", + "xml.Decoder": "encoding/xml", + "xml.Directive": "encoding/xml", + "xml.Encoder": "encoding/xml", + "xml.EndElement": "encoding/xml", + "xml.Escape": "encoding/xml", + "xml.EscapeText": "encoding/xml", + "xml.HTMLAutoClose": "encoding/xml", + "xml.HTMLEntity": "encoding/xml", + "xml.Header": "encoding/xml", + "xml.Marshal": "encoding/xml", + "xml.MarshalIndent": "encoding/xml", + "xml.Marshaler": "encoding/xml", + "xml.MarshalerAttr": "encoding/xml", + "xml.Name": "encoding/xml", + "xml.NewDecoder": "encoding/xml", + "xml.NewEncoder": "encoding/xml", + "xml.ProcInst": "encoding/xml", + "xml.StartElement": "encoding/xml", + "xml.SyntaxError": "encoding/xml", + "xml.TagPathError": "encoding/xml", + "xml.Token": "encoding/xml", + "xml.Unmarshal": "encoding/xml", + "xml.UnmarshalError": "encoding/xml", + "xml.Unmarshaler": "encoding/xml", + "xml.UnmarshalerAttr": "encoding/xml", + "xml.UnsupportedTypeError": "encoding/xml", + "zip.Compressor": "archive/zip", + "zip.Decompressor": "archive/zip", + "zip.Deflate": "archive/zip", + "zip.ErrAlgorithm": "archive/zip", + "zip.ErrChecksum": "archive/zip", + "zip.ErrFormat": "archive/zip", + "zip.File": "archive/zip", + "zip.FileHeader": "archive/zip", + "zip.FileInfoHeader": "archive/zip", + "zip.NewReader": "archive/zip", + "zip.NewWriter": "archive/zip", + "zip.OpenReader": "archive/zip", + "zip.ReadCloser": "archive/zip", + "zip.Reader": "archive/zip", + "zip.RegisterCompressor": "archive/zip", + "zip.RegisterDecompressor": "archive/zip", + "zip.Store": "archive/zip", + "zip.Writer": "archive/zip", + "zlib.BestCompression": "compress/zlib", + "zlib.BestSpeed": "compress/zlib", + "zlib.DefaultCompression": "compress/zlib", + "zlib.ErrChecksum": "compress/zlib", + "zlib.ErrDictionary": "compress/zlib", + "zlib.ErrHeader": "compress/zlib", + "zlib.HuffmanOnly": "compress/zlib", + "zlib.NewReader": "compress/zlib", + "zlib.NewReaderDict": "compress/zlib", + "zlib.NewWriter": "compress/zlib", + "zlib.NewWriterLevel": "compress/zlib", + "zlib.NewWriterLevelDict": "compress/zlib", + "zlib.NoCompression": "compress/zlib", + "zlib.Resetter": "compress/zlib", + "zlib.Writer": "compress/zlib", +} diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go new file mode 100644 index 00000000..c532e8dd --- /dev/null +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -0,0 +1,1403 @@ +// Copyright 2011-2015 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package types + +import ( + "bytes" + "fmt" + "go/ast" + "go/build" + "go/importer" + "go/parser" + "go/printer" + "go/token" + "go/types" + "io/ioutil" + "log" + "os" + "path/filepath" + "regexp" + "sort" + "strconv" + "strings" + "time" + + "github.com/visualfc/gotools/pkg/buildctx" + "github.com/visualfc/gotools/pkg/command" + "github.com/visualfc/gotools/pkg/gomod" + "github.com/visualfc/gotools/pkg/pkgutil" + "github.com/visualfc/gotools/pkg/stdlib" + "golang.org/x/tools/go/buildutil" +) + +var Command = &command.Command{ + Run: runTypes, + UsageLine: "types", + Short: "golang type util", + Long: `golang type util`, +} + +var ( + typesVerbose bool + typesAllowBinary bool + typesFilePos string + typesFileStdin bool + typesFindUse bool + typesFindDef bool + typesFindUseAll bool + typesFindInfo bool + typesFindDoc bool + typesTags string + typesTagList = []string{} // exploded version of tags flag; set in main +) + +//func init +func init() { + Command.Flag.BoolVar(&typesVerbose, "v", false, "verbose debugging") + Command.Flag.BoolVar(&typesAllowBinary, "b", false, "import can be satisfied by a compiled package object without corresponding sources.") + Command.Flag.StringVar(&typesFilePos, "pos", "", "file position \"file.go:pos\"") + Command.Flag.BoolVar(&typesFileStdin, "stdin", false, "input file use stdin") + Command.Flag.BoolVar(&typesFindInfo, "info", false, "find cursor info") + Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define") + Command.Flag.BoolVar(&typesFindUse, "use", false, "find cursor usages") + Command.Flag.BoolVar(&typesFindUseAll, "all", false, "find cursor all usages in GOPATH") + Command.Flag.BoolVar(&typesFindDoc, "doc", false, "find cursor def doc") + Command.Flag.StringVar(&typesTags, "tags", "", "space-separated list of build tags to apply when parsing") +} + +type ObjKind int + +const ( + ObjNone ObjKind = iota + ObjPkgName + ObjTypeName + ObjInterface + ObjStruct + ObjConst + ObjVar + ObjField + ObjFunc + ObjMethod + ObjLabel + ObjBuiltin + ObjNil + ObjImplicit + ObjUnknown + ObjComment +) + +var ObjKindName = []string{"none", "package", + "type", "interface", "struct", + "const", "var", "field", + "func", "method", + "label", "builtin", "nil", + "implicit", "unknown", "comment"} + +func (k ObjKind) String() string { + if k >= 0 && int(k) < len(ObjKindName) { + return ObjKindName[k] + } + return "unkwnown" +} + +var builtinInfoMap = map[string]string{ + "append": "func append(slice []Type, elems ...Type) []Type", + "copy": "func copy(dst, src []Type) int", + "delete": "func delete(m map[Type]Type1, key Type)", + "len": "func len(v Type) int", + "cap": "func cap(v Type) int", + "make": "func make(Type, size IntegerType) Type", + "new": "func new(Type) *Type", + "complex": "func complex(r, i FloatType) ComplexType", + "real": "func real(c ComplexType) FloatType", + "imag": "func imag(c ComplexType) FloatType", + "close": "func close(c chan<- Type)", + "panic": "func panic(v interface{})", + "recover": "func recover() interface{}", + "print": "func print(args ...Type)", + "println": "func println(args ...Type)", + "error": "type error interface {Error() string}", + "Sizeof": "func unsafe.Sizeof(any) uintptr", + "Offsetof": "func unsafe.Offsetof(any) uintptr", + "Alignof": "func unsafe.Alignof(any) uintptr", +} + +func builtinInfo(id string) string { + if info, ok := builtinInfoMap[id]; ok { + return "builtin " + info + } + return "builtin " + id +} + +func simpleObjInfo(obj types.Object) string { + s := obj.String() + pkg := obj.Pkg() + if pkg != nil { + s = strings.Replace(s, pkg.Path(), pkg.Name(), -1) + s = simpleType(s) + if pkg.Name() == "main" { + s = strings.Replace(s, "main.", "", -1) + } + } + return s +} + +func simpleType(src string) string { + re, _ := regexp.Compile("[\\w\\./]+") + return re.ReplaceAllStringFunc(src, func(s string) string { + r := s + if i := strings.LastIndex(s, "/"); i != -1 { + r = s[i+1:] + } + if strings.Count(r, ".") > 1 { + r = r[strings.Index(r, ".")+1:] + } + return r + }) +} + +func runTypes(cmd *command.Command, args []string) error { + if len(args) < 1 { + cmd.Usage() + return nil + } + if typesVerbose { + now := time.Now() + defer func() { + cmd.Println("time", time.Now().Sub(now)) + }() + } + typesTagList = strings.Split(typesTags, " ") + context := buildctx.System() + context.BuildTags = append(typesTagList, context.BuildTags...) + + w := NewPkgWalker(context) + var cursor *FileCursor + if typesFilePos != "" { + var cursorInfo FileCursor + pos := strings.Index(typesFilePos, ":") + if pos != -1 { + cursorInfo.fileName = typesFilePos[:pos] + if i, err := strconv.Atoi(typesFilePos[pos+1:]); err == nil { + cursorInfo.cursorPos = i + } + } + if typesFileStdin { + src, err := ioutil.ReadAll(cmd.Stdin) + if err == nil { + cursorInfo.src = src + } + } + cursor = &cursorInfo + } + w.cursor = cursor + w.cmd = cmd + for _, pkgName := range args { + if pkgName == "." { + pkgPath, err := os.Getwd() + if err != nil { + return err + } + pkgName = pkgPath + } + conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: true} + if cursor != nil { + cursor.pkgName = pkgName + conf.Cursor = cursor + conf.IgnoreFuncBodies = false + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + //Types: make(map[ast.Expr]types.TypeAndValue), + //Scopes : make(map[ast.Node]*types.Scope) + //Implicits : make(map[ast.Node]types.Object) + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } + } + pkg, err := w.Check(pkgName, conf) + if pkg == nil { + return fmt.Errorf("error import path %v", err) + } + if cursor != nil && (typesFindInfo || typesFindDef || typesFindUse) { + return w.LookupCursor(pkg, conf, cursor) + } + } + return nil +} + +type FileCursor struct { + pkgName string + fileName string + fileDir string + cursorPos int + pos token.Pos + src interface{} + xtest bool +} + +func NewFileCursor(src interface{}, filename string, pos int) *FileCursor { + return &FileCursor{fileName: filename, cursorPos: pos, src: src} +} + +type PkgConfig struct { + IgnoreFuncBodies bool + AllowBinary bool + WithTestFiles bool + Cursor *FileCursor + Pkg *types.Package + XPkg *types.Package + Info *types.Info + XInfo *types.Info + Files map[string]*ast.File + XTestFiles map[string]*ast.File +} + +func NewPkgWalker(context *build.Context) *PkgWalker { + return &PkgWalker{ + Context: context, + fset: token.NewFileSet(), + parsedFileCache: map[string]*ast.File{}, + parsedFileMod: map[string]int64{}, + importingName: map[string]bool{}, + Imported: map[string]*types.Package{"unsafe": types.Unsafe}, + ImportedMod: map[string]int64{}, + gcimported: importer.Default(), + } +} + +type PkgWalker struct { + fset *token.FileSet + Context *build.Context + current *types.Package + importingName map[string]bool + parsedFileCache map[string]*ast.File + parsedFileMod map[string]int64 + Imported map[string]*types.Package // packages already imported + ImportedMod map[string]int64 + gcimported types.Importer + cursor *FileCursor + cmd *command.Command + mod *gomod.ModuleList + //importing types.Package +} + +func DefaultPkgConfig() *PkgConfig { + conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} + return conf +} + +func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err error) { + if name == "." { + name, _ = os.Getwd() + } + if conf == nil { + conf = DefaultPkgConfig() + } + if conf.Cursor != nil { + conf.Cursor.pkgName = name + } + + p.Imported[name] = nil + p.importingName = make(map[string]bool) + pkg, err = p.Import("", name, conf) + return +} + +func contains(list []string, s string) bool { + for _, t := range list { + if t == s { + return true + } + } + return false +} + +func (w *PkgWalker) isBinaryPkg(pkg string) bool { + return stdlib.IsStdPkg(pkg) +} + +func (w *PkgWalker) importPath(path string, mode build.ImportMode) (*build.Package, error) { + if filepath.IsAbs(path) { + return w.Context.ImportDir(path, 0) + } + if stdlib.IsStdPkg(path) { + return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) + } + //check mod + if w.mod != nil { + module, _, dir := w.mod.LookupModule(path) + if module != nil { + pkg, err := w.Context.ImportDir(dir, mode) + if pkg != nil { + pkg.ImportPath = path + } + return pkg, err + } + } + return w.Context.Import(path, "", mode) +} + +func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig) (pkg *types.Package, err error) { + return w.ImportHelper(parentDir, name, "", conf) +} + +func lastModTime(dir string, files []string) int64 { + var lastTime int64 + for _, file := range files { + filename := filepath.Join(dir, file) + info, err := os.Lstat(filename) + if err != nil { + continue + } + t := info.ModTime().UnixNano() + if t > lastTime { + lastTime = t + } + } + return lastTime +} + +func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig) (pkg *types.Package, err error) { + defer func() { + err := recover() + if err != nil && typesVerbose { + fmt.Println(w.cmd.Stderr, err) + } + }() + + if parentDir != "" { + if strings.HasPrefix(name, ".") { + name = filepath.Join(parentDir, name) + } else if pkgutil.IsVendorExperiment() { + parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) + var err error + name, err = pkgutil.VendoredImportPath(parentPkg, name) + if err != nil { + return nil, err + } + } + } + + // parser cursor mod + if filepath.IsAbs(name) { + w.mod = gomod.LooupModList(name) + if typesVerbose && w.mod != nil { + log.Println("parser mod", w.mod.Module) + } + } + + bp, err := w.importPath(name, 0) + + if bp == nil { + return nil, err + } + GoFiles := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...) + XTestFiles := append([]string{}, bp.XTestGoFiles...) + + if conf.WithTestFiles { + GoFiles = append(GoFiles, bp.TestGoFiles...) + } + + pkg = w.Imported[name] + lastMod := lastModTime(bp.Dir, GoFiles) + if pkg != nil { + if t, ok := w.ImportedMod[name]; ok { + if t == lastMod { + return pkg, nil + } + } + } + + if typesVerbose { + w.cmd.Println("parser pkg", parentDir, name) + } + checkName := name + + if bp.ImportPath == "." { + checkName = bp.Name + } else { + checkName = bp.ImportPath + } + + if import_path != "" { + checkName = import_path + } + + if w.importingName[checkName] { + return nil, fmt.Errorf("cycle importing package %q", name) + } + + w.importingName[checkName] = true + + // if err != nil { + // return nil, err + // //if _, nogo := err.(*build.NoGoError); nogo { + // // return + // //} + // //return + // //log.Fatalf("pkg %q, dir %q: ScanDir: %v", name, info.Dir, err) + // } + + if name == "runtime" { + n := fmt.Sprintf("zgoos_%s.go", w.Context.GOOS) + if !contains(GoFiles, n) { + GoFiles = append(GoFiles, n) + } + + n = fmt.Sprintf("zgoarch_%s.go", w.Context.GOARCH) + if !contains(GoFiles, n) { + GoFiles = append(GoFiles, n) + } + } + + if conf.Cursor != nil && conf.Cursor.fileName != "" { + cursor := conf.Cursor + f, _ := w.parseFileEx(bp.Dir, cursor.fileName, cursor.src, true) + if f != nil { + cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) + cursor.fileDir = bp.Dir + isTest := strings.HasSuffix(cursor.fileName, "_test.go") + isXTest := false + if isTest && strings.HasSuffix(f.Name.Name, "_test") { + isXTest = true + } + cursor.xtest = isXTest + checkAppend := func(filenames []string, file string) []string { + for _, f := range filenames { + if f == file { + return filenames + } + } + return append(filenames, file) + } + if isXTest { + XTestFiles = checkAppend(XTestFiles, cursor.fileName) + } else { + GoFiles = checkAppend(GoFiles, cursor.fileName) + } + } + } + + parserFiles := func(filenames []string, cursor *FileCursor, xtest bool) (files []*ast.File, fileMap map[string]*ast.File) { + fileMap = make(map[string]*ast.File) + for _, file := range filenames { + var f *ast.File + if cursor != nil && cursor.fileName == file { + f, err = w.parseFile(bp.Dir, file, cursor.src) + cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) + cursor.fileDir = bp.Dir + cursor.xtest = xtest + } else { + f, err = w.parseFile(bp.Dir, file, nil) + } + if err != nil && typesVerbose { + fmt.Fprintln(w.cmd.Stderr, err) + } + files = append(files, f) + fileMap[file] = f + } + return + } + var files []*ast.File + var xfiles []*ast.File + files, conf.Files = parserFiles(GoFiles, conf.Cursor, false) + xfiles, conf.XTestFiles = parserFiles(bp.XTestGoFiles, conf.Cursor, true) + + typesConf := types.Config{ + IgnoreFuncBodies: conf.IgnoreFuncBodies, + FakeImportC: true, + Importer: &Importer{w, conf, bp.Dir}, + Error: func(err error) { + if typesVerbose { + fmt.Fprintln(w.cmd.Stderr, err) + } + }, + } + + pkg, err = typesConf.Check(checkName, w.fset, files, conf.Info) + conf.Pkg = pkg + + w.importingName[checkName] = false + w.Imported[name] = pkg + w.ImportedMod[name] = lastMod + + if len(xfiles) > 0 { + xpkg, _ := typesConf.Check(checkName+"_test", w.fset, xfiles, conf.XInfo) + w.Imported[checkName+"_test"] = xpkg + conf.XPkg = xpkg + } + return +} + +type Importer struct { + w *PkgWalker + conf *PkgConfig + dir string +} + +func (im *Importer) Import(name string) (pkg *types.Package, err error) { + if im.conf.AllowBinary && im.w.isBinaryPkg(name) { + if found := im.w.Imported[name]; found != nil { + return found, nil + } + pkg, err = im.w.gcimported.Import(name) + if pkg != nil && pkg.Complete() { + im.w.Imported[name] = pkg + return + } + // pkg = im.w.gcimporter[name] + // if pkg != nil && pkg.Complete() { + // return + // } + // pkg, err = importer.Default().Import(name) + // if pkg != nil && pkg.Complete() { + // im.w.gcimporter[name] = pkg + // return + // } + } + return im.w.Import(im.dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false}) +} + +func (w *PkgWalker) parseFile(dir, file string, src interface{}) (*ast.File, error) { + return w.parseFileEx(dir, file, src, typesFindDoc) +} + +func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, findDoc bool) (*ast.File, error) { + filename := filepath.Join(dir, file) + if src == nil { + if f, ok := w.parsedFileCache[filename]; ok { + if i, ok := w.parsedFileMod[filename]; ok { + info, err := os.Stat(filename) + if err == nil && info.ModTime().UnixNano() == i { + return f, nil + } + } + } + } + + var f *ast.File + var err error + // generate missing context-dependent files. + if w.Context != nil && file == fmt.Sprintf("zgoos_%s.go", w.Context.GOOS) { + src := fmt.Sprintf("package runtime; const theGoos = `%s`", w.Context.GOOS) + f, err = parser.ParseFile(w.fset, filename, src, 0) + if err != nil { + fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) + } + } + + if w.Context != nil && file == fmt.Sprintf("zgoarch_%s.go", w.Context.GOARCH) { + src := fmt.Sprintf("package runtime; const theGoarch = `%s`", w.Context.GOARCH) + f, err = parser.ParseFile(w.fset, filename, src, 0) + if err != nil { + fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) + } + } + + if f == nil { + flag := parser.AllErrors + if findDoc { + flag |= parser.ParseComments + } + f, err = parser.ParseFile(w.fset, filename, src, flag) + if err != nil { + return f, err + } + } + info, err := os.Stat(filename) + if err == nil { + w.parsedFileMod[filename] = info.ModTime().UnixNano() + } + w.parsedFileCache[filename] = f + return f, nil +} + +func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *FileCursor) error { + if nm := w.CheckIsName(cursor); nm != nil { + return w.LookupName(pkg, conf, cursor, nm) + } else if is := w.CheckIsImport(cursor); is != nil { + if cursor.xtest { + return w.LookupImport(conf.XPkg, conf.XInfo, cursor, is) + } else { + return w.LookupImport(conf.Pkg, conf.Info, cursor, is) + } + } else { + return w.LookupObjects(conf, cursor) + } +} + +func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *FileCursor, nm *ast.Ident) error { + if typesFindDef { + w.cmd.Println(w.fset.Position(nm.Pos())) + } + if typesFindInfo { + if cursor.xtest { + w.cmd.Printf("package %s (%q)\n", pkg.Name()+"_test", pkg.Path()) + } else { + if pkg.Path() == pkg.Name() { + w.cmd.Printf("package %s\n", pkg.Name()) + } else { + w.cmd.Printf("package %s (%q)\n", pkg.Name(), pkg.Path()) + } + } + } + + if !typesFindUse { + return nil + } + var usages []int + findUsage := func(fileMap map[string]*ast.File) { + for _, f := range fileMap { + if f != nil && f.Name != nil && f.Name.Name == nm.Name { + usages = append(usages, int(f.Name.Pos())) + } + } + } + if cursor.xtest { + findUsage(conf.XTestFiles) + } else { + findUsage(conf.Files) + } + (sort.IntSlice(usages)).Sort() + for _, pos := range usages { + w.cmd.Println(w.fset.Position(token.Pos(pos))) + } + return nil +} + +func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor *FileCursor, is *ast.ImportSpec) error { + fpath, err := strconv.Unquote(is.Path.Value) + if err != nil { + return err + } + + fbase := fpath + pos := strings.LastIndexAny(fpath, "./-\\") + if pos != -1 { + fbase = fpath[pos+1:] + } + + var fname string + if is.Name != nil { + fname = is.Name.Name + } else { + fname = fbase + } + + var bp *build.Package + if typesFindDef { + var findpath string = fpath + //check imported and vendor + for _, v := range w.Imported { + vpath := v.Path() + pos := strings.Index(vpath, "/vendor/") + if pos >= 0 { + vpath = vpath[pos+8:] + } + if vpath == fpath { + findpath = v.Path() + break + } + } + bp, err = w.importPath(findpath, build.FindOnly) + if err == nil { + w.cmd.Println(w.fset.Position(is.Pos()).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) + } else { + w.cmd.Println(w.fset.Position(is.Pos())) + } + } + + if typesFindInfo { + if fname == fpath { + w.cmd.Printf("import %s\n", fname) + } else { + w.cmd.Printf("import %s (%q)\n", fname, fpath) + } + } + + if typesFindDoc && bp != nil && bp.Doc != "" { + w.cmd.Println(bp.Doc) + } + + if !typesFindUse { + return nil + } + + fid := pkg.Path() + "." + fname + + var usages []int + for id, obj := range pkgInfo.Uses { + if obj != nil && obj.Id() == fid { //!= nil && cursorObj.Pos() == obj.Pos() { + if _, ok := obj.(*types.PkgName); ok { + usages = append(usages, int(id.Pos())) + } + } + } + (sort.IntSlice(usages)).Sort() + for _, pos := range usages { + w.cmd.Println(w.fset.Position(token.Pos(pos))) + } + return nil +} + +func testObjKind(obj types.Object, kind ObjKind) bool { + k, err := parserObjKind(obj) + if err != nil { + return false + } + return k == kind +} + +func parserObjKind(obj types.Object) (ObjKind, error) { + var kind ObjKind + switch t := obj.(type) { + case *types.PkgName: + kind = ObjPkgName + case *types.Const: + kind = ObjConst + case *types.TypeName: + kind = ObjTypeName + switch t.Type().Underlying().(type) { + case *types.Interface: + kind = ObjInterface + case *types.Struct: + kind = ObjStruct + } + case *types.Var: + kind = ObjVar + if t.IsField() { + kind = ObjField + } + case *types.Func: + kind = ObjFunc + if sig, ok := t.Type().(*types.Signature); ok { + if sig.Recv() != nil { + kind = ObjMethod + } + } + case *types.Label: + kind = ObjLabel + case *types.Builtin: + kind = ObjBuiltin + case *types.Nil: + kind = ObjNil + default: + return ObjNone, fmt.Errorf("unknown obj type %T", obj) + } + return kind, nil +} + +func (w *PkgWalker) LookupStructFromField(info *types.Info, cursorPkg *types.Package, cursorObj types.Object, cursorPos token.Pos) types.Object { + if info == nil { + conf := &PkgConfig{ + IgnoreFuncBodies: true, + AllowBinary: true, + WithTestFiles: true, + Info: &types.Info{ + Defs: make(map[*ast.Ident]types.Object), + }, + } + w.Imported[cursorPkg.Path()] = nil + pkg, _ := w.Import("", cursorPkg.Path(), conf) + if pkg != nil { + info = conf.Info + } + } + for _, obj := range info.Defs { + if obj == nil { + continue + } + if _, ok := obj.(*types.TypeName); ok { + if t, ok := obj.Type().Underlying().(*types.Struct); ok { + for i := 0; i < t.NumFields(); i++ { + if t.Field(i).Pos() == cursorPos { + return obj + } + } + } + } + } + return nil +} + +func (w *PkgWalker) lookupNamedField(named *types.Named, name string) *types.Named { + if istruct, ok := named.Underlying().(*types.Struct); ok { + for i := 0; i < istruct.NumFields(); i++ { + field := istruct.Field(i) + if field.Anonymous() { + fieldType := orgType(field.Type()) + if typ, ok := fieldType.(*types.Named); ok { + if na := w.lookupNamedField(typ, name); na != nil { + return na + } + } + } else { + if field.Name() == name { + return named + } + } + } + } + return nil +} + +func (w *PkgWalker) lookupNamedMethod(named *types.Named, name string) (types.Object, *types.Named) { + if iface, ok := named.Underlying().(*types.Interface); ok { + for i := 0; i < iface.NumMethods(); i++ { + fn := iface.Method(i) + if fn.Name() == name { + return fn, named + } + } + for i := 0; i < iface.NumEmbeddeds(); i++ { + if obj, na := w.lookupNamedMethod(iface.Embedded(i), name); obj != nil { + return obj, na + } + } + return nil, nil + } + if istruct, ok := named.Underlying().(*types.Struct); ok { + for i := 0; i < named.NumMethods(); i++ { + fn := named.Method(i) + if fn.Name() == name { + return fn, named + } + } + for i := 0; i < istruct.NumFields(); i++ { + field := istruct.Field(i) + if !field.Anonymous() { + continue + } + if typ, ok := field.Type().(*types.Named); ok { + if obj, na := w.lookupNamedMethod(typ, name); obj != nil { + return obj, na + } + } + } + } + return nil, nil +} + +func IsSamePkg(a, b *types.Package) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return a.Path() == b.Path() +} + +func IsSameObject(a, b types.Object) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + var apath string + var bpath string + if a.Pkg() != nil { + apath = a.Pkg().Path() + } + if b.Pkg() != nil { + bpath = b.Pkg().Path() + } + if apath != bpath { + return false + } + if a.Id() != b.Id() { + return false + } + if a.Type().String() != b.Type().String() { + return false + } + t1, ok1 := a.(*types.TypeName) + t2, ok2 := b.(*types.TypeName) + if ok1 && ok2 { + return t1.Type().String() == t2.Type().String() + } + return a.String() == b.String() +} + +func orgType(typ types.Type) types.Type { + if pt, ok := typ.(*types.Pointer); ok { + return pt.Elem() + } + return typ +} + +func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { + var cursorObj types.Object + var cursorSelection *types.Selection + var cursorObjIsDef bool + //lookup defs + + var pkg *types.Package + var pkgInfo *types.Info + if cursor.xtest { + pkgInfo = conf.XInfo + pkg = conf.XPkg + } else { + pkgInfo = conf.Info + pkg = conf.Pkg + } + + _ = cursorObjIsDef + if cursorObj == nil { + for sel, obj := range pkgInfo.Selections { + if cursor.pos >= sel.Sel.Pos() && cursor.pos <= sel.Sel.End() { + cursorObj = obj.Obj() + cursorSelection = obj + break + } + } + } + var cursorId *ast.Ident + if cursorObj == nil { + for id, obj := range pkgInfo.Defs { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + cursorId = id + cursorObjIsDef = true + break + } + } + } + _ = cursorSelection + if cursorObj == nil { + for id, obj := range pkgInfo.Uses { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + break + } + } + } + + var kind ObjKind + if cursorObj != nil { + var err error + kind, err = parserObjKind(cursorObj) + if err != nil { + return err + } + } else if cursorId != nil { + kind = ObjImplicit + } else { + //TODO + return nil + } + + if kind == ObjField { + if cursorObj.(*types.Var).Anonymous() { + typ := orgType(cursorObj.Type()) + if named, ok := typ.(*types.Named); ok { + cursorObj = named.Obj() + } + } + } + + var cursorPkg *types.Package + var cursorPos token.Pos + + if cursorObj != nil { + cursorPkg = cursorObj.Pkg() + cursorPos = cursorObj.Pos() + } else { + cursorPkg = pkg + cursorPos = cursorId.Pos() + } + + //var fieldTypeInfo *types.Info + var fieldTypeObj types.Object + // if cursorPkg == pkg { + // fieldTypeInfo = pkgInfo + // } + cursorIsInterfaceMethod := false + var cursorInterfaceTypeName string + var cursorInterfaceTypeNamed *types.Named + + if kind == ObjMethod && cursorSelection != nil && cursorSelection.Recv() != nil { + sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature) + if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { + if named, ok := cursorSelection.Recv().(*types.Named); ok { + obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) + if obj != nil { + cursorObj = obj + } + if typ != nil { + cursorPkg = typ.Obj().Pkg() + cursorInterfaceTypeName = typ.Obj().Name() + } + cursorIsInterfaceMethod = true + cursorInterfaceTypeNamed = named + } + } + } else if kind == ObjField && cursorSelection != nil { + if recv := cursorSelection.Recv(); recv != nil { + typ := orgType(recv) + if typ != nil { + if name, ok := typ.(*types.Named); ok { + fieldTypeObj = name.Obj() + na := w.lookupNamedField(name, cursorObj.Name()) + if na != nil { + fieldTypeObj = na.Obj() + } + } + } + } + } + if typesVerbose { + w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) + } + if cursorPkg != nil && cursorPkg != pkg && + kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { + conf := &PkgConfig{ + IgnoreFuncBodies: true, + AllowBinary: true, + WithTestFiles: true, + Info: &types.Info{ + Defs: make(map[*ast.Ident]types.Object), + }, + } + pkg, _ := w.Import("", cursorPkg.Path(), conf) + if pkg != nil { + if cursorIsInterfaceMethod { + for k, v := range conf.Info.Defs { + if k != nil && v != nil && IsSameObject(v, cursorInterfaceTypeNamed.Obj()) { + named := v.Type().(*types.Named) + obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) + if obj != nil { + cursorObj = obj + cursorPos = obj.Pos() + } + if obj != nil { + cursorObj = obj + } + if typ != nil { + cursorPkg = typ.Obj().Pkg() + cursorInterfaceTypeName = typ.Obj().Name() + } + break + } + } + // for _, obj := range conf.Info.Defs { + // if obj == nil { + // continue + // } + // if fn, ok := obj.(*types.Func); ok { + // if fn.Name() == cursorObj.Name() { + // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { + // if named, ok := sig.Recv().Type().(*types.Named); ok { + // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { + // cursorPos = obj.Pos() + // break + // } + // } + // } + // } + // } + // } + } else if kind == ObjField && fieldTypeObj != nil { + for _, obj := range conf.Info.Defs { + if obj == nil { + continue + } + if _, ok := obj.(*types.TypeName); ok { + if IsSameObject(fieldTypeObj, obj) { + if t, ok := obj.Type().Underlying().(*types.Struct); ok { + for i := 0; i < t.NumFields(); i++ { + if t.Field(i).Id() == cursorObj.Id() { + cursorPos = t.Field(i).Pos() + break + } + } + } + break + } + } + } + } else { + for k, v := range conf.Info.Defs { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + cursorPos = k.Pos() + break + } + } + } + } + // if kind == ObjField || cursorIsInterfaceMethod { + // fieldTypeInfo = conf.Info + // } + } + // if kind == ObjField { + // fieldTypeObj = w.LookupStructFromField(fieldTypeInfo, cursorPkg, cursorObj, cursorPos) + // } + if typesFindDef { + w.cmd.Println(w.fset.Position(cursorPos)) + } + if typesFindInfo { + /*if kind == ObjField && fieldTypeObj != nil { + typeName := fieldTypeObj.Name() + if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg { + typeName = fieldTypeObj.Pkg().Name() + "." + fieldTypeObj.Name() + } + fmt.Println(typeName, simpleObjInfo(cursorObj)) + } else */ + if kind == ObjBuiltin { + w.cmd.Println(builtinInfo(cursorObj.Name())) + } else if kind == ObjPkgName { + w.cmd.Println(cursorObj.String()) + } else if kind == ObjImplicit { + w.cmd.Printf("%s is implicit\n", cursorId.Name) + } else if cursorIsInterfaceMethod { + w.cmd.Println(strings.Replace(simpleObjInfo(cursorObj), "(interface)", cursorPkg.Name()+"."+cursorInterfaceTypeName, 1)) + } else { + w.cmd.Println(simpleObjInfo(cursorObj)) + } + } + + if typesFindDoc && typesFindDef { + pos := w.fset.Position(cursorPos) + file := w.parsedFileCache[pos.Filename] + if file != nil { + line := pos.Line + var group *ast.CommentGroup + for _, v := range file.Comments { + lastLine := w.fset.Position(v.End()).Line + if lastLine == line || lastLine == line-1 { + group = v + } else if lastLine > line { + break + } + } + if group != nil { + w.cmd.Println(group.Text()) + } + } + } + if !typesFindUse { + return nil + } + + var usages []int + if kind == ObjPkgName { + for id, obj := range pkgInfo.Uses { + if obj != nil && obj.Id() == cursorObj.Id() { //!= nil && cursorObj.Pos() == obj.Pos() { + if _, ok := obj.(*types.PkgName); ok { + usages = append(usages, int(id.Pos())) + } + } + } + } else { + // for id, obj := range pkgInfo.Defs { + // if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() { + // usages = append(usages, int(id.Pos())) + // } + // } + if cursorObj != nil { + for id, obj := range pkgInfo.Uses { + if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() { + usages = append(usages, int(id.Pos())) + } + } + } else { + for id, obj := range pkgInfo.Uses { + if obj != nil && obj.Pos() == cursorPos { //!= nil && cursorObj.Pos() == obj.Pos() { + usages = append(usages, int(id.Pos())) + } + } + } + } + var pkg_path string + var xpkg_path string + if conf.Pkg != nil { + pkg_path = conf.Pkg.Path() + } + if conf.XPkg != nil { + xpkg_path = conf.XPkg.Path() + } + + if cursorPkg != nil && + (cursorPkg.Path() == pkg_path || cursorPkg.Path() == xpkg_path) && + kind != ObjPkgName { + usages = append(usages, int(cursorPos)) + } + + (sort.IntSlice(usages)).Sort() + for _, pos := range usages { + w.cmd.Println(w.fset.Position(token.Pos(pos))) + } + //check look for current pkg.object on pkg_test + if typesFindUseAll || IsSamePkg(cursorPkg, conf.Pkg) { + var addInfo *types.Info + if conf.Cursor.xtest { + addInfo = conf.Info + } else { + addInfo = conf.XInfo + } + if addInfo != nil && cursorPkg != nil { + var usages []int + // for id, obj := range addInfo.Defs { + // if id != nil && obj != nil && obj.Id() == cursorObj.Id() { + // usages = append(usages, int(id.Pos())) + // } + // } + for k, v := range addInfo.Uses { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + usages = append(usages, int(k.Pos())) + } + } + (sort.IntSlice(usages)).Sort() + for _, pos := range usages { + w.cmd.Println(w.fset.Position(token.Pos(pos))) + } + } + } + if !typesFindUseAll { + return nil + } + + if cursorPkg == nil { + return nil + } + + var find_def_pkg string + var uses_paths []string + if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { + find_def_pkg = cursorPkg.Path() + uses_paths = append(uses_paths, cursorPkg.Path()) + } + + cursorPkgPath := cursorObj.Pkg().Path() + if pkgutil.IsVendorExperiment() { + cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) + } + + buildutil.ForEachPackage(w.Context, func(importPath string, err error) { + if err != nil { + return + } + if importPath == conf.Pkg.Path() { + return + } + bp, err := w.importPath(importPath, 0) + if err != nil { + return + } + find := false + if bp.ImportPath == cursorPkg.Path() { + find = true + } else { + for _, v := range bp.Imports { + if v == cursorPkgPath { + find = true + break + } + } + } + if find { + for _, v := range uses_paths { + if v == bp.ImportPath { + return + } + } + uses_paths = append(uses_paths, bp.ImportPath) + } + }) + + w.Imported = make(map[string]*types.Package) + for _, v := range uses_paths { + conf := &PkgConfig{ + IgnoreFuncBodies: false, + AllowBinary: true, + WithTestFiles: true, + Info: &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + }, + XInfo: &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + }, + } + w.Imported[v] = nil + var usages []int + vpkg, _ := w.Import("", v, conf) + if vpkg != nil && vpkg != pkg { + if conf.Info != nil { + for k, v := range conf.Info.Uses { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + usages = append(usages, int(k.Pos())) + } + } + } + if conf.XInfo != nil { + for k, v := range conf.XInfo.Uses { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + usages = append(usages, int(k.Pos())) + } + } + } + } + if v == find_def_pkg { + usages = append(usages, int(cursorPos)) + } + (sort.IntSlice(usages)).Sort() + for _, pos := range usages { + w.cmd.Println(w.fset.Position(token.Pos(pos))) + } + } + return nil +} + +func (w *PkgWalker) CheckIsName(cursor *FileCursor) *ast.Ident { + if cursor.fileDir == "" { + return nil + } + file, _ := w.parseFile(cursor.fileDir, cursor.fileName, cursor.src) + if file == nil { + return nil + } + if inRange(file.Name, cursor.pos) { + return file.Name + } + return nil +} + +func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec { + if cursor.fileDir == "" { + return nil + } + file, _ := w.parseFile(cursor.fileDir, cursor.fileName, cursor.src) + if file == nil { + return nil + } + for _, is := range file.Imports { + if inRange(is, cursor.pos) { + return is + } + } + return nil +} + +func inRange(node ast.Node, p token.Pos) bool { + if node == nil { + return false + } + return p >= node.Pos() && p <= node.End() +} + +func (w *PkgWalker) nodeString(node interface{}) string { + if node == nil { + return "" + } + var b bytes.Buffer + printer.Fprint(&b, w.fset, node) + return b.String() +} diff --git a/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/golang.org/x/tools/go/buildutil/allpackages.go new file mode 100644 index 00000000..3d29cf3b --- /dev/null +++ b/vendor/golang.org/x/tools/go/buildutil/allpackages.go @@ -0,0 +1,198 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package buildutil provides utilities related to the go/build +// package in the standard library. +// +// All I/O is done via the build.Context file system interface, which must +// be concurrency-safe. +package buildutil + +import ( + "go/build" + "os" + "path/filepath" + "sort" + "strings" + "sync" +) + +// AllPackages returns the package path of each Go package in any source +// directory of the specified build context (e.g. $GOROOT or an element +// of $GOPATH). Errors are ignored. The results are sorted. +// All package paths are canonical, and thus may contain "/vendor/". +// +// The result may include import paths for directories that contain no +// *.go files, such as "archive" (in $GOROOT/src). +// +// All I/O is done via the build.Context file system interface, +// which must be concurrency-safe. +// +func AllPackages(ctxt *build.Context) []string { + var list []string + ForEachPackage(ctxt, func(pkg string, _ error) { + list = append(list, pkg) + }) + sort.Strings(list) + return list +} + +// ForEachPackage calls the found function with the package path of +// each Go package it finds in any source directory of the specified +// build context (e.g. $GOROOT or an element of $GOPATH). +// All package paths are canonical, and thus may contain "/vendor/". +// +// If the package directory exists but could not be read, the second +// argument to the found function provides the error. +// +// All I/O is done via the build.Context file system interface, +// which must be concurrency-safe. +// +func ForEachPackage(ctxt *build.Context, found func(importPath string, err error)) { + ch := make(chan item) + + var wg sync.WaitGroup + for _, root := range ctxt.SrcDirs() { + root := root + wg.Add(1) + go func() { + allPackages(ctxt, root, ch) + wg.Done() + }() + } + go func() { + wg.Wait() + close(ch) + }() + + // All calls to found occur in the caller's goroutine. + for i := range ch { + found(i.importPath, i.err) + } +} + +type item struct { + importPath string + err error // (optional) +} + +// We use a process-wide counting semaphore to limit +// the number of parallel calls to ReadDir. +var ioLimit = make(chan bool, 20) + +func allPackages(ctxt *build.Context, root string, ch chan<- item) { + root = filepath.Clean(root) + string(os.PathSeparator) + + var wg sync.WaitGroup + + var walkDir func(dir string) + walkDir = func(dir string) { + // Avoid .foo, _foo, and testdata directory trees. + base := filepath.Base(dir) + if base == "" || base[0] == '.' || base[0] == '_' || base == "testdata" { + return + } + + pkg := filepath.ToSlash(strings.TrimPrefix(dir, root)) + + // Prune search if we encounter any of these import paths. + switch pkg { + case "builtin": + return + } + + ioLimit <- true + files, err := ReadDir(ctxt, dir) + <-ioLimit + if pkg != "" || err != nil { + ch <- item{pkg, err} + } + for _, fi := range files { + fi := fi + if fi.IsDir() { + wg.Add(1) + go func() { + walkDir(filepath.Join(dir, fi.Name())) + wg.Done() + }() + } + } + } + + walkDir(root) + wg.Wait() +} + +// ExpandPatterns returns the set of packages matched by patterns, +// which may have the following forms: +// +// golang.org/x/tools/cmd/guru # a single package +// golang.org/x/tools/... # all packages beneath dir +// ... # the entire workspace. +// +// Order is significant: a pattern preceded by '-' removes matching +// packages from the set. For example, these patterns match all encoding +// packages except encoding/xml: +// +// encoding/... -encoding/xml +// +// A trailing slash in a pattern is ignored. (Path components of Go +// package names are separated by slash, not the platform's path separator.) +// +func ExpandPatterns(ctxt *build.Context, patterns []string) map[string]bool { + // TODO(adonovan): support other features of 'go list': + // - "std"/"cmd"/"all" meta-packages + // - "..." not at the end of a pattern + // - relative patterns using "./" or "../" prefix + + pkgs := make(map[string]bool) + doPkg := func(pkg string, neg bool) { + if neg { + delete(pkgs, pkg) + } else { + pkgs[pkg] = true + } + } + + // Scan entire workspace if wildcards are present. + // TODO(adonovan): opt: scan only the necessary subtrees of the workspace. + var all []string + for _, arg := range patterns { + if strings.HasSuffix(arg, "...") { + all = AllPackages(ctxt) + break + } + } + + for _, arg := range patterns { + if arg == "" { + continue + } + + neg := arg[0] == '-' + if neg { + arg = arg[1:] + } + + if arg == "..." { + // ... matches all packages + for _, pkg := range all { + doPkg(pkg, neg) + } + } else if dir := strings.TrimSuffix(arg, "/..."); dir != arg { + // dir/... matches all packages beneath dir + for _, pkg := range all { + if strings.HasPrefix(pkg, dir) && + (len(pkg) == len(dir) || pkg[len(dir)] == '/') { + doPkg(pkg, neg) + } + } + } else { + // single package + doPkg(strings.TrimSuffix(arg, "/"), neg) + } + } + + return pkgs +} diff --git a/vendor/golang.org/x/tools/go/buildutil/fakecontext.go b/vendor/golang.org/x/tools/go/buildutil/fakecontext.go new file mode 100644 index 00000000..8b7f0667 --- /dev/null +++ b/vendor/golang.org/x/tools/go/buildutil/fakecontext.go @@ -0,0 +1,109 @@ +package buildutil + +import ( + "fmt" + "go/build" + "io" + "io/ioutil" + "os" + "path" + "path/filepath" + "sort" + "strings" + "time" +) + +// FakeContext returns a build.Context for the fake file tree specified +// by pkgs, which maps package import paths to a mapping from file base +// names to contents. +// +// The fake Context has a GOROOT of "/go" and no GOPATH, and overrides +// the necessary file access methods to read from memory instead of the +// real file system. +// +// Unlike a real file tree, the fake one has only two levels---packages +// and files---so ReadDir("/go/src/") returns all packages under +// /go/src/ including, for instance, "math" and "math/big". +// ReadDir("/go/src/math/big") would return all the files in the +// "math/big" package. +// +func FakeContext(pkgs map[string]map[string]string) *build.Context { + clean := func(filename string) string { + f := path.Clean(filepath.ToSlash(filename)) + // Removing "/go/src" while respecting segment + // boundaries has this unfortunate corner case: + if f == "/go/src" { + return "" + } + return strings.TrimPrefix(f, "/go/src/") + } + + ctxt := build.Default // copy + ctxt.GOROOT = "/go" + ctxt.GOPATH = "" + ctxt.Compiler = "gc" + ctxt.IsDir = func(dir string) bool { + dir = clean(dir) + if dir == "" { + return true // needed by (*build.Context).SrcDirs + } + return pkgs[dir] != nil + } + ctxt.ReadDir = func(dir string) ([]os.FileInfo, error) { + dir = clean(dir) + var fis []os.FileInfo + if dir == "" { + // enumerate packages + for importPath := range pkgs { + fis = append(fis, fakeDirInfo(importPath)) + } + } else { + // enumerate files of package + for basename := range pkgs[dir] { + fis = append(fis, fakeFileInfo(basename)) + } + } + sort.Sort(byName(fis)) + return fis, nil + } + ctxt.OpenFile = func(filename string) (io.ReadCloser, error) { + filename = clean(filename) + dir, base := path.Split(filename) + content, ok := pkgs[path.Clean(dir)][base] + if !ok { + return nil, fmt.Errorf("file not found: %s", filename) + } + return ioutil.NopCloser(strings.NewReader(content)), nil + } + ctxt.IsAbsPath = func(path string) bool { + path = filepath.ToSlash(path) + // Don't rely on the default (filepath.Path) since on + // Windows, it reports virtual paths as non-absolute. + return strings.HasPrefix(path, "/") + } + return &ctxt +} + +type byName []os.FileInfo + +func (s byName) Len() int { return len(s) } +func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } + +type fakeFileInfo string + +func (fi fakeFileInfo) Name() string { return string(fi) } +func (fakeFileInfo) Sys() interface{} { return nil } +func (fakeFileInfo) ModTime() time.Time { return time.Time{} } +func (fakeFileInfo) IsDir() bool { return false } +func (fakeFileInfo) Size() int64 { return 0 } +func (fakeFileInfo) Mode() os.FileMode { return 0644 } + +type fakeDirInfo string + +func (fd fakeDirInfo) Name() string { return string(fd) } +func (fakeDirInfo) Sys() interface{} { return nil } +func (fakeDirInfo) ModTime() time.Time { return time.Time{} } +func (fakeDirInfo) IsDir() bool { return true } +func (fakeDirInfo) Size() int64 { return 0 } +func (fakeDirInfo) Mode() os.FileMode { return 0755 } diff --git a/vendor/golang.org/x/tools/go/buildutil/overlay.go b/vendor/golang.org/x/tools/go/buildutil/overlay.go new file mode 100644 index 00000000..3f71c4fe --- /dev/null +++ b/vendor/golang.org/x/tools/go/buildutil/overlay.go @@ -0,0 +1,103 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package buildutil + +import ( + "bufio" + "bytes" + "fmt" + "go/build" + "io" + "io/ioutil" + "path/filepath" + "strconv" + "strings" +) + +// OverlayContext overlays a build.Context with additional files from +// a map. Files in the map take precedence over other files. +// +// In addition to plain string comparison, two file names are +// considered equal if their base names match and their directory +// components point at the same directory on the file system. That is, +// symbolic links are followed for directories, but not files. +// +// A common use case for OverlayContext is to allow editors to pass in +// a set of unsaved, modified files. +// +// Currently, only the Context.OpenFile function will respect the +// overlay. This may change in the future. +func OverlayContext(orig *build.Context, overlay map[string][]byte) *build.Context { + // TODO(dominikh): Implement IsDir, HasSubdir and ReadDir + + rc := func(data []byte) (io.ReadCloser, error) { + return ioutil.NopCloser(bytes.NewBuffer(data)), nil + } + + copy := *orig // make a copy + ctxt := © + ctxt.OpenFile = func(path string) (io.ReadCloser, error) { + // Fast path: names match exactly. + if content, ok := overlay[path]; ok { + return rc(content) + } + + // Slow path: check for same file under a different + // alias, perhaps due to a symbolic link. + for filename, content := range overlay { + if sameFile(path, filename) { + return rc(content) + } + } + + return OpenFile(orig, path) + } + return ctxt +} + +// ParseOverlayArchive parses an archive containing Go files and their +// contents. The result is intended to be used with OverlayContext. +// +// +// Archive format +// +// The archive consists of a series of files. Each file consists of a +// name, a decimal file size and the file contents, separated by +// newlinews. No newline follows after the file contents. +func ParseOverlayArchive(archive io.Reader) (map[string][]byte, error) { + overlay := make(map[string][]byte) + r := bufio.NewReader(archive) + for { + // Read file name. + filename, err := r.ReadString('\n') + if err != nil { + if err == io.EOF { + break // OK + } + return nil, fmt.Errorf("reading archive file name: %v", err) + } + filename = filepath.Clean(strings.TrimSpace(filename)) + + // Read file size. + sz, err := r.ReadString('\n') + if err != nil { + return nil, fmt.Errorf("reading size of archive file %s: %v", filename, err) + } + sz = strings.TrimSpace(sz) + size, err := strconv.ParseUint(sz, 10, 32) + if err != nil { + return nil, fmt.Errorf("parsing size of archive file %s: %v", filename, err) + } + + // Read file content. + content := make([]byte, size) + if _, err := io.ReadFull(r, content); err != nil { + return nil, fmt.Errorf("reading archive file %s: %v", filename, err) + } + overlay[filename] = content + } + + return overlay, nil +} diff --git a/vendor/golang.org/x/tools/go/buildutil/tags.go b/vendor/golang.org/x/tools/go/buildutil/tags.go new file mode 100644 index 00000000..486606f3 --- /dev/null +++ b/vendor/golang.org/x/tools/go/buildutil/tags.go @@ -0,0 +1,75 @@ +package buildutil + +// This logic was copied from stringsFlag from $GOROOT/src/cmd/go/build.go. + +import "fmt" + +const TagsFlagDoc = "a list of `build tags` to consider satisfied during the build. " + + "For more information about build tags, see the description of " + + "build constraints in the documentation for the go/build package" + +// TagsFlag is an implementation of the flag.Value and flag.Getter interfaces that parses +// a flag value in the same manner as go build's -tags flag and +// populates a []string slice. +// +// See $GOROOT/src/go/build/doc.go for description of build tags. +// See $GOROOT/src/cmd/go/doc.go for description of 'go build -tags' flag. +// +// Example: +// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc) +type TagsFlag []string + +func (v *TagsFlag) Set(s string) error { + var err error + *v, err = splitQuotedFields(s) + if *v == nil { + *v = []string{} + } + return err +} + +func (v *TagsFlag) Get() interface{} { return *v } + +func splitQuotedFields(s string) ([]string, error) { + // Split fields allowing '' or "" around elements. + // Quotes further inside the string do not count. + var f []string + for len(s) > 0 { + for len(s) > 0 && isSpaceByte(s[0]) { + s = s[1:] + } + if len(s) == 0 { + break + } + // Accepted quoted string. No unescaping inside. + if s[0] == '"' || s[0] == '\'' { + quote := s[0] + s = s[1:] + i := 0 + for i < len(s) && s[i] != quote { + i++ + } + if i >= len(s) { + return nil, fmt.Errorf("unterminated %c string", quote) + } + f = append(f, s[:i]) + s = s[i+1:] + continue + } + i := 0 + for i < len(s) && !isSpaceByte(s[i]) { + i++ + } + f = append(f, s[:i]) + s = s[i:] + } + return f, nil +} + +func (v *TagsFlag) String() string { + return "" +} + +func isSpaceByte(c byte) bool { + return c == ' ' || c == '\t' || c == '\n' || c == '\r' +} diff --git a/vendor/golang.org/x/tools/go/buildutil/util.go b/vendor/golang.org/x/tools/go/buildutil/util.go new file mode 100644 index 00000000..fc923d7a --- /dev/null +++ b/vendor/golang.org/x/tools/go/buildutil/util.go @@ -0,0 +1,212 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package buildutil + +import ( + "fmt" + "go/ast" + "go/build" + "go/parser" + "go/token" + "io" + "io/ioutil" + "os" + "path" + "path/filepath" + "strings" +) + +// ParseFile behaves like parser.ParseFile, +// but uses the build context's file system interface, if any. +// +// If file is not absolute (as defined by IsAbsPath), the (dir, file) +// components are joined using JoinPath; dir must be absolute. +// +// The displayPath function, if provided, is used to transform the +// filename that will be attached to the ASTs. +// +// TODO(adonovan): call this from go/loader.parseFiles when the tree thaws. +// +func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, file string, mode parser.Mode) (*ast.File, error) { + if !IsAbsPath(ctxt, file) { + file = JoinPath(ctxt, dir, file) + } + rd, err := OpenFile(ctxt, file) + if err != nil { + return nil, err + } + defer rd.Close() // ignore error + if displayPath != nil { + file = displayPath(file) + } + return parser.ParseFile(fset, file, rd, mode) +} + +// ContainingPackage returns the package containing filename. +// +// If filename is not absolute, it is interpreted relative to working directory dir. +// All I/O is via the build context's file system interface, if any. +// +// The '...Files []string' fields of the resulting build.Package are not +// populated (build.FindOnly mode). +// +func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) { + if !IsAbsPath(ctxt, filename) { + filename = JoinPath(ctxt, dir, filename) + } + + // We must not assume the file tree uses + // "/" always, + // `\` always, + // or os.PathSeparator (which varies by platform), + // but to make any progress, we are forced to assume that + // paths will not use `\` unless the PathSeparator + // is also `\`, thus we can rely on filepath.ToSlash for some sanity. + + dirSlash := path.Dir(filepath.ToSlash(filename)) + "/" + + // We assume that no source root (GOPATH[i] or GOROOT) contains any other. + for _, srcdir := range ctxt.SrcDirs() { + srcdirSlash := filepath.ToSlash(srcdir) + "/" + if importPath, ok := HasSubdir(ctxt, srcdirSlash, dirSlash); ok { + return ctxt.Import(importPath, dir, build.FindOnly) + } + } + + return nil, fmt.Errorf("can't find package containing %s", filename) +} + +// -- Effective methods of file system interface ------------------------- + +// (go/build.Context defines these as methods, but does not export them.) + +// hasSubdir calls ctxt.HasSubdir (if not nil) or else uses +// the local file system to answer the question. +func HasSubdir(ctxt *build.Context, root, dir string) (rel string, ok bool) { + if f := ctxt.HasSubdir; f != nil { + return f(root, dir) + } + + // Try using paths we received. + if rel, ok = hasSubdir(root, dir); ok { + return + } + + // Try expanding symlinks and comparing + // expanded against unexpanded and + // expanded against expanded. + rootSym, _ := filepath.EvalSymlinks(root) + dirSym, _ := filepath.EvalSymlinks(dir) + + if rel, ok = hasSubdir(rootSym, dir); ok { + return + } + if rel, ok = hasSubdir(root, dirSym); ok { + return + } + return hasSubdir(rootSym, dirSym) +} + +func hasSubdir(root, dir string) (rel string, ok bool) { + const sep = string(filepath.Separator) + root = filepath.Clean(root) + if !strings.HasSuffix(root, sep) { + root += sep + } + + dir = filepath.Clean(dir) + if !strings.HasPrefix(dir, root) { + return "", false + } + + return filepath.ToSlash(dir[len(root):]), true +} + +// FileExists returns true if the specified file exists, +// using the build context's file system interface. +func FileExists(ctxt *build.Context, path string) bool { + if ctxt.OpenFile != nil { + r, err := ctxt.OpenFile(path) + if err != nil { + return false + } + r.Close() // ignore error + return true + } + _, err := os.Stat(path) + return err == nil +} + +// OpenFile behaves like os.Open, +// but uses the build context's file system interface, if any. +func OpenFile(ctxt *build.Context, path string) (io.ReadCloser, error) { + if ctxt.OpenFile != nil { + return ctxt.OpenFile(path) + } + return os.Open(path) +} + +// IsAbsPath behaves like filepath.IsAbs, +// but uses the build context's file system interface, if any. +func IsAbsPath(ctxt *build.Context, path string) bool { + if ctxt.IsAbsPath != nil { + return ctxt.IsAbsPath(path) + } + return filepath.IsAbs(path) +} + +// JoinPath behaves like filepath.Join, +// but uses the build context's file system interface, if any. +func JoinPath(ctxt *build.Context, path ...string) string { + if ctxt.JoinPath != nil { + return ctxt.JoinPath(path...) + } + return filepath.Join(path...) +} + +// IsDir behaves like os.Stat plus IsDir, +// but uses the build context's file system interface, if any. +func IsDir(ctxt *build.Context, path string) bool { + if ctxt.IsDir != nil { + return ctxt.IsDir(path) + } + fi, err := os.Stat(path) + return err == nil && fi.IsDir() +} + +// ReadDir behaves like ioutil.ReadDir, +// but uses the build context's file system interface, if any. +func ReadDir(ctxt *build.Context, path string) ([]os.FileInfo, error) { + if ctxt.ReadDir != nil { + return ctxt.ReadDir(path) + } + return ioutil.ReadDir(path) +} + +// SplitPathList behaves like filepath.SplitList, +// but uses the build context's file system interface, if any. +func SplitPathList(ctxt *build.Context, s string) []string { + if ctxt.SplitPathList != nil { + return ctxt.SplitPathList(s) + } + return filepath.SplitList(s) +} + +// sameFile returns true if x and y have the same basename and denote +// the same file. +// +func sameFile(x, y string) bool { + if path.Clean(x) == path.Clean(y) { + return true + } + if filepath.Base(x) == filepath.Base(y) { // (optimisation) + if xi, err := os.Stat(x); err == nil { + if yi, err := os.Stat(y); err == nil { + return os.SameFile(xi, yi) + } + } + } + return false +} From 1cb0d2b76d3105e5cc8d35a65cf7bae7e075be21 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 2 Aug 2018 13:50:25 +0800 Subject: [PATCH 020/133] clean code --- gocode_test.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/gocode_test.go b/gocode_test.go index c975113a..2612631a 100644 --- a/gocode_test.go +++ b/gocode_test.go @@ -51,25 +51,10 @@ func TestModule(t *testing.T) { g_daemon = d //ar, n := test_auto_complete(&build.Default, "./package_types.go", 1809) - //ar, n := test_auto_complete(&build.Default, "./server.go", 1443) + ar, n := test_auto_complete(&build.Default, "./server.go", 1443) //test_auto_complete(&build.Default, "./server.go", 1443) - //ar, n = - ar, n := test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 567) - test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 568) fmt.Println(ar, n) - //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) - //test_auto_complete(&build.Default, "/Users/vfc/go/vtest/main.go", 550) - //ar, n := test_auto_complete(&build.Default, "/Users/vfc/dev/liteide/liteidex/src/github.com/visualfc/gotools/main.go", 1449) - //fmt.Println(ar, n) - // p, up, _ := d.autocomplete.walker.Check("/Users/vfc/go/vtest", nil) - // log.Println(p, up) - // p, up, _ = d.autocomplete.walker.Check(".", nil) - // log.Println(p, up) -} - -func testv(a string) { - } func test_auto_complete(ctx *build.Context, filename string, pos int) (c []candidate, d int) { From 18c0e476422ceced49352b7e5371b146e7acac6d Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 2 Aug 2018 16:32:07 +0800 Subject: [PATCH 021/133] remove test --- gocode_test.go | 76 -------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 gocode_test.go diff --git a/gocode_test.go b/gocode_test.go deleted file mode 100644 index 2612631a..00000000 --- a/gocode_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package main - -import ( - "fmt" - "go/build" - "io/ioutil" - "log" - "os" - "testing" -) - -func _TestGocode(t *testing.T) { - var ctx package_lookup_context - ctx.Context = build.Default - dir, _ := os.Getwd() - bp, err := build.ImportDir(dir, build.FindOnly) - if err != nil { - return - } - - ctx.CurrentPackagePath = bp.ImportPath - *g_debug = true - g_config.Autobuild = false - //resolveKnownPackageIdent("fmt", "gocode.go", &ctx) - //resolveKnownPackageIdent("os", "gocode.go", &ctx) - //resolveKnownPackageIdent("http", "gocode.go", &ctx) - //resolvePackageIdent("github.com/visualfc/gotools/pkg/srcimporter", "package_types.go", &ctx) - //return - declcache := new_decl_cache(&ctx) - pkgcache := new_package_cache() - autocomplete := new_auto_complete_context(&ctx, pkgcache, declcache) - data, err := ioutil.ReadFile("package_types.go") - if err != nil { - t.Fatal(err) - } - ar, n := autocomplete.apropos(data, "./package_types.go", 714) - fmt.Println(ar, n) -} - -func test1(a string) { - -} - -func TestModule(t *testing.T) { - //*g_debug = true - - d := &daemon{} - d.pkgcache = new_package_cache() - d.declcache = new_decl_cache(&d.context) - d.autocomplete = new_auto_complete_context(&d.context, d.pkgcache, d.declcache) - g_daemon = d - - //ar, n := test_auto_complete(&build.Default, "./package_types.go", 1809) - ar, n := test_auto_complete(&build.Default, "./server.go", 1443) - //test_auto_complete(&build.Default, "./server.go", 1443) - - fmt.Println(ar, n) -} - -func test_auto_complete(ctx *build.Context, filename string, pos int) (c []candidate, d int) { - data, err := ioutil.ReadFile(filename) - if err != nil { - log.Fatalln(err) - } - return server_auto_complete(data, filename, pos, pack_build_context(ctx)) -} - -func resolvePackageIdent(importPath string, filename string, c *auto_complete_context, context *package_lookup_context) *package_file_cache { - pkg, vname, ok := abs_path_for_package(filename, importPath, context) - if !ok { - return nil - } - p := new_package_file_cache(pkg, importPath, vname) - p.update_cache(c) - return p -} From 0ed11281c9879b1ede538393f259eab5b60d807c Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 2 Aug 2018 20:57:54 +0800 Subject: [PATCH 022/133] fix bug test.0055 --- decl.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/decl.go b/decl.go index ffd34a4a..a515f501 100644 --- a/decl.go +++ b/decl.go @@ -761,6 +761,14 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if d.class == decl_package { return ast.NewIdent(t.Name), scope, false } + //check type, fix bug test.0055 + if i, ok := d.typ.(*ast.Ident); ok { + if i.Obj != nil && i.Obj.Decl != nil { + if typ, ok := i.Obj.Decl.(*ast.TypeSpec); ok { + return infer_type(typ.Type, scope, -1) + } + } + } typ, scope := d.infer_type() return typ, scope, d.class == decl_type } @@ -910,7 +918,6 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if it == nil { break } - if d := type_to_decl(it, s); d != nil { c := d.find_child_and_in_embedded(t.Sel.Name) if c != nil { From 25d21c23cab31e2dcc553d422e1f15e73d48a31c Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 3 Aug 2018 10:24:38 +0800 Subject: [PATCH 023/133] update gomod dep --- Godeps/Godeps.json | 38 +++++++++++++++---- autocompletecontext.go | 1 - .../visualfc/gotools/pkg/gomod/gomod.go | 5 +++ .../visualfc/gotools/types/types.go | 1 - 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 90633fdf..b0e70cc8 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,31 +8,31 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "99a976ad49d61f7b9e5779e28d92ba9733e57be3" + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -45,6 +45,30 @@ { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/buildctx", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/command", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/gomod", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/pkgutil", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/stdlib", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + }, + { + "ImportPath": "github.com/visualfc/gotools/types/vendor/golang.org/x/tools/go/buildutil", + "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" } ] } diff --git a/autocompletecontext.go b/autocompletecontext.go index d3b06187..f2b1d408 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -80,7 +80,6 @@ func (b *out_buffers) append_decl(p, name, pkg string, decl *decl, class decl_cl if c1 || c2 || c3 || c4 || c5 { return } - decl.pretty_print_type(b.tmpbuf, b.canonical_aliases) b.candidates = append(b.candidates, candidate{ Name: name, diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 651ca691..71780f57 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -6,12 +6,17 @@ package gomod import ( "encoding/json" + "os" "os/exec" "path/filepath" "strings" ) func LooupModList(dir string) *ModuleList { + _, err := os.Stat(filepath.Join(dir, "go.mod")) + if err != nil { + return nil + } data := ListModuleJson(dir) if data == nil { return nil diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index c532e8dd..09c058b9 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -285,7 +285,6 @@ type PkgWalker struct { cursor *FileCursor cmd *command.Command mod *gomod.ModuleList - //importing types.Package } func DefaultPkgConfig() *PkgConfig { From 91384141f498fec1e3d14af84980b5a343a88e7c Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 13 Aug 2018 09:29:29 +0800 Subject: [PATCH 024/133] update dep --- Godeps/Godeps.json | 38 ++++---------- .../visualfc/gotools/types/types.go | 49 ++++++++++++------- 2 files changed, 39 insertions(+), 48 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index b0e70cc8..b5e39640 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,31 +8,31 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -47,28 +47,8 @@ "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" }, { - "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/buildctx", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" - }, - { - "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/command", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" - }, - { - "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/gomod", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" - }, - { - "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" - }, - { - "ImportPath": "github.com/visualfc/gotools/types/vendor/github.com/visualfc/gotools/pkg/stdlib", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" - }, - { - "ImportPath": "github.com/visualfc/gotools/types/vendor/golang.org/x/tools/go/buildutil", - "Rev": "b908c257e4aa1a5d3e067742034c8ea539fb3f4a" + "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", + "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" } ] } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 09c058b9..c1c3ecdf 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -188,6 +188,7 @@ func runTypes(cmd *command.Command, args []string) error { src, err := ioutil.ReadAll(cmd.Stdin) if err == nil { cursorInfo.src = src + cursorInfo.mtime = time.Now().UnixNano() } } cursor = &cursorInfo @@ -239,11 +240,16 @@ type FileCursor struct { cursorPos int pos token.Pos src interface{} + mtime int64 xtest bool } func NewFileCursor(src interface{}, filename string, pos int) *FileCursor { - return &FileCursor{fileName: filename, cursorPos: pos, src: src} + cur := &FileCursor{fileName: filename, cursorPos: pos, src: src} + if src != nil { + cur.mtime = time.Now().UnixNano() + } + return cur } type PkgConfig struct { @@ -458,7 +464,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri if conf.Cursor != nil && conf.Cursor.fileName != "" { cursor := conf.Cursor - f, _ := w.parseFileEx(bp.Dir, cursor.fileName, cursor.src, true) + f, _ := w.parseFileEx(bp.Dir, cursor.fileName, cursor.src, cursor.mtime, true) if f != nil { cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir @@ -489,12 +495,12 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri for _, file := range filenames { var f *ast.File if cursor != nil && cursor.fileName == file { - f, err = w.parseFile(bp.Dir, file, cursor.src) + f, err = w.parseFileEx(bp.Dir, file, cursor.src, cursor.mtime, true) cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir cursor.xtest = xtest } else { - f, err = w.parseFile(bp.Dir, file, nil) + f, err = w.parseFile(bp.Dir, file) } if err != nil && typesVerbose { fmt.Fprintln(w.cmd.Stderr, err) @@ -564,19 +570,20 @@ func (im *Importer) Import(name string) (pkg *types.Package, err error) { return im.w.Import(im.dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false}) } -func (w *PkgWalker) parseFile(dir, file string, src interface{}) (*ast.File, error) { - return w.parseFileEx(dir, file, src, typesFindDoc) +func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { + return w.parseFileEx(dir, file, nil, -1, typesFindDoc) } -func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, findDoc bool) (*ast.File, error) { +func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, findDoc bool) (*ast.File, error) { filename := filepath.Join(dir, file) - if src == nil { - if f, ok := w.parsedFileCache[filename]; ok { - if i, ok := w.parsedFileMod[filename]; ok { - info, err := os.Stat(filename) - if err == nil && info.ModTime().UnixNano() == i { - return f, nil - } + if f, ok := w.parsedFileCache[filename]; ok { + if i, ok := w.parsedFileMod[filename]; ok { + if mtime != -1 && mtime == i { + return f, nil + } + info, err := os.Stat(filename) + if err == nil && info.ModTime().UnixNano() == i { + return f, nil } } } @@ -610,9 +617,13 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, findDoc bool) return f, err } } - info, err := os.Stat(filename) - if err == nil { - w.parsedFileMod[filename] = info.ModTime().UnixNano() + if mtime != -1 { + w.parsedFileMod[filename] = mtime + } else { + info, err := os.Stat(filename) + if err == nil { + w.parsedFileMod[filename] = info.ModTime().UnixNano() + } } w.parsedFileCache[filename] = f return f, nil @@ -1359,7 +1370,7 @@ func (w *PkgWalker) CheckIsName(cursor *FileCursor) *ast.Ident { if cursor.fileDir == "" { return nil } - file, _ := w.parseFile(cursor.fileDir, cursor.fileName, cursor.src) + file, _ := w.parseFileEx(cursor.fileDir, cursor.fileName, cursor.src, cursor.mtime, true) if file == nil { return nil } @@ -1373,7 +1384,7 @@ func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec { if cursor.fileDir == "" { return nil } - file, _ := w.parseFile(cursor.fileDir, cursor.fileName, cursor.src) + file, _ := w.parseFileEx(cursor.fileDir, cursor.fileName, cursor.src, cursor.mtime, true) if file == nil { return nil } From 4367a5e6e5c5e47c788dbcff14ed4223e7e1e004 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 1 Sep 2018 19:39:01 +0800 Subject: [PATCH 025/133] fix gomod search --- Godeps/Godeps.json | 29 +-- .../visualfc/gotools/pkg/gomod/gomod.go | 5 - .../gotools/pkg/srcimporter/srcimporter.go | 211 ------------------ .../go/internal/gcimporter/gcimporter.go | 24 +- 4 files changed, 21 insertions(+), 248 deletions(-) delete mode 100644 vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index b5e39640..e515db0b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,53 +2,42 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", - "Packages": [ - "./..." - ], "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkg/srcimporter", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" + "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" + "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "99195f4d4ffa6331a9bc856c72697a15d9842950" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "84b363ae95d0667b0e006e4e2fc35228550aa2c9" + "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" } ] } diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 71780f57..651ca691 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -6,17 +6,12 @@ package gomod import ( "encoding/json" - "os" "os/exec" "path/filepath" "strings" ) func LooupModList(dir string) *ModuleList { - _, err := os.Stat(filepath.Join(dir, "go.mod")) - if err != nil { - return nil - } data := ListModuleJson(dir) if data == nil { return nil diff --git a/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go b/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go deleted file mode 100644 index ee31067f..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/srcimporter/srcimporter.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package srcimporter implements importing directly -// from source files rather than installed packages. -package srcimporter - -import ( - "fmt" - "go/ast" - "go/build" - "go/importer" - "go/parser" - "go/token" - "go/types" - "io" - "os" - "path/filepath" - "sync" -) - -// An Importer provides the context for importing packages from source code. -type Importer struct { - ctxt *build.Context - fset *token.FileSet - sizes types.Sizes - packages map[string]*types.Package -} - -// NewImporter returns a new Importer for the given context, file set, and map -// of packages. The context is used to resolve import paths to package paths, -// and identifying the files belonging to the package. If the context provides -// non-nil file system functions, they are used instead of the regular package -// os functions. The file set is used to track position information of package -// files; and imported packages are added to the packages map. -func New(ctxt *build.Context, fset *token.FileSet, packages map[string]*types.Package) *Importer { - return &Importer{ - ctxt: ctxt, - fset: fset, - sizes: types.SizesFor(ctxt.Compiler, ctxt.GOARCH), // uses go/types default if GOARCH not found - packages: packages, - } -} - -// Importing is a sentinel taking the place in Importer.packages -// for a package that is in the process of being imported. -var importing types.Package - -// Import(path) is a shortcut for ImportFrom(path, ".", 0). -func (p *Importer) Import(path string) (*types.Package, error) { - return p.ImportFrom(path, ".", 0) // use "." rather than "" (see issue #24441) -} - -// ImportFrom imports the package with the given import path resolved from the given srcDir, -// adds the new package to the set of packages maintained by the importer, and returns the -// package. Package path resolution and file system operations are controlled by the context -// maintained with the importer. The import mode must be zero but is otherwise ignored. -// Packages that are not comprised entirely of pure Go files may fail to import because the -// type checker may not be able to determine all exported entities (e.g. due to cgo dependencies). -func (p *Importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) { - if mode != 0 { - panic("non-zero import mode") - } - - // if abs, err := p.absPath(srcDir); err == nil { // see issue #14282 - // srcDir = abs - // } - var bp *build.Package - var err error - if srcDir != "" && srcDir != "." { - bp, err = p.ctxt.ImportDir(srcDir, 0) - bp.ImportPath = path - } else { - bp, err = p.ctxt.Import(path, srcDir, 0) - } - if err != nil { - return nil, err // err may be *build.NoGoError - return as is - } - - // package unsafe is known to the type checker - if bp.ImportPath == "unsafe" { - return types.Unsafe, nil - } - - // no need to re-import if the package was imported completely before - pkg := p.packages[bp.ImportPath] - if pkg != nil { - if pkg == &importing { - return nil, fmt.Errorf("import cycle through package %q", bp.ImportPath) - } - if !pkg.Complete() { - // Package exists but is not complete - we cannot handle this - // at the moment since the source importer replaces the package - // wholesale rather than augmenting it (see #19337 for details). - // Return incomplete package with error (see #16088). - return pkg, fmt.Errorf("reimported partially imported package %q", bp.ImportPath) - } - return pkg, nil - } - - p.packages[bp.ImportPath] = &importing - defer func() { - // clean up in case of error - // TODO(gri) Eventually we may want to leave a (possibly empty) - // package in the map in all cases (and use that package to - // identify cycles). See also issue 16088. - if p.packages[bp.ImportPath] == &importing { - p.packages[bp.ImportPath] = nil - } - }() - - var filenames []string - filenames = append(filenames, bp.GoFiles...) - filenames = append(filenames, bp.CgoFiles...) - - files, err := p.parseFiles(bp.Dir, filenames) - if err != nil { - return nil, err - } - - // type-check package files - var firstHardErr error - conf := types.Config{ - IgnoreFuncBodies: true, - FakeImportC: true, - // continue type-checking after the first error - Error: func(err error) { - if firstHardErr == nil && !err.(types.Error).Soft { - firstHardErr = err - } - }, - Importer: importer.Default(), - Sizes: p.sizes, - } - pkg, err = conf.Check(bp.ImportPath, p.fset, files, nil) - if pkg == nil { - // If there was a hard error it is possibly unsafe - // to use the package as it may not be fully populated. - // Do not return it (see also #20837, #20855). - if firstHardErr != nil { - err = firstHardErr // give preference to first hard error over any soft error - } - return pkg, fmt.Errorf("type-checking package %q failed (%v)", bp.ImportPath, err) - } - // if firstHardErr != nil { - // // this can only happen if we have a bug in go/types - // panic("package is not safe yet no error was returned") - // } - - p.packages[bp.ImportPath] = pkg - return pkg, nil -} - -func (p *Importer) parseFiles(dir string, filenames []string) ([]*ast.File, error) { - // use build.Context's OpenFile if there is one - open := p.ctxt.OpenFile - if open == nil { - open = func(name string) (io.ReadCloser, error) { return os.Open(name) } - } - - files := make([]*ast.File, len(filenames)) - errors := make([]error, len(filenames)) - - var wg sync.WaitGroup - wg.Add(len(filenames)) - for i, filename := range filenames { - go func(i int, filepath string) { - defer wg.Done() - src, err := open(filepath) - if err != nil { - errors[i] = err // open provides operation and filename in error - return - } - files[i], errors[i] = parser.ParseFile(p.fset, filepath, src, 0) - src.Close() // ignore Close error - parsing may have succeeded which is all we need - }(i, p.joinPath(dir, filename)) - } - wg.Wait() - - // if there are errors, return the first one for deterministic results - for _, err := range errors { - if err != nil { - return nil, err - } - } - - return files, nil -} - -// context-controlled file system operations - -func (p *Importer) absPath(path string) (string, error) { - // TODO(gri) This should be using p.ctxt.AbsPath which doesn't - // exist but probably should. See also issue #14282. - return filepath.Abs(path) -} - -func (p *Importer) isAbsPath(path string) bool { - if f := p.ctxt.IsAbsPath; f != nil { - return f(path) - } - return filepath.IsAbs(path) -} - -func (p *Importer) joinPath(elem ...string) string { - if f := p.ctxt.JoinPath; f != nil { - return f(elem...) - } - return filepath.Join(elem...) -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index d379881e..9125056f 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -16,7 +16,7 @@ import ( "errors" "fmt" "go/build" - exact "go/constant" + "go/constant" "go/token" "go/types" "io" @@ -777,9 +777,9 @@ func (p *parser) parseInt() string { // number = int_lit [ "p" int_lit ] . // -func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { +func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { // mantissa - mant := exact.MakeFromLiteral(p.parseInt(), token.INT, 0) + mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) if mant == nil { panic("invalid mantissa") } @@ -792,14 +792,14 @@ func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { p.error(err) } if exp < 0 { - denom := exact.MakeInt64(1) - denom = exact.Shift(denom, token.SHL, uint(-exp)) + denom := constant.MakeInt64(1) + denom = constant.Shift(denom, token.SHL, uint(-exp)) typ = types.Typ[types.UntypedFloat] - val = exact.BinaryOp(mant, token.QUO, denom) + val = constant.BinaryOp(mant, token.QUO, denom) return } if exp > 0 { - mant = exact.Shift(mant, token.SHL, uint(exp)) + mant = constant.Shift(mant, token.SHL, uint(exp)) } typ = types.Typ[types.UntypedFloat] val = mant @@ -830,7 +830,7 @@ func (p *parser) parseConstDecl() { p.expect('=') var typ types.Type - var val exact.Value + var val constant.Value switch p.tok { case scanner.Ident: // bool_lit @@ -838,7 +838,7 @@ func (p *parser) parseConstDecl() { p.error("expected true or false") } typ = types.Typ[types.UntypedBool] - val = exact.MakeBool(p.lit == "true") + val = constant.MakeBool(p.lit == "true") p.next() case '-', scanner.Int: @@ -862,18 +862,18 @@ func (p *parser) parseConstDecl() { p.expectKeyword("i") p.expect(')') typ = types.Typ[types.UntypedComplex] - val = exact.BinaryOp(re, token.ADD, exact.MakeImag(im)) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) case scanner.Char: // rune_lit typ = types.Typ[types.UntypedRune] - val = exact.MakeFromLiteral(p.lit, token.CHAR, 0) + val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) p.next() case scanner.String: // string_lit typ = types.Typ[types.UntypedString] - val = exact.MakeFromLiteral(p.lit, token.STRING, 0) + val = constant.MakeFromLiteral(p.lit, token.STRING, 0) p.next() default: From e761f83df3cfd3d38356f0ea3ac2f835e515934e Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 2 Sep 2018 08:00:54 +0800 Subject: [PATCH 026/133] support syscall/js --- Godeps/Godeps.json | 15 +- .../visualfc/gotools/pkg/stdlib/mkpkglist.go | 51 +- .../visualfc/gotools/pkg/stdlib/mkstdlib.go | 2 + .../visualfc/gotools/pkg/stdlib/pkglist.go | 77 +- .../visualfc/gotools/pkg/stdlib/zstdlib.go | 14696 ++++++++-------- .../visualfc/gotools/types/types.go | 6 + 6 files changed, 7718 insertions(+), 7129 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e515db0b..a2db4326 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,30 +2,33 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", + "Packages": [ + "./..." + ], "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "14789f6058005da4a12f16006051c9fdd3065f3f" + "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go index efe7a922..41d18cdb 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go @@ -3,11 +3,16 @@ package main import ( + "bytes" "fmt" + "go/format" + "io/ioutil" + "log" + "os/exec" "strings" ) -var pkgList = ` +var basePkgList = ` archive/tar archive/zip bufio @@ -154,10 +159,25 @@ unsafe ` func main() { - //fmt.Println(pkgList) + cmd := exec.Command("go", "list", "std") + out, err := cmd.Output() + if err != nil { + log.Fatalln(err) + } + var pkgList []string + for _, v := range strings.Split(string(out), "\n") { + if v == "" { + continue + } + // if strings.HasPrefix(v, "vendor/") { + // continue + // } + pkgList = append(pkgList, v) + } + var list []string index := 0 - for _, v := range strings.Split(pkgList, "\n") { + for _, v := range pkgList { v = strings.TrimSpace(v) if v == "" { continue @@ -169,5 +189,28 @@ func main() { list = append(list, v) index++ } - fmt.Println(strings.Join(list, ",")) + var buf bytes.Buffer + outf := func(format string, args ...interface{}) { + fmt.Fprintf(&buf, format, args...) + } + outf("// AUTO-GENERATED BY mkpkglist.go\n\n") + outf("package stdlib\n") + outf("var Packages = []string{\n") + outf(strings.Join(list, ",")) + outf("}\n") + outf(` +func IsStdPkg(pkg string) bool { + for _, v := range Packages { + if v == pkg { + return true + } + } + return false +}`) + fmtbuf, err := format.Source(buf.Bytes()) + if err != nil { + log.Fatal(err) + } + //os.Stdout.Write(fmtbuf) + ioutil.WriteFile("./pkglist.go", fmtbuf, 0777) } diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go index 2191f8d4..529263cd 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go @@ -54,6 +54,8 @@ func main() { mustOpen(api("go1.7.txt")), mustOpen(api("go1.8.txt")), mustOpen(api("go1.9.txt")), + mustOpen(api("go1.10.txt")), + mustOpen(api("go1.11.txt")), ) sc := bufio.NewScanner(f) fullImport := map[string]string{} // "zip.NewReader" => "archive/zip" diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go index da5e5790..b5bf3269 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go @@ -1,3 +1,5 @@ +// AUTO-GENERATED BY mkpkglist.go + package stdlib var Packages = []string{ @@ -6,38 +8,49 @@ var Packages = []string{ "compress/zlib", "container/heap", "container/list", "container/ring", "context", "crypto", "crypto/aes", "crypto/cipher", "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/elliptic", - "crypto/hmac", "crypto/md5", "crypto/rand", "crypto/rc4", - "crypto/rsa", "crypto/sha1", "crypto/sha256", "crypto/sha512", - "crypto/subtle", "crypto/tls", "crypto/x509", "crypto/x509/pkix", - "database/sql", "database/sql/driver", "debug/dwarf", "debug/elf", - "debug/gosym", "debug/macho", "debug/pe", "debug/plan9obj", - "encoding", "encoding/ascii85", "encoding/asn1", "encoding/base32", - "encoding/base64", "encoding/binary", "encoding/csv", "encoding/gob", - "encoding/hex", "encoding/json", "encoding/pem", "encoding/xml", - "errors", "expvar", "flag", "fmt", - "go/ast", "go/build", "go/constant", "go/doc", - "go/format", "go/importer", "go/parser", "go/printer", - "go/scanner", "go/token", "go/types", "hash", - "hash/adler32", "hash/crc32", "hash/crc64", "hash/fnv", - "html", "html/template", "image", "image/color", - "image/color/palette", "image/draw", "image/gif", "image/jpeg", - "image/png", "index/suffixarray", "io", "io/ioutil", - "log", "log/syslog", "math", "math/big", - "math/bits", "math/cmplx", "math/rand", "mime", - "mime/multipart", "mime/quotedprintable", "net", "net/http", - "net/http/cgi", "net/http/cookiejar", "net/http/fcgi", "net/http/httptest", - "net/http/httptrace", "net/http/httputil", "net/http/pprof", "net/mail", - "net/rpc", "net/rpc/jsonrpc", "net/smtp", "net/textproto", - "net/url", "os", "os/exec", "os/signal", - "os/user", "path", "path/filepath", "plugin", - "reflect", "regexp", "regexp/syntax", "runtime", - "runtime/cgo", "runtime/debug", "runtime/pprof", "runtime/race", - "runtime/trace", "sort", "strconv", "strings", - "sync", "sync/atomic", "syscall", "testing", - "testing/iotest", "testing/quick", "text/scanner", "text/tabwriter", - "text/template", "text/template/parse", "time", "unicode", - "unicode/utf16", "unicode/utf8", "unsafe", -} + "crypto/hmac", "crypto/internal/randutil", "crypto/internal/subtle", "crypto/md5", + "crypto/rand", "crypto/rc4", "crypto/rsa", "crypto/sha1", + "crypto/sha256", "crypto/sha512", "crypto/subtle", "crypto/tls", + "crypto/x509", "crypto/x509/pkix", "database/sql", "database/sql/driver", + "debug/dwarf", "debug/elf", "debug/gosym", "debug/macho", + "debug/pe", "debug/plan9obj", "encoding", "encoding/ascii85", + "encoding/asn1", "encoding/base32", "encoding/base64", "encoding/binary", + "encoding/csv", "encoding/gob", "encoding/hex", "encoding/json", + "encoding/pem", "encoding/xml", "errors", "expvar", + "flag", "fmt", "go/ast", "go/build", + "go/constant", "go/doc", "go/format", "go/importer", + "go/internal/gccgoimporter", "go/internal/gcimporter", "go/internal/srcimporter", "go/parser", + "go/printer", "go/scanner", "go/token", "go/types", + "hash", "hash/adler32", "hash/crc32", "hash/crc64", + "hash/fnv", "html", "html/template", "image", + "image/color", "image/color/palette", "image/draw", "image/gif", + "image/internal/imageutil", "image/jpeg", "image/png", "index/suffixarray", + "internal/bytealg", "internal/cpu", "internal/nettrace", "internal/poll", + "internal/race", "internal/singleflight", "internal/syscall/unix", "internal/syscall/windows", + "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "internal/testenv", "internal/testlog", + "internal/trace", "io", "io/ioutil", "log", + "log/syslog", "math", "math/big", "math/bits", + "math/cmplx", "math/rand", "mime", "mime/multipart", + "mime/quotedprintable", "net", "net/http", "net/http/cgi", + "net/http/cookiejar", "net/http/fcgi", "net/http/httptest", "net/http/httptrace", + "net/http/httputil", "net/http/internal", "net/http/pprof", "net/internal/socktest", + "net/mail", "net/rpc", "net/rpc/jsonrpc", "net/smtp", + "net/textproto", "net/url", "os", "os/exec", + "os/signal", "os/signal/internal/pty", "os/user", "path", + "path/filepath", "plugin", "reflect", "regexp", + "regexp/syntax", "runtime", "runtime/cgo", "runtime/debug", + "runtime/internal/atomic", "runtime/internal/sys", "runtime/pprof", "runtime/pprof/internal/profile", + "runtime/race", "runtime/trace", "sort", "strconv", + "strings", "sync", "sync/atomic", "syscall", + "testing", "testing/internal/testdeps", "testing/iotest", "testing/quick", + "text/scanner", "text/tabwriter", "text/template", "text/template/parse", + "time", "unicode", "unicode/utf16", "unicode/utf8", + "unsafe", "vendor/golang_org/x/crypto/chacha20poly1305", "vendor/golang_org/x/crypto/cryptobyte", "vendor/golang_org/x/crypto/cryptobyte/asn1", + "vendor/golang_org/x/crypto/curve25519", "vendor/golang_org/x/crypto/internal/chacha20", "vendor/golang_org/x/crypto/poly1305", "vendor/golang_org/x/net/dns/dnsmessage", + "vendor/golang_org/x/net/http/httpguts", "vendor/golang_org/x/net/http/httpproxy", "vendor/golang_org/x/net/http2/hpack", "vendor/golang_org/x/net/idna", + "vendor/golang_org/x/net/internal/nettest", "vendor/golang_org/x/net/nettest", "vendor/golang_org/x/net/route", "vendor/golang_org/x/text/secure", + "vendor/golang_org/x/text/secure/bidirule", "vendor/golang_org/x/text/transform", "vendor/golang_org/x/text/unicode", "vendor/golang_org/x/text/unicode/bidi", + "vendor/golang_org/x/text/unicode/norm"} func IsStdPkg(pkg string) bool { for _, v := range Packages { diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go index 633fb43a..510aeee2 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go @@ -3,1193 +3,1353 @@ package stdlib var Symbols = map[string]string{ - "adler32.Checksum": "hash/adler32", - "adler32.New": "hash/adler32", - "adler32.Size": "hash/adler32", - "aes.BlockSize": "crypto/aes", - "aes.KeySizeError": "crypto/aes", - "aes.NewCipher": "crypto/aes", - "ascii85.CorruptInputError": "encoding/ascii85", - "ascii85.Decode": "encoding/ascii85", - "ascii85.Encode": "encoding/ascii85", - "ascii85.MaxEncodedLen": "encoding/ascii85", - "ascii85.NewDecoder": "encoding/ascii85", - "ascii85.NewEncoder": "encoding/ascii85", - "asn1.BitString": "encoding/asn1", - "asn1.ClassApplication": "encoding/asn1", - "asn1.ClassContextSpecific": "encoding/asn1", - "asn1.ClassPrivate": "encoding/asn1", - "asn1.ClassUniversal": "encoding/asn1", - "asn1.Enumerated": "encoding/asn1", - "asn1.Flag": "encoding/asn1", - "asn1.Marshal": "encoding/asn1", - "asn1.NullBytes": "encoding/asn1", - "asn1.NullRawValue": "encoding/asn1", - "asn1.ObjectIdentifier": "encoding/asn1", - "asn1.RawContent": "encoding/asn1", - "asn1.RawValue": "encoding/asn1", - "asn1.StructuralError": "encoding/asn1", - "asn1.SyntaxError": "encoding/asn1", - "asn1.TagBitString": "encoding/asn1", - "asn1.TagBoolean": "encoding/asn1", - "asn1.TagEnum": "encoding/asn1", - "asn1.TagGeneralString": "encoding/asn1", - "asn1.TagGeneralizedTime": "encoding/asn1", - "asn1.TagIA5String": "encoding/asn1", - "asn1.TagInteger": "encoding/asn1", - "asn1.TagNull": "encoding/asn1", - "asn1.TagOID": "encoding/asn1", - "asn1.TagOctetString": "encoding/asn1", - "asn1.TagPrintableString": "encoding/asn1", - "asn1.TagSequence": "encoding/asn1", - "asn1.TagSet": "encoding/asn1", - "asn1.TagT61String": "encoding/asn1", - "asn1.TagUTCTime": "encoding/asn1", - "asn1.TagUTF8String": "encoding/asn1", - "asn1.Unmarshal": "encoding/asn1", - "asn1.UnmarshalWithParams": "encoding/asn1", - "ast.ArrayType": "go/ast", - "ast.AssignStmt": "go/ast", - "ast.Bad": "go/ast", - "ast.BadDecl": "go/ast", - "ast.BadExpr": "go/ast", - "ast.BadStmt": "go/ast", - "ast.BasicLit": "go/ast", - "ast.BinaryExpr": "go/ast", - "ast.BlockStmt": "go/ast", - "ast.BranchStmt": "go/ast", - "ast.CallExpr": "go/ast", - "ast.CaseClause": "go/ast", - "ast.ChanDir": "go/ast", - "ast.ChanType": "go/ast", - "ast.CommClause": "go/ast", - "ast.Comment": "go/ast", - "ast.CommentGroup": "go/ast", - "ast.CommentMap": "go/ast", - "ast.CompositeLit": "go/ast", - "ast.Con": "go/ast", - "ast.DeclStmt": "go/ast", - "ast.DeferStmt": "go/ast", - "ast.Ellipsis": "go/ast", - "ast.EmptyStmt": "go/ast", - "ast.ExprStmt": "go/ast", - "ast.Field": "go/ast", - "ast.FieldFilter": "go/ast", - "ast.FieldList": "go/ast", - "ast.File": "go/ast", - "ast.FileExports": "go/ast", - "ast.Filter": "go/ast", - "ast.FilterDecl": "go/ast", - "ast.FilterFile": "go/ast", - "ast.FilterFuncDuplicates": "go/ast", - "ast.FilterImportDuplicates": "go/ast", - "ast.FilterPackage": "go/ast", - "ast.FilterUnassociatedComments": "go/ast", - "ast.ForStmt": "go/ast", - "ast.Fprint": "go/ast", - "ast.Fun": "go/ast", - "ast.FuncDecl": "go/ast", - "ast.FuncLit": "go/ast", - "ast.FuncType": "go/ast", - "ast.GenDecl": "go/ast", - "ast.GoStmt": "go/ast", - "ast.Ident": "go/ast", - "ast.IfStmt": "go/ast", - "ast.ImportSpec": "go/ast", - "ast.Importer": "go/ast", - "ast.IncDecStmt": "go/ast", - "ast.IndexExpr": "go/ast", - "ast.Inspect": "go/ast", - "ast.InterfaceType": "go/ast", - "ast.IsExported": "go/ast", - "ast.KeyValueExpr": "go/ast", - "ast.LabeledStmt": "go/ast", - "ast.Lbl": "go/ast", - "ast.MapType": "go/ast", - "ast.MergeMode": "go/ast", - "ast.MergePackageFiles": "go/ast", - "ast.NewCommentMap": "go/ast", - "ast.NewIdent": "go/ast", - "ast.NewObj": "go/ast", - "ast.NewPackage": "go/ast", - "ast.NewScope": "go/ast", - "ast.Node": "go/ast", - "ast.NotNilFilter": "go/ast", - "ast.ObjKind": "go/ast", - "ast.Object": "go/ast", - "ast.Package": "go/ast", - "ast.PackageExports": "go/ast", - "ast.ParenExpr": "go/ast", - "ast.Pkg": "go/ast", - "ast.Print": "go/ast", - "ast.RECV": "go/ast", - "ast.RangeStmt": "go/ast", - "ast.ReturnStmt": "go/ast", - "ast.SEND": "go/ast", - "ast.Scope": "go/ast", - "ast.SelectStmt": "go/ast", - "ast.SelectorExpr": "go/ast", - "ast.SendStmt": "go/ast", - "ast.SliceExpr": "go/ast", - "ast.SortImports": "go/ast", - "ast.StarExpr": "go/ast", - "ast.StructType": "go/ast", - "ast.SwitchStmt": "go/ast", - "ast.Typ": "go/ast", - "ast.TypeAssertExpr": "go/ast", - "ast.TypeSpec": "go/ast", - "ast.TypeSwitchStmt": "go/ast", - "ast.UnaryExpr": "go/ast", - "ast.ValueSpec": "go/ast", - "ast.Var": "go/ast", - "ast.Visitor": "go/ast", - "ast.Walk": "go/ast", - "atomic.AddInt32": "sync/atomic", - "atomic.AddInt64": "sync/atomic", - "atomic.AddUint32": "sync/atomic", - "atomic.AddUint64": "sync/atomic", - "atomic.AddUintptr": "sync/atomic", - "atomic.CompareAndSwapInt32": "sync/atomic", - "atomic.CompareAndSwapInt64": "sync/atomic", - "atomic.CompareAndSwapPointer": "sync/atomic", - "atomic.CompareAndSwapUint32": "sync/atomic", - "atomic.CompareAndSwapUint64": "sync/atomic", - "atomic.CompareAndSwapUintptr": "sync/atomic", - "atomic.LoadInt32": "sync/atomic", - "atomic.LoadInt64": "sync/atomic", - "atomic.LoadPointer": "sync/atomic", - "atomic.LoadUint32": "sync/atomic", - "atomic.LoadUint64": "sync/atomic", - "atomic.LoadUintptr": "sync/atomic", - "atomic.StoreInt32": "sync/atomic", - "atomic.StoreInt64": "sync/atomic", - "atomic.StorePointer": "sync/atomic", - "atomic.StoreUint32": "sync/atomic", - "atomic.StoreUint64": "sync/atomic", - "atomic.StoreUintptr": "sync/atomic", - "atomic.SwapInt32": "sync/atomic", - "atomic.SwapInt64": "sync/atomic", - "atomic.SwapPointer": "sync/atomic", - "atomic.SwapUint32": "sync/atomic", - "atomic.SwapUint64": "sync/atomic", - "atomic.SwapUintptr": "sync/atomic", - "atomic.Value": "sync/atomic", - "base32.CorruptInputError": "encoding/base32", - "base32.Encoding": "encoding/base32", - "base32.HexEncoding": "encoding/base32", - "base32.NewDecoder": "encoding/base32", - "base32.NewEncoder": "encoding/base32", - "base32.NewEncoding": "encoding/base32", - "base32.NoPadding": "encoding/base32", - "base32.StdEncoding": "encoding/base32", - "base32.StdPadding": "encoding/base32", - "base64.CorruptInputError": "encoding/base64", - "base64.Encoding": "encoding/base64", - "base64.NewDecoder": "encoding/base64", - "base64.NewEncoder": "encoding/base64", - "base64.NewEncoding": "encoding/base64", - "base64.NoPadding": "encoding/base64", - "base64.RawStdEncoding": "encoding/base64", - "base64.RawURLEncoding": "encoding/base64", - "base64.StdEncoding": "encoding/base64", - "base64.StdPadding": "encoding/base64", - "base64.URLEncoding": "encoding/base64", - "big.Above": "math/big", - "big.Accuracy": "math/big", - "big.AwayFromZero": "math/big", - "big.Below": "math/big", - "big.ErrNaN": "math/big", - "big.Exact": "math/big", - "big.Float": "math/big", - "big.Int": "math/big", - "big.Jacobi": "math/big", - "big.MaxBase": "math/big", - "big.MaxExp": "math/big", - "big.MaxPrec": "math/big", - "big.MinExp": "math/big", - "big.NewFloat": "math/big", - "big.NewInt": "math/big", - "big.NewRat": "math/big", - "big.ParseFloat": "math/big", - "big.Rat": "math/big", - "big.RoundingMode": "math/big", - "big.ToNearestAway": "math/big", - "big.ToNearestEven": "math/big", - "big.ToNegativeInf": "math/big", - "big.ToPositiveInf": "math/big", - "big.ToZero": "math/big", - "big.Word": "math/big", - "binary.BigEndian": "encoding/binary", - "binary.ByteOrder": "encoding/binary", - "binary.LittleEndian": "encoding/binary", - "binary.MaxVarintLen16": "encoding/binary", - "binary.MaxVarintLen32": "encoding/binary", - "binary.MaxVarintLen64": "encoding/binary", - "binary.PutUvarint": "encoding/binary", - "binary.PutVarint": "encoding/binary", - "binary.Read": "encoding/binary", - "binary.ReadUvarint": "encoding/binary", - "binary.ReadVarint": "encoding/binary", - "binary.Size": "encoding/binary", - "binary.Uvarint": "encoding/binary", - "binary.Varint": "encoding/binary", - "binary.Write": "encoding/binary", - "bits.LeadingZeros": "math/bits", - "bits.LeadingZeros16": "math/bits", - "bits.LeadingZeros32": "math/bits", - "bits.LeadingZeros64": "math/bits", - "bits.LeadingZeros8": "math/bits", - "bits.Len": "math/bits", - "bits.Len16": "math/bits", - "bits.Len32": "math/bits", - "bits.Len64": "math/bits", - "bits.Len8": "math/bits", - "bits.OnesCount": "math/bits", - "bits.OnesCount16": "math/bits", - "bits.OnesCount32": "math/bits", - "bits.OnesCount64": "math/bits", - "bits.OnesCount8": "math/bits", - "bits.Reverse": "math/bits", - "bits.Reverse16": "math/bits", - "bits.Reverse32": "math/bits", - "bits.Reverse64": "math/bits", - "bits.Reverse8": "math/bits", - "bits.ReverseBytes": "math/bits", - "bits.ReverseBytes16": "math/bits", - "bits.ReverseBytes32": "math/bits", - "bits.ReverseBytes64": "math/bits", - "bits.RotateLeft": "math/bits", - "bits.RotateLeft16": "math/bits", - "bits.RotateLeft32": "math/bits", - "bits.RotateLeft64": "math/bits", - "bits.RotateLeft8": "math/bits", - "bits.TrailingZeros": "math/bits", - "bits.TrailingZeros16": "math/bits", - "bits.TrailingZeros32": "math/bits", - "bits.TrailingZeros64": "math/bits", - "bits.TrailingZeros8": "math/bits", - "bits.UintSize": "math/bits", - "bufio.ErrAdvanceTooFar": "bufio", - "bufio.ErrBufferFull": "bufio", - "bufio.ErrFinalToken": "bufio", - "bufio.ErrInvalidUnreadByte": "bufio", - "bufio.ErrInvalidUnreadRune": "bufio", - "bufio.ErrNegativeAdvance": "bufio", - "bufio.ErrNegativeCount": "bufio", - "bufio.ErrTooLong": "bufio", - "bufio.MaxScanTokenSize": "bufio", - "bufio.NewReadWriter": "bufio", - "bufio.NewReader": "bufio", - "bufio.NewReaderSize": "bufio", - "bufio.NewScanner": "bufio", - "bufio.NewWriter": "bufio", - "bufio.NewWriterSize": "bufio", - "bufio.ReadWriter": "bufio", - "bufio.Reader": "bufio", - "bufio.ScanBytes": "bufio", - "bufio.ScanLines": "bufio", - "bufio.ScanRunes": "bufio", - "bufio.ScanWords": "bufio", - "bufio.Scanner": "bufio", - "bufio.SplitFunc": "bufio", - "bufio.Writer": "bufio", - "build.AllowBinary": "go/build", - "build.ArchChar": "go/build", - "build.Context": "go/build", - "build.Default": "go/build", - "build.FindOnly": "go/build", - "build.IgnoreVendor": "go/build", - "build.Import": "go/build", - "build.ImportComment": "go/build", - "build.ImportDir": "go/build", - "build.ImportMode": "go/build", - "build.IsLocalImport": "go/build", - "build.MultiplePackageError": "go/build", - "build.NoGoError": "go/build", - "build.Package": "go/build", - "build.ToolDir": "go/build", - "bytes.Buffer": "bytes", - "bytes.Compare": "bytes", - "bytes.Contains": "bytes", - "bytes.ContainsAny": "bytes", - "bytes.ContainsRune": "bytes", - "bytes.Count": "bytes", - "bytes.Equal": "bytes", - "bytes.EqualFold": "bytes", - "bytes.ErrTooLarge": "bytes", - "bytes.Fields": "bytes", - "bytes.FieldsFunc": "bytes", - "bytes.HasPrefix": "bytes", - "bytes.HasSuffix": "bytes", - "bytes.Index": "bytes", - "bytes.IndexAny": "bytes", - "bytes.IndexByte": "bytes", - "bytes.IndexFunc": "bytes", - "bytes.IndexRune": "bytes", - "bytes.Join": "bytes", - "bytes.LastIndex": "bytes", - "bytes.LastIndexAny": "bytes", - "bytes.LastIndexByte": "bytes", - "bytes.LastIndexFunc": "bytes", - "bytes.Map": "bytes", - "bytes.MinRead": "bytes", - "bytes.NewBuffer": "bytes", - "bytes.NewBufferString": "bytes", - "bytes.NewReader": "bytes", - "bytes.Reader": "bytes", - "bytes.Repeat": "bytes", - "bytes.Replace": "bytes", - "bytes.Runes": "bytes", - "bytes.Split": "bytes", - "bytes.SplitAfter": "bytes", - "bytes.SplitAfterN": "bytes", - "bytes.SplitN": "bytes", - "bytes.Title": "bytes", - "bytes.ToLower": "bytes", - "bytes.ToLowerSpecial": "bytes", - "bytes.ToTitle": "bytes", - "bytes.ToTitleSpecial": "bytes", - "bytes.ToUpper": "bytes", - "bytes.ToUpperSpecial": "bytes", - "bytes.Trim": "bytes", - "bytes.TrimFunc": "bytes", - "bytes.TrimLeft": "bytes", - "bytes.TrimLeftFunc": "bytes", - "bytes.TrimPrefix": "bytes", - "bytes.TrimRight": "bytes", - "bytes.TrimRightFunc": "bytes", - "bytes.TrimSpace": "bytes", - "bytes.TrimSuffix": "bytes", - "bzip2.NewReader": "compress/bzip2", - "bzip2.StructuralError": "compress/bzip2", - "cgi.Handler": "net/http/cgi", - "cgi.Request": "net/http/cgi", - "cgi.RequestFromMap": "net/http/cgi", - "cgi.Serve": "net/http/cgi", - "cipher.AEAD": "crypto/cipher", - "cipher.Block": "crypto/cipher", - "cipher.BlockMode": "crypto/cipher", - "cipher.NewCBCDecrypter": "crypto/cipher", - "cipher.NewCBCEncrypter": "crypto/cipher", - "cipher.NewCFBDecrypter": "crypto/cipher", - "cipher.NewCFBEncrypter": "crypto/cipher", - "cipher.NewCTR": "crypto/cipher", - "cipher.NewGCM": "crypto/cipher", - "cipher.NewGCMWithNonceSize": "crypto/cipher", - "cipher.NewOFB": "crypto/cipher", - "cipher.Stream": "crypto/cipher", - "cipher.StreamReader": "crypto/cipher", - "cipher.StreamWriter": "crypto/cipher", - "cmplx.Abs": "math/cmplx", - "cmplx.Acos": "math/cmplx", - "cmplx.Acosh": "math/cmplx", - "cmplx.Asin": "math/cmplx", - "cmplx.Asinh": "math/cmplx", - "cmplx.Atan": "math/cmplx", - "cmplx.Atanh": "math/cmplx", - "cmplx.Conj": "math/cmplx", - "cmplx.Cos": "math/cmplx", - "cmplx.Cosh": "math/cmplx", - "cmplx.Cot": "math/cmplx", - "cmplx.Exp": "math/cmplx", - "cmplx.Inf": "math/cmplx", - "cmplx.IsInf": "math/cmplx", - "cmplx.IsNaN": "math/cmplx", - "cmplx.Log": "math/cmplx", - "cmplx.Log10": "math/cmplx", - "cmplx.NaN": "math/cmplx", - "cmplx.Phase": "math/cmplx", - "cmplx.Polar": "math/cmplx", - "cmplx.Pow": "math/cmplx", - "cmplx.Rect": "math/cmplx", - "cmplx.Sin": "math/cmplx", - "cmplx.Sinh": "math/cmplx", - "cmplx.Sqrt": "math/cmplx", - "cmplx.Tan": "math/cmplx", - "cmplx.Tanh": "math/cmplx", - "color.Alpha": "image/color", - "color.Alpha16": "image/color", - "color.Alpha16Model": "image/color", - "color.AlphaModel": "image/color", - "color.Black": "image/color", - "color.CMYK": "image/color", - "color.CMYKModel": "image/color", - "color.CMYKToRGB": "image/color", - "color.Color": "image/color", - "color.Gray": "image/color", - "color.Gray16": "image/color", - "color.Gray16Model": "image/color", - "color.GrayModel": "image/color", - "color.Model": "image/color", - "color.ModelFunc": "image/color", - "color.NRGBA": "image/color", - "color.NRGBA64": "image/color", - "color.NRGBA64Model": "image/color", - "color.NRGBAModel": "image/color", - "color.NYCbCrA": "image/color", - "color.NYCbCrAModel": "image/color", - "color.Opaque": "image/color", - "color.Palette": "image/color", - "color.RGBA": "image/color", - "color.RGBA64": "image/color", - "color.RGBA64Model": "image/color", - "color.RGBAModel": "image/color", - "color.RGBToCMYK": "image/color", - "color.RGBToYCbCr": "image/color", - "color.Transparent": "image/color", - "color.White": "image/color", - "color.YCbCr": "image/color", - "color.YCbCrModel": "image/color", - "color.YCbCrToRGB": "image/color", - "constant.BinaryOp": "go/constant", - "constant.BitLen": "go/constant", - "constant.Bool": "go/constant", - "constant.BoolVal": "go/constant", - "constant.Bytes": "go/constant", - "constant.Compare": "go/constant", - "constant.Complex": "go/constant", - "constant.Denom": "go/constant", - "constant.Float": "go/constant", - "constant.Float32Val": "go/constant", - "constant.Float64Val": "go/constant", - "constant.Imag": "go/constant", - "constant.Int": "go/constant", - "constant.Int64Val": "go/constant", - "constant.Kind": "go/constant", - "constant.MakeBool": "go/constant", - "constant.MakeFloat64": "go/constant", - "constant.MakeFromBytes": "go/constant", - "constant.MakeFromLiteral": "go/constant", - "constant.MakeImag": "go/constant", - "constant.MakeInt64": "go/constant", - "constant.MakeString": "go/constant", - "constant.MakeUint64": "go/constant", - "constant.MakeUnknown": "go/constant", - "constant.Num": "go/constant", - "constant.Real": "go/constant", - "constant.Shift": "go/constant", - "constant.Sign": "go/constant", - "constant.String": "go/constant", - "constant.StringVal": "go/constant", - "constant.ToComplex": "go/constant", - "constant.ToFloat": "go/constant", - "constant.ToInt": "go/constant", - "constant.Uint64Val": "go/constant", - "constant.UnaryOp": "go/constant", - "constant.Unknown": "go/constant", - "context.Background": "context", - "context.CancelFunc": "context", - "context.Canceled": "context", - "context.Context": "context", - "context.DeadlineExceeded": "context", - "context.TODO": "context", - "context.WithCancel": "context", - "context.WithDeadline": "context", - "context.WithTimeout": "context", - "context.WithValue": "context", - "cookiejar.Jar": "net/http/cookiejar", - "cookiejar.New": "net/http/cookiejar", - "cookiejar.Options": "net/http/cookiejar", - "cookiejar.PublicSuffixList": "net/http/cookiejar", - "crc32.Castagnoli": "hash/crc32", - "crc32.Checksum": "hash/crc32", - "crc32.ChecksumIEEE": "hash/crc32", - "crc32.IEEE": "hash/crc32", - "crc32.IEEETable": "hash/crc32", - "crc32.Koopman": "hash/crc32", - "crc32.MakeTable": "hash/crc32", - "crc32.New": "hash/crc32", - "crc32.NewIEEE": "hash/crc32", - "crc32.Size": "hash/crc32", - "crc32.Table": "hash/crc32", - "crc32.Update": "hash/crc32", - "crc64.Checksum": "hash/crc64", - "crc64.ECMA": "hash/crc64", - "crc64.ISO": "hash/crc64", - "crc64.MakeTable": "hash/crc64", - "crc64.New": "hash/crc64", - "crc64.Size": "hash/crc64", - "crc64.Table": "hash/crc64", - "crc64.Update": "hash/crc64", - "crypto.BLAKE2b_256": "crypto", - "crypto.BLAKE2b_384": "crypto", - "crypto.BLAKE2b_512": "crypto", - "crypto.BLAKE2s_256": "crypto", - "crypto.Decrypter": "crypto", - "crypto.DecrypterOpts": "crypto", - "crypto.Hash": "crypto", - "crypto.MD4": "crypto", - "crypto.MD5": "crypto", - "crypto.MD5SHA1": "crypto", - "crypto.PrivateKey": "crypto", - "crypto.PublicKey": "crypto", - "crypto.RIPEMD160": "crypto", - "crypto.RegisterHash": "crypto", - "crypto.SHA1": "crypto", - "crypto.SHA224": "crypto", - "crypto.SHA256": "crypto", - "crypto.SHA384": "crypto", - "crypto.SHA3_224": "crypto", - "crypto.SHA3_256": "crypto", - "crypto.SHA3_384": "crypto", - "crypto.SHA3_512": "crypto", - "crypto.SHA512": "crypto", - "crypto.SHA512_224": "crypto", - "crypto.SHA512_256": "crypto", - "crypto.Signer": "crypto", - "crypto.SignerOpts": "crypto", - "csv.ErrBareQuote": "encoding/csv", - "csv.ErrFieldCount": "encoding/csv", - "csv.ErrQuote": "encoding/csv", - "csv.ErrTrailingComma": "encoding/csv", - "csv.NewReader": "encoding/csv", - "csv.NewWriter": "encoding/csv", - "csv.ParseError": "encoding/csv", - "csv.Reader": "encoding/csv", - "csv.Writer": "encoding/csv", - "debug.FreeOSMemory": "runtime/debug", - "debug.GCStats": "runtime/debug", - "debug.PrintStack": "runtime/debug", - "debug.ReadGCStats": "runtime/debug", - "debug.SetGCPercent": "runtime/debug", - "debug.SetMaxStack": "runtime/debug", - "debug.SetMaxThreads": "runtime/debug", - "debug.SetPanicOnFault": "runtime/debug", - "debug.SetTraceback": "runtime/debug", - "debug.Stack": "runtime/debug", - "debug.WriteHeapDump": "runtime/debug", - "des.BlockSize": "crypto/des", - "des.KeySizeError": "crypto/des", - "des.NewCipher": "crypto/des", - "des.NewTripleDESCipher": "crypto/des", - "doc.AllDecls": "go/doc", - "doc.AllMethods": "go/doc", - "doc.Example": "go/doc", - "doc.Examples": "go/doc", - "doc.Filter": "go/doc", - "doc.Func": "go/doc", - "doc.IllegalPrefixes": "go/doc", - "doc.IsPredeclared": "go/doc", - "doc.Mode": "go/doc", - "doc.New": "go/doc", - "doc.Note": "go/doc", - "doc.Package": "go/doc", - "doc.Synopsis": "go/doc", - "doc.ToHTML": "go/doc", - "doc.ToText": "go/doc", - "doc.Type": "go/doc", - "doc.Value": "go/doc", - "draw.Draw": "image/draw", - "draw.DrawMask": "image/draw", - "draw.Drawer": "image/draw", - "draw.FloydSteinberg": "image/draw", - "draw.Image": "image/draw", - "draw.Op": "image/draw", - "draw.Over": "image/draw", - "draw.Quantizer": "image/draw", - "draw.Src": "image/draw", - "driver.Bool": "database/sql/driver", - "driver.ColumnConverter": "database/sql/driver", - "driver.Conn": "database/sql/driver", - "driver.ConnBeginTx": "database/sql/driver", - "driver.ConnPrepareContext": "database/sql/driver", - "driver.DefaultParameterConverter": "database/sql/driver", - "driver.Driver": "database/sql/driver", - "driver.ErrBadConn": "database/sql/driver", - "driver.ErrRemoveArgument": "database/sql/driver", - "driver.ErrSkip": "database/sql/driver", - "driver.Execer": "database/sql/driver", - "driver.ExecerContext": "database/sql/driver", - "driver.Int32": "database/sql/driver", - "driver.IsScanValue": "database/sql/driver", - "driver.IsValue": "database/sql/driver", - "driver.IsolationLevel": "database/sql/driver", - "driver.NamedValue": "database/sql/driver", - "driver.NamedValueChecker": "database/sql/driver", - "driver.NotNull": "database/sql/driver", - "driver.Null": "database/sql/driver", - "driver.Pinger": "database/sql/driver", - "driver.Queryer": "database/sql/driver", - "driver.QueryerContext": "database/sql/driver", - "driver.Result": "database/sql/driver", - "driver.ResultNoRows": "database/sql/driver", - "driver.Rows": "database/sql/driver", - "driver.RowsAffected": "database/sql/driver", - "driver.RowsColumnTypeDatabaseTypeName": "database/sql/driver", - "driver.RowsColumnTypeLength": "database/sql/driver", - "driver.RowsColumnTypeNullable": "database/sql/driver", - "driver.RowsColumnTypePrecisionScale": "database/sql/driver", - "driver.RowsColumnTypeScanType": "database/sql/driver", - "driver.RowsNextResultSet": "database/sql/driver", - "driver.Stmt": "database/sql/driver", - "driver.StmtExecContext": "database/sql/driver", - "driver.StmtQueryContext": "database/sql/driver", - "driver.String": "database/sql/driver", - "driver.Tx": "database/sql/driver", - "driver.TxOptions": "database/sql/driver", - "driver.Value": "database/sql/driver", - "driver.ValueConverter": "database/sql/driver", - "driver.Valuer": "database/sql/driver", - "dsa.ErrInvalidPublicKey": "crypto/dsa", - "dsa.GenerateKey": "crypto/dsa", - "dsa.GenerateParameters": "crypto/dsa", - "dsa.L1024N160": "crypto/dsa", - "dsa.L2048N224": "crypto/dsa", - "dsa.L2048N256": "crypto/dsa", - "dsa.L3072N256": "crypto/dsa", - "dsa.ParameterSizes": "crypto/dsa", - "dsa.Parameters": "crypto/dsa", - "dsa.PrivateKey": "crypto/dsa", - "dsa.PublicKey": "crypto/dsa", - "dsa.Sign": "crypto/dsa", - "dsa.Verify": "crypto/dsa", - "dwarf.AddrType": "debug/dwarf", - "dwarf.ArrayType": "debug/dwarf", - "dwarf.Attr": "debug/dwarf", - "dwarf.AttrAbstractOrigin": "debug/dwarf", - "dwarf.AttrAccessibility": "debug/dwarf", - "dwarf.AttrAddrClass": "debug/dwarf", - "dwarf.AttrAllocated": "debug/dwarf", - "dwarf.AttrArtificial": "debug/dwarf", - "dwarf.AttrAssociated": "debug/dwarf", - "dwarf.AttrBaseTypes": "debug/dwarf", - "dwarf.AttrBitOffset": "debug/dwarf", - "dwarf.AttrBitSize": "debug/dwarf", - "dwarf.AttrByteSize": "debug/dwarf", - "dwarf.AttrCallColumn": "debug/dwarf", - "dwarf.AttrCallFile": "debug/dwarf", - "dwarf.AttrCallLine": "debug/dwarf", - "dwarf.AttrCalling": "debug/dwarf", - "dwarf.AttrCommonRef": "debug/dwarf", - "dwarf.AttrCompDir": "debug/dwarf", - "dwarf.AttrConstValue": "debug/dwarf", - "dwarf.AttrContainingType": "debug/dwarf", - "dwarf.AttrCount": "debug/dwarf", - "dwarf.AttrDataLocation": "debug/dwarf", - "dwarf.AttrDataMemberLoc": "debug/dwarf", - "dwarf.AttrDeclColumn": "debug/dwarf", - "dwarf.AttrDeclFile": "debug/dwarf", - "dwarf.AttrDeclLine": "debug/dwarf", - "dwarf.AttrDeclaration": "debug/dwarf", - "dwarf.AttrDefaultValue": "debug/dwarf", - "dwarf.AttrDescription": "debug/dwarf", - "dwarf.AttrDiscr": "debug/dwarf", - "dwarf.AttrDiscrList": "debug/dwarf", - "dwarf.AttrDiscrValue": "debug/dwarf", - "dwarf.AttrEncoding": "debug/dwarf", - "dwarf.AttrEntrypc": "debug/dwarf", - "dwarf.AttrExtension": "debug/dwarf", - "dwarf.AttrExternal": "debug/dwarf", - "dwarf.AttrFrameBase": "debug/dwarf", - "dwarf.AttrFriend": "debug/dwarf", - "dwarf.AttrHighpc": "debug/dwarf", - "dwarf.AttrIdentifierCase": "debug/dwarf", - "dwarf.AttrImport": "debug/dwarf", - "dwarf.AttrInline": "debug/dwarf", - "dwarf.AttrIsOptional": "debug/dwarf", - "dwarf.AttrLanguage": "debug/dwarf", - "dwarf.AttrLocation": "debug/dwarf", - "dwarf.AttrLowerBound": "debug/dwarf", - "dwarf.AttrLowpc": "debug/dwarf", - "dwarf.AttrMacroInfo": "debug/dwarf", - "dwarf.AttrName": "debug/dwarf", - "dwarf.AttrNamelistItem": "debug/dwarf", - "dwarf.AttrOrdering": "debug/dwarf", - "dwarf.AttrPriority": "debug/dwarf", - "dwarf.AttrProducer": "debug/dwarf", - "dwarf.AttrPrototyped": "debug/dwarf", - "dwarf.AttrRanges": "debug/dwarf", - "dwarf.AttrReturnAddr": "debug/dwarf", - "dwarf.AttrSegment": "debug/dwarf", - "dwarf.AttrSibling": "debug/dwarf", - "dwarf.AttrSpecification": "debug/dwarf", - "dwarf.AttrStartScope": "debug/dwarf", - "dwarf.AttrStaticLink": "debug/dwarf", - "dwarf.AttrStmtList": "debug/dwarf", - "dwarf.AttrStride": "debug/dwarf", - "dwarf.AttrStrideSize": "debug/dwarf", - "dwarf.AttrStringLength": "debug/dwarf", - "dwarf.AttrTrampoline": "debug/dwarf", - "dwarf.AttrType": "debug/dwarf", - "dwarf.AttrUpperBound": "debug/dwarf", - "dwarf.AttrUseLocation": "debug/dwarf", - "dwarf.AttrUseUTF8": "debug/dwarf", - "dwarf.AttrVarParam": "debug/dwarf", - "dwarf.AttrVirtuality": "debug/dwarf", - "dwarf.AttrVisibility": "debug/dwarf", - "dwarf.AttrVtableElemLoc": "debug/dwarf", - "dwarf.BasicType": "debug/dwarf", - "dwarf.BoolType": "debug/dwarf", - "dwarf.CharType": "debug/dwarf", - "dwarf.Class": "debug/dwarf", - "dwarf.ClassAddress": "debug/dwarf", - "dwarf.ClassBlock": "debug/dwarf", - "dwarf.ClassConstant": "debug/dwarf", - "dwarf.ClassExprLoc": "debug/dwarf", - "dwarf.ClassFlag": "debug/dwarf", - "dwarf.ClassLinePtr": "debug/dwarf", - "dwarf.ClassLocListPtr": "debug/dwarf", - "dwarf.ClassMacPtr": "debug/dwarf", - "dwarf.ClassRangeListPtr": "debug/dwarf", - "dwarf.ClassReference": "debug/dwarf", - "dwarf.ClassReferenceAlt": "debug/dwarf", - "dwarf.ClassReferenceSig": "debug/dwarf", - "dwarf.ClassString": "debug/dwarf", - "dwarf.ClassStringAlt": "debug/dwarf", - "dwarf.ClassUnknown": "debug/dwarf", - "dwarf.CommonType": "debug/dwarf", - "dwarf.ComplexType": "debug/dwarf", - "dwarf.Data": "debug/dwarf", - "dwarf.DecodeError": "debug/dwarf", - "dwarf.DotDotDotType": "debug/dwarf", - "dwarf.Entry": "debug/dwarf", - "dwarf.EnumType": "debug/dwarf", - "dwarf.EnumValue": "debug/dwarf", - "dwarf.ErrUnknownPC": "debug/dwarf", - "dwarf.Field": "debug/dwarf", - "dwarf.FloatType": "debug/dwarf", - "dwarf.FuncType": "debug/dwarf", - "dwarf.IntType": "debug/dwarf", - "dwarf.LineEntry": "debug/dwarf", - "dwarf.LineFile": "debug/dwarf", - "dwarf.LineReader": "debug/dwarf", - "dwarf.LineReaderPos": "debug/dwarf", - "dwarf.New": "debug/dwarf", - "dwarf.Offset": "debug/dwarf", - "dwarf.PtrType": "debug/dwarf", - "dwarf.QualType": "debug/dwarf", - "dwarf.Reader": "debug/dwarf", - "dwarf.StructField": "debug/dwarf", - "dwarf.StructType": "debug/dwarf", - "dwarf.Tag": "debug/dwarf", - "dwarf.TagAccessDeclaration": "debug/dwarf", - "dwarf.TagArrayType": "debug/dwarf", - "dwarf.TagBaseType": "debug/dwarf", - "dwarf.TagCatchDwarfBlock": "debug/dwarf", - "dwarf.TagClassType": "debug/dwarf", - "dwarf.TagCommonDwarfBlock": "debug/dwarf", - "dwarf.TagCommonInclusion": "debug/dwarf", - "dwarf.TagCompileUnit": "debug/dwarf", - "dwarf.TagCondition": "debug/dwarf", - "dwarf.TagConstType": "debug/dwarf", - "dwarf.TagConstant": "debug/dwarf", - "dwarf.TagDwarfProcedure": "debug/dwarf", - "dwarf.TagEntryPoint": "debug/dwarf", - "dwarf.TagEnumerationType": "debug/dwarf", - "dwarf.TagEnumerator": "debug/dwarf", - "dwarf.TagFileType": "debug/dwarf", - "dwarf.TagFormalParameter": "debug/dwarf", - "dwarf.TagFriend": "debug/dwarf", - "dwarf.TagImportedDeclaration": "debug/dwarf", - "dwarf.TagImportedModule": "debug/dwarf", - "dwarf.TagImportedUnit": "debug/dwarf", - "dwarf.TagInheritance": "debug/dwarf", - "dwarf.TagInlinedSubroutine": "debug/dwarf", - "dwarf.TagInterfaceType": "debug/dwarf", - "dwarf.TagLabel": "debug/dwarf", - "dwarf.TagLexDwarfBlock": "debug/dwarf", - "dwarf.TagMember": "debug/dwarf", - "dwarf.TagModule": "debug/dwarf", - "dwarf.TagMutableType": "debug/dwarf", - "dwarf.TagNamelist": "debug/dwarf", - "dwarf.TagNamelistItem": "debug/dwarf", - "dwarf.TagNamespace": "debug/dwarf", - "dwarf.TagPackedType": "debug/dwarf", - "dwarf.TagPartialUnit": "debug/dwarf", - "dwarf.TagPointerType": "debug/dwarf", - "dwarf.TagPtrToMemberType": "debug/dwarf", - "dwarf.TagReferenceType": "debug/dwarf", - "dwarf.TagRestrictType": "debug/dwarf", - "dwarf.TagRvalueReferenceType": "debug/dwarf", - "dwarf.TagSetType": "debug/dwarf", - "dwarf.TagSharedType": "debug/dwarf", - "dwarf.TagStringType": "debug/dwarf", - "dwarf.TagStructType": "debug/dwarf", - "dwarf.TagSubprogram": "debug/dwarf", - "dwarf.TagSubrangeType": "debug/dwarf", - "dwarf.TagSubroutineType": "debug/dwarf", - "dwarf.TagTemplateAlias": "debug/dwarf", - "dwarf.TagTemplateTypeParameter": "debug/dwarf", - "dwarf.TagTemplateValueParameter": "debug/dwarf", - "dwarf.TagThrownType": "debug/dwarf", - "dwarf.TagTryDwarfBlock": "debug/dwarf", - "dwarf.TagTypeUnit": "debug/dwarf", - "dwarf.TagTypedef": "debug/dwarf", - "dwarf.TagUnionType": "debug/dwarf", - "dwarf.TagUnspecifiedParameters": "debug/dwarf", - "dwarf.TagUnspecifiedType": "debug/dwarf", - "dwarf.TagVariable": "debug/dwarf", - "dwarf.TagVariant": "debug/dwarf", - "dwarf.TagVariantPart": "debug/dwarf", - "dwarf.TagVolatileType": "debug/dwarf", - "dwarf.TagWithStmt": "debug/dwarf", - "dwarf.Type": "debug/dwarf", - "dwarf.TypedefType": "debug/dwarf", - "dwarf.UcharType": "debug/dwarf", - "dwarf.UintType": "debug/dwarf", - "dwarf.UnspecifiedType": "debug/dwarf", - "dwarf.VoidType": "debug/dwarf", - "ecdsa.GenerateKey": "crypto/ecdsa", - "ecdsa.PrivateKey": "crypto/ecdsa", - "ecdsa.PublicKey": "crypto/ecdsa", - "ecdsa.Sign": "crypto/ecdsa", - "ecdsa.Verify": "crypto/ecdsa", - "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf", - "elf.COMPRESS_HIOS": "debug/elf", - "elf.COMPRESS_HIPROC": "debug/elf", - "elf.COMPRESS_LOOS": "debug/elf", - "elf.COMPRESS_LOPROC": "debug/elf", - "elf.COMPRESS_ZLIB": "debug/elf", - "elf.Chdr32": "debug/elf", - "elf.Chdr64": "debug/elf", - "elf.Class": "debug/elf", - "elf.CompressionType": "debug/elf", - "elf.DF_BIND_NOW": "debug/elf", - "elf.DF_ORIGIN": "debug/elf", - "elf.DF_STATIC_TLS": "debug/elf", - "elf.DF_SYMBOLIC": "debug/elf", - "elf.DF_TEXTREL": "debug/elf", - "elf.DT_BIND_NOW": "debug/elf", - "elf.DT_DEBUG": "debug/elf", - "elf.DT_ENCODING": "debug/elf", - "elf.DT_FINI": "debug/elf", - "elf.DT_FINI_ARRAY": "debug/elf", - "elf.DT_FINI_ARRAYSZ": "debug/elf", - "elf.DT_FLAGS": "debug/elf", - "elf.DT_HASH": "debug/elf", - "elf.DT_HIOS": "debug/elf", - "elf.DT_HIPROC": "debug/elf", - "elf.DT_INIT": "debug/elf", - "elf.DT_INIT_ARRAY": "debug/elf", - "elf.DT_INIT_ARRAYSZ": "debug/elf", - "elf.DT_JMPREL": "debug/elf", - "elf.DT_LOOS": "debug/elf", - "elf.DT_LOPROC": "debug/elf", - "elf.DT_NEEDED": "debug/elf", - "elf.DT_NULL": "debug/elf", - "elf.DT_PLTGOT": "debug/elf", - "elf.DT_PLTREL": "debug/elf", - "elf.DT_PLTRELSZ": "debug/elf", - "elf.DT_PREINIT_ARRAY": "debug/elf", - "elf.DT_PREINIT_ARRAYSZ": "debug/elf", - "elf.DT_REL": "debug/elf", - "elf.DT_RELA": "debug/elf", - "elf.DT_RELAENT": "debug/elf", - "elf.DT_RELASZ": "debug/elf", - "elf.DT_RELENT": "debug/elf", - "elf.DT_RELSZ": "debug/elf", - "elf.DT_RPATH": "debug/elf", - "elf.DT_RUNPATH": "debug/elf", - "elf.DT_SONAME": "debug/elf", - "elf.DT_STRSZ": "debug/elf", - "elf.DT_STRTAB": "debug/elf", - "elf.DT_SYMBOLIC": "debug/elf", - "elf.DT_SYMENT": "debug/elf", - "elf.DT_SYMTAB": "debug/elf", - "elf.DT_TEXTREL": "debug/elf", - "elf.DT_VERNEED": "debug/elf", - "elf.DT_VERNEEDNUM": "debug/elf", - "elf.DT_VERSYM": "debug/elf", - "elf.Data": "debug/elf", - "elf.Dyn32": "debug/elf", - "elf.Dyn64": "debug/elf", - "elf.DynFlag": "debug/elf", - "elf.DynTag": "debug/elf", - "elf.EI_ABIVERSION": "debug/elf", - "elf.EI_CLASS": "debug/elf", - "elf.EI_DATA": "debug/elf", - "elf.EI_NIDENT": "debug/elf", - "elf.EI_OSABI": "debug/elf", - "elf.EI_PAD": "debug/elf", - "elf.EI_VERSION": "debug/elf", - "elf.ELFCLASS32": "debug/elf", - "elf.ELFCLASS64": "debug/elf", - "elf.ELFCLASSNONE": "debug/elf", - "elf.ELFDATA2LSB": "debug/elf", - "elf.ELFDATA2MSB": "debug/elf", - "elf.ELFDATANONE": "debug/elf", - "elf.ELFMAG": "debug/elf", - "elf.ELFOSABI_86OPEN": "debug/elf", - "elf.ELFOSABI_AIX": "debug/elf", - "elf.ELFOSABI_ARM": "debug/elf", - "elf.ELFOSABI_FREEBSD": "debug/elf", - "elf.ELFOSABI_HPUX": "debug/elf", - "elf.ELFOSABI_HURD": "debug/elf", - "elf.ELFOSABI_IRIX": "debug/elf", - "elf.ELFOSABI_LINUX": "debug/elf", - "elf.ELFOSABI_MODESTO": "debug/elf", - "elf.ELFOSABI_NETBSD": "debug/elf", - "elf.ELFOSABI_NONE": "debug/elf", - "elf.ELFOSABI_NSK": "debug/elf", - "elf.ELFOSABI_OPENBSD": "debug/elf", - "elf.ELFOSABI_OPENVMS": "debug/elf", - "elf.ELFOSABI_SOLARIS": "debug/elf", - "elf.ELFOSABI_STANDALONE": "debug/elf", - "elf.ELFOSABI_TRU64": "debug/elf", - "elf.EM_386": "debug/elf", - "elf.EM_486": "debug/elf", - "elf.EM_68HC12": "debug/elf", - "elf.EM_68K": "debug/elf", - "elf.EM_860": "debug/elf", - "elf.EM_88K": "debug/elf", - "elf.EM_960": "debug/elf", - "elf.EM_AARCH64": "debug/elf", - "elf.EM_ALPHA": "debug/elf", - "elf.EM_ALPHA_STD": "debug/elf", - "elf.EM_ARC": "debug/elf", - "elf.EM_ARM": "debug/elf", - "elf.EM_COLDFIRE": "debug/elf", - "elf.EM_FR20": "debug/elf", - "elf.EM_H8S": "debug/elf", - "elf.EM_H8_300": "debug/elf", - "elf.EM_H8_300H": "debug/elf", - "elf.EM_H8_500": "debug/elf", - "elf.EM_IA_64": "debug/elf", - "elf.EM_M32": "debug/elf", - "elf.EM_ME16": "debug/elf", - "elf.EM_MIPS": "debug/elf", - "elf.EM_MIPS_RS3_LE": "debug/elf", - "elf.EM_MIPS_RS4_BE": "debug/elf", - "elf.EM_MIPS_X": "debug/elf", - "elf.EM_MMA": "debug/elf", - "elf.EM_NCPU": "debug/elf", - "elf.EM_NDR1": "debug/elf", - "elf.EM_NONE": "debug/elf", - "elf.EM_PARISC": "debug/elf", - "elf.EM_PCP": "debug/elf", - "elf.EM_PPC": "debug/elf", - "elf.EM_PPC64": "debug/elf", - "elf.EM_RCE": "debug/elf", - "elf.EM_RH32": "debug/elf", - "elf.EM_S370": "debug/elf", - "elf.EM_S390": "debug/elf", - "elf.EM_SH": "debug/elf", - "elf.EM_SPARC": "debug/elf", - "elf.EM_SPARC32PLUS": "debug/elf", - "elf.EM_SPARCV9": "debug/elf", - "elf.EM_ST100": "debug/elf", - "elf.EM_STARCORE": "debug/elf", - "elf.EM_TINYJ": "debug/elf", - "elf.EM_TRICORE": "debug/elf", - "elf.EM_V800": "debug/elf", - "elf.EM_VPP500": "debug/elf", - "elf.EM_X86_64": "debug/elf", - "elf.ET_CORE": "debug/elf", - "elf.ET_DYN": "debug/elf", - "elf.ET_EXEC": "debug/elf", - "elf.ET_HIOS": "debug/elf", - "elf.ET_HIPROC": "debug/elf", - "elf.ET_LOOS": "debug/elf", - "elf.ET_LOPROC": "debug/elf", - "elf.ET_NONE": "debug/elf", - "elf.ET_REL": "debug/elf", - "elf.EV_CURRENT": "debug/elf", - "elf.EV_NONE": "debug/elf", - "elf.ErrNoSymbols": "debug/elf", - "elf.File": "debug/elf", - "elf.FileHeader": "debug/elf", - "elf.FormatError": "debug/elf", - "elf.Header32": "debug/elf", - "elf.Header64": "debug/elf", - "elf.ImportedSymbol": "debug/elf", - "elf.Machine": "debug/elf", - "elf.NT_FPREGSET": "debug/elf", - "elf.NT_PRPSINFO": "debug/elf", - "elf.NT_PRSTATUS": "debug/elf", - "elf.NType": "debug/elf", - "elf.NewFile": "debug/elf", - "elf.OSABI": "debug/elf", - "elf.Open": "debug/elf", - "elf.PF_MASKOS": "debug/elf", - "elf.PF_MASKPROC": "debug/elf", - "elf.PF_R": "debug/elf", - "elf.PF_W": "debug/elf", - "elf.PF_X": "debug/elf", - "elf.PT_DYNAMIC": "debug/elf", - "elf.PT_HIOS": "debug/elf", - "elf.PT_HIPROC": "debug/elf", - "elf.PT_INTERP": "debug/elf", - "elf.PT_LOAD": "debug/elf", - "elf.PT_LOOS": "debug/elf", - "elf.PT_LOPROC": "debug/elf", - "elf.PT_NOTE": "debug/elf", - "elf.PT_NULL": "debug/elf", - "elf.PT_PHDR": "debug/elf", - "elf.PT_SHLIB": "debug/elf", - "elf.PT_TLS": "debug/elf", - "elf.Prog": "debug/elf", - "elf.Prog32": "debug/elf", - "elf.Prog64": "debug/elf", - "elf.ProgFlag": "debug/elf", - "elf.ProgHeader": "debug/elf", - "elf.ProgType": "debug/elf", - "elf.R_386": "debug/elf", - "elf.R_386_32": "debug/elf", - "elf.R_386_COPY": "debug/elf", - "elf.R_386_GLOB_DAT": "debug/elf", - "elf.R_386_GOT32": "debug/elf", - "elf.R_386_GOTOFF": "debug/elf", - "elf.R_386_GOTPC": "debug/elf", - "elf.R_386_JMP_SLOT": "debug/elf", - "elf.R_386_NONE": "debug/elf", - "elf.R_386_PC32": "debug/elf", - "elf.R_386_PLT32": "debug/elf", - "elf.R_386_RELATIVE": "debug/elf", - "elf.R_386_TLS_DTPMOD32": "debug/elf", - "elf.R_386_TLS_DTPOFF32": "debug/elf", - "elf.R_386_TLS_GD": "debug/elf", - "elf.R_386_TLS_GD_32": "debug/elf", - "elf.R_386_TLS_GD_CALL": "debug/elf", - "elf.R_386_TLS_GD_POP": "debug/elf", - "elf.R_386_TLS_GD_PUSH": "debug/elf", - "elf.R_386_TLS_GOTIE": "debug/elf", - "elf.R_386_TLS_IE": "debug/elf", - "elf.R_386_TLS_IE_32": "debug/elf", - "elf.R_386_TLS_LDM": "debug/elf", - "elf.R_386_TLS_LDM_32": "debug/elf", - "elf.R_386_TLS_LDM_CALL": "debug/elf", - "elf.R_386_TLS_LDM_POP": "debug/elf", - "elf.R_386_TLS_LDM_PUSH": "debug/elf", - "elf.R_386_TLS_LDO_32": "debug/elf", - "elf.R_386_TLS_LE": "debug/elf", - "elf.R_386_TLS_LE_32": "debug/elf", - "elf.R_386_TLS_TPOFF": "debug/elf", - "elf.R_386_TLS_TPOFF32": "debug/elf", - "elf.R_390": "debug/elf", - "elf.R_390_12": "debug/elf", - "elf.R_390_16": "debug/elf", - "elf.R_390_20": "debug/elf", - "elf.R_390_32": "debug/elf", - "elf.R_390_64": "debug/elf", - "elf.R_390_8": "debug/elf", - "elf.R_390_COPY": "debug/elf", - "elf.R_390_GLOB_DAT": "debug/elf", - "elf.R_390_GOT12": "debug/elf", - "elf.R_390_GOT16": "debug/elf", - "elf.R_390_GOT20": "debug/elf", - "elf.R_390_GOT32": "debug/elf", - "elf.R_390_GOT64": "debug/elf", - "elf.R_390_GOTENT": "debug/elf", - "elf.R_390_GOTOFF": "debug/elf", - "elf.R_390_GOTOFF16": "debug/elf", - "elf.R_390_GOTOFF64": "debug/elf", - "elf.R_390_GOTPC": "debug/elf", - "elf.R_390_GOTPCDBL": "debug/elf", - "elf.R_390_GOTPLT12": "debug/elf", - "elf.R_390_GOTPLT16": "debug/elf", - "elf.R_390_GOTPLT20": "debug/elf", - "elf.R_390_GOTPLT32": "debug/elf", - "elf.R_390_GOTPLT64": "debug/elf", - "elf.R_390_GOTPLTENT": "debug/elf", - "elf.R_390_GOTPLTOFF16": "debug/elf", - "elf.R_390_GOTPLTOFF32": "debug/elf", - "elf.R_390_GOTPLTOFF64": "debug/elf", - "elf.R_390_JMP_SLOT": "debug/elf", - "elf.R_390_NONE": "debug/elf", - "elf.R_390_PC16": "debug/elf", - "elf.R_390_PC16DBL": "debug/elf", - "elf.R_390_PC32": "debug/elf", - "elf.R_390_PC32DBL": "debug/elf", - "elf.R_390_PC64": "debug/elf", - "elf.R_390_PLT16DBL": "debug/elf", - "elf.R_390_PLT32": "debug/elf", - "elf.R_390_PLT32DBL": "debug/elf", - "elf.R_390_PLT64": "debug/elf", - "elf.R_390_RELATIVE": "debug/elf", - "elf.R_390_TLS_DTPMOD": "debug/elf", - "elf.R_390_TLS_DTPOFF": "debug/elf", - "elf.R_390_TLS_GD32": "debug/elf", - "elf.R_390_TLS_GD64": "debug/elf", - "elf.R_390_TLS_GDCALL": "debug/elf", - "elf.R_390_TLS_GOTIE12": "debug/elf", - "elf.R_390_TLS_GOTIE20": "debug/elf", - "elf.R_390_TLS_GOTIE32": "debug/elf", - "elf.R_390_TLS_GOTIE64": "debug/elf", - "elf.R_390_TLS_IE32": "debug/elf", - "elf.R_390_TLS_IE64": "debug/elf", - "elf.R_390_TLS_IEENT": "debug/elf", - "elf.R_390_TLS_LDCALL": "debug/elf", - "elf.R_390_TLS_LDM32": "debug/elf", - "elf.R_390_TLS_LDM64": "debug/elf", - "elf.R_390_TLS_LDO32": "debug/elf", - "elf.R_390_TLS_LDO64": "debug/elf", - "elf.R_390_TLS_LE32": "debug/elf", - "elf.R_390_TLS_LE64": "debug/elf", - "elf.R_390_TLS_LOAD": "debug/elf", - "elf.R_390_TLS_TPOFF": "debug/elf", - "elf.R_AARCH64": "debug/elf", - "elf.R_AARCH64_ABS16": "debug/elf", - "elf.R_AARCH64_ABS32": "debug/elf", - "elf.R_AARCH64_ABS64": "debug/elf", - "elf.R_AARCH64_ADD_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_ADR_GOT_PAGE": "debug/elf", - "elf.R_AARCH64_ADR_PREL_LO21": "debug/elf", - "elf.R_AARCH64_ADR_PREL_PG_HI21": "debug/elf", - "elf.R_AARCH64_ADR_PREL_PG_HI21_NC": "debug/elf", - "elf.R_AARCH64_CALL26": "debug/elf", - "elf.R_AARCH64_CONDBR19": "debug/elf", - "elf.R_AARCH64_COPY": "debug/elf", - "elf.R_AARCH64_GLOB_DAT": "debug/elf", - "elf.R_AARCH64_GOT_LD_PREL19": "debug/elf", - "elf.R_AARCH64_IRELATIVE": "debug/elf", - "elf.R_AARCH64_JUMP26": "debug/elf", - "elf.R_AARCH64_JUMP_SLOT": "debug/elf", - "elf.R_AARCH64_LD64_GOT_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST128_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST16_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST32_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST64_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST8_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LD_PREL_LO19": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G0": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G1": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G2": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G0": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G0_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G1": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G1_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G2": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G2_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G3": "debug/elf", - "elf.R_AARCH64_NONE": "debug/elf", - "elf.R_AARCH64_NULL": "debug/elf", - "elf.R_AARCH64_P32_ABS16": "debug/elf", - "elf.R_AARCH64_P32_ABS32": "debug/elf", - "elf.R_AARCH64_P32_ADD_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_ADR_GOT_PAGE": "debug/elf", - "elf.R_AARCH64_P32_ADR_PREL_LO21": "debug/elf", - "elf.R_AARCH64_P32_ADR_PREL_PG_HI21": "debug/elf", - "elf.R_AARCH64_P32_CALL26": "debug/elf", - "elf.R_AARCH64_P32_CONDBR19": "debug/elf", - "elf.R_AARCH64_P32_COPY": "debug/elf", - "elf.R_AARCH64_P32_GLOB_DAT": "debug/elf", - "elf.R_AARCH64_P32_GOT_LD_PREL19": "debug/elf", - "elf.R_AARCH64_P32_IRELATIVE": "debug/elf", - "elf.R_AARCH64_P32_JUMP26": "debug/elf", - "elf.R_AARCH64_P32_JUMP_SLOT": "debug/elf", - "elf.R_AARCH64_P32_LD32_GOT_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST128_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST16_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST32_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST64_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST8_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LD_PREL_LO19": "debug/elf", - "elf.R_AARCH64_P32_MOVW_SABS_G0": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G0": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G0_NC": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G1": "debug/elf", - "elf.R_AARCH64_P32_PREL16": "debug/elf", - "elf.R_AARCH64_P32_PREL32": "debug/elf", - "elf.R_AARCH64_P32_RELATIVE": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADR_PREL21": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_CALL": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_LD32_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_LD_PREL19": "debug/elf", - "elf.R_AARCH64_P32_TLSGD_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSGD_ADR_PAGE21": "debug/elf", + "adler32.Checksum": "hash/adler32", + "adler32.New": "hash/adler32", + "adler32.Size": "hash/adler32", + "aes.BlockSize": "crypto/aes", + "aes.KeySizeError": "crypto/aes", + "aes.NewCipher": "crypto/aes", + "ascii85.CorruptInputError": "encoding/ascii85", + "ascii85.Decode": "encoding/ascii85", + "ascii85.Encode": "encoding/ascii85", + "ascii85.MaxEncodedLen": "encoding/ascii85", + "ascii85.NewDecoder": "encoding/ascii85", + "ascii85.NewEncoder": "encoding/ascii85", + "asn1.BitString": "encoding/asn1", + "asn1.ClassApplication": "encoding/asn1", + "asn1.ClassContextSpecific": "encoding/asn1", + "asn1.ClassPrivate": "encoding/asn1", + "asn1.ClassUniversal": "encoding/asn1", + "asn1.Enumerated": "encoding/asn1", + "asn1.Flag": "encoding/asn1", + "asn1.Marshal": "encoding/asn1", + "asn1.MarshalWithParams": "encoding/asn1", + "asn1.NullBytes": "encoding/asn1", + "asn1.NullRawValue": "encoding/asn1", + "asn1.ObjectIdentifier": "encoding/asn1", + "asn1.RawContent": "encoding/asn1", + "asn1.RawValue": "encoding/asn1", + "asn1.StructuralError": "encoding/asn1", + "asn1.SyntaxError": "encoding/asn1", + "asn1.TagBitString": "encoding/asn1", + "asn1.TagBoolean": "encoding/asn1", + "asn1.TagEnum": "encoding/asn1", + "asn1.TagGeneralString": "encoding/asn1", + "asn1.TagGeneralizedTime": "encoding/asn1", + "asn1.TagIA5String": "encoding/asn1", + "asn1.TagInteger": "encoding/asn1", + "asn1.TagNull": "encoding/asn1", + "asn1.TagNumericString": "encoding/asn1", + "asn1.TagOID": "encoding/asn1", + "asn1.TagOctetString": "encoding/asn1", + "asn1.TagPrintableString": "encoding/asn1", + "asn1.TagSequence": "encoding/asn1", + "asn1.TagSet": "encoding/asn1", + "asn1.TagT61String": "encoding/asn1", + "asn1.TagUTCTime": "encoding/asn1", + "asn1.TagUTF8String": "encoding/asn1", + "asn1.Unmarshal": "encoding/asn1", + "asn1.UnmarshalWithParams": "encoding/asn1", + "ast.ArrayType": "go/ast", + "ast.AssignStmt": "go/ast", + "ast.Bad": "go/ast", + "ast.BadDecl": "go/ast", + "ast.BadExpr": "go/ast", + "ast.BadStmt": "go/ast", + "ast.BasicLit": "go/ast", + "ast.BinaryExpr": "go/ast", + "ast.BlockStmt": "go/ast", + "ast.BranchStmt": "go/ast", + "ast.CallExpr": "go/ast", + "ast.CaseClause": "go/ast", + "ast.ChanDir": "go/ast", + "ast.ChanType": "go/ast", + "ast.CommClause": "go/ast", + "ast.Comment": "go/ast", + "ast.CommentGroup": "go/ast", + "ast.CommentMap": "go/ast", + "ast.CompositeLit": "go/ast", + "ast.Con": "go/ast", + "ast.DeclStmt": "go/ast", + "ast.DeferStmt": "go/ast", + "ast.Ellipsis": "go/ast", + "ast.EmptyStmt": "go/ast", + "ast.ExprStmt": "go/ast", + "ast.Field": "go/ast", + "ast.FieldFilter": "go/ast", + "ast.FieldList": "go/ast", + "ast.File": "go/ast", + "ast.FileExports": "go/ast", + "ast.Filter": "go/ast", + "ast.FilterDecl": "go/ast", + "ast.FilterFile": "go/ast", + "ast.FilterFuncDuplicates": "go/ast", + "ast.FilterImportDuplicates": "go/ast", + "ast.FilterPackage": "go/ast", + "ast.FilterUnassociatedComments": "go/ast", + "ast.ForStmt": "go/ast", + "ast.Fprint": "go/ast", + "ast.Fun": "go/ast", + "ast.FuncDecl": "go/ast", + "ast.FuncLit": "go/ast", + "ast.FuncType": "go/ast", + "ast.GenDecl": "go/ast", + "ast.GoStmt": "go/ast", + "ast.Ident": "go/ast", + "ast.IfStmt": "go/ast", + "ast.ImportSpec": "go/ast", + "ast.Importer": "go/ast", + "ast.IncDecStmt": "go/ast", + "ast.IndexExpr": "go/ast", + "ast.Inspect": "go/ast", + "ast.InterfaceType": "go/ast", + "ast.IsExported": "go/ast", + "ast.KeyValueExpr": "go/ast", + "ast.LabeledStmt": "go/ast", + "ast.Lbl": "go/ast", + "ast.MapType": "go/ast", + "ast.MergeMode": "go/ast", + "ast.MergePackageFiles": "go/ast", + "ast.NewCommentMap": "go/ast", + "ast.NewIdent": "go/ast", + "ast.NewObj": "go/ast", + "ast.NewPackage": "go/ast", + "ast.NewScope": "go/ast", + "ast.Node": "go/ast", + "ast.NotNilFilter": "go/ast", + "ast.ObjKind": "go/ast", + "ast.Object": "go/ast", + "ast.Package": "go/ast", + "ast.PackageExports": "go/ast", + "ast.ParenExpr": "go/ast", + "ast.Pkg": "go/ast", + "ast.Print": "go/ast", + "ast.RECV": "go/ast", + "ast.RangeStmt": "go/ast", + "ast.ReturnStmt": "go/ast", + "ast.SEND": "go/ast", + "ast.Scope": "go/ast", + "ast.SelectStmt": "go/ast", + "ast.SelectorExpr": "go/ast", + "ast.SendStmt": "go/ast", + "ast.SliceExpr": "go/ast", + "ast.SortImports": "go/ast", + "ast.StarExpr": "go/ast", + "ast.StructType": "go/ast", + "ast.SwitchStmt": "go/ast", + "ast.Typ": "go/ast", + "ast.TypeAssertExpr": "go/ast", + "ast.TypeSpec": "go/ast", + "ast.TypeSwitchStmt": "go/ast", + "ast.UnaryExpr": "go/ast", + "ast.ValueSpec": "go/ast", + "ast.Var": "go/ast", + "ast.Visitor": "go/ast", + "ast.Walk": "go/ast", + "atomic.AddInt32": "sync/atomic", + "atomic.AddInt64": "sync/atomic", + "atomic.AddUint32": "sync/atomic", + "atomic.AddUint64": "sync/atomic", + "atomic.AddUintptr": "sync/atomic", + "atomic.CompareAndSwapInt32": "sync/atomic", + "atomic.CompareAndSwapInt64": "sync/atomic", + "atomic.CompareAndSwapPointer": "sync/atomic", + "atomic.CompareAndSwapUint32": "sync/atomic", + "atomic.CompareAndSwapUint64": "sync/atomic", + "atomic.CompareAndSwapUintptr": "sync/atomic", + "atomic.LoadInt32": "sync/atomic", + "atomic.LoadInt64": "sync/atomic", + "atomic.LoadPointer": "sync/atomic", + "atomic.LoadUint32": "sync/atomic", + "atomic.LoadUint64": "sync/atomic", + "atomic.LoadUintptr": "sync/atomic", + "atomic.StoreInt32": "sync/atomic", + "atomic.StoreInt64": "sync/atomic", + "atomic.StorePointer": "sync/atomic", + "atomic.StoreUint32": "sync/atomic", + "atomic.StoreUint64": "sync/atomic", + "atomic.StoreUintptr": "sync/atomic", + "atomic.SwapInt32": "sync/atomic", + "atomic.SwapInt64": "sync/atomic", + "atomic.SwapPointer": "sync/atomic", + "atomic.SwapUint32": "sync/atomic", + "atomic.SwapUint64": "sync/atomic", + "atomic.SwapUintptr": "sync/atomic", + "atomic.Value": "sync/atomic", + "base32.CorruptInputError": "encoding/base32", + "base32.Encoding": "encoding/base32", + "base32.HexEncoding": "encoding/base32", + "base32.NewDecoder": "encoding/base32", + "base32.NewEncoder": "encoding/base32", + "base32.NewEncoding": "encoding/base32", + "base32.NoPadding": "encoding/base32", + "base32.StdEncoding": "encoding/base32", + "base32.StdPadding": "encoding/base32", + "base64.CorruptInputError": "encoding/base64", + "base64.Encoding": "encoding/base64", + "base64.NewDecoder": "encoding/base64", + "base64.NewEncoder": "encoding/base64", + "base64.NewEncoding": "encoding/base64", + "base64.NoPadding": "encoding/base64", + "base64.RawStdEncoding": "encoding/base64", + "base64.RawURLEncoding": "encoding/base64", + "base64.StdEncoding": "encoding/base64", + "base64.StdPadding": "encoding/base64", + "base64.URLEncoding": "encoding/base64", + "big.Above": "math/big", + "big.Accuracy": "math/big", + "big.AwayFromZero": "math/big", + "big.Below": "math/big", + "big.ErrNaN": "math/big", + "big.Exact": "math/big", + "big.Float": "math/big", + "big.Int": "math/big", + "big.Jacobi": "math/big", + "big.MaxBase": "math/big", + "big.MaxExp": "math/big", + "big.MaxPrec": "math/big", + "big.MinExp": "math/big", + "big.NewFloat": "math/big", + "big.NewInt": "math/big", + "big.NewRat": "math/big", + "big.ParseFloat": "math/big", + "big.Rat": "math/big", + "big.RoundingMode": "math/big", + "big.ToNearestAway": "math/big", + "big.ToNearestEven": "math/big", + "big.ToNegativeInf": "math/big", + "big.ToPositiveInf": "math/big", + "big.ToZero": "math/big", + "big.Word": "math/big", + "binary.BigEndian": "encoding/binary", + "binary.ByteOrder": "encoding/binary", + "binary.LittleEndian": "encoding/binary", + "binary.MaxVarintLen16": "encoding/binary", + "binary.MaxVarintLen32": "encoding/binary", + "binary.MaxVarintLen64": "encoding/binary", + "binary.PutUvarint": "encoding/binary", + "binary.PutVarint": "encoding/binary", + "binary.Read": "encoding/binary", + "binary.ReadUvarint": "encoding/binary", + "binary.ReadVarint": "encoding/binary", + "binary.Size": "encoding/binary", + "binary.Uvarint": "encoding/binary", + "binary.Varint": "encoding/binary", + "binary.Write": "encoding/binary", + "bits.LeadingZeros": "math/bits", + "bits.LeadingZeros16": "math/bits", + "bits.LeadingZeros32": "math/bits", + "bits.LeadingZeros64": "math/bits", + "bits.LeadingZeros8": "math/bits", + "bits.Len": "math/bits", + "bits.Len16": "math/bits", + "bits.Len32": "math/bits", + "bits.Len64": "math/bits", + "bits.Len8": "math/bits", + "bits.OnesCount": "math/bits", + "bits.OnesCount16": "math/bits", + "bits.OnesCount32": "math/bits", + "bits.OnesCount64": "math/bits", + "bits.OnesCount8": "math/bits", + "bits.Reverse": "math/bits", + "bits.Reverse16": "math/bits", + "bits.Reverse32": "math/bits", + "bits.Reverse64": "math/bits", + "bits.Reverse8": "math/bits", + "bits.ReverseBytes": "math/bits", + "bits.ReverseBytes16": "math/bits", + "bits.ReverseBytes32": "math/bits", + "bits.ReverseBytes64": "math/bits", + "bits.RotateLeft": "math/bits", + "bits.RotateLeft16": "math/bits", + "bits.RotateLeft32": "math/bits", + "bits.RotateLeft64": "math/bits", + "bits.RotateLeft8": "math/bits", + "bits.TrailingZeros": "math/bits", + "bits.TrailingZeros16": "math/bits", + "bits.TrailingZeros32": "math/bits", + "bits.TrailingZeros64": "math/bits", + "bits.TrailingZeros8": "math/bits", + "bits.UintSize": "math/bits", + "bufio.ErrAdvanceTooFar": "bufio", + "bufio.ErrBufferFull": "bufio", + "bufio.ErrFinalToken": "bufio", + "bufio.ErrInvalidUnreadByte": "bufio", + "bufio.ErrInvalidUnreadRune": "bufio", + "bufio.ErrNegativeAdvance": "bufio", + "bufio.ErrNegativeCount": "bufio", + "bufio.ErrTooLong": "bufio", + "bufio.MaxScanTokenSize": "bufio", + "bufio.NewReadWriter": "bufio", + "bufio.NewReader": "bufio", + "bufio.NewReaderSize": "bufio", + "bufio.NewScanner": "bufio", + "bufio.NewWriter": "bufio", + "bufio.NewWriterSize": "bufio", + "bufio.ReadWriter": "bufio", + "bufio.Reader": "bufio", + "bufio.ScanBytes": "bufio", + "bufio.ScanLines": "bufio", + "bufio.ScanRunes": "bufio", + "bufio.ScanWords": "bufio", + "bufio.Scanner": "bufio", + "bufio.SplitFunc": "bufio", + "bufio.Writer": "bufio", + "build.AllowBinary": "go/build", + "build.ArchChar": "go/build", + "build.Context": "go/build", + "build.Default": "go/build", + "build.FindOnly": "go/build", + "build.IgnoreVendor": "go/build", + "build.Import": "go/build", + "build.ImportComment": "go/build", + "build.ImportDir": "go/build", + "build.ImportMode": "go/build", + "build.IsLocalImport": "go/build", + "build.MultiplePackageError": "go/build", + "build.NoGoError": "go/build", + "build.Package": "go/build", + "build.ToolDir": "go/build", + "bytes.Buffer": "bytes", + "bytes.Compare": "bytes", + "bytes.Contains": "bytes", + "bytes.ContainsAny": "bytes", + "bytes.ContainsRune": "bytes", + "bytes.Count": "bytes", + "bytes.Equal": "bytes", + "bytes.EqualFold": "bytes", + "bytes.ErrTooLarge": "bytes", + "bytes.Fields": "bytes", + "bytes.FieldsFunc": "bytes", + "bytes.HasPrefix": "bytes", + "bytes.HasSuffix": "bytes", + "bytes.Index": "bytes", + "bytes.IndexAny": "bytes", + "bytes.IndexByte": "bytes", + "bytes.IndexFunc": "bytes", + "bytes.IndexRune": "bytes", + "bytes.Join": "bytes", + "bytes.LastIndex": "bytes", + "bytes.LastIndexAny": "bytes", + "bytes.LastIndexByte": "bytes", + "bytes.LastIndexFunc": "bytes", + "bytes.Map": "bytes", + "bytes.MinRead": "bytes", + "bytes.NewBuffer": "bytes", + "bytes.NewBufferString": "bytes", + "bytes.NewReader": "bytes", + "bytes.Reader": "bytes", + "bytes.Repeat": "bytes", + "bytes.Replace": "bytes", + "bytes.Runes": "bytes", + "bytes.Split": "bytes", + "bytes.SplitAfter": "bytes", + "bytes.SplitAfterN": "bytes", + "bytes.SplitN": "bytes", + "bytes.Title": "bytes", + "bytes.ToLower": "bytes", + "bytes.ToLowerSpecial": "bytes", + "bytes.ToTitle": "bytes", + "bytes.ToTitleSpecial": "bytes", + "bytes.ToUpper": "bytes", + "bytes.ToUpperSpecial": "bytes", + "bytes.Trim": "bytes", + "bytes.TrimFunc": "bytes", + "bytes.TrimLeft": "bytes", + "bytes.TrimLeftFunc": "bytes", + "bytes.TrimPrefix": "bytes", + "bytes.TrimRight": "bytes", + "bytes.TrimRightFunc": "bytes", + "bytes.TrimSpace": "bytes", + "bytes.TrimSuffix": "bytes", + "bzip2.NewReader": "compress/bzip2", + "bzip2.StructuralError": "compress/bzip2", + "cgi.Handler": "net/http/cgi", + "cgi.Request": "net/http/cgi", + "cgi.RequestFromMap": "net/http/cgi", + "cgi.Serve": "net/http/cgi", + "cipher.AEAD": "crypto/cipher", + "cipher.Block": "crypto/cipher", + "cipher.BlockMode": "crypto/cipher", + "cipher.NewCBCDecrypter": "crypto/cipher", + "cipher.NewCBCEncrypter": "crypto/cipher", + "cipher.NewCFBDecrypter": "crypto/cipher", + "cipher.NewCFBEncrypter": "crypto/cipher", + "cipher.NewCTR": "crypto/cipher", + "cipher.NewGCM": "crypto/cipher", + "cipher.NewGCMWithNonceSize": "crypto/cipher", + "cipher.NewGCMWithTagSize": "crypto/cipher", + "cipher.NewOFB": "crypto/cipher", + "cipher.Stream": "crypto/cipher", + "cipher.StreamReader": "crypto/cipher", + "cipher.StreamWriter": "crypto/cipher", + "cmplx.Abs": "math/cmplx", + "cmplx.Acos": "math/cmplx", + "cmplx.Acosh": "math/cmplx", + "cmplx.Asin": "math/cmplx", + "cmplx.Asinh": "math/cmplx", + "cmplx.Atan": "math/cmplx", + "cmplx.Atanh": "math/cmplx", + "cmplx.Conj": "math/cmplx", + "cmplx.Cos": "math/cmplx", + "cmplx.Cosh": "math/cmplx", + "cmplx.Cot": "math/cmplx", + "cmplx.Exp": "math/cmplx", + "cmplx.Inf": "math/cmplx", + "cmplx.IsInf": "math/cmplx", + "cmplx.IsNaN": "math/cmplx", + "cmplx.Log": "math/cmplx", + "cmplx.Log10": "math/cmplx", + "cmplx.NaN": "math/cmplx", + "cmplx.Phase": "math/cmplx", + "cmplx.Polar": "math/cmplx", + "cmplx.Pow": "math/cmplx", + "cmplx.Rect": "math/cmplx", + "cmplx.Sin": "math/cmplx", + "cmplx.Sinh": "math/cmplx", + "cmplx.Sqrt": "math/cmplx", + "cmplx.Tan": "math/cmplx", + "cmplx.Tanh": "math/cmplx", + "color.Alpha": "image/color", + "color.Alpha16": "image/color", + "color.Alpha16Model": "image/color", + "color.AlphaModel": "image/color", + "color.Black": "image/color", + "color.CMYK": "image/color", + "color.CMYKModel": "image/color", + "color.CMYKToRGB": "image/color", + "color.Color": "image/color", + "color.Gray": "image/color", + "color.Gray16": "image/color", + "color.Gray16Model": "image/color", + "color.GrayModel": "image/color", + "color.Model": "image/color", + "color.ModelFunc": "image/color", + "color.NRGBA": "image/color", + "color.NRGBA64": "image/color", + "color.NRGBA64Model": "image/color", + "color.NRGBAModel": "image/color", + "color.NYCbCrA": "image/color", + "color.NYCbCrAModel": "image/color", + "color.Opaque": "image/color", + "color.Palette": "image/color", + "color.RGBA": "image/color", + "color.RGBA64": "image/color", + "color.RGBA64Model": "image/color", + "color.RGBAModel": "image/color", + "color.RGBToCMYK": "image/color", + "color.RGBToYCbCr": "image/color", + "color.Transparent": "image/color", + "color.White": "image/color", + "color.YCbCr": "image/color", + "color.YCbCrModel": "image/color", + "color.YCbCrToRGB": "image/color", + "constant.BinaryOp": "go/constant", + "constant.BitLen": "go/constant", + "constant.Bool": "go/constant", + "constant.BoolVal": "go/constant", + "constant.Bytes": "go/constant", + "constant.Compare": "go/constant", + "constant.Complex": "go/constant", + "constant.Denom": "go/constant", + "constant.Float": "go/constant", + "constant.Float32Val": "go/constant", + "constant.Float64Val": "go/constant", + "constant.Imag": "go/constant", + "constant.Int": "go/constant", + "constant.Int64Val": "go/constant", + "constant.Kind": "go/constant", + "constant.MakeBool": "go/constant", + "constant.MakeFloat64": "go/constant", + "constant.MakeFromBytes": "go/constant", + "constant.MakeFromLiteral": "go/constant", + "constant.MakeImag": "go/constant", + "constant.MakeInt64": "go/constant", + "constant.MakeString": "go/constant", + "constant.MakeUint64": "go/constant", + "constant.MakeUnknown": "go/constant", + "constant.Num": "go/constant", + "constant.Real": "go/constant", + "constant.Shift": "go/constant", + "constant.Sign": "go/constant", + "constant.String": "go/constant", + "constant.StringVal": "go/constant", + "constant.ToComplex": "go/constant", + "constant.ToFloat": "go/constant", + "constant.ToInt": "go/constant", + "constant.Uint64Val": "go/constant", + "constant.UnaryOp": "go/constant", + "constant.Unknown": "go/constant", + "context.Background": "context", + "context.CancelFunc": "context", + "context.Canceled": "context", + "context.Context": "context", + "context.DeadlineExceeded": "context", + "context.TODO": "context", + "context.WithCancel": "context", + "context.WithDeadline": "context", + "context.WithTimeout": "context", + "context.WithValue": "context", + "cookiejar.Jar": "net/http/cookiejar", + "cookiejar.New": "net/http/cookiejar", + "cookiejar.Options": "net/http/cookiejar", + "cookiejar.PublicSuffixList": "net/http/cookiejar", + "crc32.Castagnoli": "hash/crc32", + "crc32.Checksum": "hash/crc32", + "crc32.ChecksumIEEE": "hash/crc32", + "crc32.IEEE": "hash/crc32", + "crc32.IEEETable": "hash/crc32", + "crc32.Koopman": "hash/crc32", + "crc32.MakeTable": "hash/crc32", + "crc32.New": "hash/crc32", + "crc32.NewIEEE": "hash/crc32", + "crc32.Size": "hash/crc32", + "crc32.Table": "hash/crc32", + "crc32.Update": "hash/crc32", + "crc64.Checksum": "hash/crc64", + "crc64.ECMA": "hash/crc64", + "crc64.ISO": "hash/crc64", + "crc64.MakeTable": "hash/crc64", + "crc64.New": "hash/crc64", + "crc64.Size": "hash/crc64", + "crc64.Table": "hash/crc64", + "crc64.Update": "hash/crc64", + "crypto.BLAKE2b_256": "crypto", + "crypto.BLAKE2b_384": "crypto", + "crypto.BLAKE2b_512": "crypto", + "crypto.BLAKE2s_256": "crypto", + "crypto.Decrypter": "crypto", + "crypto.DecrypterOpts": "crypto", + "crypto.Hash": "crypto", + "crypto.MD4": "crypto", + "crypto.MD5": "crypto", + "crypto.MD5SHA1": "crypto", + "crypto.PrivateKey": "crypto", + "crypto.PublicKey": "crypto", + "crypto.RIPEMD160": "crypto", + "crypto.RegisterHash": "crypto", + "crypto.SHA1": "crypto", + "crypto.SHA224": "crypto", + "crypto.SHA256": "crypto", + "crypto.SHA384": "crypto", + "crypto.SHA3_224": "crypto", + "crypto.SHA3_256": "crypto", + "crypto.SHA3_384": "crypto", + "crypto.SHA3_512": "crypto", + "crypto.SHA512": "crypto", + "crypto.SHA512_224": "crypto", + "crypto.SHA512_256": "crypto", + "crypto.Signer": "crypto", + "crypto.SignerOpts": "crypto", + "csv.ErrBareQuote": "encoding/csv", + "csv.ErrFieldCount": "encoding/csv", + "csv.ErrQuote": "encoding/csv", + "csv.ErrTrailingComma": "encoding/csv", + "csv.NewReader": "encoding/csv", + "csv.NewWriter": "encoding/csv", + "csv.ParseError": "encoding/csv", + "csv.Reader": "encoding/csv", + "csv.Writer": "encoding/csv", + "debug.FreeOSMemory": "runtime/debug", + "debug.GCStats": "runtime/debug", + "debug.PrintStack": "runtime/debug", + "debug.ReadGCStats": "runtime/debug", + "debug.SetGCPercent": "runtime/debug", + "debug.SetMaxStack": "runtime/debug", + "debug.SetMaxThreads": "runtime/debug", + "debug.SetPanicOnFault": "runtime/debug", + "debug.SetTraceback": "runtime/debug", + "debug.Stack": "runtime/debug", + "debug.WriteHeapDump": "runtime/debug", + "des.BlockSize": "crypto/des", + "des.KeySizeError": "crypto/des", + "des.NewCipher": "crypto/des", + "des.NewTripleDESCipher": "crypto/des", + "doc.AllDecls": "go/doc", + "doc.AllMethods": "go/doc", + "doc.Example": "go/doc", + "doc.Examples": "go/doc", + "doc.Filter": "go/doc", + "doc.Func": "go/doc", + "doc.IllegalPrefixes": "go/doc", + "doc.IsPredeclared": "go/doc", + "doc.Mode": "go/doc", + "doc.New": "go/doc", + "doc.Note": "go/doc", + "doc.Package": "go/doc", + "doc.Synopsis": "go/doc", + "doc.ToHTML": "go/doc", + "doc.ToText": "go/doc", + "doc.Type": "go/doc", + "doc.Value": "go/doc", + "draw.Draw": "image/draw", + "draw.DrawMask": "image/draw", + "draw.Drawer": "image/draw", + "draw.FloydSteinberg": "image/draw", + "draw.Image": "image/draw", + "draw.Op": "image/draw", + "draw.Over": "image/draw", + "draw.Quantizer": "image/draw", + "draw.Src": "image/draw", + "driver.Bool": "database/sql/driver", + "driver.ColumnConverter": "database/sql/driver", + "driver.Conn": "database/sql/driver", + "driver.ConnBeginTx": "database/sql/driver", + "driver.ConnPrepareContext": "database/sql/driver", + "driver.Connector": "database/sql/driver", + "driver.DefaultParameterConverter": "database/sql/driver", + "driver.Driver": "database/sql/driver", + "driver.DriverContext": "database/sql/driver", + "driver.ErrBadConn": "database/sql/driver", + "driver.ErrRemoveArgument": "database/sql/driver", + "driver.ErrSkip": "database/sql/driver", + "driver.Execer": "database/sql/driver", + "driver.ExecerContext": "database/sql/driver", + "driver.Int32": "database/sql/driver", + "driver.IsScanValue": "database/sql/driver", + "driver.IsValue": "database/sql/driver", + "driver.IsolationLevel": "database/sql/driver", + "driver.NamedValue": "database/sql/driver", + "driver.NamedValueChecker": "database/sql/driver", + "driver.NotNull": "database/sql/driver", + "driver.Null": "database/sql/driver", + "driver.Pinger": "database/sql/driver", + "driver.Queryer": "database/sql/driver", + "driver.QueryerContext": "database/sql/driver", + "driver.Result": "database/sql/driver", + "driver.ResultNoRows": "database/sql/driver", + "driver.Rows": "database/sql/driver", + "driver.RowsAffected": "database/sql/driver", + "driver.RowsColumnTypeDatabaseTypeName": "database/sql/driver", + "driver.RowsColumnTypeLength": "database/sql/driver", + "driver.RowsColumnTypeNullable": "database/sql/driver", + "driver.RowsColumnTypePrecisionScale": "database/sql/driver", + "driver.RowsColumnTypeScanType": "database/sql/driver", + "driver.RowsNextResultSet": "database/sql/driver", + "driver.SessionResetter": "database/sql/driver", + "driver.Stmt": "database/sql/driver", + "driver.StmtExecContext": "database/sql/driver", + "driver.StmtQueryContext": "database/sql/driver", + "driver.String": "database/sql/driver", + "driver.Tx": "database/sql/driver", + "driver.TxOptions": "database/sql/driver", + "driver.Value": "database/sql/driver", + "driver.ValueConverter": "database/sql/driver", + "driver.Valuer": "database/sql/driver", + "dsa.ErrInvalidPublicKey": "crypto/dsa", + "dsa.GenerateKey": "crypto/dsa", + "dsa.GenerateParameters": "crypto/dsa", + "dsa.L1024N160": "crypto/dsa", + "dsa.L2048N224": "crypto/dsa", + "dsa.L2048N256": "crypto/dsa", + "dsa.L3072N256": "crypto/dsa", + "dsa.ParameterSizes": "crypto/dsa", + "dsa.Parameters": "crypto/dsa", + "dsa.PrivateKey": "crypto/dsa", + "dsa.PublicKey": "crypto/dsa", + "dsa.Sign": "crypto/dsa", + "dsa.Verify": "crypto/dsa", + "dwarf.AddrType": "debug/dwarf", + "dwarf.ArrayType": "debug/dwarf", + "dwarf.Attr": "debug/dwarf", + "dwarf.AttrAbstractOrigin": "debug/dwarf", + "dwarf.AttrAccessibility": "debug/dwarf", + "dwarf.AttrAddrClass": "debug/dwarf", + "dwarf.AttrAllocated": "debug/dwarf", + "dwarf.AttrArtificial": "debug/dwarf", + "dwarf.AttrAssociated": "debug/dwarf", + "dwarf.AttrBaseTypes": "debug/dwarf", + "dwarf.AttrBitOffset": "debug/dwarf", + "dwarf.AttrBitSize": "debug/dwarf", + "dwarf.AttrByteSize": "debug/dwarf", + "dwarf.AttrCallColumn": "debug/dwarf", + "dwarf.AttrCallFile": "debug/dwarf", + "dwarf.AttrCallLine": "debug/dwarf", + "dwarf.AttrCalling": "debug/dwarf", + "dwarf.AttrCommonRef": "debug/dwarf", + "dwarf.AttrCompDir": "debug/dwarf", + "dwarf.AttrConstValue": "debug/dwarf", + "dwarf.AttrContainingType": "debug/dwarf", + "dwarf.AttrCount": "debug/dwarf", + "dwarf.AttrDataLocation": "debug/dwarf", + "dwarf.AttrDataMemberLoc": "debug/dwarf", + "dwarf.AttrDeclColumn": "debug/dwarf", + "dwarf.AttrDeclFile": "debug/dwarf", + "dwarf.AttrDeclLine": "debug/dwarf", + "dwarf.AttrDeclaration": "debug/dwarf", + "dwarf.AttrDefaultValue": "debug/dwarf", + "dwarf.AttrDescription": "debug/dwarf", + "dwarf.AttrDiscr": "debug/dwarf", + "dwarf.AttrDiscrList": "debug/dwarf", + "dwarf.AttrDiscrValue": "debug/dwarf", + "dwarf.AttrEncoding": "debug/dwarf", + "dwarf.AttrEntrypc": "debug/dwarf", + "dwarf.AttrExtension": "debug/dwarf", + "dwarf.AttrExternal": "debug/dwarf", + "dwarf.AttrFrameBase": "debug/dwarf", + "dwarf.AttrFriend": "debug/dwarf", + "dwarf.AttrHighpc": "debug/dwarf", + "dwarf.AttrIdentifierCase": "debug/dwarf", + "dwarf.AttrImport": "debug/dwarf", + "dwarf.AttrInline": "debug/dwarf", + "dwarf.AttrIsOptional": "debug/dwarf", + "dwarf.AttrLanguage": "debug/dwarf", + "dwarf.AttrLocation": "debug/dwarf", + "dwarf.AttrLowerBound": "debug/dwarf", + "dwarf.AttrLowpc": "debug/dwarf", + "dwarf.AttrMacroInfo": "debug/dwarf", + "dwarf.AttrName": "debug/dwarf", + "dwarf.AttrNamelistItem": "debug/dwarf", + "dwarf.AttrOrdering": "debug/dwarf", + "dwarf.AttrPriority": "debug/dwarf", + "dwarf.AttrProducer": "debug/dwarf", + "dwarf.AttrPrototyped": "debug/dwarf", + "dwarf.AttrRanges": "debug/dwarf", + "dwarf.AttrReturnAddr": "debug/dwarf", + "dwarf.AttrSegment": "debug/dwarf", + "dwarf.AttrSibling": "debug/dwarf", + "dwarf.AttrSpecification": "debug/dwarf", + "dwarf.AttrStartScope": "debug/dwarf", + "dwarf.AttrStaticLink": "debug/dwarf", + "dwarf.AttrStmtList": "debug/dwarf", + "dwarf.AttrStride": "debug/dwarf", + "dwarf.AttrStrideSize": "debug/dwarf", + "dwarf.AttrStringLength": "debug/dwarf", + "dwarf.AttrTrampoline": "debug/dwarf", + "dwarf.AttrType": "debug/dwarf", + "dwarf.AttrUpperBound": "debug/dwarf", + "dwarf.AttrUseLocation": "debug/dwarf", + "dwarf.AttrUseUTF8": "debug/dwarf", + "dwarf.AttrVarParam": "debug/dwarf", + "dwarf.AttrVirtuality": "debug/dwarf", + "dwarf.AttrVisibility": "debug/dwarf", + "dwarf.AttrVtableElemLoc": "debug/dwarf", + "dwarf.BasicType": "debug/dwarf", + "dwarf.BoolType": "debug/dwarf", + "dwarf.CharType": "debug/dwarf", + "dwarf.Class": "debug/dwarf", + "dwarf.ClassAddress": "debug/dwarf", + "dwarf.ClassBlock": "debug/dwarf", + "dwarf.ClassConstant": "debug/dwarf", + "dwarf.ClassExprLoc": "debug/dwarf", + "dwarf.ClassFlag": "debug/dwarf", + "dwarf.ClassLinePtr": "debug/dwarf", + "dwarf.ClassLocListPtr": "debug/dwarf", + "dwarf.ClassMacPtr": "debug/dwarf", + "dwarf.ClassRangeListPtr": "debug/dwarf", + "dwarf.ClassReference": "debug/dwarf", + "dwarf.ClassReferenceAlt": "debug/dwarf", + "dwarf.ClassReferenceSig": "debug/dwarf", + "dwarf.ClassString": "debug/dwarf", + "dwarf.ClassStringAlt": "debug/dwarf", + "dwarf.ClassUnknown": "debug/dwarf", + "dwarf.CommonType": "debug/dwarf", + "dwarf.ComplexType": "debug/dwarf", + "dwarf.Data": "debug/dwarf", + "dwarf.DecodeError": "debug/dwarf", + "dwarf.DotDotDotType": "debug/dwarf", + "dwarf.Entry": "debug/dwarf", + "dwarf.EnumType": "debug/dwarf", + "dwarf.EnumValue": "debug/dwarf", + "dwarf.ErrUnknownPC": "debug/dwarf", + "dwarf.Field": "debug/dwarf", + "dwarf.FloatType": "debug/dwarf", + "dwarf.FuncType": "debug/dwarf", + "dwarf.IntType": "debug/dwarf", + "dwarf.LineEntry": "debug/dwarf", + "dwarf.LineFile": "debug/dwarf", + "dwarf.LineReader": "debug/dwarf", + "dwarf.LineReaderPos": "debug/dwarf", + "dwarf.New": "debug/dwarf", + "dwarf.Offset": "debug/dwarf", + "dwarf.PtrType": "debug/dwarf", + "dwarf.QualType": "debug/dwarf", + "dwarf.Reader": "debug/dwarf", + "dwarf.StructField": "debug/dwarf", + "dwarf.StructType": "debug/dwarf", + "dwarf.Tag": "debug/dwarf", + "dwarf.TagAccessDeclaration": "debug/dwarf", + "dwarf.TagArrayType": "debug/dwarf", + "dwarf.TagBaseType": "debug/dwarf", + "dwarf.TagCatchDwarfBlock": "debug/dwarf", + "dwarf.TagClassType": "debug/dwarf", + "dwarf.TagCommonDwarfBlock": "debug/dwarf", + "dwarf.TagCommonInclusion": "debug/dwarf", + "dwarf.TagCompileUnit": "debug/dwarf", + "dwarf.TagCondition": "debug/dwarf", + "dwarf.TagConstType": "debug/dwarf", + "dwarf.TagConstant": "debug/dwarf", + "dwarf.TagDwarfProcedure": "debug/dwarf", + "dwarf.TagEntryPoint": "debug/dwarf", + "dwarf.TagEnumerationType": "debug/dwarf", + "dwarf.TagEnumerator": "debug/dwarf", + "dwarf.TagFileType": "debug/dwarf", + "dwarf.TagFormalParameter": "debug/dwarf", + "dwarf.TagFriend": "debug/dwarf", + "dwarf.TagImportedDeclaration": "debug/dwarf", + "dwarf.TagImportedModule": "debug/dwarf", + "dwarf.TagImportedUnit": "debug/dwarf", + "dwarf.TagInheritance": "debug/dwarf", + "dwarf.TagInlinedSubroutine": "debug/dwarf", + "dwarf.TagInterfaceType": "debug/dwarf", + "dwarf.TagLabel": "debug/dwarf", + "dwarf.TagLexDwarfBlock": "debug/dwarf", + "dwarf.TagMember": "debug/dwarf", + "dwarf.TagModule": "debug/dwarf", + "dwarf.TagMutableType": "debug/dwarf", + "dwarf.TagNamelist": "debug/dwarf", + "dwarf.TagNamelistItem": "debug/dwarf", + "dwarf.TagNamespace": "debug/dwarf", + "dwarf.TagPackedType": "debug/dwarf", + "dwarf.TagPartialUnit": "debug/dwarf", + "dwarf.TagPointerType": "debug/dwarf", + "dwarf.TagPtrToMemberType": "debug/dwarf", + "dwarf.TagReferenceType": "debug/dwarf", + "dwarf.TagRestrictType": "debug/dwarf", + "dwarf.TagRvalueReferenceType": "debug/dwarf", + "dwarf.TagSetType": "debug/dwarf", + "dwarf.TagSharedType": "debug/dwarf", + "dwarf.TagStringType": "debug/dwarf", + "dwarf.TagStructType": "debug/dwarf", + "dwarf.TagSubprogram": "debug/dwarf", + "dwarf.TagSubrangeType": "debug/dwarf", + "dwarf.TagSubroutineType": "debug/dwarf", + "dwarf.TagTemplateAlias": "debug/dwarf", + "dwarf.TagTemplateTypeParameter": "debug/dwarf", + "dwarf.TagTemplateValueParameter": "debug/dwarf", + "dwarf.TagThrownType": "debug/dwarf", + "dwarf.TagTryDwarfBlock": "debug/dwarf", + "dwarf.TagTypeUnit": "debug/dwarf", + "dwarf.TagTypedef": "debug/dwarf", + "dwarf.TagUnionType": "debug/dwarf", + "dwarf.TagUnspecifiedParameters": "debug/dwarf", + "dwarf.TagUnspecifiedType": "debug/dwarf", + "dwarf.TagVariable": "debug/dwarf", + "dwarf.TagVariant": "debug/dwarf", + "dwarf.TagVariantPart": "debug/dwarf", + "dwarf.TagVolatileType": "debug/dwarf", + "dwarf.TagWithStmt": "debug/dwarf", + "dwarf.Type": "debug/dwarf", + "dwarf.TypedefType": "debug/dwarf", + "dwarf.UcharType": "debug/dwarf", + "dwarf.UintType": "debug/dwarf", + "dwarf.UnspecifiedType": "debug/dwarf", + "dwarf.VoidType": "debug/dwarf", + "ecdsa.GenerateKey": "crypto/ecdsa", + "ecdsa.PrivateKey": "crypto/ecdsa", + "ecdsa.PublicKey": "crypto/ecdsa", + "ecdsa.Sign": "crypto/ecdsa", + "ecdsa.Verify": "crypto/ecdsa", + "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf", + "elf.COMPRESS_HIOS": "debug/elf", + "elf.COMPRESS_HIPROC": "debug/elf", + "elf.COMPRESS_LOOS": "debug/elf", + "elf.COMPRESS_LOPROC": "debug/elf", + "elf.COMPRESS_ZLIB": "debug/elf", + "elf.Chdr32": "debug/elf", + "elf.Chdr64": "debug/elf", + "elf.Class": "debug/elf", + "elf.CompressionType": "debug/elf", + "elf.DF_BIND_NOW": "debug/elf", + "elf.DF_ORIGIN": "debug/elf", + "elf.DF_STATIC_TLS": "debug/elf", + "elf.DF_SYMBOLIC": "debug/elf", + "elf.DF_TEXTREL": "debug/elf", + "elf.DT_BIND_NOW": "debug/elf", + "elf.DT_DEBUG": "debug/elf", + "elf.DT_ENCODING": "debug/elf", + "elf.DT_FINI": "debug/elf", + "elf.DT_FINI_ARRAY": "debug/elf", + "elf.DT_FINI_ARRAYSZ": "debug/elf", + "elf.DT_FLAGS": "debug/elf", + "elf.DT_HASH": "debug/elf", + "elf.DT_HIOS": "debug/elf", + "elf.DT_HIPROC": "debug/elf", + "elf.DT_INIT": "debug/elf", + "elf.DT_INIT_ARRAY": "debug/elf", + "elf.DT_INIT_ARRAYSZ": "debug/elf", + "elf.DT_JMPREL": "debug/elf", + "elf.DT_LOOS": "debug/elf", + "elf.DT_LOPROC": "debug/elf", + "elf.DT_NEEDED": "debug/elf", + "elf.DT_NULL": "debug/elf", + "elf.DT_PLTGOT": "debug/elf", + "elf.DT_PLTREL": "debug/elf", + "elf.DT_PLTRELSZ": "debug/elf", + "elf.DT_PREINIT_ARRAY": "debug/elf", + "elf.DT_PREINIT_ARRAYSZ": "debug/elf", + "elf.DT_REL": "debug/elf", + "elf.DT_RELA": "debug/elf", + "elf.DT_RELAENT": "debug/elf", + "elf.DT_RELASZ": "debug/elf", + "elf.DT_RELENT": "debug/elf", + "elf.DT_RELSZ": "debug/elf", + "elf.DT_RPATH": "debug/elf", + "elf.DT_RUNPATH": "debug/elf", + "elf.DT_SONAME": "debug/elf", + "elf.DT_STRSZ": "debug/elf", + "elf.DT_STRTAB": "debug/elf", + "elf.DT_SYMBOLIC": "debug/elf", + "elf.DT_SYMENT": "debug/elf", + "elf.DT_SYMTAB": "debug/elf", + "elf.DT_TEXTREL": "debug/elf", + "elf.DT_VERNEED": "debug/elf", + "elf.DT_VERNEEDNUM": "debug/elf", + "elf.DT_VERSYM": "debug/elf", + "elf.Data": "debug/elf", + "elf.Dyn32": "debug/elf", + "elf.Dyn64": "debug/elf", + "elf.DynFlag": "debug/elf", + "elf.DynTag": "debug/elf", + "elf.EI_ABIVERSION": "debug/elf", + "elf.EI_CLASS": "debug/elf", + "elf.EI_DATA": "debug/elf", + "elf.EI_NIDENT": "debug/elf", + "elf.EI_OSABI": "debug/elf", + "elf.EI_PAD": "debug/elf", + "elf.EI_VERSION": "debug/elf", + "elf.ELFCLASS32": "debug/elf", + "elf.ELFCLASS64": "debug/elf", + "elf.ELFCLASSNONE": "debug/elf", + "elf.ELFDATA2LSB": "debug/elf", + "elf.ELFDATA2MSB": "debug/elf", + "elf.ELFDATANONE": "debug/elf", + "elf.ELFMAG": "debug/elf", + "elf.ELFOSABI_86OPEN": "debug/elf", + "elf.ELFOSABI_AIX": "debug/elf", + "elf.ELFOSABI_ARM": "debug/elf", + "elf.ELFOSABI_AROS": "debug/elf", + "elf.ELFOSABI_CLOUDABI": "debug/elf", + "elf.ELFOSABI_FENIXOS": "debug/elf", + "elf.ELFOSABI_FREEBSD": "debug/elf", + "elf.ELFOSABI_HPUX": "debug/elf", + "elf.ELFOSABI_HURD": "debug/elf", + "elf.ELFOSABI_IRIX": "debug/elf", + "elf.ELFOSABI_LINUX": "debug/elf", + "elf.ELFOSABI_MODESTO": "debug/elf", + "elf.ELFOSABI_NETBSD": "debug/elf", + "elf.ELFOSABI_NONE": "debug/elf", + "elf.ELFOSABI_NSK": "debug/elf", + "elf.ELFOSABI_OPENBSD": "debug/elf", + "elf.ELFOSABI_OPENVMS": "debug/elf", + "elf.ELFOSABI_SOLARIS": "debug/elf", + "elf.ELFOSABI_STANDALONE": "debug/elf", + "elf.ELFOSABI_TRU64": "debug/elf", + "elf.EM_386": "debug/elf", + "elf.EM_486": "debug/elf", + "elf.EM_56800EX": "debug/elf", + "elf.EM_68HC05": "debug/elf", + "elf.EM_68HC08": "debug/elf", + "elf.EM_68HC11": "debug/elf", + "elf.EM_68HC12": "debug/elf", + "elf.EM_68HC16": "debug/elf", + "elf.EM_68K": "debug/elf", + "elf.EM_78KOR": "debug/elf", + "elf.EM_8051": "debug/elf", + "elf.EM_860": "debug/elf", + "elf.EM_88K": "debug/elf", + "elf.EM_960": "debug/elf", + "elf.EM_AARCH64": "debug/elf", + "elf.EM_ALPHA": "debug/elf", + "elf.EM_ALPHA_STD": "debug/elf", + "elf.EM_ALTERA_NIOS2": "debug/elf", + "elf.EM_AMDGPU": "debug/elf", + "elf.EM_ARC": "debug/elf", + "elf.EM_ARCA": "debug/elf", + "elf.EM_ARC_COMPACT": "debug/elf", + "elf.EM_ARC_COMPACT2": "debug/elf", + "elf.EM_ARM": "debug/elf", + "elf.EM_AVR": "debug/elf", + "elf.EM_AVR32": "debug/elf", + "elf.EM_BA1": "debug/elf", + "elf.EM_BA2": "debug/elf", + "elf.EM_BLACKFIN": "debug/elf", + "elf.EM_BPF": "debug/elf", + "elf.EM_C166": "debug/elf", + "elf.EM_CDP": "debug/elf", + "elf.EM_CE": "debug/elf", + "elf.EM_CLOUDSHIELD": "debug/elf", + "elf.EM_COGE": "debug/elf", + "elf.EM_COLDFIRE": "debug/elf", + "elf.EM_COOL": "debug/elf", + "elf.EM_COREA_1ST": "debug/elf", + "elf.EM_COREA_2ND": "debug/elf", + "elf.EM_CR": "debug/elf", + "elf.EM_CR16": "debug/elf", + "elf.EM_CRAYNV2": "debug/elf", + "elf.EM_CRIS": "debug/elf", + "elf.EM_CRX": "debug/elf", + "elf.EM_CSR_KALIMBA": "debug/elf", + "elf.EM_CUDA": "debug/elf", + "elf.EM_CYPRESS_M8C": "debug/elf", + "elf.EM_D10V": "debug/elf", + "elf.EM_D30V": "debug/elf", + "elf.EM_DSP24": "debug/elf", + "elf.EM_DSPIC30F": "debug/elf", + "elf.EM_DXP": "debug/elf", + "elf.EM_ECOG1": "debug/elf", + "elf.EM_ECOG16": "debug/elf", + "elf.EM_ECOG1X": "debug/elf", + "elf.EM_ECOG2": "debug/elf", + "elf.EM_ETPU": "debug/elf", + "elf.EM_EXCESS": "debug/elf", + "elf.EM_F2MC16": "debug/elf", + "elf.EM_FIREPATH": "debug/elf", + "elf.EM_FR20": "debug/elf", + "elf.EM_FR30": "debug/elf", + "elf.EM_FT32": "debug/elf", + "elf.EM_FX66": "debug/elf", + "elf.EM_H8S": "debug/elf", + "elf.EM_H8_300": "debug/elf", + "elf.EM_H8_300H": "debug/elf", + "elf.EM_H8_500": "debug/elf", + "elf.EM_HUANY": "debug/elf", + "elf.EM_IA_64": "debug/elf", + "elf.EM_INTEL205": "debug/elf", + "elf.EM_INTEL206": "debug/elf", + "elf.EM_INTEL207": "debug/elf", + "elf.EM_INTEL208": "debug/elf", + "elf.EM_INTEL209": "debug/elf", + "elf.EM_IP2K": "debug/elf", + "elf.EM_JAVELIN": "debug/elf", + "elf.EM_K10M": "debug/elf", + "elf.EM_KM32": "debug/elf", + "elf.EM_KMX16": "debug/elf", + "elf.EM_KMX32": "debug/elf", + "elf.EM_KMX8": "debug/elf", + "elf.EM_KVARC": "debug/elf", + "elf.EM_L10M": "debug/elf", + "elf.EM_LANAI": "debug/elf", + "elf.EM_LATTICEMICO32": "debug/elf", + "elf.EM_M16C": "debug/elf", + "elf.EM_M32": "debug/elf", + "elf.EM_M32C": "debug/elf", + "elf.EM_M32R": "debug/elf", + "elf.EM_MANIK": "debug/elf", + "elf.EM_MAX": "debug/elf", + "elf.EM_MAXQ30": "debug/elf", + "elf.EM_MCHP_PIC": "debug/elf", + "elf.EM_MCST_ELBRUS": "debug/elf", + "elf.EM_ME16": "debug/elf", + "elf.EM_METAG": "debug/elf", + "elf.EM_MICROBLAZE": "debug/elf", + "elf.EM_MIPS": "debug/elf", + "elf.EM_MIPS_RS3_LE": "debug/elf", + "elf.EM_MIPS_RS4_BE": "debug/elf", + "elf.EM_MIPS_X": "debug/elf", + "elf.EM_MMA": "debug/elf", + "elf.EM_MMDSP_PLUS": "debug/elf", + "elf.EM_MMIX": "debug/elf", + "elf.EM_MN10200": "debug/elf", + "elf.EM_MN10300": "debug/elf", + "elf.EM_MOXIE": "debug/elf", + "elf.EM_MSP430": "debug/elf", + "elf.EM_NCPU": "debug/elf", + "elf.EM_NDR1": "debug/elf", + "elf.EM_NDS32": "debug/elf", + "elf.EM_NONE": "debug/elf", + "elf.EM_NORC": "debug/elf", + "elf.EM_NS32K": "debug/elf", + "elf.EM_OPEN8": "debug/elf", + "elf.EM_OPENRISC": "debug/elf", + "elf.EM_PARISC": "debug/elf", + "elf.EM_PCP": "debug/elf", + "elf.EM_PDP10": "debug/elf", + "elf.EM_PDP11": "debug/elf", + "elf.EM_PDSP": "debug/elf", + "elf.EM_PJ": "debug/elf", + "elf.EM_PPC": "debug/elf", + "elf.EM_PPC64": "debug/elf", + "elf.EM_PRISM": "debug/elf", + "elf.EM_QDSP6": "debug/elf", + "elf.EM_R32C": "debug/elf", + "elf.EM_RCE": "debug/elf", + "elf.EM_RH32": "debug/elf", + "elf.EM_RISCV": "debug/elf", + "elf.EM_RL78": "debug/elf", + "elf.EM_RS08": "debug/elf", + "elf.EM_RX": "debug/elf", + "elf.EM_S370": "debug/elf", + "elf.EM_S390": "debug/elf", + "elf.EM_SCORE7": "debug/elf", + "elf.EM_SEP": "debug/elf", + "elf.EM_SE_C17": "debug/elf", + "elf.EM_SE_C33": "debug/elf", + "elf.EM_SH": "debug/elf", + "elf.EM_SHARC": "debug/elf", + "elf.EM_SLE9X": "debug/elf", + "elf.EM_SNP1K": "debug/elf", + "elf.EM_SPARC": "debug/elf", + "elf.EM_SPARC32PLUS": "debug/elf", + "elf.EM_SPARCV9": "debug/elf", + "elf.EM_ST100": "debug/elf", + "elf.EM_ST19": "debug/elf", + "elf.EM_ST200": "debug/elf", + "elf.EM_ST7": "debug/elf", + "elf.EM_ST9PLUS": "debug/elf", + "elf.EM_STARCORE": "debug/elf", + "elf.EM_STM8": "debug/elf", + "elf.EM_STXP7X": "debug/elf", + "elf.EM_SVX": "debug/elf", + "elf.EM_TILE64": "debug/elf", + "elf.EM_TILEGX": "debug/elf", + "elf.EM_TILEPRO": "debug/elf", + "elf.EM_TINYJ": "debug/elf", + "elf.EM_TI_ARP32": "debug/elf", + "elf.EM_TI_C2000": "debug/elf", + "elf.EM_TI_C5500": "debug/elf", + "elf.EM_TI_C6000": "debug/elf", + "elf.EM_TI_PRU": "debug/elf", + "elf.EM_TMM_GPP": "debug/elf", + "elf.EM_TPC": "debug/elf", + "elf.EM_TRICORE": "debug/elf", + "elf.EM_TRIMEDIA": "debug/elf", + "elf.EM_TSK3000": "debug/elf", + "elf.EM_UNICORE": "debug/elf", + "elf.EM_V800": "debug/elf", + "elf.EM_V850": "debug/elf", + "elf.EM_VAX": "debug/elf", + "elf.EM_VIDEOCORE": "debug/elf", + "elf.EM_VIDEOCORE3": "debug/elf", + "elf.EM_VIDEOCORE5": "debug/elf", + "elf.EM_VISIUM": "debug/elf", + "elf.EM_VPP500": "debug/elf", + "elf.EM_X86_64": "debug/elf", + "elf.EM_XCORE": "debug/elf", + "elf.EM_XGATE": "debug/elf", + "elf.EM_XIMO16": "debug/elf", + "elf.EM_XTENSA": "debug/elf", + "elf.EM_Z80": "debug/elf", + "elf.EM_ZSP": "debug/elf", + "elf.ET_CORE": "debug/elf", + "elf.ET_DYN": "debug/elf", + "elf.ET_EXEC": "debug/elf", + "elf.ET_HIOS": "debug/elf", + "elf.ET_HIPROC": "debug/elf", + "elf.ET_LOOS": "debug/elf", + "elf.ET_LOPROC": "debug/elf", + "elf.ET_NONE": "debug/elf", + "elf.ET_REL": "debug/elf", + "elf.EV_CURRENT": "debug/elf", + "elf.EV_NONE": "debug/elf", + "elf.ErrNoSymbols": "debug/elf", + "elf.File": "debug/elf", + "elf.FileHeader": "debug/elf", + "elf.FormatError": "debug/elf", + "elf.Header32": "debug/elf", + "elf.Header64": "debug/elf", + "elf.ImportedSymbol": "debug/elf", + "elf.Machine": "debug/elf", + "elf.NT_FPREGSET": "debug/elf", + "elf.NT_PRPSINFO": "debug/elf", + "elf.NT_PRSTATUS": "debug/elf", + "elf.NType": "debug/elf", + "elf.NewFile": "debug/elf", + "elf.OSABI": "debug/elf", + "elf.Open": "debug/elf", + "elf.PF_MASKOS": "debug/elf", + "elf.PF_MASKPROC": "debug/elf", + "elf.PF_R": "debug/elf", + "elf.PF_W": "debug/elf", + "elf.PF_X": "debug/elf", + "elf.PT_DYNAMIC": "debug/elf", + "elf.PT_HIOS": "debug/elf", + "elf.PT_HIPROC": "debug/elf", + "elf.PT_INTERP": "debug/elf", + "elf.PT_LOAD": "debug/elf", + "elf.PT_LOOS": "debug/elf", + "elf.PT_LOPROC": "debug/elf", + "elf.PT_NOTE": "debug/elf", + "elf.PT_NULL": "debug/elf", + "elf.PT_PHDR": "debug/elf", + "elf.PT_SHLIB": "debug/elf", + "elf.PT_TLS": "debug/elf", + "elf.Prog": "debug/elf", + "elf.Prog32": "debug/elf", + "elf.Prog64": "debug/elf", + "elf.ProgFlag": "debug/elf", + "elf.ProgHeader": "debug/elf", + "elf.ProgType": "debug/elf", + "elf.R_386": "debug/elf", + "elf.R_386_16": "debug/elf", + "elf.R_386_32": "debug/elf", + "elf.R_386_32PLT": "debug/elf", + "elf.R_386_8": "debug/elf", + "elf.R_386_COPY": "debug/elf", + "elf.R_386_GLOB_DAT": "debug/elf", + "elf.R_386_GOT32": "debug/elf", + "elf.R_386_GOT32X": "debug/elf", + "elf.R_386_GOTOFF": "debug/elf", + "elf.R_386_GOTPC": "debug/elf", + "elf.R_386_IRELATIVE": "debug/elf", + "elf.R_386_JMP_SLOT": "debug/elf", + "elf.R_386_NONE": "debug/elf", + "elf.R_386_PC16": "debug/elf", + "elf.R_386_PC32": "debug/elf", + "elf.R_386_PC8": "debug/elf", + "elf.R_386_PLT32": "debug/elf", + "elf.R_386_RELATIVE": "debug/elf", + "elf.R_386_SIZE32": "debug/elf", + "elf.R_386_TLS_DESC": "debug/elf", + "elf.R_386_TLS_DESC_CALL": "debug/elf", + "elf.R_386_TLS_DTPMOD32": "debug/elf", + "elf.R_386_TLS_DTPOFF32": "debug/elf", + "elf.R_386_TLS_GD": "debug/elf", + "elf.R_386_TLS_GD_32": "debug/elf", + "elf.R_386_TLS_GD_CALL": "debug/elf", + "elf.R_386_TLS_GD_POP": "debug/elf", + "elf.R_386_TLS_GD_PUSH": "debug/elf", + "elf.R_386_TLS_GOTDESC": "debug/elf", + "elf.R_386_TLS_GOTIE": "debug/elf", + "elf.R_386_TLS_IE": "debug/elf", + "elf.R_386_TLS_IE_32": "debug/elf", + "elf.R_386_TLS_LDM": "debug/elf", + "elf.R_386_TLS_LDM_32": "debug/elf", + "elf.R_386_TLS_LDM_CALL": "debug/elf", + "elf.R_386_TLS_LDM_POP": "debug/elf", + "elf.R_386_TLS_LDM_PUSH": "debug/elf", + "elf.R_386_TLS_LDO_32": "debug/elf", + "elf.R_386_TLS_LE": "debug/elf", + "elf.R_386_TLS_LE_32": "debug/elf", + "elf.R_386_TLS_TPOFF": "debug/elf", + "elf.R_386_TLS_TPOFF32": "debug/elf", + "elf.R_390": "debug/elf", + "elf.R_390_12": "debug/elf", + "elf.R_390_16": "debug/elf", + "elf.R_390_20": "debug/elf", + "elf.R_390_32": "debug/elf", + "elf.R_390_64": "debug/elf", + "elf.R_390_8": "debug/elf", + "elf.R_390_COPY": "debug/elf", + "elf.R_390_GLOB_DAT": "debug/elf", + "elf.R_390_GOT12": "debug/elf", + "elf.R_390_GOT16": "debug/elf", + "elf.R_390_GOT20": "debug/elf", + "elf.R_390_GOT32": "debug/elf", + "elf.R_390_GOT64": "debug/elf", + "elf.R_390_GOTENT": "debug/elf", + "elf.R_390_GOTOFF": "debug/elf", + "elf.R_390_GOTOFF16": "debug/elf", + "elf.R_390_GOTOFF64": "debug/elf", + "elf.R_390_GOTPC": "debug/elf", + "elf.R_390_GOTPCDBL": "debug/elf", + "elf.R_390_GOTPLT12": "debug/elf", + "elf.R_390_GOTPLT16": "debug/elf", + "elf.R_390_GOTPLT20": "debug/elf", + "elf.R_390_GOTPLT32": "debug/elf", + "elf.R_390_GOTPLT64": "debug/elf", + "elf.R_390_GOTPLTENT": "debug/elf", + "elf.R_390_GOTPLTOFF16": "debug/elf", + "elf.R_390_GOTPLTOFF32": "debug/elf", + "elf.R_390_GOTPLTOFF64": "debug/elf", + "elf.R_390_JMP_SLOT": "debug/elf", + "elf.R_390_NONE": "debug/elf", + "elf.R_390_PC16": "debug/elf", + "elf.R_390_PC16DBL": "debug/elf", + "elf.R_390_PC32": "debug/elf", + "elf.R_390_PC32DBL": "debug/elf", + "elf.R_390_PC64": "debug/elf", + "elf.R_390_PLT16DBL": "debug/elf", + "elf.R_390_PLT32": "debug/elf", + "elf.R_390_PLT32DBL": "debug/elf", + "elf.R_390_PLT64": "debug/elf", + "elf.R_390_RELATIVE": "debug/elf", + "elf.R_390_TLS_DTPMOD": "debug/elf", + "elf.R_390_TLS_DTPOFF": "debug/elf", + "elf.R_390_TLS_GD32": "debug/elf", + "elf.R_390_TLS_GD64": "debug/elf", + "elf.R_390_TLS_GDCALL": "debug/elf", + "elf.R_390_TLS_GOTIE12": "debug/elf", + "elf.R_390_TLS_GOTIE20": "debug/elf", + "elf.R_390_TLS_GOTIE32": "debug/elf", + "elf.R_390_TLS_GOTIE64": "debug/elf", + "elf.R_390_TLS_IE32": "debug/elf", + "elf.R_390_TLS_IE64": "debug/elf", + "elf.R_390_TLS_IEENT": "debug/elf", + "elf.R_390_TLS_LDCALL": "debug/elf", + "elf.R_390_TLS_LDM32": "debug/elf", + "elf.R_390_TLS_LDM64": "debug/elf", + "elf.R_390_TLS_LDO32": "debug/elf", + "elf.R_390_TLS_LDO64": "debug/elf", + "elf.R_390_TLS_LE32": "debug/elf", + "elf.R_390_TLS_LE64": "debug/elf", + "elf.R_390_TLS_LOAD": "debug/elf", + "elf.R_390_TLS_TPOFF": "debug/elf", + "elf.R_AARCH64": "debug/elf", + "elf.R_AARCH64_ABS16": "debug/elf", + "elf.R_AARCH64_ABS32": "debug/elf", + "elf.R_AARCH64_ABS64": "debug/elf", + "elf.R_AARCH64_ADD_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_ADR_GOT_PAGE": "debug/elf", + "elf.R_AARCH64_ADR_PREL_LO21": "debug/elf", + "elf.R_AARCH64_ADR_PREL_PG_HI21": "debug/elf", + "elf.R_AARCH64_ADR_PREL_PG_HI21_NC": "debug/elf", + "elf.R_AARCH64_CALL26": "debug/elf", + "elf.R_AARCH64_CONDBR19": "debug/elf", + "elf.R_AARCH64_COPY": "debug/elf", + "elf.R_AARCH64_GLOB_DAT": "debug/elf", + "elf.R_AARCH64_GOT_LD_PREL19": "debug/elf", + "elf.R_AARCH64_IRELATIVE": "debug/elf", + "elf.R_AARCH64_JUMP26": "debug/elf", + "elf.R_AARCH64_JUMP_SLOT": "debug/elf", + "elf.R_AARCH64_LD64_GOTOFF_LO15": "debug/elf", + "elf.R_AARCH64_LD64_GOTPAGE_LO15": "debug/elf", + "elf.R_AARCH64_LD64_GOT_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST128_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST16_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST32_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST64_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LDST8_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_LD_PREL_LO19": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G0": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G1": "debug/elf", + "elf.R_AARCH64_MOVW_SABS_G2": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G0": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G0_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G1": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G1_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G2": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G2_NC": "debug/elf", + "elf.R_AARCH64_MOVW_UABS_G3": "debug/elf", + "elf.R_AARCH64_NONE": "debug/elf", + "elf.R_AARCH64_NULL": "debug/elf", + "elf.R_AARCH64_P32_ABS16": "debug/elf", + "elf.R_AARCH64_P32_ABS32": "debug/elf", + "elf.R_AARCH64_P32_ADD_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_ADR_GOT_PAGE": "debug/elf", + "elf.R_AARCH64_P32_ADR_PREL_LO21": "debug/elf", + "elf.R_AARCH64_P32_ADR_PREL_PG_HI21": "debug/elf", + "elf.R_AARCH64_P32_CALL26": "debug/elf", + "elf.R_AARCH64_P32_CONDBR19": "debug/elf", + "elf.R_AARCH64_P32_COPY": "debug/elf", + "elf.R_AARCH64_P32_GLOB_DAT": "debug/elf", + "elf.R_AARCH64_P32_GOT_LD_PREL19": "debug/elf", + "elf.R_AARCH64_P32_IRELATIVE": "debug/elf", + "elf.R_AARCH64_P32_JUMP26": "debug/elf", + "elf.R_AARCH64_P32_JUMP_SLOT": "debug/elf", + "elf.R_AARCH64_P32_LD32_GOT_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST128_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST16_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST32_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST64_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LDST8_ABS_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_LD_PREL_LO19": "debug/elf", + "elf.R_AARCH64_P32_MOVW_SABS_G0": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G0": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G0_NC": "debug/elf", + "elf.R_AARCH64_P32_MOVW_UABS_G1": "debug/elf", + "elf.R_AARCH64_P32_PREL16": "debug/elf", + "elf.R_AARCH64_P32_PREL32": "debug/elf", + "elf.R_AARCH64_P32_RELATIVE": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_ADR_PREL21": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_CALL": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_LD32_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSDESC_LD_PREL19": "debug/elf", + "elf.R_AARCH64_P32_TLSGD_ADD_LO12_NC": "debug/elf", + "elf.R_AARCH64_P32_TLSGD_ADR_PAGE21": "debug/elf", "elf.R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", "elf.R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC": "debug/elf", "elf.R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", @@ -1220,14 +1380,23 @@ var Symbols = map[string]string{ "elf.R_AARCH64_TLSDESC_OFF_G1": "debug/elf", "elf.R_AARCH64_TLSGD_ADD_LO12_NC": "debug/elf", "elf.R_AARCH64_TLSGD_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_TLSGD_ADR_PREL21": "debug/elf", + "elf.R_AARCH64_TLSGD_MOVW_G0_NC": "debug/elf", + "elf.R_AARCH64_TLSGD_MOVW_G1": "debug/elf", "elf.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", "elf.R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC": "debug/elf", "elf.R_AARCH64_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC": "debug/elf", "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G1": "debug/elf", + "elf.R_AARCH64_TLSLD_ADR_PAGE21": "debug/elf", + "elf.R_AARCH64_TLSLD_ADR_PREL21": "debug/elf", + "elf.R_AARCH64_TLSLD_LDST128_DTPREL_LO12": "debug/elf", + "elf.R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC": "debug/elf", "elf.R_AARCH64_TLSLE_ADD_TPREL_HI12": "debug/elf", "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12": "debug/elf", "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12_NC": "debug/elf", + "elf.R_AARCH64_TLSLE_LDST128_TPREL_LO12": "debug/elf", + "elf.R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC": "debug/elf", "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0": "debug/elf", "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0_NC": "debug/elf", "elf.R_AARCH64_TLSLE_MOVW_TPREL_G1": "debug/elf", @@ -1270,35 +1439,146 @@ var Symbols = map[string]string{ "elf.R_ARM_ABS12": "debug/elf", "elf.R_ARM_ABS16": "debug/elf", "elf.R_ARM_ABS32": "debug/elf", + "elf.R_ARM_ABS32_NOI": "debug/elf", "elf.R_ARM_ABS8": "debug/elf", + "elf.R_ARM_ALU_PCREL_15_8": "debug/elf", + "elf.R_ARM_ALU_PCREL_23_15": "debug/elf", + "elf.R_ARM_ALU_PCREL_7_0": "debug/elf", + "elf.R_ARM_ALU_PC_G0": "debug/elf", + "elf.R_ARM_ALU_PC_G0_NC": "debug/elf", + "elf.R_ARM_ALU_PC_G1": "debug/elf", + "elf.R_ARM_ALU_PC_G1_NC": "debug/elf", + "elf.R_ARM_ALU_PC_G2": "debug/elf", + "elf.R_ARM_ALU_SBREL_19_12_NC": "debug/elf", + "elf.R_ARM_ALU_SBREL_27_20_CK": "debug/elf", + "elf.R_ARM_ALU_SB_G0": "debug/elf", + "elf.R_ARM_ALU_SB_G0_NC": "debug/elf", + "elf.R_ARM_ALU_SB_G1": "debug/elf", + "elf.R_ARM_ALU_SB_G1_NC": "debug/elf", + "elf.R_ARM_ALU_SB_G2": "debug/elf", "elf.R_ARM_AMP_VCALL9": "debug/elf", + "elf.R_ARM_BASE_ABS": "debug/elf", + "elf.R_ARM_CALL": "debug/elf", "elf.R_ARM_COPY": "debug/elf", "elf.R_ARM_GLOB_DAT": "debug/elf", "elf.R_ARM_GNU_VTENTRY": "debug/elf", "elf.R_ARM_GNU_VTINHERIT": "debug/elf", "elf.R_ARM_GOT32": "debug/elf", "elf.R_ARM_GOTOFF": "debug/elf", + "elf.R_ARM_GOTOFF12": "debug/elf", "elf.R_ARM_GOTPC": "debug/elf", + "elf.R_ARM_GOTRELAX": "debug/elf", + "elf.R_ARM_GOT_ABS": "debug/elf", + "elf.R_ARM_GOT_BREL12": "debug/elf", + "elf.R_ARM_GOT_PREL": "debug/elf", + "elf.R_ARM_IRELATIVE": "debug/elf", + "elf.R_ARM_JUMP24": "debug/elf", "elf.R_ARM_JUMP_SLOT": "debug/elf", + "elf.R_ARM_LDC_PC_G0": "debug/elf", + "elf.R_ARM_LDC_PC_G1": "debug/elf", + "elf.R_ARM_LDC_PC_G2": "debug/elf", + "elf.R_ARM_LDC_SB_G0": "debug/elf", + "elf.R_ARM_LDC_SB_G1": "debug/elf", + "elf.R_ARM_LDC_SB_G2": "debug/elf", + "elf.R_ARM_LDRS_PC_G0": "debug/elf", + "elf.R_ARM_LDRS_PC_G1": "debug/elf", + "elf.R_ARM_LDRS_PC_G2": "debug/elf", + "elf.R_ARM_LDRS_SB_G0": "debug/elf", + "elf.R_ARM_LDRS_SB_G1": "debug/elf", + "elf.R_ARM_LDRS_SB_G2": "debug/elf", + "elf.R_ARM_LDR_PC_G1": "debug/elf", + "elf.R_ARM_LDR_PC_G2": "debug/elf", + "elf.R_ARM_LDR_SBREL_11_10_NC": "debug/elf", + "elf.R_ARM_LDR_SB_G0": "debug/elf", + "elf.R_ARM_LDR_SB_G1": "debug/elf", + "elf.R_ARM_LDR_SB_G2": "debug/elf", + "elf.R_ARM_ME_TOO": "debug/elf", + "elf.R_ARM_MOVT_ABS": "debug/elf", + "elf.R_ARM_MOVT_BREL": "debug/elf", + "elf.R_ARM_MOVT_PREL": "debug/elf", + "elf.R_ARM_MOVW_ABS_NC": "debug/elf", + "elf.R_ARM_MOVW_BREL": "debug/elf", + "elf.R_ARM_MOVW_BREL_NC": "debug/elf", + "elf.R_ARM_MOVW_PREL_NC": "debug/elf", "elf.R_ARM_NONE": "debug/elf", "elf.R_ARM_PC13": "debug/elf", "elf.R_ARM_PC24": "debug/elf", "elf.R_ARM_PLT32": "debug/elf", + "elf.R_ARM_PLT32_ABS": "debug/elf", + "elf.R_ARM_PREL31": "debug/elf", + "elf.R_ARM_PRIVATE_0": "debug/elf", + "elf.R_ARM_PRIVATE_1": "debug/elf", + "elf.R_ARM_PRIVATE_10": "debug/elf", + "elf.R_ARM_PRIVATE_11": "debug/elf", + "elf.R_ARM_PRIVATE_12": "debug/elf", + "elf.R_ARM_PRIVATE_13": "debug/elf", + "elf.R_ARM_PRIVATE_14": "debug/elf", + "elf.R_ARM_PRIVATE_15": "debug/elf", + "elf.R_ARM_PRIVATE_2": "debug/elf", + "elf.R_ARM_PRIVATE_3": "debug/elf", + "elf.R_ARM_PRIVATE_4": "debug/elf", + "elf.R_ARM_PRIVATE_5": "debug/elf", + "elf.R_ARM_PRIVATE_6": "debug/elf", + "elf.R_ARM_PRIVATE_7": "debug/elf", + "elf.R_ARM_PRIVATE_8": "debug/elf", + "elf.R_ARM_PRIVATE_9": "debug/elf", "elf.R_ARM_RABS32": "debug/elf", "elf.R_ARM_RBASE": "debug/elf", "elf.R_ARM_REL32": "debug/elf", + "elf.R_ARM_REL32_NOI": "debug/elf", "elf.R_ARM_RELATIVE": "debug/elf", "elf.R_ARM_RPC24": "debug/elf", "elf.R_ARM_RREL32": "debug/elf", "elf.R_ARM_RSBREL32": "debug/elf", + "elf.R_ARM_RXPC25": "debug/elf", + "elf.R_ARM_SBREL31": "debug/elf", "elf.R_ARM_SBREL32": "debug/elf", "elf.R_ARM_SWI24": "debug/elf", + "elf.R_ARM_TARGET1": "debug/elf", + "elf.R_ARM_TARGET2": "debug/elf", "elf.R_ARM_THM_ABS5": "debug/elf", + "elf.R_ARM_THM_ALU_ABS_G0_NC": "debug/elf", + "elf.R_ARM_THM_ALU_ABS_G1_NC": "debug/elf", + "elf.R_ARM_THM_ALU_ABS_G2_NC": "debug/elf", + "elf.R_ARM_THM_ALU_ABS_G3": "debug/elf", + "elf.R_ARM_THM_ALU_PREL_11_0": "debug/elf", + "elf.R_ARM_THM_GOT_BREL12": "debug/elf", + "elf.R_ARM_THM_JUMP11": "debug/elf", + "elf.R_ARM_THM_JUMP19": "debug/elf", + "elf.R_ARM_THM_JUMP24": "debug/elf", + "elf.R_ARM_THM_JUMP6": "debug/elf", + "elf.R_ARM_THM_JUMP8": "debug/elf", + "elf.R_ARM_THM_MOVT_ABS": "debug/elf", + "elf.R_ARM_THM_MOVT_BREL": "debug/elf", + "elf.R_ARM_THM_MOVT_PREL": "debug/elf", + "elf.R_ARM_THM_MOVW_ABS_NC": "debug/elf", + "elf.R_ARM_THM_MOVW_BREL": "debug/elf", + "elf.R_ARM_THM_MOVW_BREL_NC": "debug/elf", + "elf.R_ARM_THM_MOVW_PREL_NC": "debug/elf", + "elf.R_ARM_THM_PC12": "debug/elf", "elf.R_ARM_THM_PC22": "debug/elf", "elf.R_ARM_THM_PC8": "debug/elf", "elf.R_ARM_THM_RPC22": "debug/elf", "elf.R_ARM_THM_SWI8": "debug/elf", + "elf.R_ARM_THM_TLS_CALL": "debug/elf", + "elf.R_ARM_THM_TLS_DESCSEQ16": "debug/elf", + "elf.R_ARM_THM_TLS_DESCSEQ32": "debug/elf", "elf.R_ARM_THM_XPC22": "debug/elf", + "elf.R_ARM_TLS_CALL": "debug/elf", + "elf.R_ARM_TLS_DESCSEQ": "debug/elf", + "elf.R_ARM_TLS_DTPMOD32": "debug/elf", + "elf.R_ARM_TLS_DTPOFF32": "debug/elf", + "elf.R_ARM_TLS_GD32": "debug/elf", + "elf.R_ARM_TLS_GOTDESC": "debug/elf", + "elf.R_ARM_TLS_IE12GP": "debug/elf", + "elf.R_ARM_TLS_IE32": "debug/elf", + "elf.R_ARM_TLS_LDM32": "debug/elf", + "elf.R_ARM_TLS_LDO12": "debug/elf", + "elf.R_ARM_TLS_LDO32": "debug/elf", + "elf.R_ARM_TLS_LE12": "debug/elf", + "elf.R_ARM_TLS_LE32": "debug/elf", + "elf.R_ARM_TLS_TPOFF32": "debug/elf", + "elf.R_ARM_V4BX": "debug/elf", "elf.R_ARM_XPC25": "debug/elf", "elf.R_INFO": "debug/elf", "elf.R_INFO32": "debug/elf", @@ -1360,6 +1640,8 @@ var Symbols = map[string]string{ "elf.R_PPC64_ADDR16_DS": "debug/elf", "elf.R_PPC64_ADDR16_HA": "debug/elf", "elf.R_PPC64_ADDR16_HI": "debug/elf", + "elf.R_PPC64_ADDR16_HIGH": "debug/elf", + "elf.R_PPC64_ADDR16_HIGHA": "debug/elf", "elf.R_PPC64_ADDR16_HIGHER": "debug/elf", "elf.R_PPC64_ADDR16_HIGHERA": "debug/elf", "elf.R_PPC64_ADDR16_HIGHEST": "debug/elf", @@ -1369,11 +1651,14 @@ var Symbols = map[string]string{ "elf.R_PPC64_ADDR24": "debug/elf", "elf.R_PPC64_ADDR32": "debug/elf", "elf.R_PPC64_ADDR64": "debug/elf", + "elf.R_PPC64_ADDR64_LOCAL": "debug/elf", "elf.R_PPC64_DTPMOD64": "debug/elf", "elf.R_PPC64_DTPREL16": "debug/elf", "elf.R_PPC64_DTPREL16_DS": "debug/elf", "elf.R_PPC64_DTPREL16_HA": "debug/elf", "elf.R_PPC64_DTPREL16_HI": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGH": "debug/elf", + "elf.R_PPC64_DTPREL16_HIGHA": "debug/elf", "elf.R_PPC64_DTPREL16_HIGHER": "debug/elf", "elf.R_PPC64_DTPREL16_HIGHERA": "debug/elf", "elf.R_PPC64_DTPREL16_HIGHEST": "debug/elf", @@ -1381,6 +1666,7 @@ var Symbols = map[string]string{ "elf.R_PPC64_DTPREL16_LO": "debug/elf", "elf.R_PPC64_DTPREL16_LO_DS": "debug/elf", "elf.R_PPC64_DTPREL64": "debug/elf", + "elf.R_PPC64_ENTRY": "debug/elf", "elf.R_PPC64_GOT16": "debug/elf", "elf.R_PPC64_GOT16_DS": "debug/elf", "elf.R_PPC64_GOT16_HA": "debug/elf", @@ -1403,18 +1689,31 @@ var Symbols = map[string]string{ "elf.R_PPC64_GOT_TPREL16_HA": "debug/elf", "elf.R_PPC64_GOT_TPREL16_HI": "debug/elf", "elf.R_PPC64_GOT_TPREL16_LO_DS": "debug/elf", + "elf.R_PPC64_IRELATIVE": "debug/elf", + "elf.R_PPC64_JMP_IREL": "debug/elf", "elf.R_PPC64_JMP_SLOT": "debug/elf", "elf.R_PPC64_NONE": "debug/elf", + "elf.R_PPC64_PLT16_LO_DS": "debug/elf", + "elf.R_PPC64_PLTGOT16": "debug/elf", + "elf.R_PPC64_PLTGOT16_DS": "debug/elf", + "elf.R_PPC64_PLTGOT16_HA": "debug/elf", + "elf.R_PPC64_PLTGOT16_HI": "debug/elf", + "elf.R_PPC64_PLTGOT16_LO": "debug/elf", + "elf.R_PPC64_PLTGOT_LO_DS": "debug/elf", "elf.R_PPC64_REL14": "debug/elf", "elf.R_PPC64_REL14_BRNTAKEN": "debug/elf", "elf.R_PPC64_REL14_BRTAKEN": "debug/elf", "elf.R_PPC64_REL16": "debug/elf", + "elf.R_PPC64_REL16DX_HA": "debug/elf", "elf.R_PPC64_REL16_HA": "debug/elf", "elf.R_PPC64_REL16_HI": "debug/elf", "elf.R_PPC64_REL16_LO": "debug/elf", "elf.R_PPC64_REL24": "debug/elf", + "elf.R_PPC64_REL24_NOTOC": "debug/elf", "elf.R_PPC64_REL32": "debug/elf", "elf.R_PPC64_REL64": "debug/elf", + "elf.R_PPC64_SECTOFF_DS": "debug/elf", + "elf.R_PPC64_SECTOFF_LO_DS": "debug/elf", "elf.R_PPC64_TLS": "debug/elf", "elf.R_PPC64_TLSGD": "debug/elf", "elf.R_PPC64_TLSLD": "debug/elf", @@ -1425,10 +1724,13 @@ var Symbols = map[string]string{ "elf.R_PPC64_TOC16_HI": "debug/elf", "elf.R_PPC64_TOC16_LO": "debug/elf", "elf.R_PPC64_TOC16_LO_DS": "debug/elf", + "elf.R_PPC64_TOCSAVE": "debug/elf", "elf.R_PPC64_TPREL16": "debug/elf", "elf.R_PPC64_TPREL16_DS": "debug/elf", "elf.R_PPC64_TPREL16_HA": "debug/elf", "elf.R_PPC64_TPREL16_HI": "debug/elf", + "elf.R_PPC64_TPREL16_HIGH": "debug/elf", + "elf.R_PPC64_TPREL16_HIGHA": "debug/elf", "elf.R_PPC64_TPREL16_HIGHER": "debug/elf", "elf.R_PPC64_TPREL16_HIGHERA": "debug/elf", "elf.R_PPC64_TPREL16_HIGHEST": "debug/elf", @@ -1513,6 +1815,60 @@ var Symbols = map[string]string{ "elf.R_PPC_TPREL32": "debug/elf", "elf.R_PPC_UADDR16": "debug/elf", "elf.R_PPC_UADDR32": "debug/elf", + "elf.R_RISCV": "debug/elf", + "elf.R_RISCV_32": "debug/elf", + "elf.R_RISCV_64": "debug/elf", + "elf.R_RISCV_ADD16": "debug/elf", + "elf.R_RISCV_ADD32": "debug/elf", + "elf.R_RISCV_ADD64": "debug/elf", + "elf.R_RISCV_ADD8": "debug/elf", + "elf.R_RISCV_ALIGN": "debug/elf", + "elf.R_RISCV_BRANCH": "debug/elf", + "elf.R_RISCV_CALL": "debug/elf", + "elf.R_RISCV_CALL_PLT": "debug/elf", + "elf.R_RISCV_COPY": "debug/elf", + "elf.R_RISCV_GNU_VTENTRY": "debug/elf", + "elf.R_RISCV_GNU_VTINHERIT": "debug/elf", + "elf.R_RISCV_GOT_HI20": "debug/elf", + "elf.R_RISCV_GPREL_I": "debug/elf", + "elf.R_RISCV_GPREL_S": "debug/elf", + "elf.R_RISCV_HI20": "debug/elf", + "elf.R_RISCV_JAL": "debug/elf", + "elf.R_RISCV_JUMP_SLOT": "debug/elf", + "elf.R_RISCV_LO12_I": "debug/elf", + "elf.R_RISCV_LO12_S": "debug/elf", + "elf.R_RISCV_NONE": "debug/elf", + "elf.R_RISCV_PCREL_HI20": "debug/elf", + "elf.R_RISCV_PCREL_LO12_I": "debug/elf", + "elf.R_RISCV_PCREL_LO12_S": "debug/elf", + "elf.R_RISCV_RELATIVE": "debug/elf", + "elf.R_RISCV_RELAX": "debug/elf", + "elf.R_RISCV_RVC_BRANCH": "debug/elf", + "elf.R_RISCV_RVC_JUMP": "debug/elf", + "elf.R_RISCV_RVC_LUI": "debug/elf", + "elf.R_RISCV_SET16": "debug/elf", + "elf.R_RISCV_SET32": "debug/elf", + "elf.R_RISCV_SET6": "debug/elf", + "elf.R_RISCV_SET8": "debug/elf", + "elf.R_RISCV_SUB16": "debug/elf", + "elf.R_RISCV_SUB32": "debug/elf", + "elf.R_RISCV_SUB6": "debug/elf", + "elf.R_RISCV_SUB64": "debug/elf", + "elf.R_RISCV_SUB8": "debug/elf", + "elf.R_RISCV_TLS_DTPMOD32": "debug/elf", + "elf.R_RISCV_TLS_DTPMOD64": "debug/elf", + "elf.R_RISCV_TLS_DTPREL32": "debug/elf", + "elf.R_RISCV_TLS_DTPREL64": "debug/elf", + "elf.R_RISCV_TLS_GD_HI20": "debug/elf", + "elf.R_RISCV_TLS_GOT_HI20": "debug/elf", + "elf.R_RISCV_TLS_TPREL32": "debug/elf", + "elf.R_RISCV_TLS_TPREL64": "debug/elf", + "elf.R_RISCV_TPREL_ADD": "debug/elf", + "elf.R_RISCV_TPREL_HI20": "debug/elf", + "elf.R_RISCV_TPREL_I": "debug/elf", + "elf.R_RISCV_TPREL_LO12_I": "debug/elf", + "elf.R_RISCV_TPREL_LO12_S": "debug/elf", + "elf.R_RISCV_TPREL_S": "debug/elf", "elf.R_SPARC": "debug/elf", "elf.R_SPARC_10": "debug/elf", "elf.R_SPARC_11": "debug/elf", @@ -1586,15 +1942,34 @@ var Symbols = map[string]string{ "elf.R_X86_64_DTPOFF64": "debug/elf", "elf.R_X86_64_GLOB_DAT": "debug/elf", "elf.R_X86_64_GOT32": "debug/elf", + "elf.R_X86_64_GOT64": "debug/elf", + "elf.R_X86_64_GOTOFF64": "debug/elf", + "elf.R_X86_64_GOTPC32": "debug/elf", + "elf.R_X86_64_GOTPC32_TLSDESC": "debug/elf", + "elf.R_X86_64_GOTPC64": "debug/elf", "elf.R_X86_64_GOTPCREL": "debug/elf", + "elf.R_X86_64_GOTPCREL64": "debug/elf", + "elf.R_X86_64_GOTPCRELX": "debug/elf", + "elf.R_X86_64_GOTPLT64": "debug/elf", "elf.R_X86_64_GOTTPOFF": "debug/elf", + "elf.R_X86_64_IRELATIVE": "debug/elf", "elf.R_X86_64_JMP_SLOT": "debug/elf", "elf.R_X86_64_NONE": "debug/elf", "elf.R_X86_64_PC16": "debug/elf", "elf.R_X86_64_PC32": "debug/elf", + "elf.R_X86_64_PC32_BND": "debug/elf", + "elf.R_X86_64_PC64": "debug/elf", "elf.R_X86_64_PC8": "debug/elf", "elf.R_X86_64_PLT32": "debug/elf", + "elf.R_X86_64_PLT32_BND": "debug/elf", + "elf.R_X86_64_PLTOFF64": "debug/elf", "elf.R_X86_64_RELATIVE": "debug/elf", + "elf.R_X86_64_RELATIVE64": "debug/elf", + "elf.R_X86_64_REX_GOTPCRELX": "debug/elf", + "elf.R_X86_64_SIZE32": "debug/elf", + "elf.R_X86_64_SIZE64": "debug/elf", + "elf.R_X86_64_TLSDESC": "debug/elf", + "elf.R_X86_64_TLSDESC_CALL": "debug/elf", "elf.R_X86_64_TLSGD": "debug/elf", "elf.R_X86_64_TLSLD": "debug/elf", "elf.R_X86_64_TPOFF32": "debug/elf", @@ -1912,6 +2287,8 @@ var Symbols = map[string]string{ "hex.EncodedLen": "encoding/hex", "hex.ErrLength": "encoding/hex", "hex.InvalidByteError": "encoding/hex", + "hex.NewDecoder": "encoding/hex", + "hex.NewEncoder": "encoding/hex", "hmac.Equal": "crypto/hmac", "hmac.New": "crypto/hmac", "html.EscapeString": "html", @@ -1999,6 +2376,10 @@ var Symbols = map[string]string{ "http.Response": "net/http", "http.ResponseWriter": "net/http", "http.RoundTripper": "net/http", + "http.SameSite": "net/http", + "http.SameSiteDefaultMode": "net/http", + "http.SameSiteLaxMode": "net/http", + "http.SameSiteStrictMode": "net/http", "http.Serve": "net/http", "http.ServeContent": "net/http", "http.ServeFile": "net/http", @@ -2033,6 +2414,7 @@ var Symbols = map[string]string{ "http.StatusLocked": "net/http", "http.StatusLoopDetected": "net/http", "http.StatusMethodNotAllowed": "net/http", + "http.StatusMisdirectedRequest": "net/http", "http.StatusMovedPermanently": "net/http", "http.StatusMultiStatus": "net/http", "http.StatusMultipleChoices": "net/http", @@ -2293,10 +2675,32 @@ var Symbols = map[string]string{ "lzw.NewReader": "compress/lzw", "lzw.NewWriter": "compress/lzw", "lzw.Order": "compress/lzw", + "macho.ARM64_RELOC_ADDEND": "debug/macho", + "macho.ARM64_RELOC_BRANCH26": "debug/macho", + "macho.ARM64_RELOC_GOT_LOAD_PAGE21": "debug/macho", + "macho.ARM64_RELOC_GOT_LOAD_PAGEOFF12": "debug/macho", + "macho.ARM64_RELOC_PAGE21": "debug/macho", + "macho.ARM64_RELOC_PAGEOFF12": "debug/macho", + "macho.ARM64_RELOC_POINTER_TO_GOT": "debug/macho", + "macho.ARM64_RELOC_SUBTRACTOR": "debug/macho", + "macho.ARM64_RELOC_TLVP_LOAD_PAGE21": "debug/macho", + "macho.ARM64_RELOC_TLVP_LOAD_PAGEOFF12": "debug/macho", + "macho.ARM64_RELOC_UNSIGNED": "debug/macho", + "macho.ARM_RELOC_BR24": "debug/macho", + "macho.ARM_RELOC_HALF": "debug/macho", + "macho.ARM_RELOC_HALF_SECTDIFF": "debug/macho", + "macho.ARM_RELOC_LOCAL_SECTDIFF": "debug/macho", + "macho.ARM_RELOC_PAIR": "debug/macho", + "macho.ARM_RELOC_PB_LA_PTR": "debug/macho", + "macho.ARM_RELOC_SECTDIFF": "debug/macho", + "macho.ARM_RELOC_VANILLA": "debug/macho", + "macho.ARM_THUMB_32BIT_BRANCH": "debug/macho", + "macho.ARM_THUMB_RELOC_BR22": "debug/macho", "macho.Cpu": "debug/macho", "macho.Cpu386": "debug/macho", "macho.CpuAmd64": "debug/macho", "macho.CpuArm": "debug/macho", + "macho.CpuArm64": "debug/macho", "macho.CpuPpc": "debug/macho", "macho.CpuPpc64": "debug/macho", "macho.Dylib": "debug/macho", @@ -2309,13 +2713,46 @@ var Symbols = map[string]string{ "macho.FatFile": "debug/macho", "macho.File": "debug/macho", "macho.FileHeader": "debug/macho", + "macho.FlagAllModsBound": "debug/macho", + "macho.FlagAllowStackExecution": "debug/macho", + "macho.FlagAppExtensionSafe": "debug/macho", + "macho.FlagBindAtLoad": "debug/macho", + "macho.FlagBindsToWeak": "debug/macho", + "macho.FlagCanonical": "debug/macho", + "macho.FlagDeadStrippableDylib": "debug/macho", + "macho.FlagDyldLink": "debug/macho", + "macho.FlagForceFlat": "debug/macho", + "macho.FlagHasTLVDescriptors": "debug/macho", + "macho.FlagIncrLink": "debug/macho", + "macho.FlagLazyInit": "debug/macho", + "macho.FlagNoFixPrebinding": "debug/macho", + "macho.FlagNoHeapExecution": "debug/macho", + "macho.FlagNoMultiDefs": "debug/macho", + "macho.FlagNoReexportedDylibs": "debug/macho", + "macho.FlagNoUndefs": "debug/macho", + "macho.FlagPIE": "debug/macho", + "macho.FlagPrebindable": "debug/macho", + "macho.FlagPrebound": "debug/macho", + "macho.FlagRootSafe": "debug/macho", + "macho.FlagSetuidSafe": "debug/macho", + "macho.FlagSplitSegs": "debug/macho", + "macho.FlagSubsectionsViaSymbols": "debug/macho", + "macho.FlagTwoLevel": "debug/macho", + "macho.FlagWeakDefines": "debug/macho", "macho.FormatError": "debug/macho", + "macho.GENERIC_RELOC_LOCAL_SECTDIFF": "debug/macho", + "macho.GENERIC_RELOC_PAIR": "debug/macho", + "macho.GENERIC_RELOC_PB_LA_PTR": "debug/macho", + "macho.GENERIC_RELOC_SECTDIFF": "debug/macho", + "macho.GENERIC_RELOC_TLV": "debug/macho", + "macho.GENERIC_RELOC_VANILLA": "debug/macho", "macho.Load": "debug/macho", "macho.LoadBytes": "debug/macho", "macho.LoadCmd": "debug/macho", "macho.LoadCmdDylib": "debug/macho", "macho.LoadCmdDylinker": "debug/macho", "macho.LoadCmdDysymtab": "debug/macho", + "macho.LoadCmdRpath": "debug/macho", "macho.LoadCmdSegment": "debug/macho", "macho.LoadCmdSegment64": "debug/macho", "macho.LoadCmdSymtab": "debug/macho", @@ -2332,6 +2769,13 @@ var Symbols = map[string]string{ "macho.OpenFat": "debug/macho", "macho.Regs386": "debug/macho", "macho.RegsAMD64": "debug/macho", + "macho.Reloc": "debug/macho", + "macho.RelocTypeARM": "debug/macho", + "macho.RelocTypeARM64": "debug/macho", + "macho.RelocTypeGeneric": "debug/macho", + "macho.RelocTypeX86_64": "debug/macho", + "macho.Rpath": "debug/macho", + "macho.RpathCmd": "debug/macho", "macho.Section": "debug/macho", "macho.Section32": "debug/macho", "macho.Section64": "debug/macho", @@ -2349,6 +2793,16 @@ var Symbols = map[string]string{ "macho.TypeDylib": "debug/macho", "macho.TypeExec": "debug/macho", "macho.TypeObj": "debug/macho", + "macho.X86_64_RELOC_BRANCH": "debug/macho", + "macho.X86_64_RELOC_GOT": "debug/macho", + "macho.X86_64_RELOC_GOT_LOAD": "debug/macho", + "macho.X86_64_RELOC_SIGNED": "debug/macho", + "macho.X86_64_RELOC_SIGNED_1": "debug/macho", + "macho.X86_64_RELOC_SIGNED_2": "debug/macho", + "macho.X86_64_RELOC_SIGNED_4": "debug/macho", + "macho.X86_64_RELOC_SUBTRACTOR": "debug/macho", + "macho.X86_64_RELOC_TLV": "debug/macho", + "macho.X86_64_RELOC_UNSIGNED": "debug/macho", "mail.Address": "net/mail", "mail.AddressParser": "net/mail", "mail.ErrHeaderNotPresent": "net/mail", @@ -2375,6 +2829,8 @@ var Symbols = map[string]string{ "math.E": "math", "math.Erf": "math", "math.Erfc": "math", + "math.Erfcinv": "math", + "math.Erfinv": "math", "math.Exp": "math", "math.Exp2": "math", "math.Expm1": "math", @@ -2430,6 +2886,8 @@ var Symbols = map[string]string{ "math.Pow": "math", "math.Pow10": "math", "math.Remainder": "math", + "math.Round": "math", + "math.RoundToEven": "math", "math.Signbit": "math", "math.Sin": "math", "math.Sincos": "math", @@ -2524,6 +2982,7 @@ var Symbols = map[string]string{ "net.InvalidAddrError": "net", "net.JoinHostPort": "net", "net.Listen": "net", + "net.ListenConfig": "net", "net.ListenIP": "net", "net.ListenMulticastUDP": "net", "net.ListenPacket": "net", @@ -2578,6 +3037,7 @@ var Symbols = map[string]string{ "os.ErrClosed": "os", "os.ErrExist": "os", "os.ErrInvalid": "os", + "os.ErrNoDeadline": "os", "os.ErrNotExist": "os", "os.ErrPermission": "os", "os.Executable": "os", @@ -2604,6 +3064,7 @@ var Symbols = map[string]string{ "os.IsNotExist": "os", "os.IsPathSeparator": "os", "os.IsPermission": "os", + "os.IsTimeout": "os", "os.Kill": "os", "os.Lchown": "os", "os.Link": "os", @@ -2617,6 +3078,7 @@ var Symbols = map[string]string{ "os.ModeDevice": "os", "os.ModeDir": "os", "os.ModeExclusive": "os", + "os.ModeIrregular": "os", "os.ModeNamedPipe": "os", "os.ModePerm": "os", "os.ModeSetgid": "os", @@ -2665,6 +3127,7 @@ var Symbols = map[string]string{ "os.TempDir": "os", "os.Truncate": "os", "os.Unsetenv": "os", + "os.UserCacheDir": "os", "palette.Plan9": "image/color/palette", "palette.WebSafe": "image/color/palette", "parse.ActionNode": "text/template/parse", @@ -2739,9 +3202,25 @@ var Symbols = map[string]string{ "pe.File": "debug/pe", "pe.FileHeader": "debug/pe", "pe.FormatError": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_BASERELOC": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_DEBUG": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_EXCEPTION": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_EXPORT": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_GLOBALPTR": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_IAT": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_IMPORT": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_RESOURCE": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_SECURITY": "debug/pe", + "pe.IMAGE_DIRECTORY_ENTRY_TLS": "debug/pe", "pe.IMAGE_FILE_MACHINE_AM33": "debug/pe", "pe.IMAGE_FILE_MACHINE_AMD64": "debug/pe", "pe.IMAGE_FILE_MACHINE_ARM": "debug/pe", + "pe.IMAGE_FILE_MACHINE_ARM64": "debug/pe", "pe.IMAGE_FILE_MACHINE_EBC": "debug/pe", "pe.IMAGE_FILE_MACHINE_I386": "debug/pe", "pe.IMAGE_FILE_MACHINE_IA64": "debug/pe", @@ -2869,6 +3348,7 @@ var Symbols = map[string]string{ // "rand.Read" is ambiguous "rand.Reader": "crypto/rand", "rand.Seed": "math/rand", + "rand.Shuffle": "math/rand", "rand.Source": "math/rand", "rand.Source64": "math/rand", "rand.Uint32": "math/rand", @@ -3073,658 +3553,661 @@ var Symbols = map[string]string{ "scanner.ScanRawStrings": "text/scanner", "scanner.ScanStrings": "text/scanner", // "scanner.Scanner" is ambiguous - "scanner.SkipComments": "text/scanner", - "scanner.String": "text/scanner", - "scanner.TokenString": "text/scanner", - "sha1.BlockSize": "crypto/sha1", - "sha1.New": "crypto/sha1", - "sha1.Size": "crypto/sha1", - "sha1.Sum": "crypto/sha1", - "sha256.BlockSize": "crypto/sha256", - "sha256.New": "crypto/sha256", - "sha256.New224": "crypto/sha256", - "sha256.Size": "crypto/sha256", - "sha256.Size224": "crypto/sha256", - "sha256.Sum224": "crypto/sha256", - "sha256.Sum256": "crypto/sha256", - "sha512.BlockSize": "crypto/sha512", - "sha512.New": "crypto/sha512", - "sha512.New384": "crypto/sha512", - "sha512.New512_224": "crypto/sha512", - "sha512.New512_256": "crypto/sha512", - "sha512.Size": "crypto/sha512", - "sha512.Size224": "crypto/sha512", - "sha512.Size256": "crypto/sha512", - "sha512.Size384": "crypto/sha512", - "sha512.Sum384": "crypto/sha512", - "sha512.Sum512": "crypto/sha512", - "sha512.Sum512_224": "crypto/sha512", - "sha512.Sum512_256": "crypto/sha512", - "signal.Ignore": "os/signal", - "signal.Notify": "os/signal", - "signal.Reset": "os/signal", - "signal.Stop": "os/signal", - "smtp.Auth": "net/smtp", - "smtp.CRAMMD5Auth": "net/smtp", - "smtp.Client": "net/smtp", - "smtp.Dial": "net/smtp", - "smtp.NewClient": "net/smtp", - "smtp.PlainAuth": "net/smtp", - "smtp.SendMail": "net/smtp", - "smtp.ServerInfo": "net/smtp", - "sort.Float64Slice": "sort", - "sort.Float64s": "sort", - "sort.Float64sAreSorted": "sort", - "sort.IntSlice": "sort", - "sort.Interface": "sort", - "sort.Ints": "sort", - "sort.IntsAreSorted": "sort", - "sort.IsSorted": "sort", - "sort.Reverse": "sort", - "sort.Search": "sort", - "sort.SearchFloat64s": "sort", - "sort.SearchInts": "sort", - "sort.SearchStrings": "sort", - "sort.Slice": "sort", - "sort.SliceIsSorted": "sort", - "sort.SliceStable": "sort", - "sort.Sort": "sort", - "sort.Stable": "sort", - "sort.StringSlice": "sort", - "sort.Strings": "sort", - "sort.StringsAreSorted": "sort", - "sql.ColumnType": "database/sql", - "sql.Conn": "database/sql", - "sql.DB": "database/sql", - "sql.DBStats": "database/sql", - "sql.Drivers": "database/sql", - "sql.ErrConnDone": "database/sql", - "sql.ErrNoRows": "database/sql", - "sql.ErrTxDone": "database/sql", - "sql.IsolationLevel": "database/sql", - "sql.LevelDefault": "database/sql", - "sql.LevelLinearizable": "database/sql", - "sql.LevelReadCommitted": "database/sql", - "sql.LevelReadUncommitted": "database/sql", - "sql.LevelRepeatableRead": "database/sql", - "sql.LevelSerializable": "database/sql", - "sql.LevelSnapshot": "database/sql", - "sql.LevelWriteCommitted": "database/sql", - "sql.Named": "database/sql", - "sql.NamedArg": "database/sql", - "sql.NullBool": "database/sql", - "sql.NullFloat64": "database/sql", - "sql.NullInt64": "database/sql", - "sql.NullString": "database/sql", - "sql.Open": "database/sql", - "sql.Out": "database/sql", - "sql.RawBytes": "database/sql", - "sql.Register": "database/sql", - "sql.Result": "database/sql", - "sql.Row": "database/sql", - "sql.Rows": "database/sql", - "sql.Scanner": "database/sql", - "sql.Stmt": "database/sql", - "sql.Tx": "database/sql", - "sql.TxOptions": "database/sql", - "strconv.AppendBool": "strconv", - "strconv.AppendFloat": "strconv", - "strconv.AppendInt": "strconv", - "strconv.AppendQuote": "strconv", - "strconv.AppendQuoteRune": "strconv", - "strconv.AppendQuoteRuneToASCII": "strconv", - "strconv.AppendQuoteRuneToGraphic": "strconv", - "strconv.AppendQuoteToASCII": "strconv", - "strconv.AppendQuoteToGraphic": "strconv", - "strconv.AppendUint": "strconv", - "strconv.Atoi": "strconv", - "strconv.CanBackquote": "strconv", - "strconv.ErrRange": "strconv", - "strconv.ErrSyntax": "strconv", - "strconv.FormatBool": "strconv", - "strconv.FormatFloat": "strconv", - "strconv.FormatInt": "strconv", - "strconv.FormatUint": "strconv", - "strconv.IntSize": "strconv", - "strconv.IsGraphic": "strconv", - "strconv.IsPrint": "strconv", - "strconv.Itoa": "strconv", - "strconv.NumError": "strconv", - "strconv.ParseBool": "strconv", - "strconv.ParseFloat": "strconv", - "strconv.ParseInt": "strconv", - "strconv.ParseUint": "strconv", - "strconv.Quote": "strconv", - "strconv.QuoteRune": "strconv", - "strconv.QuoteRuneToASCII": "strconv", - "strconv.QuoteRuneToGraphic": "strconv", - "strconv.QuoteToASCII": "strconv", - "strconv.QuoteToGraphic": "strconv", - "strconv.Unquote": "strconv", - "strconv.UnquoteChar": "strconv", - "strings.Compare": "strings", - "strings.Contains": "strings", - "strings.ContainsAny": "strings", - "strings.ContainsRune": "strings", - "strings.Count": "strings", - "strings.EqualFold": "strings", - "strings.Fields": "strings", - "strings.FieldsFunc": "strings", - "strings.HasPrefix": "strings", - "strings.HasSuffix": "strings", - "strings.Index": "strings", - "strings.IndexAny": "strings", - "strings.IndexByte": "strings", - "strings.IndexFunc": "strings", - "strings.IndexRune": "strings", - "strings.Join": "strings", - "strings.LastIndex": "strings", - "strings.LastIndexAny": "strings", - "strings.LastIndexByte": "strings", - "strings.LastIndexFunc": "strings", - "strings.Map": "strings", - "strings.NewReader": "strings", - "strings.NewReplacer": "strings", - "strings.Reader": "strings", - "strings.Repeat": "strings", - "strings.Replace": "strings", - "strings.Replacer": "strings", - "strings.Split": "strings", - "strings.SplitAfter": "strings", - "strings.SplitAfterN": "strings", - "strings.SplitN": "strings", - "strings.Title": "strings", - "strings.ToLower": "strings", - "strings.ToLowerSpecial": "strings", - "strings.ToTitle": "strings", - "strings.ToTitleSpecial": "strings", - "strings.ToUpper": "strings", - "strings.ToUpperSpecial": "strings", - "strings.Trim": "strings", - "strings.TrimFunc": "strings", - "strings.TrimLeft": "strings", - "strings.TrimLeftFunc": "strings", - "strings.TrimPrefix": "strings", - "strings.TrimRight": "strings", - "strings.TrimRightFunc": "strings", - "strings.TrimSpace": "strings", - "strings.TrimSuffix": "strings", - "subtle.ConstantTimeByteEq": "crypto/subtle", - "subtle.ConstantTimeCompare": "crypto/subtle", - "subtle.ConstantTimeCopy": "crypto/subtle", - "subtle.ConstantTimeEq": "crypto/subtle", - "subtle.ConstantTimeLessOrEq": "crypto/subtle", - "subtle.ConstantTimeSelect": "crypto/subtle", - "suffixarray.Index": "index/suffixarray", - "suffixarray.New": "index/suffixarray", - "sync.Cond": "sync", - "sync.Locker": "sync", - "sync.Map": "sync", - "sync.Mutex": "sync", - "sync.NewCond": "sync", - "sync.Once": "sync", - "sync.Pool": "sync", - "sync.RWMutex": "sync", - "sync.WaitGroup": "sync", - "syntax.ClassNL": "regexp/syntax", - "syntax.Compile": "regexp/syntax", - "syntax.DotNL": "regexp/syntax", - "syntax.EmptyBeginLine": "regexp/syntax", - "syntax.EmptyBeginText": "regexp/syntax", - "syntax.EmptyEndLine": "regexp/syntax", - "syntax.EmptyEndText": "regexp/syntax", - "syntax.EmptyNoWordBoundary": "regexp/syntax", - "syntax.EmptyOp": "regexp/syntax", - "syntax.EmptyOpContext": "regexp/syntax", - "syntax.EmptyWordBoundary": "regexp/syntax", - "syntax.ErrInternalError": "regexp/syntax", - "syntax.ErrInvalidCharClass": "regexp/syntax", - "syntax.ErrInvalidCharRange": "regexp/syntax", - "syntax.ErrInvalidEscape": "regexp/syntax", - "syntax.ErrInvalidNamedCapture": "regexp/syntax", - "syntax.ErrInvalidPerlOp": "regexp/syntax", - "syntax.ErrInvalidRepeatOp": "regexp/syntax", - "syntax.ErrInvalidRepeatSize": "regexp/syntax", - "syntax.ErrInvalidUTF8": "regexp/syntax", - "syntax.ErrMissingBracket": "regexp/syntax", - "syntax.ErrMissingParen": "regexp/syntax", - "syntax.ErrMissingRepeatArgument": "regexp/syntax", - "syntax.ErrTrailingBackslash": "regexp/syntax", - "syntax.ErrUnexpectedParen": "regexp/syntax", - "syntax.Error": "regexp/syntax", - "syntax.ErrorCode": "regexp/syntax", - "syntax.Flags": "regexp/syntax", - "syntax.FoldCase": "regexp/syntax", - "syntax.Inst": "regexp/syntax", - "syntax.InstAlt": "regexp/syntax", - "syntax.InstAltMatch": "regexp/syntax", - "syntax.InstCapture": "regexp/syntax", - "syntax.InstEmptyWidth": "regexp/syntax", - "syntax.InstFail": "regexp/syntax", - "syntax.InstMatch": "regexp/syntax", - "syntax.InstNop": "regexp/syntax", - "syntax.InstOp": "regexp/syntax", - "syntax.InstRune": "regexp/syntax", - "syntax.InstRune1": "regexp/syntax", - "syntax.InstRuneAny": "regexp/syntax", - "syntax.InstRuneAnyNotNL": "regexp/syntax", - "syntax.IsWordChar": "regexp/syntax", - "syntax.Literal": "regexp/syntax", - "syntax.MatchNL": "regexp/syntax", - "syntax.NonGreedy": "regexp/syntax", - "syntax.OneLine": "regexp/syntax", - "syntax.Op": "regexp/syntax", - "syntax.OpAlternate": "regexp/syntax", - "syntax.OpAnyChar": "regexp/syntax", - "syntax.OpAnyCharNotNL": "regexp/syntax", - "syntax.OpBeginLine": "regexp/syntax", - "syntax.OpBeginText": "regexp/syntax", - "syntax.OpCapture": "regexp/syntax", - "syntax.OpCharClass": "regexp/syntax", - "syntax.OpConcat": "regexp/syntax", - "syntax.OpEmptyMatch": "regexp/syntax", - "syntax.OpEndLine": "regexp/syntax", - "syntax.OpEndText": "regexp/syntax", - "syntax.OpLiteral": "regexp/syntax", - "syntax.OpNoMatch": "regexp/syntax", - "syntax.OpNoWordBoundary": "regexp/syntax", - "syntax.OpPlus": "regexp/syntax", - "syntax.OpQuest": "regexp/syntax", - "syntax.OpRepeat": "regexp/syntax", - "syntax.OpStar": "regexp/syntax", - "syntax.OpWordBoundary": "regexp/syntax", - "syntax.POSIX": "regexp/syntax", - "syntax.Parse": "regexp/syntax", - "syntax.Perl": "regexp/syntax", - "syntax.PerlX": "regexp/syntax", - "syntax.Prog": "regexp/syntax", - "syntax.Regexp": "regexp/syntax", - "syntax.Simple": "regexp/syntax", - "syntax.UnicodeGroups": "regexp/syntax", - "syntax.WasDollar": "regexp/syntax", - "syscall.AF_ALG": "syscall", - "syscall.AF_APPLETALK": "syscall", - "syscall.AF_ARP": "syscall", - "syscall.AF_ASH": "syscall", - "syscall.AF_ATM": "syscall", - "syscall.AF_ATMPVC": "syscall", - "syscall.AF_ATMSVC": "syscall", - "syscall.AF_AX25": "syscall", - "syscall.AF_BLUETOOTH": "syscall", - "syscall.AF_BRIDGE": "syscall", - "syscall.AF_CAIF": "syscall", - "syscall.AF_CAN": "syscall", - "syscall.AF_CCITT": "syscall", - "syscall.AF_CHAOS": "syscall", - "syscall.AF_CNT": "syscall", - "syscall.AF_COIP": "syscall", - "syscall.AF_DATAKIT": "syscall", - "syscall.AF_DECnet": "syscall", - "syscall.AF_DLI": "syscall", - "syscall.AF_E164": "syscall", - "syscall.AF_ECMA": "syscall", - "syscall.AF_ECONET": "syscall", - "syscall.AF_ENCAP": "syscall", - "syscall.AF_FILE": "syscall", - "syscall.AF_HYLINK": "syscall", - "syscall.AF_IEEE80211": "syscall", - "syscall.AF_IEEE802154": "syscall", - "syscall.AF_IMPLINK": "syscall", - "syscall.AF_INET": "syscall", - "syscall.AF_INET6": "syscall", - "syscall.AF_INET6_SDP": "syscall", - "syscall.AF_INET_SDP": "syscall", - "syscall.AF_IPX": "syscall", - "syscall.AF_IRDA": "syscall", - "syscall.AF_ISDN": "syscall", - "syscall.AF_ISO": "syscall", - "syscall.AF_IUCV": "syscall", - "syscall.AF_KEY": "syscall", - "syscall.AF_LAT": "syscall", - "syscall.AF_LINK": "syscall", - "syscall.AF_LLC": "syscall", - "syscall.AF_LOCAL": "syscall", - "syscall.AF_MAX": "syscall", - "syscall.AF_MPLS": "syscall", - "syscall.AF_NATM": "syscall", - "syscall.AF_NDRV": "syscall", - "syscall.AF_NETBEUI": "syscall", - "syscall.AF_NETBIOS": "syscall", - "syscall.AF_NETGRAPH": "syscall", - "syscall.AF_NETLINK": "syscall", - "syscall.AF_NETROM": "syscall", - "syscall.AF_NS": "syscall", - "syscall.AF_OROUTE": "syscall", - "syscall.AF_OSI": "syscall", - "syscall.AF_PACKET": "syscall", - "syscall.AF_PHONET": "syscall", - "syscall.AF_PPP": "syscall", - "syscall.AF_PPPOX": "syscall", - "syscall.AF_PUP": "syscall", - "syscall.AF_RDS": "syscall", - "syscall.AF_RESERVED_36": "syscall", - "syscall.AF_ROSE": "syscall", - "syscall.AF_ROUTE": "syscall", - "syscall.AF_RXRPC": "syscall", - "syscall.AF_SCLUSTER": "syscall", - "syscall.AF_SECURITY": "syscall", - "syscall.AF_SIP": "syscall", - "syscall.AF_SLOW": "syscall", - "syscall.AF_SNA": "syscall", - "syscall.AF_SYSTEM": "syscall", - "syscall.AF_TIPC": "syscall", - "syscall.AF_UNIX": "syscall", - "syscall.AF_UNSPEC": "syscall", - "syscall.AF_VENDOR00": "syscall", - "syscall.AF_VENDOR01": "syscall", - "syscall.AF_VENDOR02": "syscall", - "syscall.AF_VENDOR03": "syscall", - "syscall.AF_VENDOR04": "syscall", - "syscall.AF_VENDOR05": "syscall", - "syscall.AF_VENDOR06": "syscall", - "syscall.AF_VENDOR07": "syscall", - "syscall.AF_VENDOR08": "syscall", - "syscall.AF_VENDOR09": "syscall", - "syscall.AF_VENDOR10": "syscall", - "syscall.AF_VENDOR11": "syscall", - "syscall.AF_VENDOR12": "syscall", - "syscall.AF_VENDOR13": "syscall", - "syscall.AF_VENDOR14": "syscall", - "syscall.AF_VENDOR15": "syscall", - "syscall.AF_VENDOR16": "syscall", - "syscall.AF_VENDOR17": "syscall", - "syscall.AF_VENDOR18": "syscall", - "syscall.AF_VENDOR19": "syscall", - "syscall.AF_VENDOR20": "syscall", - "syscall.AF_VENDOR21": "syscall", - "syscall.AF_VENDOR22": "syscall", - "syscall.AF_VENDOR23": "syscall", - "syscall.AF_VENDOR24": "syscall", - "syscall.AF_VENDOR25": "syscall", - "syscall.AF_VENDOR26": "syscall", - "syscall.AF_VENDOR27": "syscall", - "syscall.AF_VENDOR28": "syscall", - "syscall.AF_VENDOR29": "syscall", - "syscall.AF_VENDOR30": "syscall", - "syscall.AF_VENDOR31": "syscall", - "syscall.AF_VENDOR32": "syscall", - "syscall.AF_VENDOR33": "syscall", - "syscall.AF_VENDOR34": "syscall", - "syscall.AF_VENDOR35": "syscall", - "syscall.AF_VENDOR36": "syscall", - "syscall.AF_VENDOR37": "syscall", - "syscall.AF_VENDOR38": "syscall", - "syscall.AF_VENDOR39": "syscall", - "syscall.AF_VENDOR40": "syscall", - "syscall.AF_VENDOR41": "syscall", - "syscall.AF_VENDOR42": "syscall", - "syscall.AF_VENDOR43": "syscall", - "syscall.AF_VENDOR44": "syscall", - "syscall.AF_VENDOR45": "syscall", - "syscall.AF_VENDOR46": "syscall", - "syscall.AF_VENDOR47": "syscall", - "syscall.AF_WANPIPE": "syscall", - "syscall.AF_X25": "syscall", - "syscall.AI_CANONNAME": "syscall", - "syscall.AI_NUMERICHOST": "syscall", - "syscall.AI_PASSIVE": "syscall", - "syscall.APPLICATION_ERROR": "syscall", - "syscall.ARPHRD_ADAPT": "syscall", - "syscall.ARPHRD_APPLETLK": "syscall", - "syscall.ARPHRD_ARCNET": "syscall", - "syscall.ARPHRD_ASH": "syscall", - "syscall.ARPHRD_ATM": "syscall", - "syscall.ARPHRD_AX25": "syscall", - "syscall.ARPHRD_BIF": "syscall", - "syscall.ARPHRD_CHAOS": "syscall", - "syscall.ARPHRD_CISCO": "syscall", - "syscall.ARPHRD_CSLIP": "syscall", - "syscall.ARPHRD_CSLIP6": "syscall", - "syscall.ARPHRD_DDCMP": "syscall", - "syscall.ARPHRD_DLCI": "syscall", - "syscall.ARPHRD_ECONET": "syscall", - "syscall.ARPHRD_EETHER": "syscall", - "syscall.ARPHRD_ETHER": "syscall", - "syscall.ARPHRD_EUI64": "syscall", - "syscall.ARPHRD_FCAL": "syscall", - "syscall.ARPHRD_FCFABRIC": "syscall", - "syscall.ARPHRD_FCPL": "syscall", - "syscall.ARPHRD_FCPP": "syscall", - "syscall.ARPHRD_FDDI": "syscall", - "syscall.ARPHRD_FRAD": "syscall", - "syscall.ARPHRD_FRELAY": "syscall", - "syscall.ARPHRD_HDLC": "syscall", - "syscall.ARPHRD_HIPPI": "syscall", - "syscall.ARPHRD_HWX25": "syscall", - "syscall.ARPHRD_IEEE1394": "syscall", - "syscall.ARPHRD_IEEE802": "syscall", - "syscall.ARPHRD_IEEE80211": "syscall", - "syscall.ARPHRD_IEEE80211_PRISM": "syscall", - "syscall.ARPHRD_IEEE80211_RADIOTAP": "syscall", - "syscall.ARPHRD_IEEE802154": "syscall", - "syscall.ARPHRD_IEEE802154_PHY": "syscall", - "syscall.ARPHRD_IEEE802_TR": "syscall", - "syscall.ARPHRD_INFINIBAND": "syscall", - "syscall.ARPHRD_IPDDP": "syscall", - "syscall.ARPHRD_IPGRE": "syscall", - "syscall.ARPHRD_IRDA": "syscall", - "syscall.ARPHRD_LAPB": "syscall", - "syscall.ARPHRD_LOCALTLK": "syscall", - "syscall.ARPHRD_LOOPBACK": "syscall", - "syscall.ARPHRD_METRICOM": "syscall", - "syscall.ARPHRD_NETROM": "syscall", - "syscall.ARPHRD_NONE": "syscall", - "syscall.ARPHRD_PIMREG": "syscall", - "syscall.ARPHRD_PPP": "syscall", - "syscall.ARPHRD_PRONET": "syscall", - "syscall.ARPHRD_RAWHDLC": "syscall", - "syscall.ARPHRD_ROSE": "syscall", - "syscall.ARPHRD_RSRVD": "syscall", - "syscall.ARPHRD_SIT": "syscall", - "syscall.ARPHRD_SKIP": "syscall", - "syscall.ARPHRD_SLIP": "syscall", - "syscall.ARPHRD_SLIP6": "syscall", - "syscall.ARPHRD_STRIP": "syscall", - "syscall.ARPHRD_TUNNEL": "syscall", - "syscall.ARPHRD_TUNNEL6": "syscall", - "syscall.ARPHRD_VOID": "syscall", - "syscall.ARPHRD_X25": "syscall", - "syscall.AUTHTYPE_CLIENT": "syscall", - "syscall.AUTHTYPE_SERVER": "syscall", - "syscall.Accept": "syscall", - "syscall.Accept4": "syscall", - "syscall.AcceptEx": "syscall", - "syscall.Access": "syscall", - "syscall.Acct": "syscall", - "syscall.AddrinfoW": "syscall", - "syscall.Adjtime": "syscall", - "syscall.Adjtimex": "syscall", - "syscall.AttachLsf": "syscall", - "syscall.B0": "syscall", - "syscall.B1000000": "syscall", - "syscall.B110": "syscall", - "syscall.B115200": "syscall", - "syscall.B1152000": "syscall", - "syscall.B1200": "syscall", - "syscall.B134": "syscall", - "syscall.B14400": "syscall", - "syscall.B150": "syscall", - "syscall.B1500000": "syscall", - "syscall.B1800": "syscall", - "syscall.B19200": "syscall", - "syscall.B200": "syscall", - "syscall.B2000000": "syscall", - "syscall.B230400": "syscall", - "syscall.B2400": "syscall", - "syscall.B2500000": "syscall", - "syscall.B28800": "syscall", - "syscall.B300": "syscall", - "syscall.B3000000": "syscall", - "syscall.B3500000": "syscall", - "syscall.B38400": "syscall", - "syscall.B4000000": "syscall", - "syscall.B460800": "syscall", - "syscall.B4800": "syscall", - "syscall.B50": "syscall", - "syscall.B500000": "syscall", - "syscall.B57600": "syscall", - "syscall.B576000": "syscall", - "syscall.B600": "syscall", - "syscall.B7200": "syscall", - "syscall.B75": "syscall", - "syscall.B76800": "syscall", - "syscall.B921600": "syscall", - "syscall.B9600": "syscall", - "syscall.BASE_PROTOCOL": "syscall", - "syscall.BIOCFEEDBACK": "syscall", - "syscall.BIOCFLUSH": "syscall", - "syscall.BIOCGBLEN": "syscall", - "syscall.BIOCGDIRECTION": "syscall", - "syscall.BIOCGDIRFILT": "syscall", - "syscall.BIOCGDLT": "syscall", - "syscall.BIOCGDLTLIST": "syscall", - "syscall.BIOCGETBUFMODE": "syscall", - "syscall.BIOCGETIF": "syscall", - "syscall.BIOCGETZMAX": "syscall", - "syscall.BIOCGFEEDBACK": "syscall", - "syscall.BIOCGFILDROP": "syscall", - "syscall.BIOCGHDRCMPLT": "syscall", - "syscall.BIOCGRSIG": "syscall", - "syscall.BIOCGRTIMEOUT": "syscall", - "syscall.BIOCGSEESENT": "syscall", - "syscall.BIOCGSTATS": "syscall", - "syscall.BIOCGSTATSOLD": "syscall", - "syscall.BIOCGTSTAMP": "syscall", - "syscall.BIOCIMMEDIATE": "syscall", - "syscall.BIOCLOCK": "syscall", - "syscall.BIOCPROMISC": "syscall", - "syscall.BIOCROTZBUF": "syscall", - "syscall.BIOCSBLEN": "syscall", - "syscall.BIOCSDIRECTION": "syscall", - "syscall.BIOCSDIRFILT": "syscall", - "syscall.BIOCSDLT": "syscall", - "syscall.BIOCSETBUFMODE": "syscall", - "syscall.BIOCSETF": "syscall", - "syscall.BIOCSETFNR": "syscall", - "syscall.BIOCSETIF": "syscall", - "syscall.BIOCSETWF": "syscall", - "syscall.BIOCSETZBUF": "syscall", - "syscall.BIOCSFEEDBACK": "syscall", - "syscall.BIOCSFILDROP": "syscall", - "syscall.BIOCSHDRCMPLT": "syscall", - "syscall.BIOCSRSIG": "syscall", - "syscall.BIOCSRTIMEOUT": "syscall", - "syscall.BIOCSSEESENT": "syscall", - "syscall.BIOCSTCPF": "syscall", - "syscall.BIOCSTSTAMP": "syscall", - "syscall.BIOCSUDPF": "syscall", - "syscall.BIOCVERSION": "syscall", - "syscall.BPF_A": "syscall", - "syscall.BPF_ABS": "syscall", - "syscall.BPF_ADD": "syscall", - "syscall.BPF_ALIGNMENT": "syscall", - "syscall.BPF_ALIGNMENT32": "syscall", - "syscall.BPF_ALU": "syscall", - "syscall.BPF_AND": "syscall", - "syscall.BPF_B": "syscall", - "syscall.BPF_BUFMODE_BUFFER": "syscall", - "syscall.BPF_BUFMODE_ZBUF": "syscall", - "syscall.BPF_DFLTBUFSIZE": "syscall", - "syscall.BPF_DIRECTION_IN": "syscall", - "syscall.BPF_DIRECTION_OUT": "syscall", - "syscall.BPF_DIV": "syscall", - "syscall.BPF_H": "syscall", - "syscall.BPF_IMM": "syscall", - "syscall.BPF_IND": "syscall", - "syscall.BPF_JA": "syscall", - "syscall.BPF_JEQ": "syscall", - "syscall.BPF_JGE": "syscall", - "syscall.BPF_JGT": "syscall", - "syscall.BPF_JMP": "syscall", - "syscall.BPF_JSET": "syscall", - "syscall.BPF_K": "syscall", - "syscall.BPF_LD": "syscall", - "syscall.BPF_LDX": "syscall", - "syscall.BPF_LEN": "syscall", - "syscall.BPF_LSH": "syscall", - "syscall.BPF_MAJOR_VERSION": "syscall", - "syscall.BPF_MAXBUFSIZE": "syscall", - "syscall.BPF_MAXINSNS": "syscall", - "syscall.BPF_MEM": "syscall", - "syscall.BPF_MEMWORDS": "syscall", - "syscall.BPF_MINBUFSIZE": "syscall", - "syscall.BPF_MINOR_VERSION": "syscall", - "syscall.BPF_MISC": "syscall", - "syscall.BPF_MSH": "syscall", - "syscall.BPF_MUL": "syscall", - "syscall.BPF_NEG": "syscall", - "syscall.BPF_OR": "syscall", - "syscall.BPF_RELEASE": "syscall", - "syscall.BPF_RET": "syscall", - "syscall.BPF_RSH": "syscall", - "syscall.BPF_ST": "syscall", - "syscall.BPF_STX": "syscall", - "syscall.BPF_SUB": "syscall", - "syscall.BPF_TAX": "syscall", - "syscall.BPF_TXA": "syscall", - "syscall.BPF_T_BINTIME": "syscall", - "syscall.BPF_T_BINTIME_FAST": "syscall", - "syscall.BPF_T_BINTIME_MONOTONIC": "syscall", - "syscall.BPF_T_BINTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_FAST": "syscall", - "syscall.BPF_T_FLAG_MASK": "syscall", - "syscall.BPF_T_FORMAT_MASK": "syscall", - "syscall.BPF_T_MICROTIME": "syscall", - "syscall.BPF_T_MICROTIME_FAST": "syscall", - "syscall.BPF_T_MICROTIME_MONOTONIC": "syscall", - "syscall.BPF_T_MICROTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_MONOTONIC": "syscall", - "syscall.BPF_T_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_NANOTIME": "syscall", - "syscall.BPF_T_NANOTIME_FAST": "syscall", - "syscall.BPF_T_NANOTIME_MONOTONIC": "syscall", - "syscall.BPF_T_NANOTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_NONE": "syscall", - "syscall.BPF_T_NORMAL": "syscall", - "syscall.BPF_W": "syscall", - "syscall.BPF_X": "syscall", - "syscall.BRKINT": "syscall", - "syscall.Bind": "syscall", - "syscall.BindToDevice": "syscall", - "syscall.BpfBuflen": "syscall", - "syscall.BpfDatalink": "syscall", - "syscall.BpfHdr": "syscall", - "syscall.BpfHeadercmpl": "syscall", - "syscall.BpfInsn": "syscall", - "syscall.BpfInterface": "syscall", - "syscall.BpfJump": "syscall", - "syscall.BpfProgram": "syscall", - "syscall.BpfStat": "syscall", - "syscall.BpfStats": "syscall", - "syscall.BpfStmt": "syscall", - "syscall.BpfTimeout": "syscall", - "syscall.BpfTimeval": "syscall", - "syscall.BpfVersion": "syscall", - "syscall.BpfZbuf": "syscall", - "syscall.BpfZbufHeader": "syscall", - "syscall.ByHandleFileInformation": "syscall", - "syscall.BytePtrFromString": "syscall", - "syscall.ByteSliceFromString": "syscall", - "syscall.CCR0_FLUSH": "syscall", - "syscall.CERT_CHAIN_POLICY_AUTHENTICODE": "syscall", - "syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS": "syscall", - "syscall.CERT_CHAIN_POLICY_BASE": "syscall", - "syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "syscall", - "syscall.CERT_CHAIN_POLICY_EV": "syscall", - "syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT": "syscall", - "syscall.CERT_CHAIN_POLICY_NT_AUTH": "syscall", - "syscall.CERT_CHAIN_POLICY_SSL": "syscall", - "syscall.CERT_E_CN_NO_MATCH": "syscall", - "syscall.CERT_E_EXPIRED": "syscall", - "syscall.CERT_E_PURPOSE": "syscall", - "syscall.CERT_E_ROLE": "syscall", - "syscall.CERT_E_UNTRUSTEDROOT": "syscall", - "syscall.CERT_STORE_ADD_ALWAYS": "syscall", + "scanner.SkipComments": "text/scanner", + "scanner.String": "text/scanner", + "scanner.TokenString": "text/scanner", + "sha1.BlockSize": "crypto/sha1", + "sha1.New": "crypto/sha1", + "sha1.Size": "crypto/sha1", + "sha1.Sum": "crypto/sha1", + "sha256.BlockSize": "crypto/sha256", + "sha256.New": "crypto/sha256", + "sha256.New224": "crypto/sha256", + "sha256.Size": "crypto/sha256", + "sha256.Size224": "crypto/sha256", + "sha256.Sum224": "crypto/sha256", + "sha256.Sum256": "crypto/sha256", + "sha512.BlockSize": "crypto/sha512", + "sha512.New": "crypto/sha512", + "sha512.New384": "crypto/sha512", + "sha512.New512_224": "crypto/sha512", + "sha512.New512_256": "crypto/sha512", + "sha512.Size": "crypto/sha512", + "sha512.Size224": "crypto/sha512", + "sha512.Size256": "crypto/sha512", + "sha512.Size384": "crypto/sha512", + "sha512.Sum384": "crypto/sha512", + "sha512.Sum512": "crypto/sha512", + "sha512.Sum512_224": "crypto/sha512", + "sha512.Sum512_256": "crypto/sha512", + "signal.Ignore": "os/signal", + "signal.Ignored": "os/signal", + "signal.Notify": "os/signal", + "signal.Reset": "os/signal", + "signal.Stop": "os/signal", + "smtp.Auth": "net/smtp", + "smtp.CRAMMD5Auth": "net/smtp", + "smtp.Client": "net/smtp", + "smtp.Dial": "net/smtp", + "smtp.NewClient": "net/smtp", + "smtp.PlainAuth": "net/smtp", + "smtp.SendMail": "net/smtp", + "smtp.ServerInfo": "net/smtp", + "sort.Float64Slice": "sort", + "sort.Float64s": "sort", + "sort.Float64sAreSorted": "sort", + "sort.IntSlice": "sort", + "sort.Interface": "sort", + "sort.Ints": "sort", + "sort.IntsAreSorted": "sort", + "sort.IsSorted": "sort", + "sort.Reverse": "sort", + "sort.Search": "sort", + "sort.SearchFloat64s": "sort", + "sort.SearchInts": "sort", + "sort.SearchStrings": "sort", + "sort.Slice": "sort", + "sort.SliceIsSorted": "sort", + "sort.SliceStable": "sort", + "sort.Sort": "sort", + "sort.Stable": "sort", + "sort.StringSlice": "sort", + "sort.Strings": "sort", + "sort.StringsAreSorted": "sort", + "sql.ColumnType": "database/sql", + "sql.Conn": "database/sql", + "sql.DB": "database/sql", + "sql.DBStats": "database/sql", + "sql.Drivers": "database/sql", + "sql.ErrConnDone": "database/sql", + "sql.ErrNoRows": "database/sql", + "sql.ErrTxDone": "database/sql", + "sql.IsolationLevel": "database/sql", + "sql.LevelDefault": "database/sql", + "sql.LevelLinearizable": "database/sql", + "sql.LevelReadCommitted": "database/sql", + "sql.LevelReadUncommitted": "database/sql", + "sql.LevelRepeatableRead": "database/sql", + "sql.LevelSerializable": "database/sql", + "sql.LevelSnapshot": "database/sql", + "sql.LevelWriteCommitted": "database/sql", + "sql.Named": "database/sql", + "sql.NamedArg": "database/sql", + "sql.NullBool": "database/sql", + "sql.NullFloat64": "database/sql", + "sql.NullInt64": "database/sql", + "sql.NullString": "database/sql", + "sql.Open": "database/sql", + "sql.OpenDB": "database/sql", + "sql.Out": "database/sql", + "sql.RawBytes": "database/sql", + "sql.Register": "database/sql", + "sql.Result": "database/sql", + "sql.Row": "database/sql", + "sql.Rows": "database/sql", + "sql.Scanner": "database/sql", + "sql.Stmt": "database/sql", + "sql.Tx": "database/sql", + "sql.TxOptions": "database/sql", + "strconv.AppendBool": "strconv", + "strconv.AppendFloat": "strconv", + "strconv.AppendInt": "strconv", + "strconv.AppendQuote": "strconv", + "strconv.AppendQuoteRune": "strconv", + "strconv.AppendQuoteRuneToASCII": "strconv", + "strconv.AppendQuoteRuneToGraphic": "strconv", + "strconv.AppendQuoteToASCII": "strconv", + "strconv.AppendQuoteToGraphic": "strconv", + "strconv.AppendUint": "strconv", + "strconv.Atoi": "strconv", + "strconv.CanBackquote": "strconv", + "strconv.ErrRange": "strconv", + "strconv.ErrSyntax": "strconv", + "strconv.FormatBool": "strconv", + "strconv.FormatFloat": "strconv", + "strconv.FormatInt": "strconv", + "strconv.FormatUint": "strconv", + "strconv.IntSize": "strconv", + "strconv.IsGraphic": "strconv", + "strconv.IsPrint": "strconv", + "strconv.Itoa": "strconv", + "strconv.NumError": "strconv", + "strconv.ParseBool": "strconv", + "strconv.ParseFloat": "strconv", + "strconv.ParseInt": "strconv", + "strconv.ParseUint": "strconv", + "strconv.Quote": "strconv", + "strconv.QuoteRune": "strconv", + "strconv.QuoteRuneToASCII": "strconv", + "strconv.QuoteRuneToGraphic": "strconv", + "strconv.QuoteToASCII": "strconv", + "strconv.QuoteToGraphic": "strconv", + "strconv.Unquote": "strconv", + "strconv.UnquoteChar": "strconv", + "strings.Builder": "strings", + "strings.Compare": "strings", + "strings.Contains": "strings", + "strings.ContainsAny": "strings", + "strings.ContainsRune": "strings", + "strings.Count": "strings", + "strings.EqualFold": "strings", + "strings.Fields": "strings", + "strings.FieldsFunc": "strings", + "strings.HasPrefix": "strings", + "strings.HasSuffix": "strings", + "strings.Index": "strings", + "strings.IndexAny": "strings", + "strings.IndexByte": "strings", + "strings.IndexFunc": "strings", + "strings.IndexRune": "strings", + "strings.Join": "strings", + "strings.LastIndex": "strings", + "strings.LastIndexAny": "strings", + "strings.LastIndexByte": "strings", + "strings.LastIndexFunc": "strings", + "strings.Map": "strings", + "strings.NewReader": "strings", + "strings.NewReplacer": "strings", + "strings.Reader": "strings", + "strings.Repeat": "strings", + "strings.Replace": "strings", + "strings.Replacer": "strings", + "strings.Split": "strings", + "strings.SplitAfter": "strings", + "strings.SplitAfterN": "strings", + "strings.SplitN": "strings", + "strings.Title": "strings", + "strings.ToLower": "strings", + "strings.ToLowerSpecial": "strings", + "strings.ToTitle": "strings", + "strings.ToTitleSpecial": "strings", + "strings.ToUpper": "strings", + "strings.ToUpperSpecial": "strings", + "strings.Trim": "strings", + "strings.TrimFunc": "strings", + "strings.TrimLeft": "strings", + "strings.TrimLeftFunc": "strings", + "strings.TrimPrefix": "strings", + "strings.TrimRight": "strings", + "strings.TrimRightFunc": "strings", + "strings.TrimSpace": "strings", + "strings.TrimSuffix": "strings", + "subtle.ConstantTimeByteEq": "crypto/subtle", + "subtle.ConstantTimeCompare": "crypto/subtle", + "subtle.ConstantTimeCopy": "crypto/subtle", + "subtle.ConstantTimeEq": "crypto/subtle", + "subtle.ConstantTimeLessOrEq": "crypto/subtle", + "subtle.ConstantTimeSelect": "crypto/subtle", + "suffixarray.Index": "index/suffixarray", + "suffixarray.New": "index/suffixarray", + "sync.Cond": "sync", + "sync.Locker": "sync", + "sync.Map": "sync", + "sync.Mutex": "sync", + "sync.NewCond": "sync", + "sync.Once": "sync", + "sync.Pool": "sync", + "sync.RWMutex": "sync", + "sync.WaitGroup": "sync", + "syntax.ClassNL": "regexp/syntax", + "syntax.Compile": "regexp/syntax", + "syntax.DotNL": "regexp/syntax", + "syntax.EmptyBeginLine": "regexp/syntax", + "syntax.EmptyBeginText": "regexp/syntax", + "syntax.EmptyEndLine": "regexp/syntax", + "syntax.EmptyEndText": "regexp/syntax", + "syntax.EmptyNoWordBoundary": "regexp/syntax", + "syntax.EmptyOp": "regexp/syntax", + "syntax.EmptyOpContext": "regexp/syntax", + "syntax.EmptyWordBoundary": "regexp/syntax", + "syntax.ErrInternalError": "regexp/syntax", + "syntax.ErrInvalidCharClass": "regexp/syntax", + "syntax.ErrInvalidCharRange": "regexp/syntax", + "syntax.ErrInvalidEscape": "regexp/syntax", + "syntax.ErrInvalidNamedCapture": "regexp/syntax", + "syntax.ErrInvalidPerlOp": "regexp/syntax", + "syntax.ErrInvalidRepeatOp": "regexp/syntax", + "syntax.ErrInvalidRepeatSize": "regexp/syntax", + "syntax.ErrInvalidUTF8": "regexp/syntax", + "syntax.ErrMissingBracket": "regexp/syntax", + "syntax.ErrMissingParen": "regexp/syntax", + "syntax.ErrMissingRepeatArgument": "regexp/syntax", + "syntax.ErrTrailingBackslash": "regexp/syntax", + "syntax.ErrUnexpectedParen": "regexp/syntax", + "syntax.Error": "regexp/syntax", + "syntax.ErrorCode": "regexp/syntax", + "syntax.Flags": "regexp/syntax", + "syntax.FoldCase": "regexp/syntax", + "syntax.Inst": "regexp/syntax", + "syntax.InstAlt": "regexp/syntax", + "syntax.InstAltMatch": "regexp/syntax", + "syntax.InstCapture": "regexp/syntax", + "syntax.InstEmptyWidth": "regexp/syntax", + "syntax.InstFail": "regexp/syntax", + "syntax.InstMatch": "regexp/syntax", + "syntax.InstNop": "regexp/syntax", + "syntax.InstOp": "regexp/syntax", + "syntax.InstRune": "regexp/syntax", + "syntax.InstRune1": "regexp/syntax", + "syntax.InstRuneAny": "regexp/syntax", + "syntax.InstRuneAnyNotNL": "regexp/syntax", + "syntax.IsWordChar": "regexp/syntax", + "syntax.Literal": "regexp/syntax", + "syntax.MatchNL": "regexp/syntax", + "syntax.NonGreedy": "regexp/syntax", + "syntax.OneLine": "regexp/syntax", + "syntax.Op": "regexp/syntax", + "syntax.OpAlternate": "regexp/syntax", + "syntax.OpAnyChar": "regexp/syntax", + "syntax.OpAnyCharNotNL": "regexp/syntax", + "syntax.OpBeginLine": "regexp/syntax", + "syntax.OpBeginText": "regexp/syntax", + "syntax.OpCapture": "regexp/syntax", + "syntax.OpCharClass": "regexp/syntax", + "syntax.OpConcat": "regexp/syntax", + "syntax.OpEmptyMatch": "regexp/syntax", + "syntax.OpEndLine": "regexp/syntax", + "syntax.OpEndText": "regexp/syntax", + "syntax.OpLiteral": "regexp/syntax", + "syntax.OpNoMatch": "regexp/syntax", + "syntax.OpNoWordBoundary": "regexp/syntax", + "syntax.OpPlus": "regexp/syntax", + "syntax.OpQuest": "regexp/syntax", + "syntax.OpRepeat": "regexp/syntax", + "syntax.OpStar": "regexp/syntax", + "syntax.OpWordBoundary": "regexp/syntax", + "syntax.POSIX": "regexp/syntax", + "syntax.Parse": "regexp/syntax", + "syntax.Perl": "regexp/syntax", + "syntax.PerlX": "regexp/syntax", + "syntax.Prog": "regexp/syntax", + "syntax.Regexp": "regexp/syntax", + "syntax.Simple": "regexp/syntax", + "syntax.UnicodeGroups": "regexp/syntax", + "syntax.WasDollar": "regexp/syntax", + "syscall.AF_ALG": "syscall", + "syscall.AF_APPLETALK": "syscall", + "syscall.AF_ARP": "syscall", + "syscall.AF_ASH": "syscall", + "syscall.AF_ATM": "syscall", + "syscall.AF_ATMPVC": "syscall", + "syscall.AF_ATMSVC": "syscall", + "syscall.AF_AX25": "syscall", + "syscall.AF_BLUETOOTH": "syscall", + "syscall.AF_BRIDGE": "syscall", + "syscall.AF_CAIF": "syscall", + "syscall.AF_CAN": "syscall", + "syscall.AF_CCITT": "syscall", + "syscall.AF_CHAOS": "syscall", + "syscall.AF_CNT": "syscall", + "syscall.AF_COIP": "syscall", + "syscall.AF_DATAKIT": "syscall", + "syscall.AF_DECnet": "syscall", + "syscall.AF_DLI": "syscall", + "syscall.AF_E164": "syscall", + "syscall.AF_ECMA": "syscall", + "syscall.AF_ECONET": "syscall", + "syscall.AF_ENCAP": "syscall", + "syscall.AF_FILE": "syscall", + "syscall.AF_HYLINK": "syscall", + "syscall.AF_IEEE80211": "syscall", + "syscall.AF_IEEE802154": "syscall", + "syscall.AF_IMPLINK": "syscall", + "syscall.AF_INET": "syscall", + "syscall.AF_INET6": "syscall", + "syscall.AF_INET6_SDP": "syscall", + "syscall.AF_INET_SDP": "syscall", + "syscall.AF_IPX": "syscall", + "syscall.AF_IRDA": "syscall", + "syscall.AF_ISDN": "syscall", + "syscall.AF_ISO": "syscall", + "syscall.AF_IUCV": "syscall", + "syscall.AF_KEY": "syscall", + "syscall.AF_LAT": "syscall", + "syscall.AF_LINK": "syscall", + "syscall.AF_LLC": "syscall", + "syscall.AF_LOCAL": "syscall", + "syscall.AF_MAX": "syscall", + "syscall.AF_MPLS": "syscall", + "syscall.AF_NATM": "syscall", + "syscall.AF_NDRV": "syscall", + "syscall.AF_NETBEUI": "syscall", + "syscall.AF_NETBIOS": "syscall", + "syscall.AF_NETGRAPH": "syscall", + "syscall.AF_NETLINK": "syscall", + "syscall.AF_NETROM": "syscall", + "syscall.AF_NS": "syscall", + "syscall.AF_OROUTE": "syscall", + "syscall.AF_OSI": "syscall", + "syscall.AF_PACKET": "syscall", + "syscall.AF_PHONET": "syscall", + "syscall.AF_PPP": "syscall", + "syscall.AF_PPPOX": "syscall", + "syscall.AF_PUP": "syscall", + "syscall.AF_RDS": "syscall", + "syscall.AF_RESERVED_36": "syscall", + "syscall.AF_ROSE": "syscall", + "syscall.AF_ROUTE": "syscall", + "syscall.AF_RXRPC": "syscall", + "syscall.AF_SCLUSTER": "syscall", + "syscall.AF_SECURITY": "syscall", + "syscall.AF_SIP": "syscall", + "syscall.AF_SLOW": "syscall", + "syscall.AF_SNA": "syscall", + "syscall.AF_SYSTEM": "syscall", + "syscall.AF_TIPC": "syscall", + "syscall.AF_UNIX": "syscall", + "syscall.AF_UNSPEC": "syscall", + "syscall.AF_VENDOR00": "syscall", + "syscall.AF_VENDOR01": "syscall", + "syscall.AF_VENDOR02": "syscall", + "syscall.AF_VENDOR03": "syscall", + "syscall.AF_VENDOR04": "syscall", + "syscall.AF_VENDOR05": "syscall", + "syscall.AF_VENDOR06": "syscall", + "syscall.AF_VENDOR07": "syscall", + "syscall.AF_VENDOR08": "syscall", + "syscall.AF_VENDOR09": "syscall", + "syscall.AF_VENDOR10": "syscall", + "syscall.AF_VENDOR11": "syscall", + "syscall.AF_VENDOR12": "syscall", + "syscall.AF_VENDOR13": "syscall", + "syscall.AF_VENDOR14": "syscall", + "syscall.AF_VENDOR15": "syscall", + "syscall.AF_VENDOR16": "syscall", + "syscall.AF_VENDOR17": "syscall", + "syscall.AF_VENDOR18": "syscall", + "syscall.AF_VENDOR19": "syscall", + "syscall.AF_VENDOR20": "syscall", + "syscall.AF_VENDOR21": "syscall", + "syscall.AF_VENDOR22": "syscall", + "syscall.AF_VENDOR23": "syscall", + "syscall.AF_VENDOR24": "syscall", + "syscall.AF_VENDOR25": "syscall", + "syscall.AF_VENDOR26": "syscall", + "syscall.AF_VENDOR27": "syscall", + "syscall.AF_VENDOR28": "syscall", + "syscall.AF_VENDOR29": "syscall", + "syscall.AF_VENDOR30": "syscall", + "syscall.AF_VENDOR31": "syscall", + "syscall.AF_VENDOR32": "syscall", + "syscall.AF_VENDOR33": "syscall", + "syscall.AF_VENDOR34": "syscall", + "syscall.AF_VENDOR35": "syscall", + "syscall.AF_VENDOR36": "syscall", + "syscall.AF_VENDOR37": "syscall", + "syscall.AF_VENDOR38": "syscall", + "syscall.AF_VENDOR39": "syscall", + "syscall.AF_VENDOR40": "syscall", + "syscall.AF_VENDOR41": "syscall", + "syscall.AF_VENDOR42": "syscall", + "syscall.AF_VENDOR43": "syscall", + "syscall.AF_VENDOR44": "syscall", + "syscall.AF_VENDOR45": "syscall", + "syscall.AF_VENDOR46": "syscall", + "syscall.AF_VENDOR47": "syscall", + "syscall.AF_WANPIPE": "syscall", + "syscall.AF_X25": "syscall", + "syscall.AI_CANONNAME": "syscall", + "syscall.AI_NUMERICHOST": "syscall", + "syscall.AI_PASSIVE": "syscall", + "syscall.APPLICATION_ERROR": "syscall", + "syscall.ARPHRD_ADAPT": "syscall", + "syscall.ARPHRD_APPLETLK": "syscall", + "syscall.ARPHRD_ARCNET": "syscall", + "syscall.ARPHRD_ASH": "syscall", + "syscall.ARPHRD_ATM": "syscall", + "syscall.ARPHRD_AX25": "syscall", + "syscall.ARPHRD_BIF": "syscall", + "syscall.ARPHRD_CHAOS": "syscall", + "syscall.ARPHRD_CISCO": "syscall", + "syscall.ARPHRD_CSLIP": "syscall", + "syscall.ARPHRD_CSLIP6": "syscall", + "syscall.ARPHRD_DDCMP": "syscall", + "syscall.ARPHRD_DLCI": "syscall", + "syscall.ARPHRD_ECONET": "syscall", + "syscall.ARPHRD_EETHER": "syscall", + "syscall.ARPHRD_ETHER": "syscall", + "syscall.ARPHRD_EUI64": "syscall", + "syscall.ARPHRD_FCAL": "syscall", + "syscall.ARPHRD_FCFABRIC": "syscall", + "syscall.ARPHRD_FCPL": "syscall", + "syscall.ARPHRD_FCPP": "syscall", + "syscall.ARPHRD_FDDI": "syscall", + "syscall.ARPHRD_FRAD": "syscall", + "syscall.ARPHRD_FRELAY": "syscall", + "syscall.ARPHRD_HDLC": "syscall", + "syscall.ARPHRD_HIPPI": "syscall", + "syscall.ARPHRD_HWX25": "syscall", + "syscall.ARPHRD_IEEE1394": "syscall", + "syscall.ARPHRD_IEEE802": "syscall", + "syscall.ARPHRD_IEEE80211": "syscall", + "syscall.ARPHRD_IEEE80211_PRISM": "syscall", + "syscall.ARPHRD_IEEE80211_RADIOTAP": "syscall", + "syscall.ARPHRD_IEEE802154": "syscall", + "syscall.ARPHRD_IEEE802154_PHY": "syscall", + "syscall.ARPHRD_IEEE802_TR": "syscall", + "syscall.ARPHRD_INFINIBAND": "syscall", + "syscall.ARPHRD_IPDDP": "syscall", + "syscall.ARPHRD_IPGRE": "syscall", + "syscall.ARPHRD_IRDA": "syscall", + "syscall.ARPHRD_LAPB": "syscall", + "syscall.ARPHRD_LOCALTLK": "syscall", + "syscall.ARPHRD_LOOPBACK": "syscall", + "syscall.ARPHRD_METRICOM": "syscall", + "syscall.ARPHRD_NETROM": "syscall", + "syscall.ARPHRD_NONE": "syscall", + "syscall.ARPHRD_PIMREG": "syscall", + "syscall.ARPHRD_PPP": "syscall", + "syscall.ARPHRD_PRONET": "syscall", + "syscall.ARPHRD_RAWHDLC": "syscall", + "syscall.ARPHRD_ROSE": "syscall", + "syscall.ARPHRD_RSRVD": "syscall", + "syscall.ARPHRD_SIT": "syscall", + "syscall.ARPHRD_SKIP": "syscall", + "syscall.ARPHRD_SLIP": "syscall", + "syscall.ARPHRD_SLIP6": "syscall", + "syscall.ARPHRD_STRIP": "syscall", + "syscall.ARPHRD_TUNNEL": "syscall", + "syscall.ARPHRD_TUNNEL6": "syscall", + "syscall.ARPHRD_VOID": "syscall", + "syscall.ARPHRD_X25": "syscall", + "syscall.AUTHTYPE_CLIENT": "syscall", + "syscall.AUTHTYPE_SERVER": "syscall", + "syscall.Accept": "syscall", + "syscall.Accept4": "syscall", + "syscall.AcceptEx": "syscall", + "syscall.Access": "syscall", + "syscall.Acct": "syscall", + "syscall.AddrinfoW": "syscall", + "syscall.Adjtime": "syscall", + "syscall.Adjtimex": "syscall", + "syscall.AttachLsf": "syscall", + "syscall.B0": "syscall", + "syscall.B1000000": "syscall", + "syscall.B110": "syscall", + "syscall.B115200": "syscall", + "syscall.B1152000": "syscall", + "syscall.B1200": "syscall", + "syscall.B134": "syscall", + "syscall.B14400": "syscall", + "syscall.B150": "syscall", + "syscall.B1500000": "syscall", + "syscall.B1800": "syscall", + "syscall.B19200": "syscall", + "syscall.B200": "syscall", + "syscall.B2000000": "syscall", + "syscall.B230400": "syscall", + "syscall.B2400": "syscall", + "syscall.B2500000": "syscall", + "syscall.B28800": "syscall", + "syscall.B300": "syscall", + "syscall.B3000000": "syscall", + "syscall.B3500000": "syscall", + "syscall.B38400": "syscall", + "syscall.B4000000": "syscall", + "syscall.B460800": "syscall", + "syscall.B4800": "syscall", + "syscall.B50": "syscall", + "syscall.B500000": "syscall", + "syscall.B57600": "syscall", + "syscall.B576000": "syscall", + "syscall.B600": "syscall", + "syscall.B7200": "syscall", + "syscall.B75": "syscall", + "syscall.B76800": "syscall", + "syscall.B921600": "syscall", + "syscall.B9600": "syscall", + "syscall.BASE_PROTOCOL": "syscall", + "syscall.BIOCFEEDBACK": "syscall", + "syscall.BIOCFLUSH": "syscall", + "syscall.BIOCGBLEN": "syscall", + "syscall.BIOCGDIRECTION": "syscall", + "syscall.BIOCGDIRFILT": "syscall", + "syscall.BIOCGDLT": "syscall", + "syscall.BIOCGDLTLIST": "syscall", + "syscall.BIOCGETBUFMODE": "syscall", + "syscall.BIOCGETIF": "syscall", + "syscall.BIOCGETZMAX": "syscall", + "syscall.BIOCGFEEDBACK": "syscall", + "syscall.BIOCGFILDROP": "syscall", + "syscall.BIOCGHDRCMPLT": "syscall", + "syscall.BIOCGRSIG": "syscall", + "syscall.BIOCGRTIMEOUT": "syscall", + "syscall.BIOCGSEESENT": "syscall", + "syscall.BIOCGSTATS": "syscall", + "syscall.BIOCGSTATSOLD": "syscall", + "syscall.BIOCGTSTAMP": "syscall", + "syscall.BIOCIMMEDIATE": "syscall", + "syscall.BIOCLOCK": "syscall", + "syscall.BIOCPROMISC": "syscall", + "syscall.BIOCROTZBUF": "syscall", + "syscall.BIOCSBLEN": "syscall", + "syscall.BIOCSDIRECTION": "syscall", + "syscall.BIOCSDIRFILT": "syscall", + "syscall.BIOCSDLT": "syscall", + "syscall.BIOCSETBUFMODE": "syscall", + "syscall.BIOCSETF": "syscall", + "syscall.BIOCSETFNR": "syscall", + "syscall.BIOCSETIF": "syscall", + "syscall.BIOCSETWF": "syscall", + "syscall.BIOCSETZBUF": "syscall", + "syscall.BIOCSFEEDBACK": "syscall", + "syscall.BIOCSFILDROP": "syscall", + "syscall.BIOCSHDRCMPLT": "syscall", + "syscall.BIOCSRSIG": "syscall", + "syscall.BIOCSRTIMEOUT": "syscall", + "syscall.BIOCSSEESENT": "syscall", + "syscall.BIOCSTCPF": "syscall", + "syscall.BIOCSTSTAMP": "syscall", + "syscall.BIOCSUDPF": "syscall", + "syscall.BIOCVERSION": "syscall", + "syscall.BPF_A": "syscall", + "syscall.BPF_ABS": "syscall", + "syscall.BPF_ADD": "syscall", + "syscall.BPF_ALIGNMENT": "syscall", + "syscall.BPF_ALIGNMENT32": "syscall", + "syscall.BPF_ALU": "syscall", + "syscall.BPF_AND": "syscall", + "syscall.BPF_B": "syscall", + "syscall.BPF_BUFMODE_BUFFER": "syscall", + "syscall.BPF_BUFMODE_ZBUF": "syscall", + "syscall.BPF_DFLTBUFSIZE": "syscall", + "syscall.BPF_DIRECTION_IN": "syscall", + "syscall.BPF_DIRECTION_OUT": "syscall", + "syscall.BPF_DIV": "syscall", + "syscall.BPF_H": "syscall", + "syscall.BPF_IMM": "syscall", + "syscall.BPF_IND": "syscall", + "syscall.BPF_JA": "syscall", + "syscall.BPF_JEQ": "syscall", + "syscall.BPF_JGE": "syscall", + "syscall.BPF_JGT": "syscall", + "syscall.BPF_JMP": "syscall", + "syscall.BPF_JSET": "syscall", + "syscall.BPF_K": "syscall", + "syscall.BPF_LD": "syscall", + "syscall.BPF_LDX": "syscall", + "syscall.BPF_LEN": "syscall", + "syscall.BPF_LSH": "syscall", + "syscall.BPF_MAJOR_VERSION": "syscall", + "syscall.BPF_MAXBUFSIZE": "syscall", + "syscall.BPF_MAXINSNS": "syscall", + "syscall.BPF_MEM": "syscall", + "syscall.BPF_MEMWORDS": "syscall", + "syscall.BPF_MINBUFSIZE": "syscall", + "syscall.BPF_MINOR_VERSION": "syscall", + "syscall.BPF_MISC": "syscall", + "syscall.BPF_MSH": "syscall", + "syscall.BPF_MUL": "syscall", + "syscall.BPF_NEG": "syscall", + "syscall.BPF_OR": "syscall", + "syscall.BPF_RELEASE": "syscall", + "syscall.BPF_RET": "syscall", + "syscall.BPF_RSH": "syscall", + "syscall.BPF_ST": "syscall", + "syscall.BPF_STX": "syscall", + "syscall.BPF_SUB": "syscall", + "syscall.BPF_TAX": "syscall", + "syscall.BPF_TXA": "syscall", + "syscall.BPF_T_BINTIME": "syscall", + "syscall.BPF_T_BINTIME_FAST": "syscall", + "syscall.BPF_T_BINTIME_MONOTONIC": "syscall", + "syscall.BPF_T_BINTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_FAST": "syscall", + "syscall.BPF_T_FLAG_MASK": "syscall", + "syscall.BPF_T_FORMAT_MASK": "syscall", + "syscall.BPF_T_MICROTIME": "syscall", + "syscall.BPF_T_MICROTIME_FAST": "syscall", + "syscall.BPF_T_MICROTIME_MONOTONIC": "syscall", + "syscall.BPF_T_MICROTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_MONOTONIC": "syscall", + "syscall.BPF_T_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_NANOTIME": "syscall", + "syscall.BPF_T_NANOTIME_FAST": "syscall", + "syscall.BPF_T_NANOTIME_MONOTONIC": "syscall", + "syscall.BPF_T_NANOTIME_MONOTONIC_FAST": "syscall", + "syscall.BPF_T_NONE": "syscall", + "syscall.BPF_T_NORMAL": "syscall", + "syscall.BPF_W": "syscall", + "syscall.BPF_X": "syscall", + "syscall.BRKINT": "syscall", + "syscall.Bind": "syscall", + "syscall.BindToDevice": "syscall", + "syscall.BpfBuflen": "syscall", + "syscall.BpfDatalink": "syscall", + "syscall.BpfHdr": "syscall", + "syscall.BpfHeadercmpl": "syscall", + "syscall.BpfInsn": "syscall", + "syscall.BpfInterface": "syscall", + "syscall.BpfJump": "syscall", + "syscall.BpfProgram": "syscall", + "syscall.BpfStat": "syscall", + "syscall.BpfStats": "syscall", + "syscall.BpfStmt": "syscall", + "syscall.BpfTimeout": "syscall", + "syscall.BpfTimeval": "syscall", + "syscall.BpfVersion": "syscall", + "syscall.BpfZbuf": "syscall", + "syscall.BpfZbufHeader": "syscall", + "syscall.ByHandleFileInformation": "syscall", + "syscall.BytePtrFromString": "syscall", + "syscall.ByteSliceFromString": "syscall", + "syscall.CCR0_FLUSH": "syscall", + "syscall.CERT_CHAIN_POLICY_AUTHENTICODE": "syscall", + "syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS": "syscall", + "syscall.CERT_CHAIN_POLICY_BASE": "syscall", + "syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "syscall", + "syscall.CERT_CHAIN_POLICY_EV": "syscall", + "syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT": "syscall", + "syscall.CERT_CHAIN_POLICY_NT_AUTH": "syscall", + "syscall.CERT_CHAIN_POLICY_SSL": "syscall", + "syscall.CERT_E_CN_NO_MATCH": "syscall", + "syscall.CERT_E_EXPIRED": "syscall", + "syscall.CERT_E_PURPOSE": "syscall", + "syscall.CERT_E_ROLE": "syscall", + "syscall.CERT_E_UNTRUSTEDROOT": "syscall", + "syscall.CERT_STORE_ADD_ALWAYS": "syscall", "syscall.CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": "syscall", "syscall.CERT_STORE_PROV_MEMORY": "syscall", "syscall.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": "syscall", @@ -3747,4813 +4230,4824 @@ var Symbols = map[string]string{ "syscall.CERT_TRUST_NO_ERROR": "syscall", "syscall.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": "syscall", "syscall.CERT_TRUST_REVOCATION_STATUS_UNKNOWN": "syscall", - "syscall.CFLUSH": "syscall", - "syscall.CLOCAL": "syscall", - "syscall.CLONE_CHILD_CLEARTID": "syscall", - "syscall.CLONE_CHILD_SETTID": "syscall", - "syscall.CLONE_CSIGNAL": "syscall", - "syscall.CLONE_DETACHED": "syscall", - "syscall.CLONE_FILES": "syscall", - "syscall.CLONE_FS": "syscall", - "syscall.CLONE_IO": "syscall", - "syscall.CLONE_NEWIPC": "syscall", - "syscall.CLONE_NEWNET": "syscall", - "syscall.CLONE_NEWNS": "syscall", - "syscall.CLONE_NEWPID": "syscall", - "syscall.CLONE_NEWUSER": "syscall", - "syscall.CLONE_NEWUTS": "syscall", - "syscall.CLONE_PARENT": "syscall", - "syscall.CLONE_PARENT_SETTID": "syscall", - "syscall.CLONE_PID": "syscall", - "syscall.CLONE_PTRACE": "syscall", - "syscall.CLONE_SETTLS": "syscall", - "syscall.CLONE_SIGHAND": "syscall", - "syscall.CLONE_SYSVSEM": "syscall", - "syscall.CLONE_THREAD": "syscall", - "syscall.CLONE_UNTRACED": "syscall", - "syscall.CLONE_VFORK": "syscall", - "syscall.CLONE_VM": "syscall", - "syscall.CPUID_CFLUSH": "syscall", - "syscall.CREAD": "syscall", - "syscall.CREATE_ALWAYS": "syscall", - "syscall.CREATE_NEW": "syscall", - "syscall.CREATE_NEW_PROCESS_GROUP": "syscall", - "syscall.CREATE_UNICODE_ENVIRONMENT": "syscall", - "syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL": "syscall", - "syscall.CRYPT_DELETEKEYSET": "syscall", - "syscall.CRYPT_MACHINE_KEYSET": "syscall", - "syscall.CRYPT_NEWKEYSET": "syscall", - "syscall.CRYPT_SILENT": "syscall", - "syscall.CRYPT_VERIFYCONTEXT": "syscall", - "syscall.CS5": "syscall", - "syscall.CS6": "syscall", - "syscall.CS7": "syscall", - "syscall.CS8": "syscall", - "syscall.CSIZE": "syscall", - "syscall.CSTART": "syscall", - "syscall.CSTATUS": "syscall", - "syscall.CSTOP": "syscall", - "syscall.CSTOPB": "syscall", - "syscall.CSUSP": "syscall", - "syscall.CTL_MAXNAME": "syscall", - "syscall.CTL_NET": "syscall", - "syscall.CTL_QUERY": "syscall", - "syscall.CTRL_BREAK_EVENT": "syscall", - "syscall.CTRL_C_EVENT": "syscall", - "syscall.CancelIo": "syscall", - "syscall.CancelIoEx": "syscall", - "syscall.CertAddCertificateContextToStore": "syscall", - "syscall.CertChainContext": "syscall", - "syscall.CertChainElement": "syscall", - "syscall.CertChainPara": "syscall", - "syscall.CertChainPolicyPara": "syscall", - "syscall.CertChainPolicyStatus": "syscall", - "syscall.CertCloseStore": "syscall", - "syscall.CertContext": "syscall", - "syscall.CertCreateCertificateContext": "syscall", - "syscall.CertEnhKeyUsage": "syscall", - "syscall.CertEnumCertificatesInStore": "syscall", - "syscall.CertFreeCertificateChain": "syscall", - "syscall.CertFreeCertificateContext": "syscall", - "syscall.CertGetCertificateChain": "syscall", - "syscall.CertOpenStore": "syscall", - "syscall.CertOpenSystemStore": "syscall", - "syscall.CertRevocationInfo": "syscall", - "syscall.CertSimpleChain": "syscall", - "syscall.CertTrustStatus": "syscall", - "syscall.CertUsageMatch": "syscall", - "syscall.CertVerifyCertificateChainPolicy": "syscall", - "syscall.Chdir": "syscall", - "syscall.CheckBpfVersion": "syscall", - "syscall.Chflags": "syscall", - "syscall.Chmod": "syscall", - "syscall.Chown": "syscall", - "syscall.Chroot": "syscall", - "syscall.Clearenv": "syscall", - "syscall.Close": "syscall", - "syscall.CloseHandle": "syscall", - "syscall.CloseOnExec": "syscall", - "syscall.Closesocket": "syscall", - "syscall.CmsgLen": "syscall", - "syscall.CmsgSpace": "syscall", - "syscall.Cmsghdr": "syscall", - "syscall.CommandLineToArgv": "syscall", - "syscall.ComputerName": "syscall", - "syscall.Conn": "syscall", - "syscall.Connect": "syscall", - "syscall.ConnectEx": "syscall", - "syscall.ConvertSidToStringSid": "syscall", - "syscall.ConvertStringSidToSid": "syscall", - "syscall.CopySid": "syscall", - "syscall.Creat": "syscall", - "syscall.CreateDirectory": "syscall", - "syscall.CreateFile": "syscall", - "syscall.CreateFileMapping": "syscall", - "syscall.CreateHardLink": "syscall", - "syscall.CreateIoCompletionPort": "syscall", - "syscall.CreatePipe": "syscall", - "syscall.CreateProcess": "syscall", - "syscall.CreateSymbolicLink": "syscall", - "syscall.CreateToolhelp32Snapshot": "syscall", - "syscall.Credential": "syscall", - "syscall.CryptAcquireContext": "syscall", - "syscall.CryptGenRandom": "syscall", - "syscall.CryptReleaseContext": "syscall", - "syscall.DIOCBSFLUSH": "syscall", - "syscall.DIOCOSFPFLUSH": "syscall", - "syscall.DLL": "syscall", - "syscall.DLLError": "syscall", - "syscall.DLT_A429": "syscall", - "syscall.DLT_A653_ICM": "syscall", - "syscall.DLT_AIRONET_HEADER": "syscall", - "syscall.DLT_AOS": "syscall", - "syscall.DLT_APPLE_IP_OVER_IEEE1394": "syscall", - "syscall.DLT_ARCNET": "syscall", - "syscall.DLT_ARCNET_LINUX": "syscall", - "syscall.DLT_ATM_CLIP": "syscall", - "syscall.DLT_ATM_RFC1483": "syscall", - "syscall.DLT_AURORA": "syscall", - "syscall.DLT_AX25": "syscall", - "syscall.DLT_AX25_KISS": "syscall", - "syscall.DLT_BACNET_MS_TP": "syscall", - "syscall.DLT_BLUETOOTH_HCI_H4": "syscall", - "syscall.DLT_BLUETOOTH_HCI_H4_WITH_PHDR": "syscall", - "syscall.DLT_CAN20B": "syscall", - "syscall.DLT_CAN_SOCKETCAN": "syscall", - "syscall.DLT_CHAOS": "syscall", - "syscall.DLT_CHDLC": "syscall", - "syscall.DLT_CISCO_IOS": "syscall", - "syscall.DLT_C_HDLC": "syscall", - "syscall.DLT_C_HDLC_WITH_DIR": "syscall", - "syscall.DLT_DBUS": "syscall", - "syscall.DLT_DECT": "syscall", - "syscall.DLT_DOCSIS": "syscall", - "syscall.DLT_DVB_CI": "syscall", - "syscall.DLT_ECONET": "syscall", - "syscall.DLT_EN10MB": "syscall", - "syscall.DLT_EN3MB": "syscall", - "syscall.DLT_ENC": "syscall", - "syscall.DLT_ERF": "syscall", - "syscall.DLT_ERF_ETH": "syscall", - "syscall.DLT_ERF_POS": "syscall", - "syscall.DLT_FC_2": "syscall", - "syscall.DLT_FC_2_WITH_FRAME_DELIMS": "syscall", - "syscall.DLT_FDDI": "syscall", - "syscall.DLT_FLEXRAY": "syscall", - "syscall.DLT_FRELAY": "syscall", - "syscall.DLT_FRELAY_WITH_DIR": "syscall", - "syscall.DLT_GCOM_SERIAL": "syscall", - "syscall.DLT_GCOM_T1E1": "syscall", - "syscall.DLT_GPF_F": "syscall", - "syscall.DLT_GPF_T": "syscall", - "syscall.DLT_GPRS_LLC": "syscall", - "syscall.DLT_GSMTAP_ABIS": "syscall", - "syscall.DLT_GSMTAP_UM": "syscall", - "syscall.DLT_HDLC": "syscall", - "syscall.DLT_HHDLC": "syscall", - "syscall.DLT_HIPPI": "syscall", - "syscall.DLT_IBM_SN": "syscall", - "syscall.DLT_IBM_SP": "syscall", - "syscall.DLT_IEEE802": "syscall", - "syscall.DLT_IEEE802_11": "syscall", - "syscall.DLT_IEEE802_11_RADIO": "syscall", - "syscall.DLT_IEEE802_11_RADIO_AVS": "syscall", - "syscall.DLT_IEEE802_15_4": "syscall", - "syscall.DLT_IEEE802_15_4_LINUX": "syscall", - "syscall.DLT_IEEE802_15_4_NOFCS": "syscall", - "syscall.DLT_IEEE802_15_4_NONASK_PHY": "syscall", - "syscall.DLT_IEEE802_16_MAC_CPS": "syscall", - "syscall.DLT_IEEE802_16_MAC_CPS_RADIO": "syscall", - "syscall.DLT_IPFILTER": "syscall", - "syscall.DLT_IPMB": "syscall", - "syscall.DLT_IPMB_LINUX": "syscall", - "syscall.DLT_IPNET": "syscall", - "syscall.DLT_IPOIB": "syscall", - "syscall.DLT_IPV4": "syscall", - "syscall.DLT_IPV6": "syscall", - "syscall.DLT_IP_OVER_FC": "syscall", - "syscall.DLT_JUNIPER_ATM1": "syscall", - "syscall.DLT_JUNIPER_ATM2": "syscall", - "syscall.DLT_JUNIPER_ATM_CEMIC": "syscall", - "syscall.DLT_JUNIPER_CHDLC": "syscall", - "syscall.DLT_JUNIPER_ES": "syscall", - "syscall.DLT_JUNIPER_ETHER": "syscall", - "syscall.DLT_JUNIPER_FIBRECHANNEL": "syscall", - "syscall.DLT_JUNIPER_FRELAY": "syscall", - "syscall.DLT_JUNIPER_GGSN": "syscall", - "syscall.DLT_JUNIPER_ISM": "syscall", - "syscall.DLT_JUNIPER_MFR": "syscall", - "syscall.DLT_JUNIPER_MLFR": "syscall", - "syscall.DLT_JUNIPER_MLPPP": "syscall", - "syscall.DLT_JUNIPER_MONITOR": "syscall", - "syscall.DLT_JUNIPER_PIC_PEER": "syscall", - "syscall.DLT_JUNIPER_PPP": "syscall", - "syscall.DLT_JUNIPER_PPPOE": "syscall", - "syscall.DLT_JUNIPER_PPPOE_ATM": "syscall", - "syscall.DLT_JUNIPER_SERVICES": "syscall", - "syscall.DLT_JUNIPER_SRX_E2E": "syscall", - "syscall.DLT_JUNIPER_ST": "syscall", - "syscall.DLT_JUNIPER_VP": "syscall", - "syscall.DLT_JUNIPER_VS": "syscall", - "syscall.DLT_LAPB_WITH_DIR": "syscall", - "syscall.DLT_LAPD": "syscall", - "syscall.DLT_LIN": "syscall", - "syscall.DLT_LINUX_EVDEV": "syscall", - "syscall.DLT_LINUX_IRDA": "syscall", - "syscall.DLT_LINUX_LAPD": "syscall", - "syscall.DLT_LINUX_PPP_WITHDIRECTION": "syscall", - "syscall.DLT_LINUX_SLL": "syscall", - "syscall.DLT_LOOP": "syscall", - "syscall.DLT_LTALK": "syscall", - "syscall.DLT_MATCHING_MAX": "syscall", - "syscall.DLT_MATCHING_MIN": "syscall", - "syscall.DLT_MFR": "syscall", - "syscall.DLT_MOST": "syscall", - "syscall.DLT_MPEG_2_TS": "syscall", - "syscall.DLT_MPLS": "syscall", - "syscall.DLT_MTP2": "syscall", - "syscall.DLT_MTP2_WITH_PHDR": "syscall", - "syscall.DLT_MTP3": "syscall", - "syscall.DLT_MUX27010": "syscall", - "syscall.DLT_NETANALYZER": "syscall", - "syscall.DLT_NETANALYZER_TRANSPARENT": "syscall", - "syscall.DLT_NFC_LLCP": "syscall", - "syscall.DLT_NFLOG": "syscall", - "syscall.DLT_NG40": "syscall", - "syscall.DLT_NULL": "syscall", - "syscall.DLT_PCI_EXP": "syscall", - "syscall.DLT_PFLOG": "syscall", - "syscall.DLT_PFSYNC": "syscall", - "syscall.DLT_PPI": "syscall", - "syscall.DLT_PPP": "syscall", - "syscall.DLT_PPP_BSDOS": "syscall", - "syscall.DLT_PPP_ETHER": "syscall", - "syscall.DLT_PPP_PPPD": "syscall", - "syscall.DLT_PPP_SERIAL": "syscall", - "syscall.DLT_PPP_WITH_DIR": "syscall", - "syscall.DLT_PPP_WITH_DIRECTION": "syscall", - "syscall.DLT_PRISM_HEADER": "syscall", - "syscall.DLT_PRONET": "syscall", - "syscall.DLT_RAIF1": "syscall", - "syscall.DLT_RAW": "syscall", - "syscall.DLT_RAWAF_MASK": "syscall", - "syscall.DLT_RIO": "syscall", - "syscall.DLT_SCCP": "syscall", - "syscall.DLT_SITA": "syscall", - "syscall.DLT_SLIP": "syscall", - "syscall.DLT_SLIP_BSDOS": "syscall", - "syscall.DLT_STANAG_5066_D_PDU": "syscall", - "syscall.DLT_SUNATM": "syscall", - "syscall.DLT_SYMANTEC_FIREWALL": "syscall", - "syscall.DLT_TZSP": "syscall", - "syscall.DLT_USB": "syscall", - "syscall.DLT_USB_LINUX": "syscall", - "syscall.DLT_USB_LINUX_MMAPPED": "syscall", - "syscall.DLT_USER0": "syscall", - "syscall.DLT_USER1": "syscall", - "syscall.DLT_USER10": "syscall", - "syscall.DLT_USER11": "syscall", - "syscall.DLT_USER12": "syscall", - "syscall.DLT_USER13": "syscall", - "syscall.DLT_USER14": "syscall", - "syscall.DLT_USER15": "syscall", - "syscall.DLT_USER2": "syscall", - "syscall.DLT_USER3": "syscall", - "syscall.DLT_USER4": "syscall", - "syscall.DLT_USER5": "syscall", - "syscall.DLT_USER6": "syscall", - "syscall.DLT_USER7": "syscall", - "syscall.DLT_USER8": "syscall", - "syscall.DLT_USER9": "syscall", - "syscall.DLT_WIHART": "syscall", - "syscall.DLT_X2E_SERIAL": "syscall", - "syscall.DLT_X2E_XORAYA": "syscall", - "syscall.DNSMXData": "syscall", - "syscall.DNSPTRData": "syscall", - "syscall.DNSRecord": "syscall", - "syscall.DNSSRVData": "syscall", - "syscall.DNSTXTData": "syscall", - "syscall.DNS_INFO_NO_RECORDS": "syscall", - "syscall.DNS_TYPE_A": "syscall", - "syscall.DNS_TYPE_A6": "syscall", - "syscall.DNS_TYPE_AAAA": "syscall", - "syscall.DNS_TYPE_ADDRS": "syscall", - "syscall.DNS_TYPE_AFSDB": "syscall", - "syscall.DNS_TYPE_ALL": "syscall", - "syscall.DNS_TYPE_ANY": "syscall", - "syscall.DNS_TYPE_ATMA": "syscall", - "syscall.DNS_TYPE_AXFR": "syscall", - "syscall.DNS_TYPE_CERT": "syscall", - "syscall.DNS_TYPE_CNAME": "syscall", - "syscall.DNS_TYPE_DHCID": "syscall", - "syscall.DNS_TYPE_DNAME": "syscall", - "syscall.DNS_TYPE_DNSKEY": "syscall", - "syscall.DNS_TYPE_DS": "syscall", - "syscall.DNS_TYPE_EID": "syscall", - "syscall.DNS_TYPE_GID": "syscall", - "syscall.DNS_TYPE_GPOS": "syscall", - "syscall.DNS_TYPE_HINFO": "syscall", - "syscall.DNS_TYPE_ISDN": "syscall", - "syscall.DNS_TYPE_IXFR": "syscall", - "syscall.DNS_TYPE_KEY": "syscall", - "syscall.DNS_TYPE_KX": "syscall", - "syscall.DNS_TYPE_LOC": "syscall", - "syscall.DNS_TYPE_MAILA": "syscall", - "syscall.DNS_TYPE_MAILB": "syscall", - "syscall.DNS_TYPE_MB": "syscall", - "syscall.DNS_TYPE_MD": "syscall", - "syscall.DNS_TYPE_MF": "syscall", - "syscall.DNS_TYPE_MG": "syscall", - "syscall.DNS_TYPE_MINFO": "syscall", - "syscall.DNS_TYPE_MR": "syscall", - "syscall.DNS_TYPE_MX": "syscall", - "syscall.DNS_TYPE_NAPTR": "syscall", - "syscall.DNS_TYPE_NBSTAT": "syscall", - "syscall.DNS_TYPE_NIMLOC": "syscall", - "syscall.DNS_TYPE_NS": "syscall", - "syscall.DNS_TYPE_NSAP": "syscall", - "syscall.DNS_TYPE_NSAPPTR": "syscall", - "syscall.DNS_TYPE_NSEC": "syscall", - "syscall.DNS_TYPE_NULL": "syscall", - "syscall.DNS_TYPE_NXT": "syscall", - "syscall.DNS_TYPE_OPT": "syscall", - "syscall.DNS_TYPE_PTR": "syscall", - "syscall.DNS_TYPE_PX": "syscall", - "syscall.DNS_TYPE_RP": "syscall", - "syscall.DNS_TYPE_RRSIG": "syscall", - "syscall.DNS_TYPE_RT": "syscall", - "syscall.DNS_TYPE_SIG": "syscall", - "syscall.DNS_TYPE_SINK": "syscall", - "syscall.DNS_TYPE_SOA": "syscall", - "syscall.DNS_TYPE_SRV": "syscall", - "syscall.DNS_TYPE_TEXT": "syscall", - "syscall.DNS_TYPE_TKEY": "syscall", - "syscall.DNS_TYPE_TSIG": "syscall", - "syscall.DNS_TYPE_UID": "syscall", - "syscall.DNS_TYPE_UINFO": "syscall", - "syscall.DNS_TYPE_UNSPEC": "syscall", - "syscall.DNS_TYPE_WINS": "syscall", - "syscall.DNS_TYPE_WINSR": "syscall", - "syscall.DNS_TYPE_WKS": "syscall", - "syscall.DNS_TYPE_X25": "syscall", - "syscall.DT_BLK": "syscall", - "syscall.DT_CHR": "syscall", - "syscall.DT_DIR": "syscall", - "syscall.DT_FIFO": "syscall", - "syscall.DT_LNK": "syscall", - "syscall.DT_REG": "syscall", - "syscall.DT_SOCK": "syscall", - "syscall.DT_UNKNOWN": "syscall", - "syscall.DT_WHT": "syscall", - "syscall.DUPLICATE_CLOSE_SOURCE": "syscall", - "syscall.DUPLICATE_SAME_ACCESS": "syscall", - "syscall.DeleteFile": "syscall", - "syscall.DetachLsf": "syscall", - "syscall.DeviceIoControl": "syscall", - "syscall.Dirent": "syscall", - "syscall.DnsNameCompare": "syscall", - "syscall.DnsQuery": "syscall", - "syscall.DnsRecordListFree": "syscall", - "syscall.DnsSectionAdditional": "syscall", - "syscall.DnsSectionAnswer": "syscall", - "syscall.DnsSectionAuthority": "syscall", - "syscall.DnsSectionQuestion": "syscall", - "syscall.Dup": "syscall", - "syscall.Dup2": "syscall", - "syscall.Dup3": "syscall", - "syscall.DuplicateHandle": "syscall", - "syscall.E2BIG": "syscall", - "syscall.EACCES": "syscall", - "syscall.EADDRINUSE": "syscall", - "syscall.EADDRNOTAVAIL": "syscall", - "syscall.EADV": "syscall", - "syscall.EAFNOSUPPORT": "syscall", - "syscall.EAGAIN": "syscall", - "syscall.EALREADY": "syscall", - "syscall.EAUTH": "syscall", - "syscall.EBADARCH": "syscall", - "syscall.EBADE": "syscall", - "syscall.EBADEXEC": "syscall", - "syscall.EBADF": "syscall", - "syscall.EBADFD": "syscall", - "syscall.EBADMACHO": "syscall", - "syscall.EBADMSG": "syscall", - "syscall.EBADR": "syscall", - "syscall.EBADRPC": "syscall", - "syscall.EBADRQC": "syscall", - "syscall.EBADSLT": "syscall", - "syscall.EBFONT": "syscall", - "syscall.EBUSY": "syscall", - "syscall.ECANCELED": "syscall", - "syscall.ECAPMODE": "syscall", - "syscall.ECHILD": "syscall", - "syscall.ECHO": "syscall", - "syscall.ECHOCTL": "syscall", - "syscall.ECHOE": "syscall", - "syscall.ECHOK": "syscall", - "syscall.ECHOKE": "syscall", - "syscall.ECHONL": "syscall", - "syscall.ECHOPRT": "syscall", - "syscall.ECHRNG": "syscall", - "syscall.ECOMM": "syscall", - "syscall.ECONNABORTED": "syscall", - "syscall.ECONNREFUSED": "syscall", - "syscall.ECONNRESET": "syscall", - "syscall.EDEADLK": "syscall", - "syscall.EDEADLOCK": "syscall", - "syscall.EDESTADDRREQ": "syscall", - "syscall.EDEVERR": "syscall", - "syscall.EDOM": "syscall", - "syscall.EDOOFUS": "syscall", - "syscall.EDOTDOT": "syscall", - "syscall.EDQUOT": "syscall", - "syscall.EEXIST": "syscall", - "syscall.EFAULT": "syscall", - "syscall.EFBIG": "syscall", - "syscall.EFER_LMA": "syscall", - "syscall.EFER_LME": "syscall", - "syscall.EFER_NXE": "syscall", - "syscall.EFER_SCE": "syscall", - "syscall.EFTYPE": "syscall", - "syscall.EHOSTDOWN": "syscall", - "syscall.EHOSTUNREACH": "syscall", - "syscall.EHWPOISON": "syscall", - "syscall.EIDRM": "syscall", - "syscall.EILSEQ": "syscall", - "syscall.EINPROGRESS": "syscall", - "syscall.EINTR": "syscall", - "syscall.EINVAL": "syscall", - "syscall.EIO": "syscall", - "syscall.EIPSEC": "syscall", - "syscall.EISCONN": "syscall", - "syscall.EISDIR": "syscall", - "syscall.EISNAM": "syscall", - "syscall.EKEYEXPIRED": "syscall", - "syscall.EKEYREJECTED": "syscall", - "syscall.EKEYREVOKED": "syscall", - "syscall.EL2HLT": "syscall", - "syscall.EL2NSYNC": "syscall", - "syscall.EL3HLT": "syscall", - "syscall.EL3RST": "syscall", - "syscall.ELAST": "syscall", - "syscall.ELF_NGREG": "syscall", - "syscall.ELF_PRARGSZ": "syscall", - "syscall.ELIBACC": "syscall", - "syscall.ELIBBAD": "syscall", - "syscall.ELIBEXEC": "syscall", - "syscall.ELIBMAX": "syscall", - "syscall.ELIBSCN": "syscall", - "syscall.ELNRNG": "syscall", - "syscall.ELOOP": "syscall", - "syscall.EMEDIUMTYPE": "syscall", - "syscall.EMFILE": "syscall", - "syscall.EMLINK": "syscall", - "syscall.EMSGSIZE": "syscall", - "syscall.EMT_TAGOVF": "syscall", - "syscall.EMULTIHOP": "syscall", - "syscall.EMUL_ENABLED": "syscall", - "syscall.EMUL_LINUX": "syscall", - "syscall.EMUL_LINUX32": "syscall", - "syscall.EMUL_MAXID": "syscall", - "syscall.EMUL_NATIVE": "syscall", - "syscall.ENAMETOOLONG": "syscall", - "syscall.ENAVAIL": "syscall", - "syscall.ENDRUNDISC": "syscall", - "syscall.ENEEDAUTH": "syscall", - "syscall.ENETDOWN": "syscall", - "syscall.ENETRESET": "syscall", - "syscall.ENETUNREACH": "syscall", - "syscall.ENFILE": "syscall", - "syscall.ENOANO": "syscall", - "syscall.ENOATTR": "syscall", - "syscall.ENOBUFS": "syscall", - "syscall.ENOCSI": "syscall", - "syscall.ENODATA": "syscall", - "syscall.ENODEV": "syscall", - "syscall.ENOENT": "syscall", - "syscall.ENOEXEC": "syscall", - "syscall.ENOKEY": "syscall", - "syscall.ENOLCK": "syscall", - "syscall.ENOLINK": "syscall", - "syscall.ENOMEDIUM": "syscall", - "syscall.ENOMEM": "syscall", - "syscall.ENOMSG": "syscall", - "syscall.ENONET": "syscall", - "syscall.ENOPKG": "syscall", - "syscall.ENOPOLICY": "syscall", - "syscall.ENOPROTOOPT": "syscall", - "syscall.ENOSPC": "syscall", - "syscall.ENOSR": "syscall", - "syscall.ENOSTR": "syscall", - "syscall.ENOSYS": "syscall", - "syscall.ENOTBLK": "syscall", - "syscall.ENOTCAPABLE": "syscall", - "syscall.ENOTCONN": "syscall", - "syscall.ENOTDIR": "syscall", - "syscall.ENOTEMPTY": "syscall", - "syscall.ENOTNAM": "syscall", - "syscall.ENOTRECOVERABLE": "syscall", - "syscall.ENOTSOCK": "syscall", - "syscall.ENOTSUP": "syscall", - "syscall.ENOTTY": "syscall", - "syscall.ENOTUNIQ": "syscall", - "syscall.ENXIO": "syscall", - "syscall.EN_SW_CTL_INF": "syscall", - "syscall.EN_SW_CTL_PREC": "syscall", - "syscall.EN_SW_CTL_ROUND": "syscall", - "syscall.EN_SW_DATACHAIN": "syscall", - "syscall.EN_SW_DENORM": "syscall", - "syscall.EN_SW_INVOP": "syscall", - "syscall.EN_SW_OVERFLOW": "syscall", - "syscall.EN_SW_PRECLOSS": "syscall", - "syscall.EN_SW_UNDERFLOW": "syscall", - "syscall.EN_SW_ZERODIV": "syscall", - "syscall.EOPNOTSUPP": "syscall", - "syscall.EOVERFLOW": "syscall", - "syscall.EOWNERDEAD": "syscall", - "syscall.EPERM": "syscall", - "syscall.EPFNOSUPPORT": "syscall", - "syscall.EPIPE": "syscall", - "syscall.EPOLLERR": "syscall", - "syscall.EPOLLET": "syscall", - "syscall.EPOLLHUP": "syscall", - "syscall.EPOLLIN": "syscall", - "syscall.EPOLLMSG": "syscall", - "syscall.EPOLLONESHOT": "syscall", - "syscall.EPOLLOUT": "syscall", - "syscall.EPOLLPRI": "syscall", - "syscall.EPOLLRDBAND": "syscall", - "syscall.EPOLLRDHUP": "syscall", - "syscall.EPOLLRDNORM": "syscall", - "syscall.EPOLLWRBAND": "syscall", - "syscall.EPOLLWRNORM": "syscall", - "syscall.EPOLL_CLOEXEC": "syscall", - "syscall.EPOLL_CTL_ADD": "syscall", - "syscall.EPOLL_CTL_DEL": "syscall", - "syscall.EPOLL_CTL_MOD": "syscall", - "syscall.EPOLL_NONBLOCK": "syscall", - "syscall.EPROCLIM": "syscall", - "syscall.EPROCUNAVAIL": "syscall", - "syscall.EPROGMISMATCH": "syscall", - "syscall.EPROGUNAVAIL": "syscall", - "syscall.EPROTO": "syscall", - "syscall.EPROTONOSUPPORT": "syscall", - "syscall.EPROTOTYPE": "syscall", - "syscall.EPWROFF": "syscall", - "syscall.ERANGE": "syscall", - "syscall.EREMCHG": "syscall", - "syscall.EREMOTE": "syscall", - "syscall.EREMOTEIO": "syscall", - "syscall.ERESTART": "syscall", - "syscall.ERFKILL": "syscall", - "syscall.EROFS": "syscall", - "syscall.ERPCMISMATCH": "syscall", - "syscall.ERROR_ACCESS_DENIED": "syscall", - "syscall.ERROR_ALREADY_EXISTS": "syscall", - "syscall.ERROR_BROKEN_PIPE": "syscall", - "syscall.ERROR_BUFFER_OVERFLOW": "syscall", - "syscall.ERROR_DIR_NOT_EMPTY": "syscall", - "syscall.ERROR_ENVVAR_NOT_FOUND": "syscall", - "syscall.ERROR_FILE_EXISTS": "syscall", - "syscall.ERROR_FILE_NOT_FOUND": "syscall", - "syscall.ERROR_HANDLE_EOF": "syscall", - "syscall.ERROR_INSUFFICIENT_BUFFER": "syscall", - "syscall.ERROR_IO_PENDING": "syscall", - "syscall.ERROR_MOD_NOT_FOUND": "syscall", - "syscall.ERROR_MORE_DATA": "syscall", - "syscall.ERROR_NETNAME_DELETED": "syscall", - "syscall.ERROR_NOT_FOUND": "syscall", - "syscall.ERROR_NO_MORE_FILES": "syscall", - "syscall.ERROR_OPERATION_ABORTED": "syscall", - "syscall.ERROR_PATH_NOT_FOUND": "syscall", - "syscall.ERROR_PRIVILEGE_NOT_HELD": "syscall", - "syscall.ERROR_PROC_NOT_FOUND": "syscall", - "syscall.ESHLIBVERS": "syscall", - "syscall.ESHUTDOWN": "syscall", - "syscall.ESOCKTNOSUPPORT": "syscall", - "syscall.ESPIPE": "syscall", - "syscall.ESRCH": "syscall", - "syscall.ESRMNT": "syscall", - "syscall.ESTALE": "syscall", - "syscall.ESTRPIPE": "syscall", - "syscall.ETHERCAP_JUMBO_MTU": "syscall", - "syscall.ETHERCAP_VLAN_HWTAGGING": "syscall", - "syscall.ETHERCAP_VLAN_MTU": "syscall", - "syscall.ETHERMIN": "syscall", - "syscall.ETHERMTU": "syscall", - "syscall.ETHERMTU_JUMBO": "syscall", - "syscall.ETHERTYPE_8023": "syscall", - "syscall.ETHERTYPE_AARP": "syscall", - "syscall.ETHERTYPE_ACCTON": "syscall", - "syscall.ETHERTYPE_AEONIC": "syscall", - "syscall.ETHERTYPE_ALPHA": "syscall", - "syscall.ETHERTYPE_AMBER": "syscall", - "syscall.ETHERTYPE_AMOEBA": "syscall", - "syscall.ETHERTYPE_AOE": "syscall", - "syscall.ETHERTYPE_APOLLO": "syscall", - "syscall.ETHERTYPE_APOLLODOMAIN": "syscall", - "syscall.ETHERTYPE_APPLETALK": "syscall", - "syscall.ETHERTYPE_APPLITEK": "syscall", - "syscall.ETHERTYPE_ARGONAUT": "syscall", - "syscall.ETHERTYPE_ARP": "syscall", - "syscall.ETHERTYPE_AT": "syscall", - "syscall.ETHERTYPE_ATALK": "syscall", - "syscall.ETHERTYPE_ATOMIC": "syscall", - "syscall.ETHERTYPE_ATT": "syscall", - "syscall.ETHERTYPE_ATTSTANFORD": "syscall", - "syscall.ETHERTYPE_AUTOPHON": "syscall", - "syscall.ETHERTYPE_AXIS": "syscall", - "syscall.ETHERTYPE_BCLOOP": "syscall", - "syscall.ETHERTYPE_BOFL": "syscall", - "syscall.ETHERTYPE_CABLETRON": "syscall", - "syscall.ETHERTYPE_CHAOS": "syscall", - "syscall.ETHERTYPE_COMDESIGN": "syscall", - "syscall.ETHERTYPE_COMPUGRAPHIC": "syscall", - "syscall.ETHERTYPE_COUNTERPOINT": "syscall", - "syscall.ETHERTYPE_CRONUS": "syscall", - "syscall.ETHERTYPE_CRONUSVLN": "syscall", - "syscall.ETHERTYPE_DCA": "syscall", - "syscall.ETHERTYPE_DDE": "syscall", - "syscall.ETHERTYPE_DEBNI": "syscall", - "syscall.ETHERTYPE_DECAM": "syscall", - "syscall.ETHERTYPE_DECCUST": "syscall", - "syscall.ETHERTYPE_DECDIAG": "syscall", - "syscall.ETHERTYPE_DECDNS": "syscall", - "syscall.ETHERTYPE_DECDTS": "syscall", - "syscall.ETHERTYPE_DECEXPER": "syscall", - "syscall.ETHERTYPE_DECLAST": "syscall", - "syscall.ETHERTYPE_DECLTM": "syscall", - "syscall.ETHERTYPE_DECMUMPS": "syscall", - "syscall.ETHERTYPE_DECNETBIOS": "syscall", - "syscall.ETHERTYPE_DELTACON": "syscall", - "syscall.ETHERTYPE_DIDDLE": "syscall", - "syscall.ETHERTYPE_DLOG1": "syscall", - "syscall.ETHERTYPE_DLOG2": "syscall", - "syscall.ETHERTYPE_DN": "syscall", - "syscall.ETHERTYPE_DOGFIGHT": "syscall", - "syscall.ETHERTYPE_DSMD": "syscall", - "syscall.ETHERTYPE_ECMA": "syscall", - "syscall.ETHERTYPE_ENCRYPT": "syscall", - "syscall.ETHERTYPE_ES": "syscall", - "syscall.ETHERTYPE_EXCELAN": "syscall", - "syscall.ETHERTYPE_EXPERDATA": "syscall", - "syscall.ETHERTYPE_FLIP": "syscall", - "syscall.ETHERTYPE_FLOWCONTROL": "syscall", - "syscall.ETHERTYPE_FRARP": "syscall", - "syscall.ETHERTYPE_GENDYN": "syscall", - "syscall.ETHERTYPE_HAYES": "syscall", - "syscall.ETHERTYPE_HIPPI_FP": "syscall", - "syscall.ETHERTYPE_HITACHI": "syscall", - "syscall.ETHERTYPE_HP": "syscall", - "syscall.ETHERTYPE_IEEEPUP": "syscall", - "syscall.ETHERTYPE_IEEEPUPAT": "syscall", - "syscall.ETHERTYPE_IMLBL": "syscall", - "syscall.ETHERTYPE_IMLBLDIAG": "syscall", - "syscall.ETHERTYPE_IP": "syscall", - "syscall.ETHERTYPE_IPAS": "syscall", - "syscall.ETHERTYPE_IPV6": "syscall", - "syscall.ETHERTYPE_IPX": "syscall", - "syscall.ETHERTYPE_IPXNEW": "syscall", - "syscall.ETHERTYPE_KALPANA": "syscall", - "syscall.ETHERTYPE_LANBRIDGE": "syscall", - "syscall.ETHERTYPE_LANPROBE": "syscall", - "syscall.ETHERTYPE_LAT": "syscall", - "syscall.ETHERTYPE_LBACK": "syscall", - "syscall.ETHERTYPE_LITTLE": "syscall", - "syscall.ETHERTYPE_LLDP": "syscall", - "syscall.ETHERTYPE_LOGICRAFT": "syscall", - "syscall.ETHERTYPE_LOOPBACK": "syscall", - "syscall.ETHERTYPE_MATRA": "syscall", - "syscall.ETHERTYPE_MAX": "syscall", - "syscall.ETHERTYPE_MERIT": "syscall", - "syscall.ETHERTYPE_MICP": "syscall", - "syscall.ETHERTYPE_MOPDL": "syscall", - "syscall.ETHERTYPE_MOPRC": "syscall", - "syscall.ETHERTYPE_MOTOROLA": "syscall", - "syscall.ETHERTYPE_MPLS": "syscall", - "syscall.ETHERTYPE_MPLS_MCAST": "syscall", - "syscall.ETHERTYPE_MUMPS": "syscall", - "syscall.ETHERTYPE_NBPCC": "syscall", - "syscall.ETHERTYPE_NBPCLAIM": "syscall", - "syscall.ETHERTYPE_NBPCLREQ": "syscall", - "syscall.ETHERTYPE_NBPCLRSP": "syscall", - "syscall.ETHERTYPE_NBPCREQ": "syscall", - "syscall.ETHERTYPE_NBPCRSP": "syscall", - "syscall.ETHERTYPE_NBPDG": "syscall", - "syscall.ETHERTYPE_NBPDGB": "syscall", - "syscall.ETHERTYPE_NBPDLTE": "syscall", - "syscall.ETHERTYPE_NBPRAR": "syscall", - "syscall.ETHERTYPE_NBPRAS": "syscall", - "syscall.ETHERTYPE_NBPRST": "syscall", - "syscall.ETHERTYPE_NBPSCD": "syscall", - "syscall.ETHERTYPE_NBPVCD": "syscall", - "syscall.ETHERTYPE_NBS": "syscall", - "syscall.ETHERTYPE_NCD": "syscall", - "syscall.ETHERTYPE_NESTAR": "syscall", - "syscall.ETHERTYPE_NETBEUI": "syscall", - "syscall.ETHERTYPE_NOVELL": "syscall", - "syscall.ETHERTYPE_NS": "syscall", - "syscall.ETHERTYPE_NSAT": "syscall", - "syscall.ETHERTYPE_NSCOMPAT": "syscall", - "syscall.ETHERTYPE_NTRAILER": "syscall", - "syscall.ETHERTYPE_OS9": "syscall", - "syscall.ETHERTYPE_OS9NET": "syscall", - "syscall.ETHERTYPE_PACER": "syscall", - "syscall.ETHERTYPE_PAE": "syscall", - "syscall.ETHERTYPE_PCS": "syscall", - "syscall.ETHERTYPE_PLANNING": "syscall", - "syscall.ETHERTYPE_PPP": "syscall", - "syscall.ETHERTYPE_PPPOE": "syscall", - "syscall.ETHERTYPE_PPPOEDISC": "syscall", - "syscall.ETHERTYPE_PRIMENTS": "syscall", - "syscall.ETHERTYPE_PUP": "syscall", - "syscall.ETHERTYPE_PUPAT": "syscall", - "syscall.ETHERTYPE_QINQ": "syscall", - "syscall.ETHERTYPE_RACAL": "syscall", - "syscall.ETHERTYPE_RATIONAL": "syscall", - "syscall.ETHERTYPE_RAWFR": "syscall", - "syscall.ETHERTYPE_RCL": "syscall", - "syscall.ETHERTYPE_RDP": "syscall", - "syscall.ETHERTYPE_RETIX": "syscall", - "syscall.ETHERTYPE_REVARP": "syscall", - "syscall.ETHERTYPE_SCA": "syscall", - "syscall.ETHERTYPE_SECTRA": "syscall", - "syscall.ETHERTYPE_SECUREDATA": "syscall", - "syscall.ETHERTYPE_SGITW": "syscall", - "syscall.ETHERTYPE_SG_BOUNCE": "syscall", - "syscall.ETHERTYPE_SG_DIAG": "syscall", - "syscall.ETHERTYPE_SG_NETGAMES": "syscall", - "syscall.ETHERTYPE_SG_RESV": "syscall", - "syscall.ETHERTYPE_SIMNET": "syscall", - "syscall.ETHERTYPE_SLOW": "syscall", - "syscall.ETHERTYPE_SLOWPROTOCOLS": "syscall", - "syscall.ETHERTYPE_SNA": "syscall", - "syscall.ETHERTYPE_SNMP": "syscall", - "syscall.ETHERTYPE_SONIX": "syscall", - "syscall.ETHERTYPE_SPIDER": "syscall", - "syscall.ETHERTYPE_SPRITE": "syscall", - "syscall.ETHERTYPE_STP": "syscall", - "syscall.ETHERTYPE_TALARIS": "syscall", - "syscall.ETHERTYPE_TALARISMC": "syscall", - "syscall.ETHERTYPE_TCPCOMP": "syscall", - "syscall.ETHERTYPE_TCPSM": "syscall", - "syscall.ETHERTYPE_TEC": "syscall", - "syscall.ETHERTYPE_TIGAN": "syscall", - "syscall.ETHERTYPE_TRAIL": "syscall", - "syscall.ETHERTYPE_TRANSETHER": "syscall", - "syscall.ETHERTYPE_TYMSHARE": "syscall", - "syscall.ETHERTYPE_UBBST": "syscall", - "syscall.ETHERTYPE_UBDEBUG": "syscall", - "syscall.ETHERTYPE_UBDIAGLOOP": "syscall", - "syscall.ETHERTYPE_UBDL": "syscall", - "syscall.ETHERTYPE_UBNIU": "syscall", - "syscall.ETHERTYPE_UBNMC": "syscall", - "syscall.ETHERTYPE_VALID": "syscall", - "syscall.ETHERTYPE_VARIAN": "syscall", - "syscall.ETHERTYPE_VAXELN": "syscall", - "syscall.ETHERTYPE_VEECO": "syscall", - "syscall.ETHERTYPE_VEXP": "syscall", - "syscall.ETHERTYPE_VGLAB": "syscall", - "syscall.ETHERTYPE_VINES": "syscall", - "syscall.ETHERTYPE_VINESECHO": "syscall", - "syscall.ETHERTYPE_VINESLOOP": "syscall", - "syscall.ETHERTYPE_VITAL": "syscall", - "syscall.ETHERTYPE_VLAN": "syscall", - "syscall.ETHERTYPE_VLTLMAN": "syscall", - "syscall.ETHERTYPE_VPROD": "syscall", - "syscall.ETHERTYPE_VURESERVED": "syscall", - "syscall.ETHERTYPE_WATERLOO": "syscall", - "syscall.ETHERTYPE_WELLFLEET": "syscall", - "syscall.ETHERTYPE_X25": "syscall", - "syscall.ETHERTYPE_X75": "syscall", - "syscall.ETHERTYPE_XNSSM": "syscall", - "syscall.ETHERTYPE_XTP": "syscall", - "syscall.ETHER_ADDR_LEN": "syscall", - "syscall.ETHER_ALIGN": "syscall", - "syscall.ETHER_CRC_LEN": "syscall", - "syscall.ETHER_CRC_POLY_BE": "syscall", - "syscall.ETHER_CRC_POLY_LE": "syscall", - "syscall.ETHER_HDR_LEN": "syscall", - "syscall.ETHER_MAX_DIX_LEN": "syscall", - "syscall.ETHER_MAX_LEN": "syscall", - "syscall.ETHER_MAX_LEN_JUMBO": "syscall", - "syscall.ETHER_MIN_LEN": "syscall", - "syscall.ETHER_PPPOE_ENCAP_LEN": "syscall", - "syscall.ETHER_TYPE_LEN": "syscall", - "syscall.ETHER_VLAN_ENCAP_LEN": "syscall", - "syscall.ETH_P_1588": "syscall", - "syscall.ETH_P_8021Q": "syscall", - "syscall.ETH_P_802_2": "syscall", - "syscall.ETH_P_802_3": "syscall", - "syscall.ETH_P_AARP": "syscall", - "syscall.ETH_P_ALL": "syscall", - "syscall.ETH_P_AOE": "syscall", - "syscall.ETH_P_ARCNET": "syscall", - "syscall.ETH_P_ARP": "syscall", - "syscall.ETH_P_ATALK": "syscall", - "syscall.ETH_P_ATMFATE": "syscall", - "syscall.ETH_P_ATMMPOA": "syscall", - "syscall.ETH_P_AX25": "syscall", - "syscall.ETH_P_BPQ": "syscall", - "syscall.ETH_P_CAIF": "syscall", - "syscall.ETH_P_CAN": "syscall", - "syscall.ETH_P_CONTROL": "syscall", - "syscall.ETH_P_CUST": "syscall", - "syscall.ETH_P_DDCMP": "syscall", - "syscall.ETH_P_DEC": "syscall", - "syscall.ETH_P_DIAG": "syscall", - "syscall.ETH_P_DNA_DL": "syscall", - "syscall.ETH_P_DNA_RC": "syscall", - "syscall.ETH_P_DNA_RT": "syscall", - "syscall.ETH_P_DSA": "syscall", - "syscall.ETH_P_ECONET": "syscall", - "syscall.ETH_P_EDSA": "syscall", - "syscall.ETH_P_FCOE": "syscall", - "syscall.ETH_P_FIP": "syscall", - "syscall.ETH_P_HDLC": "syscall", - "syscall.ETH_P_IEEE802154": "syscall", - "syscall.ETH_P_IEEEPUP": "syscall", - "syscall.ETH_P_IEEEPUPAT": "syscall", - "syscall.ETH_P_IP": "syscall", - "syscall.ETH_P_IPV6": "syscall", - "syscall.ETH_P_IPX": "syscall", - "syscall.ETH_P_IRDA": "syscall", - "syscall.ETH_P_LAT": "syscall", - "syscall.ETH_P_LINK_CTL": "syscall", - "syscall.ETH_P_LOCALTALK": "syscall", - "syscall.ETH_P_LOOP": "syscall", - "syscall.ETH_P_MOBITEX": "syscall", - "syscall.ETH_P_MPLS_MC": "syscall", - "syscall.ETH_P_MPLS_UC": "syscall", - "syscall.ETH_P_PAE": "syscall", - "syscall.ETH_P_PAUSE": "syscall", - "syscall.ETH_P_PHONET": "syscall", - "syscall.ETH_P_PPPTALK": "syscall", - "syscall.ETH_P_PPP_DISC": "syscall", - "syscall.ETH_P_PPP_MP": "syscall", - "syscall.ETH_P_PPP_SES": "syscall", - "syscall.ETH_P_PUP": "syscall", - "syscall.ETH_P_PUPAT": "syscall", - "syscall.ETH_P_RARP": "syscall", - "syscall.ETH_P_SCA": "syscall", - "syscall.ETH_P_SLOW": "syscall", - "syscall.ETH_P_SNAP": "syscall", - "syscall.ETH_P_TEB": "syscall", - "syscall.ETH_P_TIPC": "syscall", - "syscall.ETH_P_TRAILER": "syscall", - "syscall.ETH_P_TR_802_2": "syscall", - "syscall.ETH_P_WAN_PPP": "syscall", - "syscall.ETH_P_WCCP": "syscall", - "syscall.ETH_P_X25": "syscall", - "syscall.ETIME": "syscall", - "syscall.ETIMEDOUT": "syscall", - "syscall.ETOOMANYREFS": "syscall", - "syscall.ETXTBSY": "syscall", - "syscall.EUCLEAN": "syscall", - "syscall.EUNATCH": "syscall", - "syscall.EUSERS": "syscall", - "syscall.EVFILT_AIO": "syscall", - "syscall.EVFILT_FS": "syscall", - "syscall.EVFILT_LIO": "syscall", - "syscall.EVFILT_MACHPORT": "syscall", - "syscall.EVFILT_PROC": "syscall", - "syscall.EVFILT_READ": "syscall", - "syscall.EVFILT_SIGNAL": "syscall", - "syscall.EVFILT_SYSCOUNT": "syscall", - "syscall.EVFILT_THREADMARKER": "syscall", - "syscall.EVFILT_TIMER": "syscall", - "syscall.EVFILT_USER": "syscall", - "syscall.EVFILT_VM": "syscall", - "syscall.EVFILT_VNODE": "syscall", - "syscall.EVFILT_WRITE": "syscall", - "syscall.EV_ADD": "syscall", - "syscall.EV_CLEAR": "syscall", - "syscall.EV_DELETE": "syscall", - "syscall.EV_DISABLE": "syscall", - "syscall.EV_DISPATCH": "syscall", - "syscall.EV_DROP": "syscall", - "syscall.EV_ENABLE": "syscall", - "syscall.EV_EOF": "syscall", - "syscall.EV_ERROR": "syscall", - "syscall.EV_FLAG0": "syscall", - "syscall.EV_FLAG1": "syscall", - "syscall.EV_ONESHOT": "syscall", - "syscall.EV_OOBAND": "syscall", - "syscall.EV_POLL": "syscall", - "syscall.EV_RECEIPT": "syscall", - "syscall.EV_SYSFLAGS": "syscall", - "syscall.EWINDOWS": "syscall", - "syscall.EWOULDBLOCK": "syscall", - "syscall.EXDEV": "syscall", - "syscall.EXFULL": "syscall", - "syscall.EXTA": "syscall", - "syscall.EXTB": "syscall", - "syscall.EXTPROC": "syscall", - "syscall.Environ": "syscall", - "syscall.EpollCreate": "syscall", - "syscall.EpollCreate1": "syscall", - "syscall.EpollCtl": "syscall", - "syscall.EpollEvent": "syscall", - "syscall.EpollWait": "syscall", - "syscall.Errno": "syscall", - "syscall.EscapeArg": "syscall", - "syscall.Exchangedata": "syscall", - "syscall.Exec": "syscall", - "syscall.Exit": "syscall", - "syscall.ExitProcess": "syscall", - "syscall.FD_CLOEXEC": "syscall", - "syscall.FD_SETSIZE": "syscall", - "syscall.FILE_ACTION_ADDED": "syscall", - "syscall.FILE_ACTION_MODIFIED": "syscall", - "syscall.FILE_ACTION_REMOVED": "syscall", - "syscall.FILE_ACTION_RENAMED_NEW_NAME": "syscall", - "syscall.FILE_ACTION_RENAMED_OLD_NAME": "syscall", - "syscall.FILE_APPEND_DATA": "syscall", - "syscall.FILE_ATTRIBUTE_ARCHIVE": "syscall", - "syscall.FILE_ATTRIBUTE_DIRECTORY": "syscall", - "syscall.FILE_ATTRIBUTE_HIDDEN": "syscall", - "syscall.FILE_ATTRIBUTE_NORMAL": "syscall", - "syscall.FILE_ATTRIBUTE_READONLY": "syscall", - "syscall.FILE_ATTRIBUTE_REPARSE_POINT": "syscall", - "syscall.FILE_ATTRIBUTE_SYSTEM": "syscall", - "syscall.FILE_BEGIN": "syscall", - "syscall.FILE_CURRENT": "syscall", - "syscall.FILE_END": "syscall", - "syscall.FILE_FLAG_BACKUP_SEMANTICS": "syscall", - "syscall.FILE_FLAG_OPEN_REPARSE_POINT": "syscall", - "syscall.FILE_FLAG_OVERLAPPED": "syscall", - "syscall.FILE_LIST_DIRECTORY": "syscall", - "syscall.FILE_MAP_COPY": "syscall", - "syscall.FILE_MAP_EXECUTE": "syscall", - "syscall.FILE_MAP_READ": "syscall", - "syscall.FILE_MAP_WRITE": "syscall", - "syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES": "syscall", - "syscall.FILE_NOTIFY_CHANGE_CREATION": "syscall", - "syscall.FILE_NOTIFY_CHANGE_DIR_NAME": "syscall", - "syscall.FILE_NOTIFY_CHANGE_FILE_NAME": "syscall", - "syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS": "syscall", - "syscall.FILE_NOTIFY_CHANGE_LAST_WRITE": "syscall", - "syscall.FILE_NOTIFY_CHANGE_SIZE": "syscall", - "syscall.FILE_SHARE_DELETE": "syscall", - "syscall.FILE_SHARE_READ": "syscall", - "syscall.FILE_SHARE_WRITE": "syscall", - "syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "syscall", - "syscall.FILE_SKIP_SET_EVENT_ON_HANDLE": "syscall", - "syscall.FILE_TYPE_CHAR": "syscall", - "syscall.FILE_TYPE_DISK": "syscall", - "syscall.FILE_TYPE_PIPE": "syscall", - "syscall.FILE_TYPE_REMOTE": "syscall", - "syscall.FILE_TYPE_UNKNOWN": "syscall", - "syscall.FILE_WRITE_ATTRIBUTES": "syscall", - "syscall.FLUSHO": "syscall", - "syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER": "syscall", - "syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY": "syscall", - "syscall.FORMAT_MESSAGE_FROM_HMODULE": "syscall", - "syscall.FORMAT_MESSAGE_FROM_STRING": "syscall", - "syscall.FORMAT_MESSAGE_FROM_SYSTEM": "syscall", - "syscall.FORMAT_MESSAGE_IGNORE_INSERTS": "syscall", - "syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK": "syscall", - "syscall.FSCTL_GET_REPARSE_POINT": "syscall", - "syscall.F_ADDFILESIGS": "syscall", - "syscall.F_ADDSIGS": "syscall", - "syscall.F_ALLOCATEALL": "syscall", - "syscall.F_ALLOCATECONTIG": "syscall", - "syscall.F_CANCEL": "syscall", - "syscall.F_CHKCLEAN": "syscall", - "syscall.F_CLOSEM": "syscall", - "syscall.F_DUP2FD": "syscall", - "syscall.F_DUP2FD_CLOEXEC": "syscall", - "syscall.F_DUPFD": "syscall", - "syscall.F_DUPFD_CLOEXEC": "syscall", - "syscall.F_EXLCK": "syscall", - "syscall.F_FLUSH_DATA": "syscall", - "syscall.F_FREEZE_FS": "syscall", - "syscall.F_FSCTL": "syscall", - "syscall.F_FSDIRMASK": "syscall", - "syscall.F_FSIN": "syscall", - "syscall.F_FSINOUT": "syscall", - "syscall.F_FSOUT": "syscall", - "syscall.F_FSPRIV": "syscall", - "syscall.F_FSVOID": "syscall", - "syscall.F_FULLFSYNC": "syscall", - "syscall.F_GETFD": "syscall", - "syscall.F_GETFL": "syscall", - "syscall.F_GETLEASE": "syscall", - "syscall.F_GETLK": "syscall", - "syscall.F_GETLK64": "syscall", - "syscall.F_GETLKPID": "syscall", - "syscall.F_GETNOSIGPIPE": "syscall", - "syscall.F_GETOWN": "syscall", - "syscall.F_GETOWN_EX": "syscall", - "syscall.F_GETPATH": "syscall", - "syscall.F_GETPATH_MTMINFO": "syscall", - "syscall.F_GETPIPE_SZ": "syscall", - "syscall.F_GETPROTECTIONCLASS": "syscall", - "syscall.F_GETSIG": "syscall", - "syscall.F_GLOBAL_NOCACHE": "syscall", - "syscall.F_LOCK": "syscall", - "syscall.F_LOG2PHYS": "syscall", - "syscall.F_LOG2PHYS_EXT": "syscall", - "syscall.F_MARKDEPENDENCY": "syscall", - "syscall.F_MAXFD": "syscall", - "syscall.F_NOCACHE": "syscall", - "syscall.F_NODIRECT": "syscall", - "syscall.F_NOTIFY": "syscall", - "syscall.F_OGETLK": "syscall", - "syscall.F_OK": "syscall", - "syscall.F_OSETLK": "syscall", - "syscall.F_OSETLKW": "syscall", - "syscall.F_PARAM_MASK": "syscall", - "syscall.F_PARAM_MAX": "syscall", - "syscall.F_PATHPKG_CHECK": "syscall", - "syscall.F_PEOFPOSMODE": "syscall", - "syscall.F_PREALLOCATE": "syscall", - "syscall.F_RDADVISE": "syscall", - "syscall.F_RDAHEAD": "syscall", - "syscall.F_RDLCK": "syscall", - "syscall.F_READAHEAD": "syscall", - "syscall.F_READBOOTSTRAP": "syscall", - "syscall.F_SETBACKINGSTORE": "syscall", - "syscall.F_SETFD": "syscall", - "syscall.F_SETFL": "syscall", - "syscall.F_SETLEASE": "syscall", - "syscall.F_SETLK": "syscall", - "syscall.F_SETLK64": "syscall", - "syscall.F_SETLKW": "syscall", - "syscall.F_SETLKW64": "syscall", - "syscall.F_SETLK_REMOTE": "syscall", - "syscall.F_SETNOSIGPIPE": "syscall", - "syscall.F_SETOWN": "syscall", - "syscall.F_SETOWN_EX": "syscall", - "syscall.F_SETPIPE_SZ": "syscall", - "syscall.F_SETPROTECTIONCLASS": "syscall", - "syscall.F_SETSIG": "syscall", - "syscall.F_SETSIZE": "syscall", - "syscall.F_SHLCK": "syscall", - "syscall.F_TEST": "syscall", - "syscall.F_THAW_FS": "syscall", - "syscall.F_TLOCK": "syscall", - "syscall.F_ULOCK": "syscall", - "syscall.F_UNLCK": "syscall", - "syscall.F_UNLCKSYS": "syscall", - "syscall.F_VOLPOSMODE": "syscall", - "syscall.F_WRITEBOOTSTRAP": "syscall", - "syscall.F_WRLCK": "syscall", - "syscall.Faccessat": "syscall", - "syscall.Fallocate": "syscall", - "syscall.Fbootstraptransfer_t": "syscall", - "syscall.Fchdir": "syscall", - "syscall.Fchflags": "syscall", - "syscall.Fchmod": "syscall", - "syscall.Fchmodat": "syscall", - "syscall.Fchown": "syscall", - "syscall.Fchownat": "syscall", - "syscall.FcntlFlock": "syscall", - "syscall.FdSet": "syscall", - "syscall.Fdatasync": "syscall", - "syscall.FileNotifyInformation": "syscall", - "syscall.Filetime": "syscall", - "syscall.FindClose": "syscall", - "syscall.FindFirstFile": "syscall", - "syscall.FindNextFile": "syscall", - "syscall.Flock": "syscall", - "syscall.Flock_t": "syscall", - "syscall.FlushBpf": "syscall", - "syscall.FlushFileBuffers": "syscall", - "syscall.FlushViewOfFile": "syscall", - "syscall.ForkExec": "syscall", - "syscall.ForkLock": "syscall", - "syscall.FormatMessage": "syscall", - "syscall.Fpathconf": "syscall", - "syscall.FreeAddrInfoW": "syscall", - "syscall.FreeEnvironmentStrings": "syscall", - "syscall.FreeLibrary": "syscall", - "syscall.Fsid": "syscall", - "syscall.Fstat": "syscall", - "syscall.Fstatfs": "syscall", - "syscall.Fstore_t": "syscall", - "syscall.Fsync": "syscall", - "syscall.Ftruncate": "syscall", - "syscall.FullPath": "syscall", - "syscall.Futimes": "syscall", - "syscall.Futimesat": "syscall", - "syscall.GENERIC_ALL": "syscall", - "syscall.GENERIC_EXECUTE": "syscall", - "syscall.GENERIC_READ": "syscall", - "syscall.GENERIC_WRITE": "syscall", - "syscall.GUID": "syscall", - "syscall.GetAcceptExSockaddrs": "syscall", - "syscall.GetAdaptersInfo": "syscall", - "syscall.GetAddrInfoW": "syscall", - "syscall.GetCommandLine": "syscall", - "syscall.GetComputerName": "syscall", - "syscall.GetConsoleMode": "syscall", - "syscall.GetCurrentDirectory": "syscall", - "syscall.GetCurrentProcess": "syscall", - "syscall.GetEnvironmentStrings": "syscall", - "syscall.GetEnvironmentVariable": "syscall", - "syscall.GetExitCodeProcess": "syscall", - "syscall.GetFileAttributes": "syscall", - "syscall.GetFileAttributesEx": "syscall", - "syscall.GetFileExInfoStandard": "syscall", - "syscall.GetFileExMaxInfoLevel": "syscall", - "syscall.GetFileInformationByHandle": "syscall", - "syscall.GetFileType": "syscall", - "syscall.GetFullPathName": "syscall", - "syscall.GetHostByName": "syscall", - "syscall.GetIfEntry": "syscall", - "syscall.GetLastError": "syscall", - "syscall.GetLengthSid": "syscall", - "syscall.GetLongPathName": "syscall", - "syscall.GetProcAddress": "syscall", - "syscall.GetProcessTimes": "syscall", - "syscall.GetProtoByName": "syscall", - "syscall.GetQueuedCompletionStatus": "syscall", - "syscall.GetServByName": "syscall", - "syscall.GetShortPathName": "syscall", - "syscall.GetStartupInfo": "syscall", - "syscall.GetStdHandle": "syscall", - "syscall.GetSystemTimeAsFileTime": "syscall", - "syscall.GetTempPath": "syscall", - "syscall.GetTimeZoneInformation": "syscall", - "syscall.GetTokenInformation": "syscall", - "syscall.GetUserNameEx": "syscall", - "syscall.GetUserProfileDirectory": "syscall", - "syscall.GetVersion": "syscall", - "syscall.Getcwd": "syscall", - "syscall.Getdents": "syscall", - "syscall.Getdirentries": "syscall", - "syscall.Getdtablesize": "syscall", - "syscall.Getegid": "syscall", - "syscall.Getenv": "syscall", - "syscall.Geteuid": "syscall", - "syscall.Getfsstat": "syscall", - "syscall.Getgid": "syscall", - "syscall.Getgroups": "syscall", - "syscall.Getpagesize": "syscall", - "syscall.Getpeername": "syscall", - "syscall.Getpgid": "syscall", - "syscall.Getpgrp": "syscall", - "syscall.Getpid": "syscall", - "syscall.Getppid": "syscall", - "syscall.Getpriority": "syscall", - "syscall.Getrlimit": "syscall", - "syscall.Getrusage": "syscall", - "syscall.Getsid": "syscall", - "syscall.Getsockname": "syscall", - "syscall.Getsockopt": "syscall", - "syscall.GetsockoptByte": "syscall", - "syscall.GetsockoptICMPv6Filter": "syscall", - "syscall.GetsockoptIPMreq": "syscall", - "syscall.GetsockoptIPMreqn": "syscall", - "syscall.GetsockoptIPv6MTUInfo": "syscall", - "syscall.GetsockoptIPv6Mreq": "syscall", - "syscall.GetsockoptInet4Addr": "syscall", - "syscall.GetsockoptInt": "syscall", - "syscall.GetsockoptUcred": "syscall", - "syscall.Gettid": "syscall", - "syscall.Gettimeofday": "syscall", - "syscall.Getuid": "syscall", - "syscall.Getwd": "syscall", - "syscall.Getxattr": "syscall", - "syscall.HANDLE_FLAG_INHERIT": "syscall", - "syscall.HKEY_CLASSES_ROOT": "syscall", - "syscall.HKEY_CURRENT_CONFIG": "syscall", - "syscall.HKEY_CURRENT_USER": "syscall", - "syscall.HKEY_DYN_DATA": "syscall", - "syscall.HKEY_LOCAL_MACHINE": "syscall", - "syscall.HKEY_PERFORMANCE_DATA": "syscall", - "syscall.HKEY_USERS": "syscall", - "syscall.HUPCL": "syscall", - "syscall.Handle": "syscall", - "syscall.Hostent": "syscall", - "syscall.ICANON": "syscall", - "syscall.ICMP6_FILTER": "syscall", - "syscall.ICMPV6_FILTER": "syscall", - "syscall.ICMPv6Filter": "syscall", - "syscall.ICRNL": "syscall", - "syscall.IEXTEN": "syscall", - "syscall.IFAN_ARRIVAL": "syscall", - "syscall.IFAN_DEPARTURE": "syscall", - "syscall.IFA_ADDRESS": "syscall", - "syscall.IFA_ANYCAST": "syscall", - "syscall.IFA_BROADCAST": "syscall", - "syscall.IFA_CACHEINFO": "syscall", - "syscall.IFA_F_DADFAILED": "syscall", - "syscall.IFA_F_DEPRECATED": "syscall", - "syscall.IFA_F_HOMEADDRESS": "syscall", - "syscall.IFA_F_NODAD": "syscall", - "syscall.IFA_F_OPTIMISTIC": "syscall", - "syscall.IFA_F_PERMANENT": "syscall", - "syscall.IFA_F_SECONDARY": "syscall", - "syscall.IFA_F_TEMPORARY": "syscall", - "syscall.IFA_F_TENTATIVE": "syscall", - "syscall.IFA_LABEL": "syscall", - "syscall.IFA_LOCAL": "syscall", - "syscall.IFA_MAX": "syscall", - "syscall.IFA_MULTICAST": "syscall", - "syscall.IFA_ROUTE": "syscall", - "syscall.IFA_UNSPEC": "syscall", - "syscall.IFF_ALLMULTI": "syscall", - "syscall.IFF_ALTPHYS": "syscall", - "syscall.IFF_AUTOMEDIA": "syscall", - "syscall.IFF_BROADCAST": "syscall", - "syscall.IFF_CANTCHANGE": "syscall", - "syscall.IFF_CANTCONFIG": "syscall", - "syscall.IFF_DEBUG": "syscall", - "syscall.IFF_DRV_OACTIVE": "syscall", - "syscall.IFF_DRV_RUNNING": "syscall", - "syscall.IFF_DYING": "syscall", - "syscall.IFF_DYNAMIC": "syscall", - "syscall.IFF_LINK0": "syscall", - "syscall.IFF_LINK1": "syscall", - "syscall.IFF_LINK2": "syscall", - "syscall.IFF_LOOPBACK": "syscall", - "syscall.IFF_MASTER": "syscall", - "syscall.IFF_MONITOR": "syscall", - "syscall.IFF_MULTICAST": "syscall", - "syscall.IFF_NOARP": "syscall", - "syscall.IFF_NOTRAILERS": "syscall", - "syscall.IFF_NO_PI": "syscall", - "syscall.IFF_OACTIVE": "syscall", - "syscall.IFF_ONE_QUEUE": "syscall", - "syscall.IFF_POINTOPOINT": "syscall", - "syscall.IFF_POINTTOPOINT": "syscall", - "syscall.IFF_PORTSEL": "syscall", - "syscall.IFF_PPROMISC": "syscall", - "syscall.IFF_PROMISC": "syscall", - "syscall.IFF_RENAMING": "syscall", - "syscall.IFF_RUNNING": "syscall", - "syscall.IFF_SIMPLEX": "syscall", - "syscall.IFF_SLAVE": "syscall", - "syscall.IFF_SMART": "syscall", - "syscall.IFF_STATICARP": "syscall", - "syscall.IFF_TAP": "syscall", - "syscall.IFF_TUN": "syscall", - "syscall.IFF_TUN_EXCL": "syscall", - "syscall.IFF_UP": "syscall", - "syscall.IFF_VNET_HDR": "syscall", - "syscall.IFLA_ADDRESS": "syscall", - "syscall.IFLA_BROADCAST": "syscall", - "syscall.IFLA_COST": "syscall", - "syscall.IFLA_IFALIAS": "syscall", - "syscall.IFLA_IFNAME": "syscall", - "syscall.IFLA_LINK": "syscall", - "syscall.IFLA_LINKINFO": "syscall", - "syscall.IFLA_LINKMODE": "syscall", - "syscall.IFLA_MAP": "syscall", - "syscall.IFLA_MASTER": "syscall", - "syscall.IFLA_MAX": "syscall", - "syscall.IFLA_MTU": "syscall", - "syscall.IFLA_NET_NS_PID": "syscall", - "syscall.IFLA_OPERSTATE": "syscall", - "syscall.IFLA_PRIORITY": "syscall", - "syscall.IFLA_PROTINFO": "syscall", - "syscall.IFLA_QDISC": "syscall", - "syscall.IFLA_STATS": "syscall", - "syscall.IFLA_TXQLEN": "syscall", - "syscall.IFLA_UNSPEC": "syscall", - "syscall.IFLA_WEIGHT": "syscall", - "syscall.IFLA_WIRELESS": "syscall", - "syscall.IFNAMSIZ": "syscall", - "syscall.IFT_1822": "syscall", - "syscall.IFT_A12MPPSWITCH": "syscall", - "syscall.IFT_AAL2": "syscall", - "syscall.IFT_AAL5": "syscall", - "syscall.IFT_ADSL": "syscall", - "syscall.IFT_AFLANE8023": "syscall", - "syscall.IFT_AFLANE8025": "syscall", - "syscall.IFT_ARAP": "syscall", - "syscall.IFT_ARCNET": "syscall", - "syscall.IFT_ARCNETPLUS": "syscall", - "syscall.IFT_ASYNC": "syscall", - "syscall.IFT_ATM": "syscall", - "syscall.IFT_ATMDXI": "syscall", - "syscall.IFT_ATMFUNI": "syscall", - "syscall.IFT_ATMIMA": "syscall", - "syscall.IFT_ATMLOGICAL": "syscall", - "syscall.IFT_ATMRADIO": "syscall", - "syscall.IFT_ATMSUBINTERFACE": "syscall", - "syscall.IFT_ATMVCIENDPT": "syscall", - "syscall.IFT_ATMVIRTUAL": "syscall", - "syscall.IFT_BGPPOLICYACCOUNTING": "syscall", - "syscall.IFT_BLUETOOTH": "syscall", - "syscall.IFT_BRIDGE": "syscall", - "syscall.IFT_BSC": "syscall", - "syscall.IFT_CARP": "syscall", - "syscall.IFT_CCTEMUL": "syscall", - "syscall.IFT_CELLULAR": "syscall", - "syscall.IFT_CEPT": "syscall", - "syscall.IFT_CES": "syscall", - "syscall.IFT_CHANNEL": "syscall", - "syscall.IFT_CNR": "syscall", - "syscall.IFT_COFFEE": "syscall", - "syscall.IFT_COMPOSITELINK": "syscall", - "syscall.IFT_DCN": "syscall", - "syscall.IFT_DIGITALPOWERLINE": "syscall", - "syscall.IFT_DIGITALWRAPPEROVERHEADCHANNEL": "syscall", - "syscall.IFT_DLSW": "syscall", - "syscall.IFT_DOCSCABLEDOWNSTREAM": "syscall", - "syscall.IFT_DOCSCABLEMACLAYER": "syscall", - "syscall.IFT_DOCSCABLEUPSTREAM": "syscall", - "syscall.IFT_DOCSCABLEUPSTREAMCHANNEL": "syscall", - "syscall.IFT_DS0": "syscall", - "syscall.IFT_DS0BUNDLE": "syscall", - "syscall.IFT_DS1FDL": "syscall", - "syscall.IFT_DS3": "syscall", - "syscall.IFT_DTM": "syscall", - "syscall.IFT_DUMMY": "syscall", - "syscall.IFT_DVBASILN": "syscall", - "syscall.IFT_DVBASIOUT": "syscall", - "syscall.IFT_DVBRCCDOWNSTREAM": "syscall", - "syscall.IFT_DVBRCCMACLAYER": "syscall", - "syscall.IFT_DVBRCCUPSTREAM": "syscall", - "syscall.IFT_ECONET": "syscall", - "syscall.IFT_ENC": "syscall", - "syscall.IFT_EON": "syscall", - "syscall.IFT_EPLRS": "syscall", - "syscall.IFT_ESCON": "syscall", - "syscall.IFT_ETHER": "syscall", - "syscall.IFT_FAITH": "syscall", - "syscall.IFT_FAST": "syscall", - "syscall.IFT_FASTETHER": "syscall", - "syscall.IFT_FASTETHERFX": "syscall", - "syscall.IFT_FDDI": "syscall", - "syscall.IFT_FIBRECHANNEL": "syscall", - "syscall.IFT_FRAMERELAYINTERCONNECT": "syscall", - "syscall.IFT_FRAMERELAYMPI": "syscall", - "syscall.IFT_FRDLCIENDPT": "syscall", - "syscall.IFT_FRELAY": "syscall", - "syscall.IFT_FRELAYDCE": "syscall", - "syscall.IFT_FRF16MFRBUNDLE": "syscall", - "syscall.IFT_FRFORWARD": "syscall", - "syscall.IFT_G703AT2MB": "syscall", - "syscall.IFT_G703AT64K": "syscall", - "syscall.IFT_GIF": "syscall", - "syscall.IFT_GIGABITETHERNET": "syscall", - "syscall.IFT_GR303IDT": "syscall", - "syscall.IFT_GR303RDT": "syscall", - "syscall.IFT_H323GATEKEEPER": "syscall", - "syscall.IFT_H323PROXY": "syscall", - "syscall.IFT_HDH1822": "syscall", - "syscall.IFT_HDLC": "syscall", - "syscall.IFT_HDSL2": "syscall", - "syscall.IFT_HIPERLAN2": "syscall", - "syscall.IFT_HIPPI": "syscall", - "syscall.IFT_HIPPIINTERFACE": "syscall", - "syscall.IFT_HOSTPAD": "syscall", - "syscall.IFT_HSSI": "syscall", - "syscall.IFT_HY": "syscall", - "syscall.IFT_IBM370PARCHAN": "syscall", - "syscall.IFT_IDSL": "syscall", - "syscall.IFT_IEEE1394": "syscall", - "syscall.IFT_IEEE80211": "syscall", - "syscall.IFT_IEEE80212": "syscall", - "syscall.IFT_IEEE8023ADLAG": "syscall", - "syscall.IFT_IFGSN": "syscall", - "syscall.IFT_IMT": "syscall", - "syscall.IFT_INFINIBAND": "syscall", - "syscall.IFT_INTERLEAVE": "syscall", - "syscall.IFT_IP": "syscall", - "syscall.IFT_IPFORWARD": "syscall", - "syscall.IFT_IPOVERATM": "syscall", - "syscall.IFT_IPOVERCDLC": "syscall", - "syscall.IFT_IPOVERCLAW": "syscall", - "syscall.IFT_IPSWITCH": "syscall", - "syscall.IFT_IPXIP": "syscall", - "syscall.IFT_ISDN": "syscall", - "syscall.IFT_ISDNBASIC": "syscall", - "syscall.IFT_ISDNPRIMARY": "syscall", - "syscall.IFT_ISDNS": "syscall", - "syscall.IFT_ISDNU": "syscall", - "syscall.IFT_ISO88022LLC": "syscall", - "syscall.IFT_ISO88023": "syscall", - "syscall.IFT_ISO88024": "syscall", - "syscall.IFT_ISO88025": "syscall", - "syscall.IFT_ISO88025CRFPINT": "syscall", - "syscall.IFT_ISO88025DTR": "syscall", - "syscall.IFT_ISO88025FIBER": "syscall", - "syscall.IFT_ISO88026": "syscall", - "syscall.IFT_ISUP": "syscall", - "syscall.IFT_L2VLAN": "syscall", - "syscall.IFT_L3IPVLAN": "syscall", - "syscall.IFT_L3IPXVLAN": "syscall", - "syscall.IFT_LAPB": "syscall", - "syscall.IFT_LAPD": "syscall", - "syscall.IFT_LAPF": "syscall", - "syscall.IFT_LINEGROUP": "syscall", - "syscall.IFT_LOCALTALK": "syscall", - "syscall.IFT_LOOP": "syscall", - "syscall.IFT_MEDIAMAILOVERIP": "syscall", - "syscall.IFT_MFSIGLINK": "syscall", - "syscall.IFT_MIOX25": "syscall", - "syscall.IFT_MODEM": "syscall", - "syscall.IFT_MPC": "syscall", - "syscall.IFT_MPLS": "syscall", - "syscall.IFT_MPLSTUNNEL": "syscall", - "syscall.IFT_MSDSL": "syscall", - "syscall.IFT_MVL": "syscall", - "syscall.IFT_MYRINET": "syscall", - "syscall.IFT_NFAS": "syscall", - "syscall.IFT_NSIP": "syscall", - "syscall.IFT_OPTICALCHANNEL": "syscall", - "syscall.IFT_OPTICALTRANSPORT": "syscall", - "syscall.IFT_OTHER": "syscall", - "syscall.IFT_P10": "syscall", - "syscall.IFT_P80": "syscall", - "syscall.IFT_PARA": "syscall", - "syscall.IFT_PDP": "syscall", - "syscall.IFT_PFLOG": "syscall", - "syscall.IFT_PFLOW": "syscall", - "syscall.IFT_PFSYNC": "syscall", - "syscall.IFT_PLC": "syscall", - "syscall.IFT_PON155": "syscall", - "syscall.IFT_PON622": "syscall", - "syscall.IFT_POS": "syscall", - "syscall.IFT_PPP": "syscall", - "syscall.IFT_PPPMULTILINKBUNDLE": "syscall", - "syscall.IFT_PROPATM": "syscall", - "syscall.IFT_PROPBWAP2MP": "syscall", - "syscall.IFT_PROPCNLS": "syscall", - "syscall.IFT_PROPDOCSWIRELESSDOWNSTREAM": "syscall", - "syscall.IFT_PROPDOCSWIRELESSMACLAYER": "syscall", - "syscall.IFT_PROPDOCSWIRELESSUPSTREAM": "syscall", - "syscall.IFT_PROPMUX": "syscall", - "syscall.IFT_PROPVIRTUAL": "syscall", - "syscall.IFT_PROPWIRELESSP2P": "syscall", - "syscall.IFT_PTPSERIAL": "syscall", - "syscall.IFT_PVC": "syscall", - "syscall.IFT_Q2931": "syscall", - "syscall.IFT_QLLC": "syscall", - "syscall.IFT_RADIOMAC": "syscall", - "syscall.IFT_RADSL": "syscall", - "syscall.IFT_REACHDSL": "syscall", - "syscall.IFT_RFC1483": "syscall", - "syscall.IFT_RS232": "syscall", - "syscall.IFT_RSRB": "syscall", - "syscall.IFT_SDLC": "syscall", - "syscall.IFT_SDSL": "syscall", - "syscall.IFT_SHDSL": "syscall", - "syscall.IFT_SIP": "syscall", - "syscall.IFT_SIPSIG": "syscall", - "syscall.IFT_SIPTG": "syscall", - "syscall.IFT_SLIP": "syscall", - "syscall.IFT_SMDSDXI": "syscall", - "syscall.IFT_SMDSICIP": "syscall", - "syscall.IFT_SONET": "syscall", - "syscall.IFT_SONETOVERHEADCHANNEL": "syscall", - "syscall.IFT_SONETPATH": "syscall", - "syscall.IFT_SONETVT": "syscall", - "syscall.IFT_SRP": "syscall", - "syscall.IFT_SS7SIGLINK": "syscall", - "syscall.IFT_STACKTOSTACK": "syscall", - "syscall.IFT_STARLAN": "syscall", - "syscall.IFT_STF": "syscall", - "syscall.IFT_T1": "syscall", - "syscall.IFT_TDLC": "syscall", - "syscall.IFT_TELINK": "syscall", - "syscall.IFT_TERMPAD": "syscall", - "syscall.IFT_TR008": "syscall", - "syscall.IFT_TRANSPHDLC": "syscall", - "syscall.IFT_TUNNEL": "syscall", - "syscall.IFT_ULTRA": "syscall", - "syscall.IFT_USB": "syscall", - "syscall.IFT_V11": "syscall", - "syscall.IFT_V35": "syscall", - "syscall.IFT_V36": "syscall", - "syscall.IFT_V37": "syscall", - "syscall.IFT_VDSL": "syscall", - "syscall.IFT_VIRTUALIPADDRESS": "syscall", - "syscall.IFT_VIRTUALTG": "syscall", - "syscall.IFT_VOICEDID": "syscall", - "syscall.IFT_VOICEEM": "syscall", - "syscall.IFT_VOICEEMFGD": "syscall", - "syscall.IFT_VOICEENCAP": "syscall", - "syscall.IFT_VOICEFGDEANA": "syscall", - "syscall.IFT_VOICEFXO": "syscall", - "syscall.IFT_VOICEFXS": "syscall", - "syscall.IFT_VOICEOVERATM": "syscall", - "syscall.IFT_VOICEOVERCABLE": "syscall", - "syscall.IFT_VOICEOVERFRAMERELAY": "syscall", - "syscall.IFT_VOICEOVERIP": "syscall", - "syscall.IFT_X213": "syscall", - "syscall.IFT_X25": "syscall", - "syscall.IFT_X25DDN": "syscall", - "syscall.IFT_X25HUNTGROUP": "syscall", - "syscall.IFT_X25MLP": "syscall", - "syscall.IFT_X25PLE": "syscall", - "syscall.IFT_XETHER": "syscall", - "syscall.IGNBRK": "syscall", - "syscall.IGNCR": "syscall", - "syscall.IGNORE": "syscall", - "syscall.IGNPAR": "syscall", - "syscall.IMAXBEL": "syscall", - "syscall.INFINITE": "syscall", - "syscall.INLCR": "syscall", - "syscall.INPCK": "syscall", - "syscall.INVALID_FILE_ATTRIBUTES": "syscall", - "syscall.IN_ACCESS": "syscall", - "syscall.IN_ALL_EVENTS": "syscall", - "syscall.IN_ATTRIB": "syscall", - "syscall.IN_CLASSA_HOST": "syscall", - "syscall.IN_CLASSA_MAX": "syscall", - "syscall.IN_CLASSA_NET": "syscall", - "syscall.IN_CLASSA_NSHIFT": "syscall", - "syscall.IN_CLASSB_HOST": "syscall", - "syscall.IN_CLASSB_MAX": "syscall", - "syscall.IN_CLASSB_NET": "syscall", - "syscall.IN_CLASSB_NSHIFT": "syscall", - "syscall.IN_CLASSC_HOST": "syscall", - "syscall.IN_CLASSC_NET": "syscall", - "syscall.IN_CLASSC_NSHIFT": "syscall", - "syscall.IN_CLASSD_HOST": "syscall", - "syscall.IN_CLASSD_NET": "syscall", - "syscall.IN_CLASSD_NSHIFT": "syscall", - "syscall.IN_CLOEXEC": "syscall", - "syscall.IN_CLOSE": "syscall", - "syscall.IN_CLOSE_NOWRITE": "syscall", - "syscall.IN_CLOSE_WRITE": "syscall", - "syscall.IN_CREATE": "syscall", - "syscall.IN_DELETE": "syscall", - "syscall.IN_DELETE_SELF": "syscall", - "syscall.IN_DONT_FOLLOW": "syscall", - "syscall.IN_EXCL_UNLINK": "syscall", - "syscall.IN_IGNORED": "syscall", - "syscall.IN_ISDIR": "syscall", - "syscall.IN_LINKLOCALNETNUM": "syscall", - "syscall.IN_LOOPBACKNET": "syscall", - "syscall.IN_MASK_ADD": "syscall", - "syscall.IN_MODIFY": "syscall", - "syscall.IN_MOVE": "syscall", - "syscall.IN_MOVED_FROM": "syscall", - "syscall.IN_MOVED_TO": "syscall", - "syscall.IN_MOVE_SELF": "syscall", - "syscall.IN_NONBLOCK": "syscall", - "syscall.IN_ONESHOT": "syscall", - "syscall.IN_ONLYDIR": "syscall", - "syscall.IN_OPEN": "syscall", - "syscall.IN_Q_OVERFLOW": "syscall", - "syscall.IN_RFC3021_HOST": "syscall", - "syscall.IN_RFC3021_MASK": "syscall", - "syscall.IN_RFC3021_NET": "syscall", - "syscall.IN_RFC3021_NSHIFT": "syscall", - "syscall.IN_UNMOUNT": "syscall", - "syscall.IOC_IN": "syscall", - "syscall.IOC_INOUT": "syscall", - "syscall.IOC_OUT": "syscall", - "syscall.IOC_VENDOR": "syscall", - "syscall.IOC_WS2": "syscall", - "syscall.IO_REPARSE_TAG_SYMLINK": "syscall", - "syscall.IPMreq": "syscall", - "syscall.IPMreqn": "syscall", - "syscall.IPPROTO_3PC": "syscall", - "syscall.IPPROTO_ADFS": "syscall", - "syscall.IPPROTO_AH": "syscall", - "syscall.IPPROTO_AHIP": "syscall", - "syscall.IPPROTO_APES": "syscall", - "syscall.IPPROTO_ARGUS": "syscall", - "syscall.IPPROTO_AX25": "syscall", - "syscall.IPPROTO_BHA": "syscall", - "syscall.IPPROTO_BLT": "syscall", - "syscall.IPPROTO_BRSATMON": "syscall", - "syscall.IPPROTO_CARP": "syscall", - "syscall.IPPROTO_CFTP": "syscall", - "syscall.IPPROTO_CHAOS": "syscall", - "syscall.IPPROTO_CMTP": "syscall", - "syscall.IPPROTO_COMP": "syscall", - "syscall.IPPROTO_CPHB": "syscall", - "syscall.IPPROTO_CPNX": "syscall", - "syscall.IPPROTO_DCCP": "syscall", - "syscall.IPPROTO_DDP": "syscall", - "syscall.IPPROTO_DGP": "syscall", - "syscall.IPPROTO_DIVERT": "syscall", - "syscall.IPPROTO_DIVERT_INIT": "syscall", - "syscall.IPPROTO_DIVERT_RESP": "syscall", - "syscall.IPPROTO_DONE": "syscall", - "syscall.IPPROTO_DSTOPTS": "syscall", - "syscall.IPPROTO_EGP": "syscall", - "syscall.IPPROTO_EMCON": "syscall", - "syscall.IPPROTO_ENCAP": "syscall", - "syscall.IPPROTO_EON": "syscall", - "syscall.IPPROTO_ESP": "syscall", - "syscall.IPPROTO_ETHERIP": "syscall", - "syscall.IPPROTO_FRAGMENT": "syscall", - "syscall.IPPROTO_GGP": "syscall", - "syscall.IPPROTO_GMTP": "syscall", - "syscall.IPPROTO_GRE": "syscall", - "syscall.IPPROTO_HELLO": "syscall", - "syscall.IPPROTO_HMP": "syscall", - "syscall.IPPROTO_HOPOPTS": "syscall", - "syscall.IPPROTO_ICMP": "syscall", - "syscall.IPPROTO_ICMPV6": "syscall", - "syscall.IPPROTO_IDP": "syscall", - "syscall.IPPROTO_IDPR": "syscall", - "syscall.IPPROTO_IDRP": "syscall", - "syscall.IPPROTO_IGMP": "syscall", - "syscall.IPPROTO_IGP": "syscall", - "syscall.IPPROTO_IGRP": "syscall", - "syscall.IPPROTO_IL": "syscall", - "syscall.IPPROTO_INLSP": "syscall", - "syscall.IPPROTO_INP": "syscall", - "syscall.IPPROTO_IP": "syscall", - "syscall.IPPROTO_IPCOMP": "syscall", - "syscall.IPPROTO_IPCV": "syscall", - "syscall.IPPROTO_IPEIP": "syscall", - "syscall.IPPROTO_IPIP": "syscall", - "syscall.IPPROTO_IPPC": "syscall", - "syscall.IPPROTO_IPV4": "syscall", - "syscall.IPPROTO_IPV6": "syscall", - "syscall.IPPROTO_IPV6_ICMP": "syscall", - "syscall.IPPROTO_IRTP": "syscall", - "syscall.IPPROTO_KRYPTOLAN": "syscall", - "syscall.IPPROTO_LARP": "syscall", - "syscall.IPPROTO_LEAF1": "syscall", - "syscall.IPPROTO_LEAF2": "syscall", - "syscall.IPPROTO_MAX": "syscall", - "syscall.IPPROTO_MAXID": "syscall", - "syscall.IPPROTO_MEAS": "syscall", - "syscall.IPPROTO_MH": "syscall", - "syscall.IPPROTO_MHRP": "syscall", - "syscall.IPPROTO_MICP": "syscall", - "syscall.IPPROTO_MOBILE": "syscall", - "syscall.IPPROTO_MPLS": "syscall", - "syscall.IPPROTO_MTP": "syscall", - "syscall.IPPROTO_MUX": "syscall", - "syscall.IPPROTO_ND": "syscall", - "syscall.IPPROTO_NHRP": "syscall", - "syscall.IPPROTO_NONE": "syscall", - "syscall.IPPROTO_NSP": "syscall", - "syscall.IPPROTO_NVPII": "syscall", - "syscall.IPPROTO_OLD_DIVERT": "syscall", - "syscall.IPPROTO_OSPFIGP": "syscall", - "syscall.IPPROTO_PFSYNC": "syscall", - "syscall.IPPROTO_PGM": "syscall", - "syscall.IPPROTO_PIGP": "syscall", - "syscall.IPPROTO_PIM": "syscall", - "syscall.IPPROTO_PRM": "syscall", - "syscall.IPPROTO_PUP": "syscall", - "syscall.IPPROTO_PVP": "syscall", - "syscall.IPPROTO_RAW": "syscall", - "syscall.IPPROTO_RCCMON": "syscall", - "syscall.IPPROTO_RDP": "syscall", - "syscall.IPPROTO_ROUTING": "syscall", - "syscall.IPPROTO_RSVP": "syscall", - "syscall.IPPROTO_RVD": "syscall", - "syscall.IPPROTO_SATEXPAK": "syscall", - "syscall.IPPROTO_SATMON": "syscall", - "syscall.IPPROTO_SCCSP": "syscall", - "syscall.IPPROTO_SCTP": "syscall", - "syscall.IPPROTO_SDRP": "syscall", - "syscall.IPPROTO_SEND": "syscall", - "syscall.IPPROTO_SEP": "syscall", - "syscall.IPPROTO_SKIP": "syscall", - "syscall.IPPROTO_SPACER": "syscall", - "syscall.IPPROTO_SRPC": "syscall", - "syscall.IPPROTO_ST": "syscall", - "syscall.IPPROTO_SVMTP": "syscall", - "syscall.IPPROTO_SWIPE": "syscall", - "syscall.IPPROTO_TCF": "syscall", - "syscall.IPPROTO_TCP": "syscall", - "syscall.IPPROTO_TLSP": "syscall", - "syscall.IPPROTO_TP": "syscall", - "syscall.IPPROTO_TPXX": "syscall", - "syscall.IPPROTO_TRUNK1": "syscall", - "syscall.IPPROTO_TRUNK2": "syscall", - "syscall.IPPROTO_TTP": "syscall", - "syscall.IPPROTO_UDP": "syscall", - "syscall.IPPROTO_UDPLITE": "syscall", - "syscall.IPPROTO_VINES": "syscall", - "syscall.IPPROTO_VISA": "syscall", - "syscall.IPPROTO_VMTP": "syscall", - "syscall.IPPROTO_VRRP": "syscall", - "syscall.IPPROTO_WBEXPAK": "syscall", - "syscall.IPPROTO_WBMON": "syscall", - "syscall.IPPROTO_WSN": "syscall", - "syscall.IPPROTO_XNET": "syscall", - "syscall.IPPROTO_XTP": "syscall", - "syscall.IPV6_2292DSTOPTS": "syscall", - "syscall.IPV6_2292HOPLIMIT": "syscall", - "syscall.IPV6_2292HOPOPTS": "syscall", - "syscall.IPV6_2292NEXTHOP": "syscall", - "syscall.IPV6_2292PKTINFO": "syscall", - "syscall.IPV6_2292PKTOPTIONS": "syscall", - "syscall.IPV6_2292RTHDR": "syscall", - "syscall.IPV6_ADDRFORM": "syscall", - "syscall.IPV6_ADD_MEMBERSHIP": "syscall", - "syscall.IPV6_AUTHHDR": "syscall", - "syscall.IPV6_AUTH_LEVEL": "syscall", - "syscall.IPV6_AUTOFLOWLABEL": "syscall", - "syscall.IPV6_BINDANY": "syscall", - "syscall.IPV6_BINDV6ONLY": "syscall", - "syscall.IPV6_BOUND_IF": "syscall", - "syscall.IPV6_CHECKSUM": "syscall", - "syscall.IPV6_DEFAULT_MULTICAST_HOPS": "syscall", - "syscall.IPV6_DEFAULT_MULTICAST_LOOP": "syscall", - "syscall.IPV6_DEFHLIM": "syscall", - "syscall.IPV6_DONTFRAG": "syscall", - "syscall.IPV6_DROP_MEMBERSHIP": "syscall", - "syscall.IPV6_DSTOPTS": "syscall", - "syscall.IPV6_ESP_NETWORK_LEVEL": "syscall", - "syscall.IPV6_ESP_TRANS_LEVEL": "syscall", - "syscall.IPV6_FAITH": "syscall", - "syscall.IPV6_FLOWINFO_MASK": "syscall", - "syscall.IPV6_FLOWLABEL_MASK": "syscall", - "syscall.IPV6_FRAGTTL": "syscall", - "syscall.IPV6_FW_ADD": "syscall", - "syscall.IPV6_FW_DEL": "syscall", - "syscall.IPV6_FW_FLUSH": "syscall", - "syscall.IPV6_FW_GET": "syscall", - "syscall.IPV6_FW_ZERO": "syscall", - "syscall.IPV6_HLIMDEC": "syscall", - "syscall.IPV6_HOPLIMIT": "syscall", - "syscall.IPV6_HOPOPTS": "syscall", - "syscall.IPV6_IPCOMP_LEVEL": "syscall", - "syscall.IPV6_IPSEC_POLICY": "syscall", - "syscall.IPV6_JOIN_ANYCAST": "syscall", - "syscall.IPV6_JOIN_GROUP": "syscall", - "syscall.IPV6_LEAVE_ANYCAST": "syscall", - "syscall.IPV6_LEAVE_GROUP": "syscall", - "syscall.IPV6_MAXHLIM": "syscall", - "syscall.IPV6_MAXOPTHDR": "syscall", - "syscall.IPV6_MAXPACKET": "syscall", - "syscall.IPV6_MAX_GROUP_SRC_FILTER": "syscall", - "syscall.IPV6_MAX_MEMBERSHIPS": "syscall", - "syscall.IPV6_MAX_SOCK_SRC_FILTER": "syscall", - "syscall.IPV6_MIN_MEMBERSHIPS": "syscall", - "syscall.IPV6_MMTU": "syscall", - "syscall.IPV6_MSFILTER": "syscall", - "syscall.IPV6_MTU": "syscall", - "syscall.IPV6_MTU_DISCOVER": "syscall", - "syscall.IPV6_MULTICAST_HOPS": "syscall", - "syscall.IPV6_MULTICAST_IF": "syscall", - "syscall.IPV6_MULTICAST_LOOP": "syscall", - "syscall.IPV6_NEXTHOP": "syscall", - "syscall.IPV6_OPTIONS": "syscall", - "syscall.IPV6_PATHMTU": "syscall", - "syscall.IPV6_PIPEX": "syscall", - "syscall.IPV6_PKTINFO": "syscall", - "syscall.IPV6_PMTUDISC_DO": "syscall", - "syscall.IPV6_PMTUDISC_DONT": "syscall", - "syscall.IPV6_PMTUDISC_PROBE": "syscall", - "syscall.IPV6_PMTUDISC_WANT": "syscall", - "syscall.IPV6_PORTRANGE": "syscall", - "syscall.IPV6_PORTRANGE_DEFAULT": "syscall", - "syscall.IPV6_PORTRANGE_HIGH": "syscall", - "syscall.IPV6_PORTRANGE_LOW": "syscall", - "syscall.IPV6_PREFER_TEMPADDR": "syscall", - "syscall.IPV6_RECVDSTOPTS": "syscall", - "syscall.IPV6_RECVDSTPORT": "syscall", - "syscall.IPV6_RECVERR": "syscall", - "syscall.IPV6_RECVHOPLIMIT": "syscall", - "syscall.IPV6_RECVHOPOPTS": "syscall", - "syscall.IPV6_RECVPATHMTU": "syscall", - "syscall.IPV6_RECVPKTINFO": "syscall", - "syscall.IPV6_RECVRTHDR": "syscall", - "syscall.IPV6_RECVTCLASS": "syscall", - "syscall.IPV6_ROUTER_ALERT": "syscall", - "syscall.IPV6_RTABLE": "syscall", - "syscall.IPV6_RTHDR": "syscall", - "syscall.IPV6_RTHDRDSTOPTS": "syscall", - "syscall.IPV6_RTHDR_LOOSE": "syscall", - "syscall.IPV6_RTHDR_STRICT": "syscall", - "syscall.IPV6_RTHDR_TYPE_0": "syscall", - "syscall.IPV6_RXDSTOPTS": "syscall", - "syscall.IPV6_RXHOPOPTS": "syscall", - "syscall.IPV6_SOCKOPT_RESERVED1": "syscall", - "syscall.IPV6_TCLASS": "syscall", - "syscall.IPV6_UNICAST_HOPS": "syscall", - "syscall.IPV6_USE_MIN_MTU": "syscall", - "syscall.IPV6_V6ONLY": "syscall", - "syscall.IPV6_VERSION": "syscall", - "syscall.IPV6_VERSION_MASK": "syscall", - "syscall.IPV6_XFRM_POLICY": "syscall", - "syscall.IP_ADD_MEMBERSHIP": "syscall", - "syscall.IP_ADD_SOURCE_MEMBERSHIP": "syscall", - "syscall.IP_AUTH_LEVEL": "syscall", - "syscall.IP_BINDANY": "syscall", - "syscall.IP_BLOCK_SOURCE": "syscall", - "syscall.IP_BOUND_IF": "syscall", - "syscall.IP_DEFAULT_MULTICAST_LOOP": "syscall", - "syscall.IP_DEFAULT_MULTICAST_TTL": "syscall", - "syscall.IP_DF": "syscall", - "syscall.IP_DIVERTFL": "syscall", - "syscall.IP_DONTFRAG": "syscall", - "syscall.IP_DROP_MEMBERSHIP": "syscall", - "syscall.IP_DROP_SOURCE_MEMBERSHIP": "syscall", - "syscall.IP_DUMMYNET3": "syscall", - "syscall.IP_DUMMYNET_CONFIGURE": "syscall", - "syscall.IP_DUMMYNET_DEL": "syscall", - "syscall.IP_DUMMYNET_FLUSH": "syscall", - "syscall.IP_DUMMYNET_GET": "syscall", - "syscall.IP_EF": "syscall", - "syscall.IP_ERRORMTU": "syscall", - "syscall.IP_ESP_NETWORK_LEVEL": "syscall", - "syscall.IP_ESP_TRANS_LEVEL": "syscall", - "syscall.IP_FAITH": "syscall", - "syscall.IP_FREEBIND": "syscall", - "syscall.IP_FW3": "syscall", - "syscall.IP_FW_ADD": "syscall", - "syscall.IP_FW_DEL": "syscall", - "syscall.IP_FW_FLUSH": "syscall", - "syscall.IP_FW_GET": "syscall", - "syscall.IP_FW_NAT_CFG": "syscall", - "syscall.IP_FW_NAT_DEL": "syscall", - "syscall.IP_FW_NAT_GET_CONFIG": "syscall", - "syscall.IP_FW_NAT_GET_LOG": "syscall", - "syscall.IP_FW_RESETLOG": "syscall", - "syscall.IP_FW_TABLE_ADD": "syscall", - "syscall.IP_FW_TABLE_DEL": "syscall", - "syscall.IP_FW_TABLE_FLUSH": "syscall", - "syscall.IP_FW_TABLE_GETSIZE": "syscall", - "syscall.IP_FW_TABLE_LIST": "syscall", - "syscall.IP_FW_ZERO": "syscall", - "syscall.IP_HDRINCL": "syscall", - "syscall.IP_IPCOMP_LEVEL": "syscall", - "syscall.IP_IPSECFLOWINFO": "syscall", - "syscall.IP_IPSEC_LOCAL_AUTH": "syscall", - "syscall.IP_IPSEC_LOCAL_CRED": "syscall", - "syscall.IP_IPSEC_LOCAL_ID": "syscall", - "syscall.IP_IPSEC_POLICY": "syscall", - "syscall.IP_IPSEC_REMOTE_AUTH": "syscall", - "syscall.IP_IPSEC_REMOTE_CRED": "syscall", - "syscall.IP_IPSEC_REMOTE_ID": "syscall", - "syscall.IP_MAXPACKET": "syscall", - "syscall.IP_MAX_GROUP_SRC_FILTER": "syscall", - "syscall.IP_MAX_MEMBERSHIPS": "syscall", - "syscall.IP_MAX_SOCK_MUTE_FILTER": "syscall", - "syscall.IP_MAX_SOCK_SRC_FILTER": "syscall", - "syscall.IP_MAX_SOURCE_FILTER": "syscall", - "syscall.IP_MF": "syscall", - "syscall.IP_MINFRAGSIZE": "syscall", - "syscall.IP_MINTTL": "syscall", - "syscall.IP_MIN_MEMBERSHIPS": "syscall", - "syscall.IP_MSFILTER": "syscall", - "syscall.IP_MSS": "syscall", - "syscall.IP_MTU": "syscall", - "syscall.IP_MTU_DISCOVER": "syscall", - "syscall.IP_MULTICAST_IF": "syscall", - "syscall.IP_MULTICAST_IFINDEX": "syscall", - "syscall.IP_MULTICAST_LOOP": "syscall", - "syscall.IP_MULTICAST_TTL": "syscall", - "syscall.IP_MULTICAST_VIF": "syscall", - "syscall.IP_NAT__XXX": "syscall", - "syscall.IP_OFFMASK": "syscall", - "syscall.IP_OLD_FW_ADD": "syscall", - "syscall.IP_OLD_FW_DEL": "syscall", - "syscall.IP_OLD_FW_FLUSH": "syscall", - "syscall.IP_OLD_FW_GET": "syscall", - "syscall.IP_OLD_FW_RESETLOG": "syscall", - "syscall.IP_OLD_FW_ZERO": "syscall", - "syscall.IP_ONESBCAST": "syscall", - "syscall.IP_OPTIONS": "syscall", - "syscall.IP_ORIGDSTADDR": "syscall", - "syscall.IP_PASSSEC": "syscall", - "syscall.IP_PIPEX": "syscall", - "syscall.IP_PKTINFO": "syscall", - "syscall.IP_PKTOPTIONS": "syscall", - "syscall.IP_PMTUDISC": "syscall", - "syscall.IP_PMTUDISC_DO": "syscall", - "syscall.IP_PMTUDISC_DONT": "syscall", - "syscall.IP_PMTUDISC_PROBE": "syscall", - "syscall.IP_PMTUDISC_WANT": "syscall", - "syscall.IP_PORTRANGE": "syscall", - "syscall.IP_PORTRANGE_DEFAULT": "syscall", - "syscall.IP_PORTRANGE_HIGH": "syscall", - "syscall.IP_PORTRANGE_LOW": "syscall", - "syscall.IP_RECVDSTADDR": "syscall", - "syscall.IP_RECVDSTPORT": "syscall", - "syscall.IP_RECVERR": "syscall", - "syscall.IP_RECVIF": "syscall", - "syscall.IP_RECVOPTS": "syscall", - "syscall.IP_RECVORIGDSTADDR": "syscall", - "syscall.IP_RECVPKTINFO": "syscall", - "syscall.IP_RECVRETOPTS": "syscall", - "syscall.IP_RECVRTABLE": "syscall", - "syscall.IP_RECVTOS": "syscall", - "syscall.IP_RECVTTL": "syscall", - "syscall.IP_RETOPTS": "syscall", - "syscall.IP_RF": "syscall", - "syscall.IP_ROUTER_ALERT": "syscall", - "syscall.IP_RSVP_OFF": "syscall", - "syscall.IP_RSVP_ON": "syscall", - "syscall.IP_RSVP_VIF_OFF": "syscall", - "syscall.IP_RSVP_VIF_ON": "syscall", - "syscall.IP_RTABLE": "syscall", - "syscall.IP_SENDSRCADDR": "syscall", - "syscall.IP_STRIPHDR": "syscall", - "syscall.IP_TOS": "syscall", - "syscall.IP_TRAFFIC_MGT_BACKGROUND": "syscall", - "syscall.IP_TRANSPARENT": "syscall", - "syscall.IP_TTL": "syscall", - "syscall.IP_UNBLOCK_SOURCE": "syscall", - "syscall.IP_XFRM_POLICY": "syscall", - "syscall.IPv6MTUInfo": "syscall", - "syscall.IPv6Mreq": "syscall", - "syscall.ISIG": "syscall", - "syscall.ISTRIP": "syscall", - "syscall.IUCLC": "syscall", - "syscall.IUTF8": "syscall", - "syscall.IXANY": "syscall", - "syscall.IXOFF": "syscall", - "syscall.IXON": "syscall", - "syscall.IfAddrmsg": "syscall", - "syscall.IfAnnounceMsghdr": "syscall", - "syscall.IfData": "syscall", - "syscall.IfInfomsg": "syscall", - "syscall.IfMsghdr": "syscall", - "syscall.IfaMsghdr": "syscall", - "syscall.IfmaMsghdr": "syscall", - "syscall.IfmaMsghdr2": "syscall", - "syscall.ImplementsGetwd": "syscall", - "syscall.Inet4Pktinfo": "syscall", - "syscall.Inet6Pktinfo": "syscall", - "syscall.InotifyAddWatch": "syscall", - "syscall.InotifyEvent": "syscall", - "syscall.InotifyInit": "syscall", - "syscall.InotifyInit1": "syscall", - "syscall.InotifyRmWatch": "syscall", - "syscall.InterfaceAddrMessage": "syscall", - "syscall.InterfaceAnnounceMessage": "syscall", - "syscall.InterfaceInfo": "syscall", - "syscall.InterfaceMessage": "syscall", - "syscall.InterfaceMulticastAddrMessage": "syscall", - "syscall.InvalidHandle": "syscall", - "syscall.Ioperm": "syscall", - "syscall.Iopl": "syscall", - "syscall.Iovec": "syscall", - "syscall.IpAdapterInfo": "syscall", - "syscall.IpAddrString": "syscall", - "syscall.IpAddressString": "syscall", - "syscall.IpMaskString": "syscall", - "syscall.Issetugid": "syscall", - "syscall.KEY_ALL_ACCESS": "syscall", - "syscall.KEY_CREATE_LINK": "syscall", - "syscall.KEY_CREATE_SUB_KEY": "syscall", - "syscall.KEY_ENUMERATE_SUB_KEYS": "syscall", - "syscall.KEY_EXECUTE": "syscall", - "syscall.KEY_NOTIFY": "syscall", - "syscall.KEY_QUERY_VALUE": "syscall", - "syscall.KEY_READ": "syscall", - "syscall.KEY_SET_VALUE": "syscall", - "syscall.KEY_WOW64_32KEY": "syscall", - "syscall.KEY_WOW64_64KEY": "syscall", - "syscall.KEY_WRITE": "syscall", - "syscall.Kevent": "syscall", - "syscall.Kevent_t": "syscall", - "syscall.Kill": "syscall", - "syscall.Klogctl": "syscall", - "syscall.Kqueue": "syscall", - "syscall.LANG_ENGLISH": "syscall", - "syscall.LAYERED_PROTOCOL": "syscall", - "syscall.LCNT_OVERLOAD_FLUSH": "syscall", - "syscall.LINUX_REBOOT_CMD_CAD_OFF": "syscall", - "syscall.LINUX_REBOOT_CMD_CAD_ON": "syscall", - "syscall.LINUX_REBOOT_CMD_HALT": "syscall", - "syscall.LINUX_REBOOT_CMD_KEXEC": "syscall", - "syscall.LINUX_REBOOT_CMD_POWER_OFF": "syscall", - "syscall.LINUX_REBOOT_CMD_RESTART": "syscall", - "syscall.LINUX_REBOOT_CMD_RESTART2": "syscall", - "syscall.LINUX_REBOOT_CMD_SW_SUSPEND": "syscall", - "syscall.LINUX_REBOOT_MAGIC1": "syscall", - "syscall.LINUX_REBOOT_MAGIC2": "syscall", - "syscall.LOCK_EX": "syscall", - "syscall.LOCK_NB": "syscall", - "syscall.LOCK_SH": "syscall", - "syscall.LOCK_UN": "syscall", - "syscall.LazyDLL": "syscall", - "syscall.LazyProc": "syscall", - "syscall.Lchown": "syscall", - "syscall.Linger": "syscall", - "syscall.Link": "syscall", - "syscall.Listen": "syscall", - "syscall.Listxattr": "syscall", - "syscall.LoadCancelIoEx": "syscall", - "syscall.LoadConnectEx": "syscall", - "syscall.LoadCreateSymbolicLink": "syscall", - "syscall.LoadDLL": "syscall", - "syscall.LoadGetAddrInfo": "syscall", - "syscall.LoadLibrary": "syscall", - "syscall.LoadSetFileCompletionNotificationModes": "syscall", - "syscall.LocalFree": "syscall", - "syscall.Log2phys_t": "syscall", - "syscall.LookupAccountName": "syscall", - "syscall.LookupAccountSid": "syscall", - "syscall.LookupSID": "syscall", - "syscall.LsfJump": "syscall", - "syscall.LsfSocket": "syscall", - "syscall.LsfStmt": "syscall", - "syscall.Lstat": "syscall", - "syscall.MADV_AUTOSYNC": "syscall", - "syscall.MADV_CAN_REUSE": "syscall", - "syscall.MADV_CORE": "syscall", - "syscall.MADV_DOFORK": "syscall", - "syscall.MADV_DONTFORK": "syscall", - "syscall.MADV_DONTNEED": "syscall", - "syscall.MADV_FREE": "syscall", - "syscall.MADV_FREE_REUSABLE": "syscall", - "syscall.MADV_FREE_REUSE": "syscall", - "syscall.MADV_HUGEPAGE": "syscall", - "syscall.MADV_HWPOISON": "syscall", - "syscall.MADV_MERGEABLE": "syscall", - "syscall.MADV_NOCORE": "syscall", - "syscall.MADV_NOHUGEPAGE": "syscall", - "syscall.MADV_NORMAL": "syscall", - "syscall.MADV_NOSYNC": "syscall", - "syscall.MADV_PROTECT": "syscall", - "syscall.MADV_RANDOM": "syscall", - "syscall.MADV_REMOVE": "syscall", - "syscall.MADV_SEQUENTIAL": "syscall", - "syscall.MADV_SPACEAVAIL": "syscall", - "syscall.MADV_UNMERGEABLE": "syscall", - "syscall.MADV_WILLNEED": "syscall", - "syscall.MADV_ZERO_WIRED_PAGES": "syscall", - "syscall.MAP_32BIT": "syscall", - "syscall.MAP_ALIGNED_SUPER": "syscall", - "syscall.MAP_ALIGNMENT_16MB": "syscall", - "syscall.MAP_ALIGNMENT_1TB": "syscall", - "syscall.MAP_ALIGNMENT_256TB": "syscall", - "syscall.MAP_ALIGNMENT_4GB": "syscall", - "syscall.MAP_ALIGNMENT_64KB": "syscall", - "syscall.MAP_ALIGNMENT_64PB": "syscall", - "syscall.MAP_ALIGNMENT_MASK": "syscall", - "syscall.MAP_ALIGNMENT_SHIFT": "syscall", - "syscall.MAP_ANON": "syscall", - "syscall.MAP_ANONYMOUS": "syscall", - "syscall.MAP_COPY": "syscall", - "syscall.MAP_DENYWRITE": "syscall", - "syscall.MAP_EXECUTABLE": "syscall", - "syscall.MAP_FILE": "syscall", - "syscall.MAP_FIXED": "syscall", - "syscall.MAP_FLAGMASK": "syscall", - "syscall.MAP_GROWSDOWN": "syscall", - "syscall.MAP_HASSEMAPHORE": "syscall", - "syscall.MAP_HUGETLB": "syscall", - "syscall.MAP_INHERIT": "syscall", - "syscall.MAP_INHERIT_COPY": "syscall", - "syscall.MAP_INHERIT_DEFAULT": "syscall", - "syscall.MAP_INHERIT_DONATE_COPY": "syscall", - "syscall.MAP_INHERIT_NONE": "syscall", - "syscall.MAP_INHERIT_SHARE": "syscall", - "syscall.MAP_JIT": "syscall", - "syscall.MAP_LOCKED": "syscall", - "syscall.MAP_NOCACHE": "syscall", - "syscall.MAP_NOCORE": "syscall", - "syscall.MAP_NOEXTEND": "syscall", - "syscall.MAP_NONBLOCK": "syscall", - "syscall.MAP_NORESERVE": "syscall", - "syscall.MAP_NOSYNC": "syscall", - "syscall.MAP_POPULATE": "syscall", - "syscall.MAP_PREFAULT_READ": "syscall", - "syscall.MAP_PRIVATE": "syscall", - "syscall.MAP_RENAME": "syscall", - "syscall.MAP_RESERVED0080": "syscall", - "syscall.MAP_RESERVED0100": "syscall", - "syscall.MAP_SHARED": "syscall", - "syscall.MAP_STACK": "syscall", - "syscall.MAP_TRYFIXED": "syscall", - "syscall.MAP_TYPE": "syscall", - "syscall.MAP_WIRED": "syscall", - "syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE": "syscall", - "syscall.MAXLEN_IFDESCR": "syscall", - "syscall.MAXLEN_PHYSADDR": "syscall", - "syscall.MAX_ADAPTER_ADDRESS_LENGTH": "syscall", - "syscall.MAX_ADAPTER_DESCRIPTION_LENGTH": "syscall", - "syscall.MAX_ADAPTER_NAME_LENGTH": "syscall", - "syscall.MAX_COMPUTERNAME_LENGTH": "syscall", - "syscall.MAX_INTERFACE_NAME_LEN": "syscall", - "syscall.MAX_LONG_PATH": "syscall", - "syscall.MAX_PATH": "syscall", - "syscall.MAX_PROTOCOL_CHAIN": "syscall", - "syscall.MCL_CURRENT": "syscall", - "syscall.MCL_FUTURE": "syscall", - "syscall.MNT_DETACH": "syscall", - "syscall.MNT_EXPIRE": "syscall", - "syscall.MNT_FORCE": "syscall", - "syscall.MSG_BCAST": "syscall", - "syscall.MSG_CMSG_CLOEXEC": "syscall", - "syscall.MSG_COMPAT": "syscall", - "syscall.MSG_CONFIRM": "syscall", - "syscall.MSG_CONTROLMBUF": "syscall", - "syscall.MSG_CTRUNC": "syscall", - "syscall.MSG_DONTROUTE": "syscall", - "syscall.MSG_DONTWAIT": "syscall", - "syscall.MSG_EOF": "syscall", - "syscall.MSG_EOR": "syscall", - "syscall.MSG_ERRQUEUE": "syscall", - "syscall.MSG_FASTOPEN": "syscall", - "syscall.MSG_FIN": "syscall", - "syscall.MSG_FLUSH": "syscall", - "syscall.MSG_HAVEMORE": "syscall", - "syscall.MSG_HOLD": "syscall", - "syscall.MSG_IOVUSRSPACE": "syscall", - "syscall.MSG_LENUSRSPACE": "syscall", - "syscall.MSG_MCAST": "syscall", - "syscall.MSG_MORE": "syscall", - "syscall.MSG_NAMEMBUF": "syscall", - "syscall.MSG_NBIO": "syscall", - "syscall.MSG_NEEDSA": "syscall", - "syscall.MSG_NOSIGNAL": "syscall", - "syscall.MSG_NOTIFICATION": "syscall", - "syscall.MSG_OOB": "syscall", - "syscall.MSG_PEEK": "syscall", - "syscall.MSG_PROXY": "syscall", - "syscall.MSG_RCVMORE": "syscall", - "syscall.MSG_RST": "syscall", - "syscall.MSG_SEND": "syscall", - "syscall.MSG_SYN": "syscall", - "syscall.MSG_TRUNC": "syscall", - "syscall.MSG_TRYHARD": "syscall", - "syscall.MSG_USERFLAGS": "syscall", - "syscall.MSG_WAITALL": "syscall", - "syscall.MSG_WAITFORONE": "syscall", - "syscall.MSG_WAITSTREAM": "syscall", - "syscall.MS_ACTIVE": "syscall", - "syscall.MS_ASYNC": "syscall", - "syscall.MS_BIND": "syscall", - "syscall.MS_DEACTIVATE": "syscall", - "syscall.MS_DIRSYNC": "syscall", - "syscall.MS_INVALIDATE": "syscall", - "syscall.MS_I_VERSION": "syscall", - "syscall.MS_KERNMOUNT": "syscall", - "syscall.MS_KILLPAGES": "syscall", - "syscall.MS_MANDLOCK": "syscall", - "syscall.MS_MGC_MSK": "syscall", - "syscall.MS_MGC_VAL": "syscall", - "syscall.MS_MOVE": "syscall", - "syscall.MS_NOATIME": "syscall", - "syscall.MS_NODEV": "syscall", - "syscall.MS_NODIRATIME": "syscall", - "syscall.MS_NOEXEC": "syscall", - "syscall.MS_NOSUID": "syscall", - "syscall.MS_NOUSER": "syscall", - "syscall.MS_POSIXACL": "syscall", - "syscall.MS_PRIVATE": "syscall", - "syscall.MS_RDONLY": "syscall", - "syscall.MS_REC": "syscall", - "syscall.MS_RELATIME": "syscall", - "syscall.MS_REMOUNT": "syscall", - "syscall.MS_RMT_MASK": "syscall", - "syscall.MS_SHARED": "syscall", - "syscall.MS_SILENT": "syscall", - "syscall.MS_SLAVE": "syscall", - "syscall.MS_STRICTATIME": "syscall", - "syscall.MS_SYNC": "syscall", - "syscall.MS_SYNCHRONOUS": "syscall", - "syscall.MS_UNBINDABLE": "syscall", - "syscall.Madvise": "syscall", - "syscall.MapViewOfFile": "syscall", - "syscall.MaxTokenInfoClass": "syscall", - "syscall.Mclpool": "syscall", - "syscall.MibIfRow": "syscall", - "syscall.Mkdir": "syscall", - "syscall.Mkdirat": "syscall", - "syscall.Mkfifo": "syscall", - "syscall.Mknod": "syscall", - "syscall.Mknodat": "syscall", - "syscall.Mlock": "syscall", - "syscall.Mlockall": "syscall", - "syscall.Mmap": "syscall", - "syscall.Mount": "syscall", - "syscall.MoveFile": "syscall", - "syscall.Mprotect": "syscall", - "syscall.Msghdr": "syscall", - "syscall.Munlock": "syscall", - "syscall.Munlockall": "syscall", - "syscall.Munmap": "syscall", - "syscall.MustLoadDLL": "syscall", - "syscall.NAME_MAX": "syscall", - "syscall.NETLINK_ADD_MEMBERSHIP": "syscall", - "syscall.NETLINK_AUDIT": "syscall", - "syscall.NETLINK_BROADCAST_ERROR": "syscall", - "syscall.NETLINK_CONNECTOR": "syscall", - "syscall.NETLINK_DNRTMSG": "syscall", - "syscall.NETLINK_DROP_MEMBERSHIP": "syscall", - "syscall.NETLINK_ECRYPTFS": "syscall", - "syscall.NETLINK_FIB_LOOKUP": "syscall", - "syscall.NETLINK_FIREWALL": "syscall", - "syscall.NETLINK_GENERIC": "syscall", - "syscall.NETLINK_INET_DIAG": "syscall", - "syscall.NETLINK_IP6_FW": "syscall", - "syscall.NETLINK_ISCSI": "syscall", - "syscall.NETLINK_KOBJECT_UEVENT": "syscall", - "syscall.NETLINK_NETFILTER": "syscall", - "syscall.NETLINK_NFLOG": "syscall", - "syscall.NETLINK_NO_ENOBUFS": "syscall", - "syscall.NETLINK_PKTINFO": "syscall", - "syscall.NETLINK_RDMA": "syscall", - "syscall.NETLINK_ROUTE": "syscall", - "syscall.NETLINK_SCSITRANSPORT": "syscall", - "syscall.NETLINK_SELINUX": "syscall", - "syscall.NETLINK_UNUSED": "syscall", - "syscall.NETLINK_USERSOCK": "syscall", - "syscall.NETLINK_XFRM": "syscall", - "syscall.NET_RT_DUMP": "syscall", - "syscall.NET_RT_DUMP2": "syscall", - "syscall.NET_RT_FLAGS": "syscall", - "syscall.NET_RT_IFLIST": "syscall", - "syscall.NET_RT_IFLIST2": "syscall", - "syscall.NET_RT_IFLISTL": "syscall", - "syscall.NET_RT_IFMALIST": "syscall", - "syscall.NET_RT_MAXID": "syscall", - "syscall.NET_RT_OIFLIST": "syscall", - "syscall.NET_RT_OOIFLIST": "syscall", - "syscall.NET_RT_STAT": "syscall", - "syscall.NET_RT_STATS": "syscall", - "syscall.NET_RT_TABLE": "syscall", - "syscall.NET_RT_TRASH": "syscall", - "syscall.NLA_ALIGNTO": "syscall", - "syscall.NLA_F_NESTED": "syscall", - "syscall.NLA_F_NET_BYTEORDER": "syscall", - "syscall.NLA_HDRLEN": "syscall", - "syscall.NLMSG_ALIGNTO": "syscall", - "syscall.NLMSG_DONE": "syscall", - "syscall.NLMSG_ERROR": "syscall", - "syscall.NLMSG_HDRLEN": "syscall", - "syscall.NLMSG_MIN_TYPE": "syscall", - "syscall.NLMSG_NOOP": "syscall", - "syscall.NLMSG_OVERRUN": "syscall", - "syscall.NLM_F_ACK": "syscall", - "syscall.NLM_F_APPEND": "syscall", - "syscall.NLM_F_ATOMIC": "syscall", - "syscall.NLM_F_CREATE": "syscall", - "syscall.NLM_F_DUMP": "syscall", - "syscall.NLM_F_ECHO": "syscall", - "syscall.NLM_F_EXCL": "syscall", - "syscall.NLM_F_MATCH": "syscall", - "syscall.NLM_F_MULTI": "syscall", - "syscall.NLM_F_REPLACE": "syscall", - "syscall.NLM_F_REQUEST": "syscall", - "syscall.NLM_F_ROOT": "syscall", - "syscall.NOFLSH": "syscall", - "syscall.NOTE_ABSOLUTE": "syscall", - "syscall.NOTE_ATTRIB": "syscall", - "syscall.NOTE_CHILD": "syscall", - "syscall.NOTE_DELETE": "syscall", - "syscall.NOTE_EOF": "syscall", - "syscall.NOTE_EXEC": "syscall", - "syscall.NOTE_EXIT": "syscall", - "syscall.NOTE_EXITSTATUS": "syscall", - "syscall.NOTE_EXTEND": "syscall", - "syscall.NOTE_FFAND": "syscall", - "syscall.NOTE_FFCOPY": "syscall", - "syscall.NOTE_FFCTRLMASK": "syscall", - "syscall.NOTE_FFLAGSMASK": "syscall", - "syscall.NOTE_FFNOP": "syscall", - "syscall.NOTE_FFOR": "syscall", - "syscall.NOTE_FORK": "syscall", - "syscall.NOTE_LINK": "syscall", - "syscall.NOTE_LOWAT": "syscall", - "syscall.NOTE_NONE": "syscall", - "syscall.NOTE_NSECONDS": "syscall", - "syscall.NOTE_PCTRLMASK": "syscall", - "syscall.NOTE_PDATAMASK": "syscall", - "syscall.NOTE_REAP": "syscall", - "syscall.NOTE_RENAME": "syscall", - "syscall.NOTE_RESOURCEEND": "syscall", - "syscall.NOTE_REVOKE": "syscall", - "syscall.NOTE_SECONDS": "syscall", - "syscall.NOTE_SIGNAL": "syscall", - "syscall.NOTE_TRACK": "syscall", - "syscall.NOTE_TRACKERR": "syscall", - "syscall.NOTE_TRIGGER": "syscall", - "syscall.NOTE_TRUNCATE": "syscall", - "syscall.NOTE_USECONDS": "syscall", - "syscall.NOTE_VM_ERROR": "syscall", - "syscall.NOTE_VM_PRESSURE": "syscall", - "syscall.NOTE_VM_PRESSURE_SUDDEN_TERMINATE": "syscall", - "syscall.NOTE_VM_PRESSURE_TERMINATE": "syscall", - "syscall.NOTE_WRITE": "syscall", - "syscall.NameCanonical": "syscall", - "syscall.NameCanonicalEx": "syscall", - "syscall.NameDisplay": "syscall", - "syscall.NameDnsDomain": "syscall", - "syscall.NameFullyQualifiedDN": "syscall", - "syscall.NameSamCompatible": "syscall", - "syscall.NameServicePrincipal": "syscall", - "syscall.NameUniqueId": "syscall", - "syscall.NameUnknown": "syscall", - "syscall.NameUserPrincipal": "syscall", - "syscall.Nanosleep": "syscall", - "syscall.NetApiBufferFree": "syscall", - "syscall.NetGetJoinInformation": "syscall", - "syscall.NetSetupDomainName": "syscall", - "syscall.NetSetupUnjoined": "syscall", - "syscall.NetSetupUnknownStatus": "syscall", - "syscall.NetSetupWorkgroupName": "syscall", - "syscall.NetUserGetInfo": "syscall", - "syscall.NetlinkMessage": "syscall", - "syscall.NetlinkRIB": "syscall", - "syscall.NetlinkRouteAttr": "syscall", - "syscall.NetlinkRouteRequest": "syscall", - "syscall.NewCallback": "syscall", - "syscall.NewCallbackCDecl": "syscall", - "syscall.NewLazyDLL": "syscall", - "syscall.NlAttr": "syscall", - "syscall.NlMsgerr": "syscall", - "syscall.NlMsghdr": "syscall", - "syscall.NsecToFiletime": "syscall", - "syscall.NsecToTimespec": "syscall", - "syscall.NsecToTimeval": "syscall", - "syscall.Ntohs": "syscall", - "syscall.OCRNL": "syscall", - "syscall.OFDEL": "syscall", - "syscall.OFILL": "syscall", - "syscall.OFIOGETBMAP": "syscall", - "syscall.OID_PKIX_KP_SERVER_AUTH": "syscall", - "syscall.OID_SERVER_GATED_CRYPTO": "syscall", - "syscall.OID_SGC_NETSCAPE": "syscall", - "syscall.OLCUC": "syscall", - "syscall.ONLCR": "syscall", - "syscall.ONLRET": "syscall", - "syscall.ONOCR": "syscall", - "syscall.ONOEOT": "syscall", - "syscall.OPEN_ALWAYS": "syscall", - "syscall.OPEN_EXISTING": "syscall", - "syscall.OPOST": "syscall", - "syscall.O_ACCMODE": "syscall", - "syscall.O_ALERT": "syscall", - "syscall.O_ALT_IO": "syscall", - "syscall.O_APPEND": "syscall", - "syscall.O_ASYNC": "syscall", - "syscall.O_CLOEXEC": "syscall", - "syscall.O_CREAT": "syscall", - "syscall.O_DIRECT": "syscall", - "syscall.O_DIRECTORY": "syscall", - "syscall.O_DSYNC": "syscall", - "syscall.O_EVTONLY": "syscall", - "syscall.O_EXCL": "syscall", - "syscall.O_EXEC": "syscall", - "syscall.O_EXLOCK": "syscall", - "syscall.O_FSYNC": "syscall", - "syscall.O_LARGEFILE": "syscall", - "syscall.O_NDELAY": "syscall", - "syscall.O_NOATIME": "syscall", - "syscall.O_NOCTTY": "syscall", - "syscall.O_NOFOLLOW": "syscall", - "syscall.O_NONBLOCK": "syscall", - "syscall.O_NOSIGPIPE": "syscall", - "syscall.O_POPUP": "syscall", - "syscall.O_RDONLY": "syscall", - "syscall.O_RDWR": "syscall", - "syscall.O_RSYNC": "syscall", - "syscall.O_SHLOCK": "syscall", - "syscall.O_SYMLINK": "syscall", - "syscall.O_SYNC": "syscall", - "syscall.O_TRUNC": "syscall", - "syscall.O_TTY_INIT": "syscall", - "syscall.O_WRONLY": "syscall", - "syscall.Open": "syscall", - "syscall.OpenCurrentProcessToken": "syscall", - "syscall.OpenProcess": "syscall", - "syscall.OpenProcessToken": "syscall", - "syscall.Openat": "syscall", - "syscall.Overlapped": "syscall", - "syscall.PACKET_ADD_MEMBERSHIP": "syscall", - "syscall.PACKET_BROADCAST": "syscall", - "syscall.PACKET_DROP_MEMBERSHIP": "syscall", - "syscall.PACKET_FASTROUTE": "syscall", - "syscall.PACKET_HOST": "syscall", - "syscall.PACKET_LOOPBACK": "syscall", - "syscall.PACKET_MR_ALLMULTI": "syscall", - "syscall.PACKET_MR_MULTICAST": "syscall", - "syscall.PACKET_MR_PROMISC": "syscall", - "syscall.PACKET_MULTICAST": "syscall", - "syscall.PACKET_OTHERHOST": "syscall", - "syscall.PACKET_OUTGOING": "syscall", - "syscall.PACKET_RECV_OUTPUT": "syscall", - "syscall.PACKET_RX_RING": "syscall", - "syscall.PACKET_STATISTICS": "syscall", - "syscall.PAGE_EXECUTE_READ": "syscall", - "syscall.PAGE_EXECUTE_READWRITE": "syscall", - "syscall.PAGE_EXECUTE_WRITECOPY": "syscall", - "syscall.PAGE_READONLY": "syscall", - "syscall.PAGE_READWRITE": "syscall", - "syscall.PAGE_WRITECOPY": "syscall", - "syscall.PARENB": "syscall", - "syscall.PARMRK": "syscall", - "syscall.PARODD": "syscall", - "syscall.PENDIN": "syscall", - "syscall.PFL_HIDDEN": "syscall", - "syscall.PFL_MATCHES_PROTOCOL_ZERO": "syscall", - "syscall.PFL_MULTIPLE_PROTO_ENTRIES": "syscall", - "syscall.PFL_NETWORKDIRECT_PROVIDER": "syscall", - "syscall.PFL_RECOMMENDED_PROTO_ENTRY": "syscall", - "syscall.PF_FLUSH": "syscall", - "syscall.PKCS_7_ASN_ENCODING": "syscall", - "syscall.PMC5_PIPELINE_FLUSH": "syscall", - "syscall.PRIO_PGRP": "syscall", - "syscall.PRIO_PROCESS": "syscall", - "syscall.PRIO_USER": "syscall", - "syscall.PRI_IOFLUSH": "syscall", - "syscall.PROCESS_QUERY_INFORMATION": "syscall", - "syscall.PROCESS_TERMINATE": "syscall", - "syscall.PROT_EXEC": "syscall", - "syscall.PROT_GROWSDOWN": "syscall", - "syscall.PROT_GROWSUP": "syscall", - "syscall.PROT_NONE": "syscall", - "syscall.PROT_READ": "syscall", - "syscall.PROT_WRITE": "syscall", - "syscall.PROV_DH_SCHANNEL": "syscall", - "syscall.PROV_DSS": "syscall", - "syscall.PROV_DSS_DH": "syscall", - "syscall.PROV_EC_ECDSA_FULL": "syscall", - "syscall.PROV_EC_ECDSA_SIG": "syscall", - "syscall.PROV_EC_ECNRA_FULL": "syscall", - "syscall.PROV_EC_ECNRA_SIG": "syscall", - "syscall.PROV_FORTEZZA": "syscall", - "syscall.PROV_INTEL_SEC": "syscall", - "syscall.PROV_MS_EXCHANGE": "syscall", - "syscall.PROV_REPLACE_OWF": "syscall", - "syscall.PROV_RNG": "syscall", - "syscall.PROV_RSA_AES": "syscall", - "syscall.PROV_RSA_FULL": "syscall", - "syscall.PROV_RSA_SCHANNEL": "syscall", - "syscall.PROV_RSA_SIG": "syscall", - "syscall.PROV_SPYRUS_LYNKS": "syscall", - "syscall.PROV_SSL": "syscall", - "syscall.PR_CAPBSET_DROP": "syscall", - "syscall.PR_CAPBSET_READ": "syscall", - "syscall.PR_CLEAR_SECCOMP_FILTER": "syscall", - "syscall.PR_ENDIAN_BIG": "syscall", - "syscall.PR_ENDIAN_LITTLE": "syscall", - "syscall.PR_ENDIAN_PPC_LITTLE": "syscall", - "syscall.PR_FPEMU_NOPRINT": "syscall", - "syscall.PR_FPEMU_SIGFPE": "syscall", - "syscall.PR_FP_EXC_ASYNC": "syscall", - "syscall.PR_FP_EXC_DISABLED": "syscall", - "syscall.PR_FP_EXC_DIV": "syscall", - "syscall.PR_FP_EXC_INV": "syscall", - "syscall.PR_FP_EXC_NONRECOV": "syscall", - "syscall.PR_FP_EXC_OVF": "syscall", - "syscall.PR_FP_EXC_PRECISE": "syscall", - "syscall.PR_FP_EXC_RES": "syscall", - "syscall.PR_FP_EXC_SW_ENABLE": "syscall", - "syscall.PR_FP_EXC_UND": "syscall", - "syscall.PR_GET_DUMPABLE": "syscall", - "syscall.PR_GET_ENDIAN": "syscall", - "syscall.PR_GET_FPEMU": "syscall", - "syscall.PR_GET_FPEXC": "syscall", - "syscall.PR_GET_KEEPCAPS": "syscall", - "syscall.PR_GET_NAME": "syscall", - "syscall.PR_GET_PDEATHSIG": "syscall", - "syscall.PR_GET_SECCOMP": "syscall", - "syscall.PR_GET_SECCOMP_FILTER": "syscall", - "syscall.PR_GET_SECUREBITS": "syscall", - "syscall.PR_GET_TIMERSLACK": "syscall", - "syscall.PR_GET_TIMING": "syscall", - "syscall.PR_GET_TSC": "syscall", - "syscall.PR_GET_UNALIGN": "syscall", - "syscall.PR_MCE_KILL": "syscall", - "syscall.PR_MCE_KILL_CLEAR": "syscall", - "syscall.PR_MCE_KILL_DEFAULT": "syscall", - "syscall.PR_MCE_KILL_EARLY": "syscall", - "syscall.PR_MCE_KILL_GET": "syscall", - "syscall.PR_MCE_KILL_LATE": "syscall", - "syscall.PR_MCE_KILL_SET": "syscall", - "syscall.PR_SECCOMP_FILTER_EVENT": "syscall", - "syscall.PR_SECCOMP_FILTER_SYSCALL": "syscall", - "syscall.PR_SET_DUMPABLE": "syscall", - "syscall.PR_SET_ENDIAN": "syscall", - "syscall.PR_SET_FPEMU": "syscall", - "syscall.PR_SET_FPEXC": "syscall", - "syscall.PR_SET_KEEPCAPS": "syscall", - "syscall.PR_SET_NAME": "syscall", - "syscall.PR_SET_PDEATHSIG": "syscall", - "syscall.PR_SET_PTRACER": "syscall", - "syscall.PR_SET_SECCOMP": "syscall", - "syscall.PR_SET_SECCOMP_FILTER": "syscall", - "syscall.PR_SET_SECUREBITS": "syscall", - "syscall.PR_SET_TIMERSLACK": "syscall", - "syscall.PR_SET_TIMING": "syscall", - "syscall.PR_SET_TSC": "syscall", - "syscall.PR_SET_UNALIGN": "syscall", - "syscall.PR_TASK_PERF_EVENTS_DISABLE": "syscall", - "syscall.PR_TASK_PERF_EVENTS_ENABLE": "syscall", - "syscall.PR_TIMING_STATISTICAL": "syscall", - "syscall.PR_TIMING_TIMESTAMP": "syscall", - "syscall.PR_TSC_ENABLE": "syscall", - "syscall.PR_TSC_SIGSEGV": "syscall", - "syscall.PR_UNALIGN_NOPRINT": "syscall", - "syscall.PR_UNALIGN_SIGBUS": "syscall", - "syscall.PTRACE_ARCH_PRCTL": "syscall", - "syscall.PTRACE_ATTACH": "syscall", - "syscall.PTRACE_CONT": "syscall", - "syscall.PTRACE_DETACH": "syscall", - "syscall.PTRACE_EVENT_CLONE": "syscall", - "syscall.PTRACE_EVENT_EXEC": "syscall", - "syscall.PTRACE_EVENT_EXIT": "syscall", - "syscall.PTRACE_EVENT_FORK": "syscall", - "syscall.PTRACE_EVENT_VFORK": "syscall", - "syscall.PTRACE_EVENT_VFORK_DONE": "syscall", - "syscall.PTRACE_GETCRUNCHREGS": "syscall", - "syscall.PTRACE_GETEVENTMSG": "syscall", - "syscall.PTRACE_GETFPREGS": "syscall", - "syscall.PTRACE_GETFPXREGS": "syscall", - "syscall.PTRACE_GETHBPREGS": "syscall", - "syscall.PTRACE_GETREGS": "syscall", - "syscall.PTRACE_GETREGSET": "syscall", - "syscall.PTRACE_GETSIGINFO": "syscall", - "syscall.PTRACE_GETVFPREGS": "syscall", - "syscall.PTRACE_GETWMMXREGS": "syscall", - "syscall.PTRACE_GET_THREAD_AREA": "syscall", - "syscall.PTRACE_KILL": "syscall", - "syscall.PTRACE_OLDSETOPTIONS": "syscall", - "syscall.PTRACE_O_MASK": "syscall", - "syscall.PTRACE_O_TRACECLONE": "syscall", - "syscall.PTRACE_O_TRACEEXEC": "syscall", - "syscall.PTRACE_O_TRACEEXIT": "syscall", - "syscall.PTRACE_O_TRACEFORK": "syscall", - "syscall.PTRACE_O_TRACESYSGOOD": "syscall", - "syscall.PTRACE_O_TRACEVFORK": "syscall", - "syscall.PTRACE_O_TRACEVFORKDONE": "syscall", - "syscall.PTRACE_PEEKDATA": "syscall", - "syscall.PTRACE_PEEKTEXT": "syscall", - "syscall.PTRACE_PEEKUSR": "syscall", - "syscall.PTRACE_POKEDATA": "syscall", - "syscall.PTRACE_POKETEXT": "syscall", - "syscall.PTRACE_POKEUSR": "syscall", - "syscall.PTRACE_SETCRUNCHREGS": "syscall", - "syscall.PTRACE_SETFPREGS": "syscall", - "syscall.PTRACE_SETFPXREGS": "syscall", - "syscall.PTRACE_SETHBPREGS": "syscall", - "syscall.PTRACE_SETOPTIONS": "syscall", - "syscall.PTRACE_SETREGS": "syscall", - "syscall.PTRACE_SETREGSET": "syscall", - "syscall.PTRACE_SETSIGINFO": "syscall", - "syscall.PTRACE_SETVFPREGS": "syscall", - "syscall.PTRACE_SETWMMXREGS": "syscall", - "syscall.PTRACE_SET_SYSCALL": "syscall", - "syscall.PTRACE_SET_THREAD_AREA": "syscall", - "syscall.PTRACE_SINGLEBLOCK": "syscall", - "syscall.PTRACE_SINGLESTEP": "syscall", - "syscall.PTRACE_SYSCALL": "syscall", - "syscall.PTRACE_SYSEMU": "syscall", - "syscall.PTRACE_SYSEMU_SINGLESTEP": "syscall", - "syscall.PTRACE_TRACEME": "syscall", - "syscall.PT_ATTACH": "syscall", - "syscall.PT_ATTACHEXC": "syscall", - "syscall.PT_CONTINUE": "syscall", - "syscall.PT_DATA_ADDR": "syscall", - "syscall.PT_DENY_ATTACH": "syscall", - "syscall.PT_DETACH": "syscall", - "syscall.PT_FIRSTMACH": "syscall", - "syscall.PT_FORCEQUOTA": "syscall", - "syscall.PT_KILL": "syscall", - "syscall.PT_MASK": "syscall", - "syscall.PT_READ_D": "syscall", - "syscall.PT_READ_I": "syscall", - "syscall.PT_READ_U": "syscall", - "syscall.PT_SIGEXC": "syscall", - "syscall.PT_STEP": "syscall", - "syscall.PT_TEXT_ADDR": "syscall", - "syscall.PT_TEXT_END_ADDR": "syscall", - "syscall.PT_THUPDATE": "syscall", - "syscall.PT_TRACE_ME": "syscall", - "syscall.PT_WRITE_D": "syscall", - "syscall.PT_WRITE_I": "syscall", - "syscall.PT_WRITE_U": "syscall", - "syscall.ParseDirent": "syscall", - "syscall.ParseNetlinkMessage": "syscall", - "syscall.ParseNetlinkRouteAttr": "syscall", - "syscall.ParseRoutingMessage": "syscall", - "syscall.ParseRoutingSockaddr": "syscall", - "syscall.ParseSocketControlMessage": "syscall", - "syscall.ParseUnixCredentials": "syscall", - "syscall.ParseUnixRights": "syscall", - "syscall.PathMax": "syscall", - "syscall.Pathconf": "syscall", - "syscall.Pause": "syscall", - "syscall.Pipe": "syscall", - "syscall.Pipe2": "syscall", - "syscall.PivotRoot": "syscall", - "syscall.PostQueuedCompletionStatus": "syscall", - "syscall.Pread": "syscall", - "syscall.Proc": "syscall", - "syscall.ProcAttr": "syscall", - "syscall.Process32First": "syscall", - "syscall.Process32Next": "syscall", - "syscall.ProcessEntry32": "syscall", - "syscall.ProcessInformation": "syscall", - "syscall.Protoent": "syscall", - "syscall.PtraceAttach": "syscall", - "syscall.PtraceCont": "syscall", - "syscall.PtraceDetach": "syscall", - "syscall.PtraceGetEventMsg": "syscall", - "syscall.PtraceGetRegs": "syscall", - "syscall.PtracePeekData": "syscall", - "syscall.PtracePeekText": "syscall", - "syscall.PtracePokeData": "syscall", - "syscall.PtracePokeText": "syscall", - "syscall.PtraceRegs": "syscall", - "syscall.PtraceSetOptions": "syscall", - "syscall.PtraceSetRegs": "syscall", - "syscall.PtraceSingleStep": "syscall", - "syscall.PtraceSyscall": "syscall", - "syscall.Pwrite": "syscall", - "syscall.REG_BINARY": "syscall", - "syscall.REG_DWORD": "syscall", - "syscall.REG_DWORD_BIG_ENDIAN": "syscall", - "syscall.REG_DWORD_LITTLE_ENDIAN": "syscall", - "syscall.REG_EXPAND_SZ": "syscall", - "syscall.REG_FULL_RESOURCE_DESCRIPTOR": "syscall", - "syscall.REG_LINK": "syscall", - "syscall.REG_MULTI_SZ": "syscall", - "syscall.REG_NONE": "syscall", - "syscall.REG_QWORD": "syscall", - "syscall.REG_QWORD_LITTLE_ENDIAN": "syscall", - "syscall.REG_RESOURCE_LIST": "syscall", - "syscall.REG_RESOURCE_REQUIREMENTS_LIST": "syscall", - "syscall.REG_SZ": "syscall", - "syscall.RLIMIT_AS": "syscall", - "syscall.RLIMIT_CORE": "syscall", - "syscall.RLIMIT_CPU": "syscall", - "syscall.RLIMIT_DATA": "syscall", - "syscall.RLIMIT_FSIZE": "syscall", - "syscall.RLIMIT_NOFILE": "syscall", - "syscall.RLIMIT_STACK": "syscall", - "syscall.RLIM_INFINITY": "syscall", - "syscall.RTAX_ADVMSS": "syscall", - "syscall.RTAX_AUTHOR": "syscall", - "syscall.RTAX_BRD": "syscall", - "syscall.RTAX_CWND": "syscall", - "syscall.RTAX_DST": "syscall", - "syscall.RTAX_FEATURES": "syscall", - "syscall.RTAX_FEATURE_ALLFRAG": "syscall", - "syscall.RTAX_FEATURE_ECN": "syscall", - "syscall.RTAX_FEATURE_SACK": "syscall", - "syscall.RTAX_FEATURE_TIMESTAMP": "syscall", - "syscall.RTAX_GATEWAY": "syscall", - "syscall.RTAX_GENMASK": "syscall", - "syscall.RTAX_HOPLIMIT": "syscall", - "syscall.RTAX_IFA": "syscall", - "syscall.RTAX_IFP": "syscall", - "syscall.RTAX_INITCWND": "syscall", - "syscall.RTAX_INITRWND": "syscall", - "syscall.RTAX_LABEL": "syscall", - "syscall.RTAX_LOCK": "syscall", - "syscall.RTAX_MAX": "syscall", - "syscall.RTAX_MTU": "syscall", - "syscall.RTAX_NETMASK": "syscall", - "syscall.RTAX_REORDERING": "syscall", - "syscall.RTAX_RTO_MIN": "syscall", - "syscall.RTAX_RTT": "syscall", - "syscall.RTAX_RTTVAR": "syscall", - "syscall.RTAX_SRC": "syscall", - "syscall.RTAX_SRCMASK": "syscall", - "syscall.RTAX_SSTHRESH": "syscall", - "syscall.RTAX_TAG": "syscall", - "syscall.RTAX_UNSPEC": "syscall", - "syscall.RTAX_WINDOW": "syscall", - "syscall.RTA_ALIGNTO": "syscall", - "syscall.RTA_AUTHOR": "syscall", - "syscall.RTA_BRD": "syscall", - "syscall.RTA_CACHEINFO": "syscall", - "syscall.RTA_DST": "syscall", - "syscall.RTA_FLOW": "syscall", - "syscall.RTA_GATEWAY": "syscall", - "syscall.RTA_GENMASK": "syscall", - "syscall.RTA_IFA": "syscall", - "syscall.RTA_IFP": "syscall", - "syscall.RTA_IIF": "syscall", - "syscall.RTA_LABEL": "syscall", - "syscall.RTA_MAX": "syscall", - "syscall.RTA_METRICS": "syscall", - "syscall.RTA_MULTIPATH": "syscall", - "syscall.RTA_NETMASK": "syscall", - "syscall.RTA_OIF": "syscall", - "syscall.RTA_PREFSRC": "syscall", - "syscall.RTA_PRIORITY": "syscall", - "syscall.RTA_SRC": "syscall", - "syscall.RTA_SRCMASK": "syscall", - "syscall.RTA_TABLE": "syscall", - "syscall.RTA_TAG": "syscall", - "syscall.RTA_UNSPEC": "syscall", - "syscall.RTCF_DIRECTSRC": "syscall", - "syscall.RTCF_DOREDIRECT": "syscall", - "syscall.RTCF_LOG": "syscall", - "syscall.RTCF_MASQ": "syscall", - "syscall.RTCF_NAT": "syscall", - "syscall.RTCF_VALVE": "syscall", - "syscall.RTF_ADDRCLASSMASK": "syscall", - "syscall.RTF_ADDRCONF": "syscall", - "syscall.RTF_ALLONLINK": "syscall", - "syscall.RTF_ANNOUNCE": "syscall", - "syscall.RTF_BLACKHOLE": "syscall", - "syscall.RTF_BROADCAST": "syscall", - "syscall.RTF_CACHE": "syscall", - "syscall.RTF_CLONED": "syscall", - "syscall.RTF_CLONING": "syscall", - "syscall.RTF_CONDEMNED": "syscall", - "syscall.RTF_DEFAULT": "syscall", - "syscall.RTF_DELCLONE": "syscall", - "syscall.RTF_DONE": "syscall", - "syscall.RTF_DYNAMIC": "syscall", - "syscall.RTF_FLOW": "syscall", - "syscall.RTF_FMASK": "syscall", - "syscall.RTF_GATEWAY": "syscall", - "syscall.RTF_GWFLAG_COMPAT": "syscall", - "syscall.RTF_HOST": "syscall", - "syscall.RTF_IFREF": "syscall", - "syscall.RTF_IFSCOPE": "syscall", - "syscall.RTF_INTERFACE": "syscall", - "syscall.RTF_IRTT": "syscall", - "syscall.RTF_LINKRT": "syscall", - "syscall.RTF_LLDATA": "syscall", - "syscall.RTF_LLINFO": "syscall", - "syscall.RTF_LOCAL": "syscall", - "syscall.RTF_MASK": "syscall", - "syscall.RTF_MODIFIED": "syscall", - "syscall.RTF_MPATH": "syscall", - "syscall.RTF_MPLS": "syscall", - "syscall.RTF_MSS": "syscall", - "syscall.RTF_MTU": "syscall", - "syscall.RTF_MULTICAST": "syscall", - "syscall.RTF_NAT": "syscall", - "syscall.RTF_NOFORWARD": "syscall", - "syscall.RTF_NONEXTHOP": "syscall", - "syscall.RTF_NOPMTUDISC": "syscall", - "syscall.RTF_PERMANENT_ARP": "syscall", - "syscall.RTF_PINNED": "syscall", - "syscall.RTF_POLICY": "syscall", - "syscall.RTF_PRCLONING": "syscall", - "syscall.RTF_PROTO1": "syscall", - "syscall.RTF_PROTO2": "syscall", - "syscall.RTF_PROTO3": "syscall", - "syscall.RTF_REINSTATE": "syscall", - "syscall.RTF_REJECT": "syscall", - "syscall.RTF_RNH_LOCKED": "syscall", - "syscall.RTF_SOURCE": "syscall", - "syscall.RTF_SRC": "syscall", - "syscall.RTF_STATIC": "syscall", - "syscall.RTF_STICKY": "syscall", - "syscall.RTF_THROW": "syscall", - "syscall.RTF_TUNNEL": "syscall", - "syscall.RTF_UP": "syscall", - "syscall.RTF_USETRAILERS": "syscall", - "syscall.RTF_WASCLONED": "syscall", - "syscall.RTF_WINDOW": "syscall", - "syscall.RTF_XRESOLVE": "syscall", - "syscall.RTM_ADD": "syscall", - "syscall.RTM_BASE": "syscall", - "syscall.RTM_CHANGE": "syscall", - "syscall.RTM_CHGADDR": "syscall", - "syscall.RTM_DELACTION": "syscall", - "syscall.RTM_DELADDR": "syscall", - "syscall.RTM_DELADDRLABEL": "syscall", - "syscall.RTM_DELETE": "syscall", - "syscall.RTM_DELLINK": "syscall", - "syscall.RTM_DELMADDR": "syscall", - "syscall.RTM_DELNEIGH": "syscall", - "syscall.RTM_DELQDISC": "syscall", - "syscall.RTM_DELROUTE": "syscall", - "syscall.RTM_DELRULE": "syscall", - "syscall.RTM_DELTCLASS": "syscall", - "syscall.RTM_DELTFILTER": "syscall", - "syscall.RTM_DESYNC": "syscall", - "syscall.RTM_F_CLONED": "syscall", - "syscall.RTM_F_EQUALIZE": "syscall", - "syscall.RTM_F_NOTIFY": "syscall", - "syscall.RTM_F_PREFIX": "syscall", - "syscall.RTM_GET": "syscall", - "syscall.RTM_GET2": "syscall", - "syscall.RTM_GETACTION": "syscall", - "syscall.RTM_GETADDR": "syscall", - "syscall.RTM_GETADDRLABEL": "syscall", - "syscall.RTM_GETANYCAST": "syscall", - "syscall.RTM_GETDCB": "syscall", - "syscall.RTM_GETLINK": "syscall", - "syscall.RTM_GETMULTICAST": "syscall", - "syscall.RTM_GETNEIGH": "syscall", - "syscall.RTM_GETNEIGHTBL": "syscall", - "syscall.RTM_GETQDISC": "syscall", - "syscall.RTM_GETROUTE": "syscall", - "syscall.RTM_GETRULE": "syscall", - "syscall.RTM_GETTCLASS": "syscall", - "syscall.RTM_GETTFILTER": "syscall", - "syscall.RTM_IEEE80211": "syscall", - "syscall.RTM_IFANNOUNCE": "syscall", - "syscall.RTM_IFINFO": "syscall", - "syscall.RTM_IFINFO2": "syscall", - "syscall.RTM_LLINFO_UPD": "syscall", - "syscall.RTM_LOCK": "syscall", - "syscall.RTM_LOSING": "syscall", - "syscall.RTM_MAX": "syscall", - "syscall.RTM_MAXSIZE": "syscall", - "syscall.RTM_MISS": "syscall", - "syscall.RTM_NEWACTION": "syscall", - "syscall.RTM_NEWADDR": "syscall", - "syscall.RTM_NEWADDRLABEL": "syscall", - "syscall.RTM_NEWLINK": "syscall", - "syscall.RTM_NEWMADDR": "syscall", - "syscall.RTM_NEWMADDR2": "syscall", - "syscall.RTM_NEWNDUSEROPT": "syscall", - "syscall.RTM_NEWNEIGH": "syscall", - "syscall.RTM_NEWNEIGHTBL": "syscall", - "syscall.RTM_NEWPREFIX": "syscall", - "syscall.RTM_NEWQDISC": "syscall", - "syscall.RTM_NEWROUTE": "syscall", - "syscall.RTM_NEWRULE": "syscall", - "syscall.RTM_NEWTCLASS": "syscall", - "syscall.RTM_NEWTFILTER": "syscall", - "syscall.RTM_NR_FAMILIES": "syscall", - "syscall.RTM_NR_MSGTYPES": "syscall", - "syscall.RTM_OIFINFO": "syscall", - "syscall.RTM_OLDADD": "syscall", - "syscall.RTM_OLDDEL": "syscall", - "syscall.RTM_OOIFINFO": "syscall", - "syscall.RTM_REDIRECT": "syscall", - "syscall.RTM_RESOLVE": "syscall", - "syscall.RTM_RTTUNIT": "syscall", - "syscall.RTM_SETDCB": "syscall", - "syscall.RTM_SETGATE": "syscall", - "syscall.RTM_SETLINK": "syscall", - "syscall.RTM_SETNEIGHTBL": "syscall", - "syscall.RTM_VERSION": "syscall", - "syscall.RTNH_ALIGNTO": "syscall", - "syscall.RTNH_F_DEAD": "syscall", - "syscall.RTNH_F_ONLINK": "syscall", - "syscall.RTNH_F_PERVASIVE": "syscall", - "syscall.RTNLGRP_IPV4_IFADDR": "syscall", - "syscall.RTNLGRP_IPV4_MROUTE": "syscall", - "syscall.RTNLGRP_IPV4_ROUTE": "syscall", - "syscall.RTNLGRP_IPV4_RULE": "syscall", - "syscall.RTNLGRP_IPV6_IFADDR": "syscall", - "syscall.RTNLGRP_IPV6_IFINFO": "syscall", - "syscall.RTNLGRP_IPV6_MROUTE": "syscall", - "syscall.RTNLGRP_IPV6_PREFIX": "syscall", - "syscall.RTNLGRP_IPV6_ROUTE": "syscall", - "syscall.RTNLGRP_IPV6_RULE": "syscall", - "syscall.RTNLGRP_LINK": "syscall", - "syscall.RTNLGRP_ND_USEROPT": "syscall", - "syscall.RTNLGRP_NEIGH": "syscall", - "syscall.RTNLGRP_NONE": "syscall", - "syscall.RTNLGRP_NOTIFY": "syscall", - "syscall.RTNLGRP_TC": "syscall", - "syscall.RTN_ANYCAST": "syscall", - "syscall.RTN_BLACKHOLE": "syscall", - "syscall.RTN_BROADCAST": "syscall", - "syscall.RTN_LOCAL": "syscall", - "syscall.RTN_MAX": "syscall", - "syscall.RTN_MULTICAST": "syscall", - "syscall.RTN_NAT": "syscall", - "syscall.RTN_PROHIBIT": "syscall", - "syscall.RTN_THROW": "syscall", - "syscall.RTN_UNICAST": "syscall", - "syscall.RTN_UNREACHABLE": "syscall", - "syscall.RTN_UNSPEC": "syscall", - "syscall.RTN_XRESOLVE": "syscall", - "syscall.RTPROT_BIRD": "syscall", - "syscall.RTPROT_BOOT": "syscall", - "syscall.RTPROT_DHCP": "syscall", - "syscall.RTPROT_DNROUTED": "syscall", - "syscall.RTPROT_GATED": "syscall", - "syscall.RTPROT_KERNEL": "syscall", - "syscall.RTPROT_MRT": "syscall", - "syscall.RTPROT_NTK": "syscall", - "syscall.RTPROT_RA": "syscall", - "syscall.RTPROT_REDIRECT": "syscall", - "syscall.RTPROT_STATIC": "syscall", - "syscall.RTPROT_UNSPEC": "syscall", - "syscall.RTPROT_XORP": "syscall", - "syscall.RTPROT_ZEBRA": "syscall", - "syscall.RTV_EXPIRE": "syscall", - "syscall.RTV_HOPCOUNT": "syscall", - "syscall.RTV_MTU": "syscall", - "syscall.RTV_RPIPE": "syscall", - "syscall.RTV_RTT": "syscall", - "syscall.RTV_RTTVAR": "syscall", - "syscall.RTV_SPIPE": "syscall", - "syscall.RTV_SSTHRESH": "syscall", - "syscall.RTV_WEIGHT": "syscall", - "syscall.RT_CACHING_CONTEXT": "syscall", - "syscall.RT_CLASS_DEFAULT": "syscall", - "syscall.RT_CLASS_LOCAL": "syscall", - "syscall.RT_CLASS_MAIN": "syscall", - "syscall.RT_CLASS_MAX": "syscall", - "syscall.RT_CLASS_UNSPEC": "syscall", - "syscall.RT_DEFAULT_FIB": "syscall", - "syscall.RT_NORTREF": "syscall", - "syscall.RT_SCOPE_HOST": "syscall", - "syscall.RT_SCOPE_LINK": "syscall", - "syscall.RT_SCOPE_NOWHERE": "syscall", - "syscall.RT_SCOPE_SITE": "syscall", - "syscall.RT_SCOPE_UNIVERSE": "syscall", - "syscall.RT_TABLEID_MAX": "syscall", - "syscall.RT_TABLE_COMPAT": "syscall", - "syscall.RT_TABLE_DEFAULT": "syscall", - "syscall.RT_TABLE_LOCAL": "syscall", - "syscall.RT_TABLE_MAIN": "syscall", - "syscall.RT_TABLE_MAX": "syscall", - "syscall.RT_TABLE_UNSPEC": "syscall", - "syscall.RUSAGE_CHILDREN": "syscall", - "syscall.RUSAGE_SELF": "syscall", - "syscall.RUSAGE_THREAD": "syscall", - "syscall.Radvisory_t": "syscall", - "syscall.RawConn": "syscall", - "syscall.RawSockaddr": "syscall", - "syscall.RawSockaddrAny": "syscall", - "syscall.RawSockaddrDatalink": "syscall", - "syscall.RawSockaddrInet4": "syscall", - "syscall.RawSockaddrInet6": "syscall", - "syscall.RawSockaddrLinklayer": "syscall", - "syscall.RawSockaddrNetlink": "syscall", - "syscall.RawSockaddrUnix": "syscall", - "syscall.RawSyscall": "syscall", - "syscall.RawSyscall6": "syscall", - "syscall.Read": "syscall", - "syscall.ReadConsole": "syscall", - "syscall.ReadDirectoryChanges": "syscall", - "syscall.ReadDirent": "syscall", - "syscall.ReadFile": "syscall", - "syscall.Readlink": "syscall", - "syscall.Reboot": "syscall", - "syscall.Recvfrom": "syscall", - "syscall.Recvmsg": "syscall", - "syscall.RegCloseKey": "syscall", - "syscall.RegEnumKeyEx": "syscall", - "syscall.RegOpenKeyEx": "syscall", - "syscall.RegQueryInfoKey": "syscall", - "syscall.RegQueryValueEx": "syscall", - "syscall.RemoveDirectory": "syscall", - "syscall.Removexattr": "syscall", - "syscall.Rename": "syscall", - "syscall.Renameat": "syscall", - "syscall.Revoke": "syscall", - "syscall.Rlimit": "syscall", - "syscall.Rmdir": "syscall", - "syscall.RouteMessage": "syscall", - "syscall.RouteRIB": "syscall", - "syscall.RtAttr": "syscall", - "syscall.RtGenmsg": "syscall", - "syscall.RtMetrics": "syscall", - "syscall.RtMsg": "syscall", - "syscall.RtMsghdr": "syscall", - "syscall.RtNexthop": "syscall", - "syscall.Rusage": "syscall", - "syscall.SCM_BINTIME": "syscall", - "syscall.SCM_CREDENTIALS": "syscall", - "syscall.SCM_CREDS": "syscall", - "syscall.SCM_RIGHTS": "syscall", - "syscall.SCM_TIMESTAMP": "syscall", - "syscall.SCM_TIMESTAMPING": "syscall", - "syscall.SCM_TIMESTAMPNS": "syscall", - "syscall.SCM_TIMESTAMP_MONOTONIC": "syscall", - "syscall.SHUT_RD": "syscall", - "syscall.SHUT_RDWR": "syscall", - "syscall.SHUT_WR": "syscall", - "syscall.SID": "syscall", - "syscall.SIDAndAttributes": "syscall", - "syscall.SIGABRT": "syscall", - "syscall.SIGALRM": "syscall", - "syscall.SIGBUS": "syscall", - "syscall.SIGCHLD": "syscall", - "syscall.SIGCLD": "syscall", - "syscall.SIGCONT": "syscall", - "syscall.SIGEMT": "syscall", - "syscall.SIGFPE": "syscall", - "syscall.SIGHUP": "syscall", - "syscall.SIGILL": "syscall", - "syscall.SIGINFO": "syscall", - "syscall.SIGINT": "syscall", - "syscall.SIGIO": "syscall", - "syscall.SIGIOT": "syscall", - "syscall.SIGKILL": "syscall", - "syscall.SIGLIBRT": "syscall", - "syscall.SIGLWP": "syscall", - "syscall.SIGPIPE": "syscall", - "syscall.SIGPOLL": "syscall", - "syscall.SIGPROF": "syscall", - "syscall.SIGPWR": "syscall", - "syscall.SIGQUIT": "syscall", - "syscall.SIGSEGV": "syscall", - "syscall.SIGSTKFLT": "syscall", - "syscall.SIGSTOP": "syscall", - "syscall.SIGSYS": "syscall", - "syscall.SIGTERM": "syscall", - "syscall.SIGTHR": "syscall", - "syscall.SIGTRAP": "syscall", - "syscall.SIGTSTP": "syscall", - "syscall.SIGTTIN": "syscall", - "syscall.SIGTTOU": "syscall", - "syscall.SIGUNUSED": "syscall", - "syscall.SIGURG": "syscall", - "syscall.SIGUSR1": "syscall", - "syscall.SIGUSR2": "syscall", - "syscall.SIGVTALRM": "syscall", - "syscall.SIGWINCH": "syscall", - "syscall.SIGXCPU": "syscall", - "syscall.SIGXFSZ": "syscall", - "syscall.SIOCADDDLCI": "syscall", - "syscall.SIOCADDMULTI": "syscall", - "syscall.SIOCADDRT": "syscall", - "syscall.SIOCAIFADDR": "syscall", - "syscall.SIOCAIFGROUP": "syscall", - "syscall.SIOCALIFADDR": "syscall", - "syscall.SIOCARPIPLL": "syscall", - "syscall.SIOCATMARK": "syscall", - "syscall.SIOCAUTOADDR": "syscall", - "syscall.SIOCAUTONETMASK": "syscall", - "syscall.SIOCBRDGADD": "syscall", - "syscall.SIOCBRDGADDS": "syscall", - "syscall.SIOCBRDGARL": "syscall", - "syscall.SIOCBRDGDADDR": "syscall", - "syscall.SIOCBRDGDEL": "syscall", - "syscall.SIOCBRDGDELS": "syscall", - "syscall.SIOCBRDGFLUSH": "syscall", - "syscall.SIOCBRDGFRL": "syscall", - "syscall.SIOCBRDGGCACHE": "syscall", - "syscall.SIOCBRDGGFD": "syscall", - "syscall.SIOCBRDGGHT": "syscall", - "syscall.SIOCBRDGGIFFLGS": "syscall", - "syscall.SIOCBRDGGMA": "syscall", - "syscall.SIOCBRDGGPARAM": "syscall", - "syscall.SIOCBRDGGPRI": "syscall", - "syscall.SIOCBRDGGRL": "syscall", - "syscall.SIOCBRDGGSIFS": "syscall", - "syscall.SIOCBRDGGTO": "syscall", - "syscall.SIOCBRDGIFS": "syscall", - "syscall.SIOCBRDGRTS": "syscall", - "syscall.SIOCBRDGSADDR": "syscall", - "syscall.SIOCBRDGSCACHE": "syscall", - "syscall.SIOCBRDGSFD": "syscall", - "syscall.SIOCBRDGSHT": "syscall", - "syscall.SIOCBRDGSIFCOST": "syscall", - "syscall.SIOCBRDGSIFFLGS": "syscall", - "syscall.SIOCBRDGSIFPRIO": "syscall", - "syscall.SIOCBRDGSMA": "syscall", - "syscall.SIOCBRDGSPRI": "syscall", - "syscall.SIOCBRDGSPROTO": "syscall", - "syscall.SIOCBRDGSTO": "syscall", - "syscall.SIOCBRDGSTXHC": "syscall", - "syscall.SIOCDARP": "syscall", - "syscall.SIOCDELDLCI": "syscall", - "syscall.SIOCDELMULTI": "syscall", - "syscall.SIOCDELRT": "syscall", - "syscall.SIOCDEVPRIVATE": "syscall", - "syscall.SIOCDIFADDR": "syscall", - "syscall.SIOCDIFGROUP": "syscall", - "syscall.SIOCDIFPHYADDR": "syscall", - "syscall.SIOCDLIFADDR": "syscall", - "syscall.SIOCDRARP": "syscall", - "syscall.SIOCGARP": "syscall", - "syscall.SIOCGDRVSPEC": "syscall", - "syscall.SIOCGETKALIVE": "syscall", - "syscall.SIOCGETLABEL": "syscall", - "syscall.SIOCGETPFLOW": "syscall", - "syscall.SIOCGETPFSYNC": "syscall", - "syscall.SIOCGETSGCNT": "syscall", - "syscall.SIOCGETVIFCNT": "syscall", - "syscall.SIOCGETVLAN": "syscall", - "syscall.SIOCGHIWAT": "syscall", - "syscall.SIOCGIFADDR": "syscall", - "syscall.SIOCGIFADDRPREF": "syscall", - "syscall.SIOCGIFALIAS": "syscall", - "syscall.SIOCGIFALTMTU": "syscall", - "syscall.SIOCGIFASYNCMAP": "syscall", - "syscall.SIOCGIFBOND": "syscall", - "syscall.SIOCGIFBR": "syscall", - "syscall.SIOCGIFBRDADDR": "syscall", - "syscall.SIOCGIFCAP": "syscall", - "syscall.SIOCGIFCONF": "syscall", - "syscall.SIOCGIFCOUNT": "syscall", - "syscall.SIOCGIFDATA": "syscall", - "syscall.SIOCGIFDESCR": "syscall", - "syscall.SIOCGIFDEVMTU": "syscall", - "syscall.SIOCGIFDLT": "syscall", - "syscall.SIOCGIFDSTADDR": "syscall", - "syscall.SIOCGIFENCAP": "syscall", - "syscall.SIOCGIFFIB": "syscall", - "syscall.SIOCGIFFLAGS": "syscall", - "syscall.SIOCGIFGATTR": "syscall", - "syscall.SIOCGIFGENERIC": "syscall", - "syscall.SIOCGIFGMEMB": "syscall", - "syscall.SIOCGIFGROUP": "syscall", - "syscall.SIOCGIFHARDMTU": "syscall", - "syscall.SIOCGIFHWADDR": "syscall", - "syscall.SIOCGIFINDEX": "syscall", - "syscall.SIOCGIFKPI": "syscall", - "syscall.SIOCGIFMAC": "syscall", - "syscall.SIOCGIFMAP": "syscall", - "syscall.SIOCGIFMEDIA": "syscall", - "syscall.SIOCGIFMEM": "syscall", - "syscall.SIOCGIFMETRIC": "syscall", - "syscall.SIOCGIFMTU": "syscall", - "syscall.SIOCGIFNAME": "syscall", - "syscall.SIOCGIFNETMASK": "syscall", - "syscall.SIOCGIFPDSTADDR": "syscall", - "syscall.SIOCGIFPFLAGS": "syscall", - "syscall.SIOCGIFPHYS": "syscall", - "syscall.SIOCGIFPRIORITY": "syscall", - "syscall.SIOCGIFPSRCADDR": "syscall", - "syscall.SIOCGIFRDOMAIN": "syscall", - "syscall.SIOCGIFRTLABEL": "syscall", - "syscall.SIOCGIFSLAVE": "syscall", - "syscall.SIOCGIFSTATUS": "syscall", - "syscall.SIOCGIFTIMESLOT": "syscall", - "syscall.SIOCGIFTXQLEN": "syscall", - "syscall.SIOCGIFVLAN": "syscall", - "syscall.SIOCGIFWAKEFLAGS": "syscall", - "syscall.SIOCGIFXFLAGS": "syscall", - "syscall.SIOCGLIFADDR": "syscall", - "syscall.SIOCGLIFPHYADDR": "syscall", - "syscall.SIOCGLIFPHYRTABLE": "syscall", - "syscall.SIOCGLIFPHYTTL": "syscall", - "syscall.SIOCGLINKSTR": "syscall", - "syscall.SIOCGLOWAT": "syscall", - "syscall.SIOCGPGRP": "syscall", - "syscall.SIOCGPRIVATE_0": "syscall", - "syscall.SIOCGPRIVATE_1": "syscall", - "syscall.SIOCGRARP": "syscall", - "syscall.SIOCGSPPPPARAMS": "syscall", - "syscall.SIOCGSTAMP": "syscall", - "syscall.SIOCGSTAMPNS": "syscall", - "syscall.SIOCGVH": "syscall", - "syscall.SIOCGVNETID": "syscall", - "syscall.SIOCIFCREATE": "syscall", - "syscall.SIOCIFCREATE2": "syscall", - "syscall.SIOCIFDESTROY": "syscall", - "syscall.SIOCIFGCLONERS": "syscall", - "syscall.SIOCINITIFADDR": "syscall", - "syscall.SIOCPROTOPRIVATE": "syscall", - "syscall.SIOCRSLVMULTI": "syscall", - "syscall.SIOCRTMSG": "syscall", - "syscall.SIOCSARP": "syscall", - "syscall.SIOCSDRVSPEC": "syscall", - "syscall.SIOCSETKALIVE": "syscall", - "syscall.SIOCSETLABEL": "syscall", - "syscall.SIOCSETPFLOW": "syscall", - "syscall.SIOCSETPFSYNC": "syscall", - "syscall.SIOCSETVLAN": "syscall", - "syscall.SIOCSHIWAT": "syscall", - "syscall.SIOCSIFADDR": "syscall", - "syscall.SIOCSIFADDRPREF": "syscall", - "syscall.SIOCSIFALTMTU": "syscall", - "syscall.SIOCSIFASYNCMAP": "syscall", - "syscall.SIOCSIFBOND": "syscall", - "syscall.SIOCSIFBR": "syscall", - "syscall.SIOCSIFBRDADDR": "syscall", - "syscall.SIOCSIFCAP": "syscall", - "syscall.SIOCSIFDESCR": "syscall", - "syscall.SIOCSIFDSTADDR": "syscall", - "syscall.SIOCSIFENCAP": "syscall", - "syscall.SIOCSIFFIB": "syscall", - "syscall.SIOCSIFFLAGS": "syscall", - "syscall.SIOCSIFGATTR": "syscall", - "syscall.SIOCSIFGENERIC": "syscall", - "syscall.SIOCSIFHWADDR": "syscall", - "syscall.SIOCSIFHWBROADCAST": "syscall", - "syscall.SIOCSIFKPI": "syscall", - "syscall.SIOCSIFLINK": "syscall", - "syscall.SIOCSIFLLADDR": "syscall", - "syscall.SIOCSIFMAC": "syscall", - "syscall.SIOCSIFMAP": "syscall", - "syscall.SIOCSIFMEDIA": "syscall", - "syscall.SIOCSIFMEM": "syscall", - "syscall.SIOCSIFMETRIC": "syscall", - "syscall.SIOCSIFMTU": "syscall", - "syscall.SIOCSIFNAME": "syscall", - "syscall.SIOCSIFNETMASK": "syscall", - "syscall.SIOCSIFPFLAGS": "syscall", - "syscall.SIOCSIFPHYADDR": "syscall", - "syscall.SIOCSIFPHYS": "syscall", - "syscall.SIOCSIFPRIORITY": "syscall", - "syscall.SIOCSIFRDOMAIN": "syscall", - "syscall.SIOCSIFRTLABEL": "syscall", - "syscall.SIOCSIFRVNET": "syscall", - "syscall.SIOCSIFSLAVE": "syscall", - "syscall.SIOCSIFTIMESLOT": "syscall", - "syscall.SIOCSIFTXQLEN": "syscall", - "syscall.SIOCSIFVLAN": "syscall", - "syscall.SIOCSIFVNET": "syscall", - "syscall.SIOCSIFXFLAGS": "syscall", - "syscall.SIOCSLIFPHYADDR": "syscall", - "syscall.SIOCSLIFPHYRTABLE": "syscall", - "syscall.SIOCSLIFPHYTTL": "syscall", - "syscall.SIOCSLINKSTR": "syscall", - "syscall.SIOCSLOWAT": "syscall", - "syscall.SIOCSPGRP": "syscall", - "syscall.SIOCSRARP": "syscall", - "syscall.SIOCSSPPPPARAMS": "syscall", - "syscall.SIOCSVH": "syscall", - "syscall.SIOCSVNETID": "syscall", - "syscall.SIOCZIFDATA": "syscall", - "syscall.SIO_GET_EXTENSION_FUNCTION_POINTER": "syscall", - "syscall.SIO_GET_INTERFACE_LIST": "syscall", - "syscall.SIO_KEEPALIVE_VALS": "syscall", - "syscall.SIO_UDP_CONNRESET": "syscall", - "syscall.SOCK_CLOEXEC": "syscall", - "syscall.SOCK_DCCP": "syscall", - "syscall.SOCK_DGRAM": "syscall", - "syscall.SOCK_FLAGS_MASK": "syscall", - "syscall.SOCK_MAXADDRLEN": "syscall", - "syscall.SOCK_NONBLOCK": "syscall", - "syscall.SOCK_NOSIGPIPE": "syscall", - "syscall.SOCK_PACKET": "syscall", - "syscall.SOCK_RAW": "syscall", - "syscall.SOCK_RDM": "syscall", - "syscall.SOCK_SEQPACKET": "syscall", - "syscall.SOCK_STREAM": "syscall", - "syscall.SOL_AAL": "syscall", - "syscall.SOL_ATM": "syscall", - "syscall.SOL_DECNET": "syscall", - "syscall.SOL_ICMPV6": "syscall", - "syscall.SOL_IP": "syscall", - "syscall.SOL_IPV6": "syscall", - "syscall.SOL_IRDA": "syscall", - "syscall.SOL_PACKET": "syscall", - "syscall.SOL_RAW": "syscall", - "syscall.SOL_SOCKET": "syscall", - "syscall.SOL_TCP": "syscall", - "syscall.SOL_X25": "syscall", - "syscall.SOMAXCONN": "syscall", - "syscall.SO_ACCEPTCONN": "syscall", - "syscall.SO_ACCEPTFILTER": "syscall", - "syscall.SO_ATTACH_FILTER": "syscall", - "syscall.SO_BINDANY": "syscall", - "syscall.SO_BINDTODEVICE": "syscall", - "syscall.SO_BINTIME": "syscall", - "syscall.SO_BROADCAST": "syscall", - "syscall.SO_BSDCOMPAT": "syscall", - "syscall.SO_DEBUG": "syscall", - "syscall.SO_DETACH_FILTER": "syscall", - "syscall.SO_DOMAIN": "syscall", - "syscall.SO_DONTROUTE": "syscall", - "syscall.SO_DONTTRUNC": "syscall", - "syscall.SO_ERROR": "syscall", - "syscall.SO_KEEPALIVE": "syscall", - "syscall.SO_LABEL": "syscall", - "syscall.SO_LINGER": "syscall", - "syscall.SO_LINGER_SEC": "syscall", - "syscall.SO_LISTENINCQLEN": "syscall", - "syscall.SO_LISTENQLEN": "syscall", - "syscall.SO_LISTENQLIMIT": "syscall", - "syscall.SO_MARK": "syscall", - "syscall.SO_NETPROC": "syscall", - "syscall.SO_NKE": "syscall", - "syscall.SO_NOADDRERR": "syscall", - "syscall.SO_NOHEADER": "syscall", - "syscall.SO_NOSIGPIPE": "syscall", - "syscall.SO_NOTIFYCONFLICT": "syscall", - "syscall.SO_NO_CHECK": "syscall", - "syscall.SO_NO_DDP": "syscall", - "syscall.SO_NO_OFFLOAD": "syscall", - "syscall.SO_NP_EXTENSIONS": "syscall", - "syscall.SO_NREAD": "syscall", - "syscall.SO_NWRITE": "syscall", - "syscall.SO_OOBINLINE": "syscall", - "syscall.SO_OVERFLOWED": "syscall", - "syscall.SO_PASSCRED": "syscall", - "syscall.SO_PASSSEC": "syscall", - "syscall.SO_PEERCRED": "syscall", - "syscall.SO_PEERLABEL": "syscall", - "syscall.SO_PEERNAME": "syscall", - "syscall.SO_PEERSEC": "syscall", - "syscall.SO_PRIORITY": "syscall", - "syscall.SO_PROTOCOL": "syscall", - "syscall.SO_PROTOTYPE": "syscall", - "syscall.SO_RANDOMPORT": "syscall", - "syscall.SO_RCVBUF": "syscall", - "syscall.SO_RCVBUFFORCE": "syscall", - "syscall.SO_RCVLOWAT": "syscall", - "syscall.SO_RCVTIMEO": "syscall", - "syscall.SO_RESTRICTIONS": "syscall", - "syscall.SO_RESTRICT_DENYIN": "syscall", - "syscall.SO_RESTRICT_DENYOUT": "syscall", - "syscall.SO_RESTRICT_DENYSET": "syscall", - "syscall.SO_REUSEADDR": "syscall", - "syscall.SO_REUSEPORT": "syscall", - "syscall.SO_REUSESHAREUID": "syscall", - "syscall.SO_RTABLE": "syscall", - "syscall.SO_RXQ_OVFL": "syscall", - "syscall.SO_SECURITY_AUTHENTICATION": "syscall", - "syscall.SO_SECURITY_ENCRYPTION_NETWORK": "syscall", - "syscall.SO_SECURITY_ENCRYPTION_TRANSPORT": "syscall", - "syscall.SO_SETFIB": "syscall", - "syscall.SO_SNDBUF": "syscall", - "syscall.SO_SNDBUFFORCE": "syscall", - "syscall.SO_SNDLOWAT": "syscall", - "syscall.SO_SNDTIMEO": "syscall", - "syscall.SO_SPLICE": "syscall", - "syscall.SO_TIMESTAMP": "syscall", - "syscall.SO_TIMESTAMPING": "syscall", - "syscall.SO_TIMESTAMPNS": "syscall", - "syscall.SO_TIMESTAMP_MONOTONIC": "syscall", - "syscall.SO_TYPE": "syscall", - "syscall.SO_UPCALLCLOSEWAIT": "syscall", - "syscall.SO_UPDATE_ACCEPT_CONTEXT": "syscall", - "syscall.SO_UPDATE_CONNECT_CONTEXT": "syscall", - "syscall.SO_USELOOPBACK": "syscall", - "syscall.SO_USER_COOKIE": "syscall", - "syscall.SO_VENDOR": "syscall", - "syscall.SO_WANTMORE": "syscall", - "syscall.SO_WANTOOBFLAG": "syscall", - "syscall.SSLExtraCertChainPolicyPara": "syscall", - "syscall.STANDARD_RIGHTS_ALL": "syscall", - "syscall.STANDARD_RIGHTS_EXECUTE": "syscall", - "syscall.STANDARD_RIGHTS_READ": "syscall", - "syscall.STANDARD_RIGHTS_REQUIRED": "syscall", - "syscall.STANDARD_RIGHTS_WRITE": "syscall", - "syscall.STARTF_USESHOWWINDOW": "syscall", - "syscall.STARTF_USESTDHANDLES": "syscall", - "syscall.STD_ERROR_HANDLE": "syscall", - "syscall.STD_INPUT_HANDLE": "syscall", - "syscall.STD_OUTPUT_HANDLE": "syscall", - "syscall.SUBLANG_ENGLISH_US": "syscall", - "syscall.SW_FORCEMINIMIZE": "syscall", - "syscall.SW_HIDE": "syscall", - "syscall.SW_MAXIMIZE": "syscall", - "syscall.SW_MINIMIZE": "syscall", - "syscall.SW_NORMAL": "syscall", - "syscall.SW_RESTORE": "syscall", - "syscall.SW_SHOW": "syscall", - "syscall.SW_SHOWDEFAULT": "syscall", - "syscall.SW_SHOWMAXIMIZED": "syscall", - "syscall.SW_SHOWMINIMIZED": "syscall", - "syscall.SW_SHOWMINNOACTIVE": "syscall", - "syscall.SW_SHOWNA": "syscall", - "syscall.SW_SHOWNOACTIVATE": "syscall", - "syscall.SW_SHOWNORMAL": "syscall", - "syscall.SYMBOLIC_LINK_FLAG_DIRECTORY": "syscall", - "syscall.SYNCHRONIZE": "syscall", - "syscall.SYSCTL_VERSION": "syscall", - "syscall.SYSCTL_VERS_0": "syscall", - "syscall.SYSCTL_VERS_1": "syscall", - "syscall.SYSCTL_VERS_MASK": "syscall", - "syscall.SYS_ABORT2": "syscall", - "syscall.SYS_ACCEPT": "syscall", - "syscall.SYS_ACCEPT4": "syscall", - "syscall.SYS_ACCEPT_NOCANCEL": "syscall", - "syscall.SYS_ACCESS": "syscall", - "syscall.SYS_ACCESS_EXTENDED": "syscall", - "syscall.SYS_ACCT": "syscall", - "syscall.SYS_ADD_KEY": "syscall", - "syscall.SYS_ADD_PROFIL": "syscall", - "syscall.SYS_ADJFREQ": "syscall", - "syscall.SYS_ADJTIME": "syscall", - "syscall.SYS_ADJTIMEX": "syscall", - "syscall.SYS_AFS_SYSCALL": "syscall", - "syscall.SYS_AIO_CANCEL": "syscall", - "syscall.SYS_AIO_ERROR": "syscall", - "syscall.SYS_AIO_FSYNC": "syscall", - "syscall.SYS_AIO_READ": "syscall", - "syscall.SYS_AIO_RETURN": "syscall", - "syscall.SYS_AIO_SUSPEND": "syscall", - "syscall.SYS_AIO_SUSPEND_NOCANCEL": "syscall", - "syscall.SYS_AIO_WRITE": "syscall", - "syscall.SYS_ALARM": "syscall", - "syscall.SYS_ARCH_PRCTL": "syscall", - "syscall.SYS_ARM_FADVISE64_64": "syscall", - "syscall.SYS_ARM_SYNC_FILE_RANGE": "syscall", - "syscall.SYS_ATGETMSG": "syscall", - "syscall.SYS_ATPGETREQ": "syscall", - "syscall.SYS_ATPGETRSP": "syscall", - "syscall.SYS_ATPSNDREQ": "syscall", - "syscall.SYS_ATPSNDRSP": "syscall", - "syscall.SYS_ATPUTMSG": "syscall", - "syscall.SYS_ATSOCKET": "syscall", - "syscall.SYS_AUDIT": "syscall", - "syscall.SYS_AUDITCTL": "syscall", - "syscall.SYS_AUDITON": "syscall", - "syscall.SYS_AUDIT_SESSION_JOIN": "syscall", - "syscall.SYS_AUDIT_SESSION_PORT": "syscall", - "syscall.SYS_AUDIT_SESSION_SELF": "syscall", - "syscall.SYS_BDFLUSH": "syscall", - "syscall.SYS_BIND": "syscall", - "syscall.SYS_BINDAT": "syscall", - "syscall.SYS_BREAK": "syscall", - "syscall.SYS_BRK": "syscall", - "syscall.SYS_BSDTHREAD_CREATE": "syscall", - "syscall.SYS_BSDTHREAD_REGISTER": "syscall", - "syscall.SYS_BSDTHREAD_TERMINATE": "syscall", - "syscall.SYS_CAPGET": "syscall", - "syscall.SYS_CAPSET": "syscall", - "syscall.SYS_CAP_ENTER": "syscall", - "syscall.SYS_CAP_FCNTLS_GET": "syscall", - "syscall.SYS_CAP_FCNTLS_LIMIT": "syscall", - "syscall.SYS_CAP_GETMODE": "syscall", - "syscall.SYS_CAP_GETRIGHTS": "syscall", - "syscall.SYS_CAP_IOCTLS_GET": "syscall", - "syscall.SYS_CAP_IOCTLS_LIMIT": "syscall", - "syscall.SYS_CAP_NEW": "syscall", - "syscall.SYS_CAP_RIGHTS_GET": "syscall", - "syscall.SYS_CAP_RIGHTS_LIMIT": "syscall", - "syscall.SYS_CHDIR": "syscall", - "syscall.SYS_CHFLAGS": "syscall", - "syscall.SYS_CHFLAGSAT": "syscall", - "syscall.SYS_CHMOD": "syscall", - "syscall.SYS_CHMOD_EXTENDED": "syscall", - "syscall.SYS_CHOWN": "syscall", - "syscall.SYS_CHOWN32": "syscall", - "syscall.SYS_CHROOT": "syscall", - "syscall.SYS_CHUD": "syscall", - "syscall.SYS_CLOCK_ADJTIME": "syscall", - "syscall.SYS_CLOCK_GETCPUCLOCKID2": "syscall", - "syscall.SYS_CLOCK_GETRES": "syscall", - "syscall.SYS_CLOCK_GETTIME": "syscall", - "syscall.SYS_CLOCK_NANOSLEEP": "syscall", - "syscall.SYS_CLOCK_SETTIME": "syscall", - "syscall.SYS_CLONE": "syscall", - "syscall.SYS_CLOSE": "syscall", - "syscall.SYS_CLOSEFROM": "syscall", - "syscall.SYS_CLOSE_NOCANCEL": "syscall", - "syscall.SYS_CONNECT": "syscall", - "syscall.SYS_CONNECTAT": "syscall", - "syscall.SYS_CONNECT_NOCANCEL": "syscall", - "syscall.SYS_COPYFILE": "syscall", - "syscall.SYS_CPUSET": "syscall", - "syscall.SYS_CPUSET_GETAFFINITY": "syscall", - "syscall.SYS_CPUSET_GETID": "syscall", - "syscall.SYS_CPUSET_SETAFFINITY": "syscall", - "syscall.SYS_CPUSET_SETID": "syscall", - "syscall.SYS_CREAT": "syscall", - "syscall.SYS_CREATE_MODULE": "syscall", - "syscall.SYS_CSOPS": "syscall", - "syscall.SYS_DELETE": "syscall", - "syscall.SYS_DELETE_MODULE": "syscall", - "syscall.SYS_DUP": "syscall", - "syscall.SYS_DUP2": "syscall", - "syscall.SYS_DUP3": "syscall", - "syscall.SYS_EACCESS": "syscall", - "syscall.SYS_EPOLL_CREATE": "syscall", - "syscall.SYS_EPOLL_CREATE1": "syscall", - "syscall.SYS_EPOLL_CTL": "syscall", - "syscall.SYS_EPOLL_CTL_OLD": "syscall", - "syscall.SYS_EPOLL_PWAIT": "syscall", - "syscall.SYS_EPOLL_WAIT": "syscall", - "syscall.SYS_EPOLL_WAIT_OLD": "syscall", - "syscall.SYS_EVENTFD": "syscall", - "syscall.SYS_EVENTFD2": "syscall", - "syscall.SYS_EXCHANGEDATA": "syscall", - "syscall.SYS_EXECVE": "syscall", - "syscall.SYS_EXIT": "syscall", - "syscall.SYS_EXIT_GROUP": "syscall", - "syscall.SYS_EXTATTRCTL": "syscall", - "syscall.SYS_EXTATTR_DELETE_FD": "syscall", - "syscall.SYS_EXTATTR_DELETE_FILE": "syscall", - "syscall.SYS_EXTATTR_DELETE_LINK": "syscall", - "syscall.SYS_EXTATTR_GET_FD": "syscall", - "syscall.SYS_EXTATTR_GET_FILE": "syscall", - "syscall.SYS_EXTATTR_GET_LINK": "syscall", - "syscall.SYS_EXTATTR_LIST_FD": "syscall", - "syscall.SYS_EXTATTR_LIST_FILE": "syscall", - "syscall.SYS_EXTATTR_LIST_LINK": "syscall", - "syscall.SYS_EXTATTR_SET_FD": "syscall", - "syscall.SYS_EXTATTR_SET_FILE": "syscall", - "syscall.SYS_EXTATTR_SET_LINK": "syscall", - "syscall.SYS_FACCESSAT": "syscall", - "syscall.SYS_FADVISE64": "syscall", - "syscall.SYS_FADVISE64_64": "syscall", - "syscall.SYS_FALLOCATE": "syscall", - "syscall.SYS_FANOTIFY_INIT": "syscall", - "syscall.SYS_FANOTIFY_MARK": "syscall", - "syscall.SYS_FCHDIR": "syscall", - "syscall.SYS_FCHFLAGS": "syscall", - "syscall.SYS_FCHMOD": "syscall", - "syscall.SYS_FCHMODAT": "syscall", - "syscall.SYS_FCHMOD_EXTENDED": "syscall", - "syscall.SYS_FCHOWN": "syscall", - "syscall.SYS_FCHOWN32": "syscall", - "syscall.SYS_FCHOWNAT": "syscall", - "syscall.SYS_FCHROOT": "syscall", - "syscall.SYS_FCNTL": "syscall", - "syscall.SYS_FCNTL64": "syscall", - "syscall.SYS_FCNTL_NOCANCEL": "syscall", - "syscall.SYS_FDATASYNC": "syscall", - "syscall.SYS_FEXECVE": "syscall", - "syscall.SYS_FFCLOCK_GETCOUNTER": "syscall", - "syscall.SYS_FFCLOCK_GETESTIMATE": "syscall", - "syscall.SYS_FFCLOCK_SETESTIMATE": "syscall", - "syscall.SYS_FFSCTL": "syscall", - "syscall.SYS_FGETATTRLIST": "syscall", - "syscall.SYS_FGETXATTR": "syscall", - "syscall.SYS_FHOPEN": "syscall", - "syscall.SYS_FHSTAT": "syscall", - "syscall.SYS_FHSTATFS": "syscall", - "syscall.SYS_FILEPORT_MAKEFD": "syscall", - "syscall.SYS_FILEPORT_MAKEPORT": "syscall", - "syscall.SYS_FKTRACE": "syscall", - "syscall.SYS_FLISTXATTR": "syscall", - "syscall.SYS_FLOCK": "syscall", - "syscall.SYS_FORK": "syscall", - "syscall.SYS_FPATHCONF": "syscall", - "syscall.SYS_FREEBSD6_FTRUNCATE": "syscall", - "syscall.SYS_FREEBSD6_LSEEK": "syscall", - "syscall.SYS_FREEBSD6_MMAP": "syscall", - "syscall.SYS_FREEBSD6_PREAD": "syscall", - "syscall.SYS_FREEBSD6_PWRITE": "syscall", - "syscall.SYS_FREEBSD6_TRUNCATE": "syscall", - "syscall.SYS_FREMOVEXATTR": "syscall", - "syscall.SYS_FSCTL": "syscall", - "syscall.SYS_FSETATTRLIST": "syscall", - "syscall.SYS_FSETXATTR": "syscall", - "syscall.SYS_FSGETPATH": "syscall", - "syscall.SYS_FSTAT": "syscall", - "syscall.SYS_FSTAT64": "syscall", - "syscall.SYS_FSTAT64_EXTENDED": "syscall", - "syscall.SYS_FSTATAT": "syscall", - "syscall.SYS_FSTATAT64": "syscall", - "syscall.SYS_FSTATFS": "syscall", - "syscall.SYS_FSTATFS64": "syscall", - "syscall.SYS_FSTATV": "syscall", - "syscall.SYS_FSTATVFS1": "syscall", - "syscall.SYS_FSTAT_EXTENDED": "syscall", - "syscall.SYS_FSYNC": "syscall", - "syscall.SYS_FSYNC_NOCANCEL": "syscall", - "syscall.SYS_FSYNC_RANGE": "syscall", - "syscall.SYS_FTIME": "syscall", - "syscall.SYS_FTRUNCATE": "syscall", - "syscall.SYS_FTRUNCATE64": "syscall", - "syscall.SYS_FUTEX": "syscall", - "syscall.SYS_FUTIMENS": "syscall", - "syscall.SYS_FUTIMES": "syscall", - "syscall.SYS_FUTIMESAT": "syscall", - "syscall.SYS_GETATTRLIST": "syscall", - "syscall.SYS_GETAUDIT": "syscall", - "syscall.SYS_GETAUDIT_ADDR": "syscall", - "syscall.SYS_GETAUID": "syscall", - "syscall.SYS_GETCONTEXT": "syscall", - "syscall.SYS_GETCPU": "syscall", - "syscall.SYS_GETCWD": "syscall", - "syscall.SYS_GETDENTS": "syscall", - "syscall.SYS_GETDENTS64": "syscall", - "syscall.SYS_GETDIRENTRIES": "syscall", - "syscall.SYS_GETDIRENTRIES64": "syscall", - "syscall.SYS_GETDIRENTRIESATTR": "syscall", - "syscall.SYS_GETDTABLECOUNT": "syscall", - "syscall.SYS_GETDTABLESIZE": "syscall", - "syscall.SYS_GETEGID": "syscall", - "syscall.SYS_GETEGID32": "syscall", - "syscall.SYS_GETEUID": "syscall", - "syscall.SYS_GETEUID32": "syscall", - "syscall.SYS_GETFH": "syscall", - "syscall.SYS_GETFSSTAT": "syscall", - "syscall.SYS_GETFSSTAT64": "syscall", - "syscall.SYS_GETGID": "syscall", - "syscall.SYS_GETGID32": "syscall", - "syscall.SYS_GETGROUPS": "syscall", - "syscall.SYS_GETGROUPS32": "syscall", - "syscall.SYS_GETHOSTUUID": "syscall", - "syscall.SYS_GETITIMER": "syscall", - "syscall.SYS_GETLCID": "syscall", - "syscall.SYS_GETLOGIN": "syscall", - "syscall.SYS_GETLOGINCLASS": "syscall", - "syscall.SYS_GETPEERNAME": "syscall", - "syscall.SYS_GETPGID": "syscall", - "syscall.SYS_GETPGRP": "syscall", - "syscall.SYS_GETPID": "syscall", - "syscall.SYS_GETPMSG": "syscall", - "syscall.SYS_GETPPID": "syscall", - "syscall.SYS_GETPRIORITY": "syscall", - "syscall.SYS_GETRESGID": "syscall", - "syscall.SYS_GETRESGID32": "syscall", - "syscall.SYS_GETRESUID": "syscall", - "syscall.SYS_GETRESUID32": "syscall", - "syscall.SYS_GETRLIMIT": "syscall", - "syscall.SYS_GETRTABLE": "syscall", - "syscall.SYS_GETRUSAGE": "syscall", - "syscall.SYS_GETSGROUPS": "syscall", - "syscall.SYS_GETSID": "syscall", - "syscall.SYS_GETSOCKNAME": "syscall", - "syscall.SYS_GETSOCKOPT": "syscall", - "syscall.SYS_GETTHRID": "syscall", - "syscall.SYS_GETTID": "syscall", - "syscall.SYS_GETTIMEOFDAY": "syscall", - "syscall.SYS_GETUID": "syscall", - "syscall.SYS_GETUID32": "syscall", - "syscall.SYS_GETVFSSTAT": "syscall", - "syscall.SYS_GETWGROUPS": "syscall", - "syscall.SYS_GETXATTR": "syscall", - "syscall.SYS_GET_KERNEL_SYMS": "syscall", - "syscall.SYS_GET_MEMPOLICY": "syscall", - "syscall.SYS_GET_ROBUST_LIST": "syscall", - "syscall.SYS_GET_THREAD_AREA": "syscall", - "syscall.SYS_GTTY": "syscall", - "syscall.SYS_IDENTITYSVC": "syscall", - "syscall.SYS_IDLE": "syscall", - "syscall.SYS_INITGROUPS": "syscall", - "syscall.SYS_INIT_MODULE": "syscall", - "syscall.SYS_INOTIFY_ADD_WATCH": "syscall", - "syscall.SYS_INOTIFY_INIT": "syscall", - "syscall.SYS_INOTIFY_INIT1": "syscall", - "syscall.SYS_INOTIFY_RM_WATCH": "syscall", - "syscall.SYS_IOCTL": "syscall", - "syscall.SYS_IOPERM": "syscall", - "syscall.SYS_IOPL": "syscall", - "syscall.SYS_IOPOLICYSYS": "syscall", - "syscall.SYS_IOPRIO_GET": "syscall", - "syscall.SYS_IOPRIO_SET": "syscall", - "syscall.SYS_IO_CANCEL": "syscall", - "syscall.SYS_IO_DESTROY": "syscall", - "syscall.SYS_IO_GETEVENTS": "syscall", - "syscall.SYS_IO_SETUP": "syscall", - "syscall.SYS_IO_SUBMIT": "syscall", - "syscall.SYS_IPC": "syscall", - "syscall.SYS_ISSETUGID": "syscall", - "syscall.SYS_JAIL": "syscall", - "syscall.SYS_JAIL_ATTACH": "syscall", - "syscall.SYS_JAIL_GET": "syscall", - "syscall.SYS_JAIL_REMOVE": "syscall", - "syscall.SYS_JAIL_SET": "syscall", - "syscall.SYS_KDEBUG_TRACE": "syscall", - "syscall.SYS_KENV": "syscall", - "syscall.SYS_KEVENT": "syscall", - "syscall.SYS_KEVENT64": "syscall", - "syscall.SYS_KEXEC_LOAD": "syscall", - "syscall.SYS_KEYCTL": "syscall", - "syscall.SYS_KILL": "syscall", - "syscall.SYS_KLDFIND": "syscall", - "syscall.SYS_KLDFIRSTMOD": "syscall", - "syscall.SYS_KLDLOAD": "syscall", - "syscall.SYS_KLDNEXT": "syscall", - "syscall.SYS_KLDSTAT": "syscall", - "syscall.SYS_KLDSYM": "syscall", - "syscall.SYS_KLDUNLOAD": "syscall", - "syscall.SYS_KLDUNLOADF": "syscall", - "syscall.SYS_KQUEUE": "syscall", - "syscall.SYS_KQUEUE1": "syscall", - "syscall.SYS_KTIMER_CREATE": "syscall", - "syscall.SYS_KTIMER_DELETE": "syscall", - "syscall.SYS_KTIMER_GETOVERRUN": "syscall", - "syscall.SYS_KTIMER_GETTIME": "syscall", - "syscall.SYS_KTIMER_SETTIME": "syscall", - "syscall.SYS_KTRACE": "syscall", - "syscall.SYS_LCHFLAGS": "syscall", - "syscall.SYS_LCHMOD": "syscall", - "syscall.SYS_LCHOWN": "syscall", - "syscall.SYS_LCHOWN32": "syscall", - "syscall.SYS_LGETFH": "syscall", - "syscall.SYS_LGETXATTR": "syscall", - "syscall.SYS_LINK": "syscall", - "syscall.SYS_LINKAT": "syscall", - "syscall.SYS_LIO_LISTIO": "syscall", - "syscall.SYS_LISTEN": "syscall", - "syscall.SYS_LISTXATTR": "syscall", - "syscall.SYS_LLISTXATTR": "syscall", - "syscall.SYS_LOCK": "syscall", - "syscall.SYS_LOOKUP_DCOOKIE": "syscall", - "syscall.SYS_LPATHCONF": "syscall", - "syscall.SYS_LREMOVEXATTR": "syscall", - "syscall.SYS_LSEEK": "syscall", - "syscall.SYS_LSETXATTR": "syscall", - "syscall.SYS_LSTAT": "syscall", - "syscall.SYS_LSTAT64": "syscall", - "syscall.SYS_LSTAT64_EXTENDED": "syscall", - "syscall.SYS_LSTATV": "syscall", - "syscall.SYS_LSTAT_EXTENDED": "syscall", - "syscall.SYS_LUTIMES": "syscall", - "syscall.SYS_MAC_SYSCALL": "syscall", - "syscall.SYS_MADVISE": "syscall", - "syscall.SYS_MADVISE1": "syscall", - "syscall.SYS_MAXSYSCALL": "syscall", - "syscall.SYS_MBIND": "syscall", - "syscall.SYS_MIGRATE_PAGES": "syscall", - "syscall.SYS_MINCORE": "syscall", - "syscall.SYS_MINHERIT": "syscall", - "syscall.SYS_MKCOMPLEX": "syscall", - "syscall.SYS_MKDIR": "syscall", - "syscall.SYS_MKDIRAT": "syscall", - "syscall.SYS_MKDIR_EXTENDED": "syscall", - "syscall.SYS_MKFIFO": "syscall", - "syscall.SYS_MKFIFOAT": "syscall", - "syscall.SYS_MKFIFO_EXTENDED": "syscall", - "syscall.SYS_MKNOD": "syscall", - "syscall.SYS_MKNODAT": "syscall", - "syscall.SYS_MLOCK": "syscall", - "syscall.SYS_MLOCKALL": "syscall", - "syscall.SYS_MMAP": "syscall", - "syscall.SYS_MMAP2": "syscall", - "syscall.SYS_MODCTL": "syscall", - "syscall.SYS_MODFIND": "syscall", - "syscall.SYS_MODFNEXT": "syscall", - "syscall.SYS_MODIFY_LDT": "syscall", - "syscall.SYS_MODNEXT": "syscall", - "syscall.SYS_MODSTAT": "syscall", - "syscall.SYS_MODWATCH": "syscall", - "syscall.SYS_MOUNT": "syscall", - "syscall.SYS_MOVE_PAGES": "syscall", - "syscall.SYS_MPROTECT": "syscall", - "syscall.SYS_MPX": "syscall", - "syscall.SYS_MQUERY": "syscall", - "syscall.SYS_MQ_GETSETATTR": "syscall", - "syscall.SYS_MQ_NOTIFY": "syscall", - "syscall.SYS_MQ_OPEN": "syscall", - "syscall.SYS_MQ_TIMEDRECEIVE": "syscall", - "syscall.SYS_MQ_TIMEDSEND": "syscall", - "syscall.SYS_MQ_UNLINK": "syscall", - "syscall.SYS_MREMAP": "syscall", - "syscall.SYS_MSGCTL": "syscall", - "syscall.SYS_MSGGET": "syscall", - "syscall.SYS_MSGRCV": "syscall", - "syscall.SYS_MSGRCV_NOCANCEL": "syscall", - "syscall.SYS_MSGSND": "syscall", - "syscall.SYS_MSGSND_NOCANCEL": "syscall", - "syscall.SYS_MSGSYS": "syscall", - "syscall.SYS_MSYNC": "syscall", - "syscall.SYS_MSYNC_NOCANCEL": "syscall", - "syscall.SYS_MUNLOCK": "syscall", - "syscall.SYS_MUNLOCKALL": "syscall", - "syscall.SYS_MUNMAP": "syscall", - "syscall.SYS_NAME_TO_HANDLE_AT": "syscall", - "syscall.SYS_NANOSLEEP": "syscall", - "syscall.SYS_NEWFSTATAT": "syscall", - "syscall.SYS_NFSCLNT": "syscall", - "syscall.SYS_NFSSERVCTL": "syscall", - "syscall.SYS_NFSSVC": "syscall", - "syscall.SYS_NFSTAT": "syscall", - "syscall.SYS_NICE": "syscall", - "syscall.SYS_NLSTAT": "syscall", - "syscall.SYS_NMOUNT": "syscall", - "syscall.SYS_NSTAT": "syscall", - "syscall.SYS_NTP_ADJTIME": "syscall", - "syscall.SYS_NTP_GETTIME": "syscall", - "syscall.SYS_OABI_SYSCALL_BASE": "syscall", - "syscall.SYS_OBREAK": "syscall", - "syscall.SYS_OLDFSTAT": "syscall", - "syscall.SYS_OLDLSTAT": "syscall", - "syscall.SYS_OLDOLDUNAME": "syscall", - "syscall.SYS_OLDSTAT": "syscall", - "syscall.SYS_OLDUNAME": "syscall", - "syscall.SYS_OPEN": "syscall", - "syscall.SYS_OPENAT": "syscall", - "syscall.SYS_OPENBSD_POLL": "syscall", - "syscall.SYS_OPEN_BY_HANDLE_AT": "syscall", - "syscall.SYS_OPEN_EXTENDED": "syscall", - "syscall.SYS_OPEN_NOCANCEL": "syscall", - "syscall.SYS_OVADVISE": "syscall", - "syscall.SYS_PACCEPT": "syscall", - "syscall.SYS_PATHCONF": "syscall", - "syscall.SYS_PAUSE": "syscall", - "syscall.SYS_PCICONFIG_IOBASE": "syscall", - "syscall.SYS_PCICONFIG_READ": "syscall", - "syscall.SYS_PCICONFIG_WRITE": "syscall", - "syscall.SYS_PDFORK": "syscall", - "syscall.SYS_PDGETPID": "syscall", - "syscall.SYS_PDKILL": "syscall", - "syscall.SYS_PERF_EVENT_OPEN": "syscall", - "syscall.SYS_PERSONALITY": "syscall", - "syscall.SYS_PID_HIBERNATE": "syscall", - "syscall.SYS_PID_RESUME": "syscall", - "syscall.SYS_PID_SHUTDOWN_SOCKETS": "syscall", - "syscall.SYS_PID_SUSPEND": "syscall", - "syscall.SYS_PIPE": "syscall", - "syscall.SYS_PIPE2": "syscall", - "syscall.SYS_PIVOT_ROOT": "syscall", - "syscall.SYS_PMC_CONTROL": "syscall", - "syscall.SYS_PMC_GET_INFO": "syscall", - "syscall.SYS_POLL": "syscall", - "syscall.SYS_POLLTS": "syscall", - "syscall.SYS_POLL_NOCANCEL": "syscall", - "syscall.SYS_POSIX_FADVISE": "syscall", - "syscall.SYS_POSIX_FALLOCATE": "syscall", - "syscall.SYS_POSIX_OPENPT": "syscall", - "syscall.SYS_POSIX_SPAWN": "syscall", - "syscall.SYS_PPOLL": "syscall", - "syscall.SYS_PRCTL": "syscall", - "syscall.SYS_PREAD": "syscall", - "syscall.SYS_PREAD64": "syscall", - "syscall.SYS_PREADV": "syscall", - "syscall.SYS_PREAD_NOCANCEL": "syscall", - "syscall.SYS_PRLIMIT64": "syscall", - "syscall.SYS_PROCCTL": "syscall", - "syscall.SYS_PROCESS_POLICY": "syscall", - "syscall.SYS_PROCESS_VM_READV": "syscall", - "syscall.SYS_PROCESS_VM_WRITEV": "syscall", - "syscall.SYS_PROC_INFO": "syscall", - "syscall.SYS_PROF": "syscall", - "syscall.SYS_PROFIL": "syscall", - "syscall.SYS_PSELECT": "syscall", - "syscall.SYS_PSELECT6": "syscall", - "syscall.SYS_PSET_ASSIGN": "syscall", - "syscall.SYS_PSET_CREATE": "syscall", - "syscall.SYS_PSET_DESTROY": "syscall", - "syscall.SYS_PSYNCH_CVBROAD": "syscall", - "syscall.SYS_PSYNCH_CVCLRPREPOST": "syscall", - "syscall.SYS_PSYNCH_CVSIGNAL": "syscall", - "syscall.SYS_PSYNCH_CVWAIT": "syscall", - "syscall.SYS_PSYNCH_MUTEXDROP": "syscall", - "syscall.SYS_PSYNCH_MUTEXWAIT": "syscall", - "syscall.SYS_PSYNCH_RW_DOWNGRADE": "syscall", - "syscall.SYS_PSYNCH_RW_LONGRDLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_RDLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_UNLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_UNLOCK2": "syscall", - "syscall.SYS_PSYNCH_RW_UPGRADE": "syscall", - "syscall.SYS_PSYNCH_RW_WRLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_YIELDWRLOCK": "syscall", - "syscall.SYS_PTRACE": "syscall", - "syscall.SYS_PUTPMSG": "syscall", - "syscall.SYS_PWRITE": "syscall", - "syscall.SYS_PWRITE64": "syscall", - "syscall.SYS_PWRITEV": "syscall", - "syscall.SYS_PWRITE_NOCANCEL": "syscall", - "syscall.SYS_QUERY_MODULE": "syscall", - "syscall.SYS_QUOTACTL": "syscall", - "syscall.SYS_RASCTL": "syscall", - "syscall.SYS_RCTL_ADD_RULE": "syscall", - "syscall.SYS_RCTL_GET_LIMITS": "syscall", - "syscall.SYS_RCTL_GET_RACCT": "syscall", - "syscall.SYS_RCTL_GET_RULES": "syscall", - "syscall.SYS_RCTL_REMOVE_RULE": "syscall", - "syscall.SYS_READ": "syscall", - "syscall.SYS_READAHEAD": "syscall", - "syscall.SYS_READDIR": "syscall", - "syscall.SYS_READLINK": "syscall", - "syscall.SYS_READLINKAT": "syscall", - "syscall.SYS_READV": "syscall", - "syscall.SYS_READV_NOCANCEL": "syscall", - "syscall.SYS_READ_NOCANCEL": "syscall", - "syscall.SYS_REBOOT": "syscall", - "syscall.SYS_RECV": "syscall", - "syscall.SYS_RECVFROM": "syscall", - "syscall.SYS_RECVFROM_NOCANCEL": "syscall", - "syscall.SYS_RECVMMSG": "syscall", - "syscall.SYS_RECVMSG": "syscall", - "syscall.SYS_RECVMSG_NOCANCEL": "syscall", - "syscall.SYS_REMAP_FILE_PAGES": "syscall", - "syscall.SYS_REMOVEXATTR": "syscall", - "syscall.SYS_RENAME": "syscall", - "syscall.SYS_RENAMEAT": "syscall", - "syscall.SYS_REQUEST_KEY": "syscall", - "syscall.SYS_RESTART_SYSCALL": "syscall", - "syscall.SYS_REVOKE": "syscall", - "syscall.SYS_RFORK": "syscall", - "syscall.SYS_RMDIR": "syscall", - "syscall.SYS_RTPRIO": "syscall", - "syscall.SYS_RTPRIO_THREAD": "syscall", - "syscall.SYS_RT_SIGACTION": "syscall", - "syscall.SYS_RT_SIGPENDING": "syscall", - "syscall.SYS_RT_SIGPROCMASK": "syscall", - "syscall.SYS_RT_SIGQUEUEINFO": "syscall", - "syscall.SYS_RT_SIGRETURN": "syscall", - "syscall.SYS_RT_SIGSUSPEND": "syscall", - "syscall.SYS_RT_SIGTIMEDWAIT": "syscall", - "syscall.SYS_RT_TGSIGQUEUEINFO": "syscall", - "syscall.SYS_SBRK": "syscall", - "syscall.SYS_SCHED_GETAFFINITY": "syscall", - "syscall.SYS_SCHED_GETPARAM": "syscall", - "syscall.SYS_SCHED_GETSCHEDULER": "syscall", - "syscall.SYS_SCHED_GET_PRIORITY_MAX": "syscall", - "syscall.SYS_SCHED_GET_PRIORITY_MIN": "syscall", - "syscall.SYS_SCHED_RR_GET_INTERVAL": "syscall", - "syscall.SYS_SCHED_SETAFFINITY": "syscall", - "syscall.SYS_SCHED_SETPARAM": "syscall", - "syscall.SYS_SCHED_SETSCHEDULER": "syscall", - "syscall.SYS_SCHED_YIELD": "syscall", - "syscall.SYS_SCTP_GENERIC_RECVMSG": "syscall", - "syscall.SYS_SCTP_GENERIC_SENDMSG": "syscall", - "syscall.SYS_SCTP_GENERIC_SENDMSG_IOV": "syscall", - "syscall.SYS_SCTP_PEELOFF": "syscall", - "syscall.SYS_SEARCHFS": "syscall", - "syscall.SYS_SECURITY": "syscall", - "syscall.SYS_SELECT": "syscall", - "syscall.SYS_SELECT_NOCANCEL": "syscall", - "syscall.SYS_SEMCONFIG": "syscall", - "syscall.SYS_SEMCTL": "syscall", - "syscall.SYS_SEMGET": "syscall", - "syscall.SYS_SEMOP": "syscall", - "syscall.SYS_SEMSYS": "syscall", - "syscall.SYS_SEMTIMEDOP": "syscall", - "syscall.SYS_SEM_CLOSE": "syscall", - "syscall.SYS_SEM_DESTROY": "syscall", - "syscall.SYS_SEM_GETVALUE": "syscall", - "syscall.SYS_SEM_INIT": "syscall", - "syscall.SYS_SEM_OPEN": "syscall", - "syscall.SYS_SEM_POST": "syscall", - "syscall.SYS_SEM_TRYWAIT": "syscall", - "syscall.SYS_SEM_UNLINK": "syscall", - "syscall.SYS_SEM_WAIT": "syscall", - "syscall.SYS_SEM_WAIT_NOCANCEL": "syscall", - "syscall.SYS_SEND": "syscall", - "syscall.SYS_SENDFILE": "syscall", - "syscall.SYS_SENDFILE64": "syscall", - "syscall.SYS_SENDMMSG": "syscall", - "syscall.SYS_SENDMSG": "syscall", - "syscall.SYS_SENDMSG_NOCANCEL": "syscall", - "syscall.SYS_SENDTO": "syscall", - "syscall.SYS_SENDTO_NOCANCEL": "syscall", - "syscall.SYS_SETATTRLIST": "syscall", - "syscall.SYS_SETAUDIT": "syscall", - "syscall.SYS_SETAUDIT_ADDR": "syscall", - "syscall.SYS_SETAUID": "syscall", - "syscall.SYS_SETCONTEXT": "syscall", - "syscall.SYS_SETDOMAINNAME": "syscall", - "syscall.SYS_SETEGID": "syscall", - "syscall.SYS_SETEUID": "syscall", - "syscall.SYS_SETFIB": "syscall", - "syscall.SYS_SETFSGID": "syscall", - "syscall.SYS_SETFSGID32": "syscall", - "syscall.SYS_SETFSUID": "syscall", - "syscall.SYS_SETFSUID32": "syscall", - "syscall.SYS_SETGID": "syscall", - "syscall.SYS_SETGID32": "syscall", - "syscall.SYS_SETGROUPS": "syscall", - "syscall.SYS_SETGROUPS32": "syscall", - "syscall.SYS_SETHOSTNAME": "syscall", - "syscall.SYS_SETITIMER": "syscall", - "syscall.SYS_SETLCID": "syscall", - "syscall.SYS_SETLOGIN": "syscall", - "syscall.SYS_SETLOGINCLASS": "syscall", - "syscall.SYS_SETNS": "syscall", - "syscall.SYS_SETPGID": "syscall", - "syscall.SYS_SETPRIORITY": "syscall", - "syscall.SYS_SETPRIVEXEC": "syscall", - "syscall.SYS_SETREGID": "syscall", - "syscall.SYS_SETREGID32": "syscall", - "syscall.SYS_SETRESGID": "syscall", - "syscall.SYS_SETRESGID32": "syscall", - "syscall.SYS_SETRESUID": "syscall", - "syscall.SYS_SETRESUID32": "syscall", - "syscall.SYS_SETREUID": "syscall", - "syscall.SYS_SETREUID32": "syscall", - "syscall.SYS_SETRLIMIT": "syscall", - "syscall.SYS_SETRTABLE": "syscall", - "syscall.SYS_SETSGROUPS": "syscall", - "syscall.SYS_SETSID": "syscall", - "syscall.SYS_SETSOCKOPT": "syscall", - "syscall.SYS_SETTID": "syscall", - "syscall.SYS_SETTID_WITH_PID": "syscall", - "syscall.SYS_SETTIMEOFDAY": "syscall", - "syscall.SYS_SETUID": "syscall", - "syscall.SYS_SETUID32": "syscall", - "syscall.SYS_SETWGROUPS": "syscall", - "syscall.SYS_SETXATTR": "syscall", - "syscall.SYS_SET_MEMPOLICY": "syscall", - "syscall.SYS_SET_ROBUST_LIST": "syscall", - "syscall.SYS_SET_THREAD_AREA": "syscall", - "syscall.SYS_SET_TID_ADDRESS": "syscall", - "syscall.SYS_SGETMASK": "syscall", - "syscall.SYS_SHARED_REGION_CHECK_NP": "syscall", - "syscall.SYS_SHARED_REGION_MAP_AND_SLIDE_NP": "syscall", - "syscall.SYS_SHMAT": "syscall", - "syscall.SYS_SHMCTL": "syscall", - "syscall.SYS_SHMDT": "syscall", - "syscall.SYS_SHMGET": "syscall", - "syscall.SYS_SHMSYS": "syscall", - "syscall.SYS_SHM_OPEN": "syscall", - "syscall.SYS_SHM_UNLINK": "syscall", - "syscall.SYS_SHUTDOWN": "syscall", - "syscall.SYS_SIGACTION": "syscall", - "syscall.SYS_SIGALTSTACK": "syscall", - "syscall.SYS_SIGNAL": "syscall", - "syscall.SYS_SIGNALFD": "syscall", - "syscall.SYS_SIGNALFD4": "syscall", - "syscall.SYS_SIGPENDING": "syscall", - "syscall.SYS_SIGPROCMASK": "syscall", - "syscall.SYS_SIGQUEUE": "syscall", - "syscall.SYS_SIGQUEUEINFO": "syscall", - "syscall.SYS_SIGRETURN": "syscall", - "syscall.SYS_SIGSUSPEND": "syscall", - "syscall.SYS_SIGSUSPEND_NOCANCEL": "syscall", - "syscall.SYS_SIGTIMEDWAIT": "syscall", - "syscall.SYS_SIGWAIT": "syscall", - "syscall.SYS_SIGWAITINFO": "syscall", - "syscall.SYS_SOCKET": "syscall", - "syscall.SYS_SOCKETCALL": "syscall", - "syscall.SYS_SOCKETPAIR": "syscall", - "syscall.SYS_SPLICE": "syscall", - "syscall.SYS_SSETMASK": "syscall", - "syscall.SYS_SSTK": "syscall", - "syscall.SYS_STACK_SNAPSHOT": "syscall", - "syscall.SYS_STAT": "syscall", - "syscall.SYS_STAT64": "syscall", - "syscall.SYS_STAT64_EXTENDED": "syscall", - "syscall.SYS_STATFS": "syscall", - "syscall.SYS_STATFS64": "syscall", - "syscall.SYS_STATV": "syscall", - "syscall.SYS_STATVFS1": "syscall", - "syscall.SYS_STAT_EXTENDED": "syscall", - "syscall.SYS_STIME": "syscall", - "syscall.SYS_STTY": "syscall", - "syscall.SYS_SWAPCONTEXT": "syscall", - "syscall.SYS_SWAPCTL": "syscall", - "syscall.SYS_SWAPOFF": "syscall", - "syscall.SYS_SWAPON": "syscall", - "syscall.SYS_SYMLINK": "syscall", - "syscall.SYS_SYMLINKAT": "syscall", - "syscall.SYS_SYNC": "syscall", - "syscall.SYS_SYNCFS": "syscall", - "syscall.SYS_SYNC_FILE_RANGE": "syscall", - "syscall.SYS_SYSARCH": "syscall", - "syscall.SYS_SYSCALL": "syscall", - "syscall.SYS_SYSCALL_BASE": "syscall", - "syscall.SYS_SYSFS": "syscall", - "syscall.SYS_SYSINFO": "syscall", - "syscall.SYS_SYSLOG": "syscall", - "syscall.SYS_TEE": "syscall", - "syscall.SYS_TGKILL": "syscall", - "syscall.SYS_THREAD_SELFID": "syscall", - "syscall.SYS_THR_CREATE": "syscall", - "syscall.SYS_THR_EXIT": "syscall", - "syscall.SYS_THR_KILL": "syscall", - "syscall.SYS_THR_KILL2": "syscall", - "syscall.SYS_THR_NEW": "syscall", - "syscall.SYS_THR_SELF": "syscall", - "syscall.SYS_THR_SET_NAME": "syscall", - "syscall.SYS_THR_SUSPEND": "syscall", - "syscall.SYS_THR_WAKE": "syscall", - "syscall.SYS_TIME": "syscall", - "syscall.SYS_TIMERFD_CREATE": "syscall", - "syscall.SYS_TIMERFD_GETTIME": "syscall", - "syscall.SYS_TIMERFD_SETTIME": "syscall", - "syscall.SYS_TIMER_CREATE": "syscall", - "syscall.SYS_TIMER_DELETE": "syscall", - "syscall.SYS_TIMER_GETOVERRUN": "syscall", - "syscall.SYS_TIMER_GETTIME": "syscall", - "syscall.SYS_TIMER_SETTIME": "syscall", - "syscall.SYS_TIMES": "syscall", - "syscall.SYS_TKILL": "syscall", - "syscall.SYS_TRUNCATE": "syscall", - "syscall.SYS_TRUNCATE64": "syscall", - "syscall.SYS_TUXCALL": "syscall", - "syscall.SYS_UGETRLIMIT": "syscall", - "syscall.SYS_ULIMIT": "syscall", - "syscall.SYS_UMASK": "syscall", - "syscall.SYS_UMASK_EXTENDED": "syscall", - "syscall.SYS_UMOUNT": "syscall", - "syscall.SYS_UMOUNT2": "syscall", - "syscall.SYS_UNAME": "syscall", - "syscall.SYS_UNDELETE": "syscall", - "syscall.SYS_UNLINK": "syscall", - "syscall.SYS_UNLINKAT": "syscall", - "syscall.SYS_UNMOUNT": "syscall", - "syscall.SYS_UNSHARE": "syscall", - "syscall.SYS_USELIB": "syscall", - "syscall.SYS_USTAT": "syscall", - "syscall.SYS_UTIME": "syscall", - "syscall.SYS_UTIMENSAT": "syscall", - "syscall.SYS_UTIMES": "syscall", - "syscall.SYS_UTRACE": "syscall", - "syscall.SYS_UUIDGEN": "syscall", - "syscall.SYS_VADVISE": "syscall", - "syscall.SYS_VFORK": "syscall", - "syscall.SYS_VHANGUP": "syscall", - "syscall.SYS_VM86": "syscall", - "syscall.SYS_VM86OLD": "syscall", - "syscall.SYS_VMSPLICE": "syscall", - "syscall.SYS_VM_PRESSURE_MONITOR": "syscall", - "syscall.SYS_VSERVER": "syscall", - "syscall.SYS_WAIT4": "syscall", - "syscall.SYS_WAIT4_NOCANCEL": "syscall", - "syscall.SYS_WAIT6": "syscall", - "syscall.SYS_WAITEVENT": "syscall", - "syscall.SYS_WAITID": "syscall", - "syscall.SYS_WAITID_NOCANCEL": "syscall", - "syscall.SYS_WAITPID": "syscall", - "syscall.SYS_WATCHEVENT": "syscall", - "syscall.SYS_WORKQ_KERNRETURN": "syscall", - "syscall.SYS_WORKQ_OPEN": "syscall", - "syscall.SYS_WRITE": "syscall", - "syscall.SYS_WRITEV": "syscall", - "syscall.SYS_WRITEV_NOCANCEL": "syscall", - "syscall.SYS_WRITE_NOCANCEL": "syscall", - "syscall.SYS_YIELD": "syscall", - "syscall.SYS__LLSEEK": "syscall", - "syscall.SYS__LWP_CONTINUE": "syscall", - "syscall.SYS__LWP_CREATE": "syscall", - "syscall.SYS__LWP_CTL": "syscall", - "syscall.SYS__LWP_DETACH": "syscall", - "syscall.SYS__LWP_EXIT": "syscall", - "syscall.SYS__LWP_GETNAME": "syscall", - "syscall.SYS__LWP_GETPRIVATE": "syscall", - "syscall.SYS__LWP_KILL": "syscall", - "syscall.SYS__LWP_PARK": "syscall", - "syscall.SYS__LWP_SELF": "syscall", - "syscall.SYS__LWP_SETNAME": "syscall", - "syscall.SYS__LWP_SETPRIVATE": "syscall", - "syscall.SYS__LWP_SUSPEND": "syscall", - "syscall.SYS__LWP_UNPARK": "syscall", - "syscall.SYS__LWP_UNPARK_ALL": "syscall", - "syscall.SYS__LWP_WAIT": "syscall", - "syscall.SYS__LWP_WAKEUP": "syscall", - "syscall.SYS__NEWSELECT": "syscall", - "syscall.SYS__PSET_BIND": "syscall", - "syscall.SYS__SCHED_GETAFFINITY": "syscall", - "syscall.SYS__SCHED_GETPARAM": "syscall", - "syscall.SYS__SCHED_SETAFFINITY": "syscall", - "syscall.SYS__SCHED_SETPARAM": "syscall", - "syscall.SYS__SYSCTL": "syscall", - "syscall.SYS__UMTX_LOCK": "syscall", - "syscall.SYS__UMTX_OP": "syscall", - "syscall.SYS__UMTX_UNLOCK": "syscall", - "syscall.SYS___ACL_ACLCHECK_FD": "syscall", - "syscall.SYS___ACL_ACLCHECK_FILE": "syscall", - "syscall.SYS___ACL_ACLCHECK_LINK": "syscall", - "syscall.SYS___ACL_DELETE_FD": "syscall", - "syscall.SYS___ACL_DELETE_FILE": "syscall", - "syscall.SYS___ACL_DELETE_LINK": "syscall", - "syscall.SYS___ACL_GET_FD": "syscall", - "syscall.SYS___ACL_GET_FILE": "syscall", - "syscall.SYS___ACL_GET_LINK": "syscall", - "syscall.SYS___ACL_SET_FD": "syscall", - "syscall.SYS___ACL_SET_FILE": "syscall", - "syscall.SYS___ACL_SET_LINK": "syscall", - "syscall.SYS___CLONE": "syscall", - "syscall.SYS___DISABLE_THREADSIGNAL": "syscall", - "syscall.SYS___GETCWD": "syscall", - "syscall.SYS___GETLOGIN": "syscall", - "syscall.SYS___GET_TCB": "syscall", - "syscall.SYS___MAC_EXECVE": "syscall", - "syscall.SYS___MAC_GETFSSTAT": "syscall", - "syscall.SYS___MAC_GET_FD": "syscall", - "syscall.SYS___MAC_GET_FILE": "syscall", - "syscall.SYS___MAC_GET_LCID": "syscall", - "syscall.SYS___MAC_GET_LCTX": "syscall", - "syscall.SYS___MAC_GET_LINK": "syscall", - "syscall.SYS___MAC_GET_MOUNT": "syscall", - "syscall.SYS___MAC_GET_PID": "syscall", - "syscall.SYS___MAC_GET_PROC": "syscall", - "syscall.SYS___MAC_MOUNT": "syscall", - "syscall.SYS___MAC_SET_FD": "syscall", - "syscall.SYS___MAC_SET_FILE": "syscall", - "syscall.SYS___MAC_SET_LCTX": "syscall", - "syscall.SYS___MAC_SET_LINK": "syscall", - "syscall.SYS___MAC_SET_PROC": "syscall", - "syscall.SYS___MAC_SYSCALL": "syscall", - "syscall.SYS___OLD_SEMWAIT_SIGNAL": "syscall", - "syscall.SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": "syscall", - "syscall.SYS___POSIX_CHOWN": "syscall", - "syscall.SYS___POSIX_FCHOWN": "syscall", - "syscall.SYS___POSIX_LCHOWN": "syscall", - "syscall.SYS___POSIX_RENAME": "syscall", - "syscall.SYS___PTHREAD_CANCELED": "syscall", - "syscall.SYS___PTHREAD_CHDIR": "syscall", - "syscall.SYS___PTHREAD_FCHDIR": "syscall", - "syscall.SYS___PTHREAD_KILL": "syscall", - "syscall.SYS___PTHREAD_MARKCANCEL": "syscall", - "syscall.SYS___PTHREAD_SIGMASK": "syscall", - "syscall.SYS___QUOTACTL": "syscall", - "syscall.SYS___SEMCTL": "syscall", - "syscall.SYS___SEMWAIT_SIGNAL": "syscall", - "syscall.SYS___SEMWAIT_SIGNAL_NOCANCEL": "syscall", - "syscall.SYS___SETLOGIN": "syscall", - "syscall.SYS___SETUGID": "syscall", - "syscall.SYS___SET_TCB": "syscall", - "syscall.SYS___SIGACTION_SIGTRAMP": "syscall", - "syscall.SYS___SIGTIMEDWAIT": "syscall", - "syscall.SYS___SIGWAIT": "syscall", - "syscall.SYS___SIGWAIT_NOCANCEL": "syscall", - "syscall.SYS___SYSCTL": "syscall", - "syscall.SYS___TFORK": "syscall", - "syscall.SYS___THREXIT": "syscall", - "syscall.SYS___THRSIGDIVERT": "syscall", - "syscall.SYS___THRSLEEP": "syscall", - "syscall.SYS___THRWAKEUP": "syscall", - "syscall.S_ARCH1": "syscall", - "syscall.S_ARCH2": "syscall", - "syscall.S_BLKSIZE": "syscall", - "syscall.S_IEXEC": "syscall", - "syscall.S_IFBLK": "syscall", - "syscall.S_IFCHR": "syscall", - "syscall.S_IFDIR": "syscall", - "syscall.S_IFIFO": "syscall", - "syscall.S_IFLNK": "syscall", - "syscall.S_IFMT": "syscall", - "syscall.S_IFREG": "syscall", - "syscall.S_IFSOCK": "syscall", - "syscall.S_IFWHT": "syscall", - "syscall.S_IREAD": "syscall", - "syscall.S_IRGRP": "syscall", - "syscall.S_IROTH": "syscall", - "syscall.S_IRUSR": "syscall", - "syscall.S_IRWXG": "syscall", - "syscall.S_IRWXO": "syscall", - "syscall.S_IRWXU": "syscall", - "syscall.S_ISGID": "syscall", - "syscall.S_ISTXT": "syscall", - "syscall.S_ISUID": "syscall", - "syscall.S_ISVTX": "syscall", - "syscall.S_IWGRP": "syscall", - "syscall.S_IWOTH": "syscall", - "syscall.S_IWRITE": "syscall", - "syscall.S_IWUSR": "syscall", - "syscall.S_IXGRP": "syscall", - "syscall.S_IXOTH": "syscall", - "syscall.S_IXUSR": "syscall", - "syscall.S_LOGIN_SET": "syscall", - "syscall.SecurityAttributes": "syscall", - "syscall.Seek": "syscall", - "syscall.Select": "syscall", - "syscall.Sendfile": "syscall", - "syscall.Sendmsg": "syscall", - "syscall.SendmsgN": "syscall", - "syscall.Sendto": "syscall", - "syscall.Servent": "syscall", - "syscall.SetBpf": "syscall", - "syscall.SetBpfBuflen": "syscall", - "syscall.SetBpfDatalink": "syscall", - "syscall.SetBpfHeadercmpl": "syscall", - "syscall.SetBpfImmediate": "syscall", - "syscall.SetBpfInterface": "syscall", - "syscall.SetBpfPromisc": "syscall", - "syscall.SetBpfTimeout": "syscall", - "syscall.SetCurrentDirectory": "syscall", - "syscall.SetEndOfFile": "syscall", - "syscall.SetEnvironmentVariable": "syscall", - "syscall.SetFileAttributes": "syscall", - "syscall.SetFileCompletionNotificationModes": "syscall", - "syscall.SetFilePointer": "syscall", - "syscall.SetFileTime": "syscall", - "syscall.SetHandleInformation": "syscall", - "syscall.SetKevent": "syscall", - "syscall.SetLsfPromisc": "syscall", - "syscall.SetNonblock": "syscall", - "syscall.Setdomainname": "syscall", - "syscall.Setegid": "syscall", - "syscall.Setenv": "syscall", - "syscall.Seteuid": "syscall", - "syscall.Setfsgid": "syscall", - "syscall.Setfsuid": "syscall", - "syscall.Setgid": "syscall", - "syscall.Setgroups": "syscall", - "syscall.Sethostname": "syscall", - "syscall.Setlogin": "syscall", - "syscall.Setpgid": "syscall", - "syscall.Setpriority": "syscall", - "syscall.Setprivexec": "syscall", - "syscall.Setregid": "syscall", - "syscall.Setresgid": "syscall", - "syscall.Setresuid": "syscall", - "syscall.Setreuid": "syscall", - "syscall.Setrlimit": "syscall", - "syscall.Setsid": "syscall", - "syscall.Setsockopt": "syscall", - "syscall.SetsockoptByte": "syscall", - "syscall.SetsockoptICMPv6Filter": "syscall", - "syscall.SetsockoptIPMreq": "syscall", - "syscall.SetsockoptIPMreqn": "syscall", - "syscall.SetsockoptIPv6Mreq": "syscall", - "syscall.SetsockoptInet4Addr": "syscall", - "syscall.SetsockoptInt": "syscall", - "syscall.SetsockoptLinger": "syscall", - "syscall.SetsockoptString": "syscall", - "syscall.SetsockoptTimeval": "syscall", - "syscall.Settimeofday": "syscall", - "syscall.Setuid": "syscall", - "syscall.Setxattr": "syscall", - "syscall.Shutdown": "syscall", - "syscall.SidTypeAlias": "syscall", - "syscall.SidTypeComputer": "syscall", - "syscall.SidTypeDeletedAccount": "syscall", - "syscall.SidTypeDomain": "syscall", - "syscall.SidTypeGroup": "syscall", - "syscall.SidTypeInvalid": "syscall", - "syscall.SidTypeLabel": "syscall", - "syscall.SidTypeUnknown": "syscall", - "syscall.SidTypeUser": "syscall", - "syscall.SidTypeWellKnownGroup": "syscall", - "syscall.Signal": "syscall", - "syscall.SizeofBpfHdr": "syscall", - "syscall.SizeofBpfInsn": "syscall", - "syscall.SizeofBpfProgram": "syscall", - "syscall.SizeofBpfStat": "syscall", - "syscall.SizeofBpfVersion": "syscall", - "syscall.SizeofBpfZbuf": "syscall", - "syscall.SizeofBpfZbufHeader": "syscall", - "syscall.SizeofCmsghdr": "syscall", - "syscall.SizeofICMPv6Filter": "syscall", - "syscall.SizeofIPMreq": "syscall", - "syscall.SizeofIPMreqn": "syscall", - "syscall.SizeofIPv6MTUInfo": "syscall", - "syscall.SizeofIPv6Mreq": "syscall", - "syscall.SizeofIfAddrmsg": "syscall", - "syscall.SizeofIfAnnounceMsghdr": "syscall", - "syscall.SizeofIfData": "syscall", - "syscall.SizeofIfInfomsg": "syscall", - "syscall.SizeofIfMsghdr": "syscall", - "syscall.SizeofIfaMsghdr": "syscall", - "syscall.SizeofIfmaMsghdr": "syscall", - "syscall.SizeofIfmaMsghdr2": "syscall", - "syscall.SizeofInet4Pktinfo": "syscall", - "syscall.SizeofInet6Pktinfo": "syscall", - "syscall.SizeofInotifyEvent": "syscall", - "syscall.SizeofLinger": "syscall", - "syscall.SizeofMsghdr": "syscall", - "syscall.SizeofNlAttr": "syscall", - "syscall.SizeofNlMsgerr": "syscall", - "syscall.SizeofNlMsghdr": "syscall", - "syscall.SizeofRtAttr": "syscall", - "syscall.SizeofRtGenmsg": "syscall", - "syscall.SizeofRtMetrics": "syscall", - "syscall.SizeofRtMsg": "syscall", - "syscall.SizeofRtMsghdr": "syscall", - "syscall.SizeofRtNexthop": "syscall", - "syscall.SizeofSockFilter": "syscall", - "syscall.SizeofSockFprog": "syscall", - "syscall.SizeofSockaddrAny": "syscall", - "syscall.SizeofSockaddrDatalink": "syscall", - "syscall.SizeofSockaddrInet4": "syscall", - "syscall.SizeofSockaddrInet6": "syscall", - "syscall.SizeofSockaddrLinklayer": "syscall", - "syscall.SizeofSockaddrNetlink": "syscall", - "syscall.SizeofSockaddrUnix": "syscall", - "syscall.SizeofTCPInfo": "syscall", - "syscall.SizeofUcred": "syscall", - "syscall.SlicePtrFromStrings": "syscall", - "syscall.SockFilter": "syscall", - "syscall.SockFprog": "syscall", - "syscall.SockaddrDatalink": "syscall", - "syscall.SockaddrGen": "syscall", - "syscall.SockaddrInet4": "syscall", - "syscall.SockaddrInet6": "syscall", - "syscall.SockaddrLinklayer": "syscall", - "syscall.SockaddrNetlink": "syscall", - "syscall.SockaddrUnix": "syscall", - "syscall.Socket": "syscall", - "syscall.SocketControlMessage": "syscall", - "syscall.SocketDisableIPv6": "syscall", - "syscall.Socketpair": "syscall", - "syscall.Splice": "syscall", - "syscall.StartProcess": "syscall", - "syscall.StartupInfo": "syscall", - "syscall.Stat": "syscall", - "syscall.Stat_t": "syscall", - "syscall.Statfs": "syscall", - "syscall.Statfs_t": "syscall", - "syscall.Stderr": "syscall", - "syscall.Stdin": "syscall", - "syscall.Stdout": "syscall", - "syscall.StringBytePtr": "syscall", - "syscall.StringByteSlice": "syscall", - "syscall.StringSlicePtr": "syscall", - "syscall.StringToSid": "syscall", - "syscall.StringToUTF16": "syscall", - "syscall.StringToUTF16Ptr": "syscall", - "syscall.Symlink": "syscall", - "syscall.Sync": "syscall", - "syscall.SyncFileRange": "syscall", - "syscall.SysProcAttr": "syscall", - "syscall.SysProcIDMap": "syscall", - "syscall.Syscall": "syscall", - "syscall.Syscall12": "syscall", - "syscall.Syscall15": "syscall", - "syscall.Syscall6": "syscall", - "syscall.Syscall9": "syscall", - "syscall.Sysctl": "syscall", - "syscall.SysctlUint32": "syscall", - "syscall.Sysctlnode": "syscall", - "syscall.Sysinfo": "syscall", - "syscall.Sysinfo_t": "syscall", - "syscall.Systemtime": "syscall", - "syscall.TCGETS": "syscall", - "syscall.TCIFLUSH": "syscall", - "syscall.TCIOFLUSH": "syscall", - "syscall.TCOFLUSH": "syscall", - "syscall.TCPInfo": "syscall", - "syscall.TCPKeepalive": "syscall", - "syscall.TCP_CA_NAME_MAX": "syscall", - "syscall.TCP_CONGCTL": "syscall", - "syscall.TCP_CONGESTION": "syscall", - "syscall.TCP_CONNECTIONTIMEOUT": "syscall", - "syscall.TCP_CORK": "syscall", - "syscall.TCP_DEFER_ACCEPT": "syscall", - "syscall.TCP_INFO": "syscall", - "syscall.TCP_KEEPALIVE": "syscall", - "syscall.TCP_KEEPCNT": "syscall", - "syscall.TCP_KEEPIDLE": "syscall", - "syscall.TCP_KEEPINIT": "syscall", - "syscall.TCP_KEEPINTVL": "syscall", - "syscall.TCP_LINGER2": "syscall", - "syscall.TCP_MAXBURST": "syscall", - "syscall.TCP_MAXHLEN": "syscall", - "syscall.TCP_MAXOLEN": "syscall", - "syscall.TCP_MAXSEG": "syscall", - "syscall.TCP_MAXWIN": "syscall", - "syscall.TCP_MAX_SACK": "syscall", - "syscall.TCP_MAX_WINSHIFT": "syscall", - "syscall.TCP_MD5SIG": "syscall", - "syscall.TCP_MD5SIG_MAXKEYLEN": "syscall", - "syscall.TCP_MINMSS": "syscall", - "syscall.TCP_MINMSSOVERLOAD": "syscall", - "syscall.TCP_MSS": "syscall", - "syscall.TCP_NODELAY": "syscall", - "syscall.TCP_NOOPT": "syscall", - "syscall.TCP_NOPUSH": "syscall", - "syscall.TCP_NSTATES": "syscall", - "syscall.TCP_QUICKACK": "syscall", - "syscall.TCP_RXT_CONNDROPTIME": "syscall", - "syscall.TCP_RXT_FINDROP": "syscall", - "syscall.TCP_SACK_ENABLE": "syscall", - "syscall.TCP_SYNCNT": "syscall", - "syscall.TCP_VENDOR": "syscall", - "syscall.TCP_WINDOW_CLAMP": "syscall", - "syscall.TCSAFLUSH": "syscall", - "syscall.TCSETS": "syscall", - "syscall.TF_DISCONNECT": "syscall", - "syscall.TF_REUSE_SOCKET": "syscall", - "syscall.TF_USE_DEFAULT_WORKER": "syscall", - "syscall.TF_USE_KERNEL_APC": "syscall", - "syscall.TF_USE_SYSTEM_THREAD": "syscall", - "syscall.TF_WRITE_BEHIND": "syscall", - "syscall.TH32CS_INHERIT": "syscall", - "syscall.TH32CS_SNAPALL": "syscall", - "syscall.TH32CS_SNAPHEAPLIST": "syscall", - "syscall.TH32CS_SNAPMODULE": "syscall", - "syscall.TH32CS_SNAPMODULE32": "syscall", - "syscall.TH32CS_SNAPPROCESS": "syscall", - "syscall.TH32CS_SNAPTHREAD": "syscall", - "syscall.TIME_ZONE_ID_DAYLIGHT": "syscall", - "syscall.TIME_ZONE_ID_STANDARD": "syscall", - "syscall.TIME_ZONE_ID_UNKNOWN": "syscall", - "syscall.TIOCCBRK": "syscall", - "syscall.TIOCCDTR": "syscall", - "syscall.TIOCCONS": "syscall", - "syscall.TIOCDCDTIMESTAMP": "syscall", - "syscall.TIOCDRAIN": "syscall", - "syscall.TIOCDSIMICROCODE": "syscall", - "syscall.TIOCEXCL": "syscall", - "syscall.TIOCEXT": "syscall", - "syscall.TIOCFLAG_CDTRCTS": "syscall", - "syscall.TIOCFLAG_CLOCAL": "syscall", - "syscall.TIOCFLAG_CRTSCTS": "syscall", - "syscall.TIOCFLAG_MDMBUF": "syscall", - "syscall.TIOCFLAG_PPS": "syscall", - "syscall.TIOCFLAG_SOFTCAR": "syscall", - "syscall.TIOCFLUSH": "syscall", - "syscall.TIOCGDEV": "syscall", - "syscall.TIOCGDRAINWAIT": "syscall", - "syscall.TIOCGETA": "syscall", - "syscall.TIOCGETD": "syscall", - "syscall.TIOCGFLAGS": "syscall", - "syscall.TIOCGICOUNT": "syscall", - "syscall.TIOCGLCKTRMIOS": "syscall", - "syscall.TIOCGLINED": "syscall", - "syscall.TIOCGPGRP": "syscall", - "syscall.TIOCGPTN": "syscall", - "syscall.TIOCGQSIZE": "syscall", - "syscall.TIOCGRANTPT": "syscall", - "syscall.TIOCGRS485": "syscall", - "syscall.TIOCGSERIAL": "syscall", - "syscall.TIOCGSID": "syscall", - "syscall.TIOCGSIZE": "syscall", - "syscall.TIOCGSOFTCAR": "syscall", - "syscall.TIOCGTSTAMP": "syscall", - "syscall.TIOCGWINSZ": "syscall", - "syscall.TIOCINQ": "syscall", - "syscall.TIOCIXOFF": "syscall", - "syscall.TIOCIXON": "syscall", - "syscall.TIOCLINUX": "syscall", - "syscall.TIOCMBIC": "syscall", - "syscall.TIOCMBIS": "syscall", - "syscall.TIOCMGDTRWAIT": "syscall", - "syscall.TIOCMGET": "syscall", - "syscall.TIOCMIWAIT": "syscall", - "syscall.TIOCMODG": "syscall", - "syscall.TIOCMODS": "syscall", - "syscall.TIOCMSDTRWAIT": "syscall", - "syscall.TIOCMSET": "syscall", - "syscall.TIOCM_CAR": "syscall", - "syscall.TIOCM_CD": "syscall", - "syscall.TIOCM_CTS": "syscall", - "syscall.TIOCM_DCD": "syscall", - "syscall.TIOCM_DSR": "syscall", - "syscall.TIOCM_DTR": "syscall", - "syscall.TIOCM_LE": "syscall", - "syscall.TIOCM_RI": "syscall", - "syscall.TIOCM_RNG": "syscall", - "syscall.TIOCM_RTS": "syscall", - "syscall.TIOCM_SR": "syscall", - "syscall.TIOCM_ST": "syscall", - "syscall.TIOCNOTTY": "syscall", - "syscall.TIOCNXCL": "syscall", - "syscall.TIOCOUTQ": "syscall", - "syscall.TIOCPKT": "syscall", - "syscall.TIOCPKT_DATA": "syscall", - "syscall.TIOCPKT_DOSTOP": "syscall", - "syscall.TIOCPKT_FLUSHREAD": "syscall", - "syscall.TIOCPKT_FLUSHWRITE": "syscall", - "syscall.TIOCPKT_IOCTL": "syscall", - "syscall.TIOCPKT_NOSTOP": "syscall", - "syscall.TIOCPKT_START": "syscall", - "syscall.TIOCPKT_STOP": "syscall", - "syscall.TIOCPTMASTER": "syscall", - "syscall.TIOCPTMGET": "syscall", - "syscall.TIOCPTSNAME": "syscall", - "syscall.TIOCPTYGNAME": "syscall", - "syscall.TIOCPTYGRANT": "syscall", - "syscall.TIOCPTYUNLK": "syscall", - "syscall.TIOCRCVFRAME": "syscall", - "syscall.TIOCREMOTE": "syscall", - "syscall.TIOCSBRK": "syscall", - "syscall.TIOCSCONS": "syscall", - "syscall.TIOCSCTTY": "syscall", - "syscall.TIOCSDRAINWAIT": "syscall", - "syscall.TIOCSDTR": "syscall", - "syscall.TIOCSERCONFIG": "syscall", - "syscall.TIOCSERGETLSR": "syscall", - "syscall.TIOCSERGETMULTI": "syscall", - "syscall.TIOCSERGSTRUCT": "syscall", - "syscall.TIOCSERGWILD": "syscall", - "syscall.TIOCSERSETMULTI": "syscall", - "syscall.TIOCSERSWILD": "syscall", - "syscall.TIOCSER_TEMT": "syscall", - "syscall.TIOCSETA": "syscall", - "syscall.TIOCSETAF": "syscall", - "syscall.TIOCSETAW": "syscall", - "syscall.TIOCSETD": "syscall", - "syscall.TIOCSFLAGS": "syscall", - "syscall.TIOCSIG": "syscall", - "syscall.TIOCSLCKTRMIOS": "syscall", - "syscall.TIOCSLINED": "syscall", - "syscall.TIOCSPGRP": "syscall", - "syscall.TIOCSPTLCK": "syscall", - "syscall.TIOCSQSIZE": "syscall", - "syscall.TIOCSRS485": "syscall", - "syscall.TIOCSSERIAL": "syscall", - "syscall.TIOCSSIZE": "syscall", - "syscall.TIOCSSOFTCAR": "syscall", - "syscall.TIOCSTART": "syscall", - "syscall.TIOCSTAT": "syscall", - "syscall.TIOCSTI": "syscall", - "syscall.TIOCSTOP": "syscall", - "syscall.TIOCSTSTAMP": "syscall", - "syscall.TIOCSWINSZ": "syscall", - "syscall.TIOCTIMESTAMP": "syscall", - "syscall.TIOCUCNTL": "syscall", - "syscall.TIOCVHANGUP": "syscall", - "syscall.TIOCXMTFRAME": "syscall", - "syscall.TOKEN_ADJUST_DEFAULT": "syscall", - "syscall.TOKEN_ADJUST_GROUPS": "syscall", - "syscall.TOKEN_ADJUST_PRIVILEGES": "syscall", - "syscall.TOKEN_ALL_ACCESS": "syscall", - "syscall.TOKEN_ASSIGN_PRIMARY": "syscall", - "syscall.TOKEN_DUPLICATE": "syscall", - "syscall.TOKEN_EXECUTE": "syscall", - "syscall.TOKEN_IMPERSONATE": "syscall", - "syscall.TOKEN_QUERY": "syscall", - "syscall.TOKEN_QUERY_SOURCE": "syscall", - "syscall.TOKEN_READ": "syscall", - "syscall.TOKEN_WRITE": "syscall", - "syscall.TOSTOP": "syscall", - "syscall.TRUNCATE_EXISTING": "syscall", - "syscall.TUNATTACHFILTER": "syscall", - "syscall.TUNDETACHFILTER": "syscall", - "syscall.TUNGETFEATURES": "syscall", - "syscall.TUNGETIFF": "syscall", - "syscall.TUNGETSNDBUF": "syscall", - "syscall.TUNGETVNETHDRSZ": "syscall", - "syscall.TUNSETDEBUG": "syscall", - "syscall.TUNSETGROUP": "syscall", - "syscall.TUNSETIFF": "syscall", - "syscall.TUNSETLINK": "syscall", - "syscall.TUNSETNOCSUM": "syscall", - "syscall.TUNSETOFFLOAD": "syscall", - "syscall.TUNSETOWNER": "syscall", - "syscall.TUNSETPERSIST": "syscall", - "syscall.TUNSETSNDBUF": "syscall", - "syscall.TUNSETTXFILTER": "syscall", - "syscall.TUNSETVNETHDRSZ": "syscall", - "syscall.Tee": "syscall", - "syscall.TerminateProcess": "syscall", - "syscall.Termios": "syscall", - "syscall.Tgkill": "syscall", - "syscall.Time": "syscall", - "syscall.Time_t": "syscall", - "syscall.Times": "syscall", - "syscall.Timespec": "syscall", - "syscall.TimespecToNsec": "syscall", - "syscall.Timeval": "syscall", - "syscall.Timeval32": "syscall", - "syscall.TimevalToNsec": "syscall", - "syscall.Timex": "syscall", - "syscall.Timezoneinformation": "syscall", - "syscall.Tms": "syscall", - "syscall.Token": "syscall", - "syscall.TokenAccessInformation": "syscall", - "syscall.TokenAuditPolicy": "syscall", - "syscall.TokenDefaultDacl": "syscall", - "syscall.TokenElevation": "syscall", - "syscall.TokenElevationType": "syscall", - "syscall.TokenGroups": "syscall", - "syscall.TokenGroupsAndPrivileges": "syscall", - "syscall.TokenHasRestrictions": "syscall", - "syscall.TokenImpersonationLevel": "syscall", - "syscall.TokenIntegrityLevel": "syscall", - "syscall.TokenLinkedToken": "syscall", - "syscall.TokenLogonSid": "syscall", - "syscall.TokenMandatoryPolicy": "syscall", - "syscall.TokenOrigin": "syscall", - "syscall.TokenOwner": "syscall", - "syscall.TokenPrimaryGroup": "syscall", - "syscall.TokenPrivileges": "syscall", - "syscall.TokenRestrictedSids": "syscall", - "syscall.TokenSandBoxInert": "syscall", - "syscall.TokenSessionId": "syscall", - "syscall.TokenSessionReference": "syscall", - "syscall.TokenSource": "syscall", - "syscall.TokenStatistics": "syscall", - "syscall.TokenType": "syscall", - "syscall.TokenUIAccess": "syscall", - "syscall.TokenUser": "syscall", - "syscall.TokenVirtualizationAllowed": "syscall", - "syscall.TokenVirtualizationEnabled": "syscall", - "syscall.Tokenprimarygroup": "syscall", - "syscall.Tokenuser": "syscall", - "syscall.TranslateAccountName": "syscall", - "syscall.TranslateName": "syscall", - "syscall.TransmitFile": "syscall", - "syscall.TransmitFileBuffers": "syscall", - "syscall.Truncate": "syscall", - "syscall.USAGE_MATCH_TYPE_AND": "syscall", - "syscall.USAGE_MATCH_TYPE_OR": "syscall", - "syscall.UTF16FromString": "syscall", - "syscall.UTF16PtrFromString": "syscall", - "syscall.UTF16ToString": "syscall", - "syscall.Ucred": "syscall", - "syscall.Umask": "syscall", - "syscall.Uname": "syscall", - "syscall.Undelete": "syscall", - "syscall.UnixCredentials": "syscall", - "syscall.UnixRights": "syscall", - "syscall.Unlink": "syscall", - "syscall.Unlinkat": "syscall", - "syscall.UnmapViewOfFile": "syscall", - "syscall.Unmount": "syscall", - "syscall.Unsetenv": "syscall", - "syscall.Unshare": "syscall", - "syscall.UserInfo10": "syscall", - "syscall.Ustat": "syscall", - "syscall.Ustat_t": "syscall", - "syscall.Utimbuf": "syscall", - "syscall.Utime": "syscall", - "syscall.Utimes": "syscall", - "syscall.UtimesNano": "syscall", - "syscall.Utsname": "syscall", - "syscall.VDISCARD": "syscall", - "syscall.VDSUSP": "syscall", - "syscall.VEOF": "syscall", - "syscall.VEOL": "syscall", - "syscall.VEOL2": "syscall", - "syscall.VERASE": "syscall", - "syscall.VERASE2": "syscall", - "syscall.VINTR": "syscall", - "syscall.VKILL": "syscall", - "syscall.VLNEXT": "syscall", - "syscall.VMIN": "syscall", - "syscall.VQUIT": "syscall", - "syscall.VREPRINT": "syscall", - "syscall.VSTART": "syscall", - "syscall.VSTATUS": "syscall", - "syscall.VSTOP": "syscall", - "syscall.VSUSP": "syscall", - "syscall.VSWTC": "syscall", - "syscall.VT0": "syscall", - "syscall.VT1": "syscall", - "syscall.VTDLY": "syscall", - "syscall.VTIME": "syscall", - "syscall.VWERASE": "syscall", - "syscall.VirtualLock": "syscall", - "syscall.VirtualUnlock": "syscall", - "syscall.WAIT_ABANDONED": "syscall", - "syscall.WAIT_FAILED": "syscall", - "syscall.WAIT_OBJECT_0": "syscall", - "syscall.WAIT_TIMEOUT": "syscall", - "syscall.WALL": "syscall", - "syscall.WALLSIG": "syscall", - "syscall.WALTSIG": "syscall", - "syscall.WCLONE": "syscall", - "syscall.WCONTINUED": "syscall", - "syscall.WCOREFLAG": "syscall", - "syscall.WEXITED": "syscall", - "syscall.WLINUXCLONE": "syscall", - "syscall.WNOHANG": "syscall", - "syscall.WNOTHREAD": "syscall", - "syscall.WNOWAIT": "syscall", - "syscall.WNOZOMBIE": "syscall", - "syscall.WOPTSCHECKED": "syscall", - "syscall.WORDSIZE": "syscall", - "syscall.WSABuf": "syscall", - "syscall.WSACleanup": "syscall", - "syscall.WSADESCRIPTION_LEN": "syscall", - "syscall.WSAData": "syscall", - "syscall.WSAEACCES": "syscall", - "syscall.WSAECONNABORTED": "syscall", - "syscall.WSAECONNRESET": "syscall", - "syscall.WSAEnumProtocols": "syscall", - "syscall.WSAID_CONNECTEX": "syscall", - "syscall.WSAIoctl": "syscall", - "syscall.WSAPROTOCOL_LEN": "syscall", - "syscall.WSAProtocolChain": "syscall", - "syscall.WSAProtocolInfo": "syscall", - "syscall.WSARecv": "syscall", - "syscall.WSARecvFrom": "syscall", - "syscall.WSASYS_STATUS_LEN": "syscall", - "syscall.WSASend": "syscall", - "syscall.WSASendTo": "syscall", - "syscall.WSASendto": "syscall", - "syscall.WSAStartup": "syscall", - "syscall.WSTOPPED": "syscall", - "syscall.WTRAPPED": "syscall", - "syscall.WUNTRACED": "syscall", - "syscall.Wait4": "syscall", - "syscall.WaitForSingleObject": "syscall", - "syscall.WaitStatus": "syscall", - "syscall.Win32FileAttributeData": "syscall", - "syscall.Win32finddata": "syscall", - "syscall.Write": "syscall", - "syscall.WriteConsole": "syscall", - "syscall.WriteFile": "syscall", - "syscall.X509_ASN_ENCODING": "syscall", - "syscall.XCASE": "syscall", - "syscall.XP1_CONNECTIONLESS": "syscall", - "syscall.XP1_CONNECT_DATA": "syscall", - "syscall.XP1_DISCONNECT_DATA": "syscall", - "syscall.XP1_EXPEDITED_DATA": "syscall", - "syscall.XP1_GRACEFUL_CLOSE": "syscall", - "syscall.XP1_GUARANTEED_DELIVERY": "syscall", - "syscall.XP1_GUARANTEED_ORDER": "syscall", - "syscall.XP1_IFS_HANDLES": "syscall", - "syscall.XP1_MESSAGE_ORIENTED": "syscall", - "syscall.XP1_MULTIPOINT_CONTROL_PLANE": "syscall", - "syscall.XP1_MULTIPOINT_DATA_PLANE": "syscall", - "syscall.XP1_PARTIAL_MESSAGE": "syscall", - "syscall.XP1_PSEUDO_STREAM": "syscall", - "syscall.XP1_QOS_SUPPORTED": "syscall", - "syscall.XP1_SAN_SUPPORT_SDP": "syscall", - "syscall.XP1_SUPPORT_BROADCAST": "syscall", - "syscall.XP1_SUPPORT_MULTIPOINT": "syscall", - "syscall.XP1_UNI_RECV": "syscall", - "syscall.XP1_UNI_SEND": "syscall", - "syslog.Dial": "log/syslog", - "syslog.LOG_ALERT": "log/syslog", - "syslog.LOG_AUTH": "log/syslog", - "syslog.LOG_AUTHPRIV": "log/syslog", - "syslog.LOG_CRIT": "log/syslog", - "syslog.LOG_CRON": "log/syslog", - "syslog.LOG_DAEMON": "log/syslog", - "syslog.LOG_DEBUG": "log/syslog", - "syslog.LOG_EMERG": "log/syslog", - "syslog.LOG_ERR": "log/syslog", - "syslog.LOG_FTP": "log/syslog", - "syslog.LOG_INFO": "log/syslog", - "syslog.LOG_KERN": "log/syslog", - "syslog.LOG_LOCAL0": "log/syslog", - "syslog.LOG_LOCAL1": "log/syslog", - "syslog.LOG_LOCAL2": "log/syslog", - "syslog.LOG_LOCAL3": "log/syslog", - "syslog.LOG_LOCAL4": "log/syslog", - "syslog.LOG_LOCAL5": "log/syslog", - "syslog.LOG_LOCAL6": "log/syslog", - "syslog.LOG_LOCAL7": "log/syslog", - "syslog.LOG_LPR": "log/syslog", - "syslog.LOG_MAIL": "log/syslog", - "syslog.LOG_NEWS": "log/syslog", - "syslog.LOG_NOTICE": "log/syslog", - "syslog.LOG_SYSLOG": "log/syslog", - "syslog.LOG_USER": "log/syslog", - "syslog.LOG_UUCP": "log/syslog", - "syslog.LOG_WARNING": "log/syslog", - "syslog.New": "log/syslog", - "syslog.NewLogger": "log/syslog", - "syslog.Priority": "log/syslog", - "syslog.Writer": "log/syslog", - "tabwriter.AlignRight": "text/tabwriter", - "tabwriter.Debug": "text/tabwriter", - "tabwriter.DiscardEmptyColumns": "text/tabwriter", - "tabwriter.Escape": "text/tabwriter", - "tabwriter.FilterHTML": "text/tabwriter", - "tabwriter.NewWriter": "text/tabwriter", - "tabwriter.StripEscape": "text/tabwriter", - "tabwriter.TabIndent": "text/tabwriter", - "tabwriter.Writer": "text/tabwriter", - "tar.ErrFieldTooLong": "archive/tar", - "tar.ErrHeader": "archive/tar", - "tar.ErrWriteAfterClose": "archive/tar", - "tar.ErrWriteTooLong": "archive/tar", - "tar.FileInfoHeader": "archive/tar", - "tar.Header": "archive/tar", - "tar.NewReader": "archive/tar", - "tar.NewWriter": "archive/tar", - "tar.Reader": "archive/tar", - "tar.TypeBlock": "archive/tar", - "tar.TypeChar": "archive/tar", - "tar.TypeCont": "archive/tar", - "tar.TypeDir": "archive/tar", - "tar.TypeFifo": "archive/tar", - "tar.TypeGNULongLink": "archive/tar", - "tar.TypeGNULongName": "archive/tar", - "tar.TypeGNUSparse": "archive/tar", - "tar.TypeLink": "archive/tar", - "tar.TypeReg": "archive/tar", - "tar.TypeRegA": "archive/tar", - "tar.TypeSymlink": "archive/tar", - "tar.TypeXGlobalHeader": "archive/tar", - "tar.TypeXHeader": "archive/tar", - "tar.Writer": "archive/tar", - "template.CSS": "html/template", - "template.ErrAmbigContext": "html/template", - "template.ErrBadHTML": "html/template", - "template.ErrBranchEnd": "html/template", - "template.ErrEndContext": "html/template", - "template.ErrNoSuchTemplate": "html/template", - "template.ErrOutputContext": "html/template", - "template.ErrPartialCharset": "html/template", - "template.ErrPartialEscape": "html/template", - "template.ErrPredefinedEscaper": "html/template", - "template.ErrRangeLoopReentry": "html/template", - "template.ErrSlashAmbig": "html/template", - "template.Error": "html/template", - "template.ErrorCode": "html/template", - "template.ExecError": "text/template", + "syscall.CFLUSH": "syscall", + "syscall.CLOCAL": "syscall", + "syscall.CLONE_CHILD_CLEARTID": "syscall", + "syscall.CLONE_CHILD_SETTID": "syscall", + "syscall.CLONE_CSIGNAL": "syscall", + "syscall.CLONE_DETACHED": "syscall", + "syscall.CLONE_FILES": "syscall", + "syscall.CLONE_FS": "syscall", + "syscall.CLONE_IO": "syscall", + "syscall.CLONE_NEWIPC": "syscall", + "syscall.CLONE_NEWNET": "syscall", + "syscall.CLONE_NEWNS": "syscall", + "syscall.CLONE_NEWPID": "syscall", + "syscall.CLONE_NEWUSER": "syscall", + "syscall.CLONE_NEWUTS": "syscall", + "syscall.CLONE_PARENT": "syscall", + "syscall.CLONE_PARENT_SETTID": "syscall", + "syscall.CLONE_PID": "syscall", + "syscall.CLONE_PTRACE": "syscall", + "syscall.CLONE_SETTLS": "syscall", + "syscall.CLONE_SIGHAND": "syscall", + "syscall.CLONE_SYSVSEM": "syscall", + "syscall.CLONE_THREAD": "syscall", + "syscall.CLONE_UNTRACED": "syscall", + "syscall.CLONE_VFORK": "syscall", + "syscall.CLONE_VM": "syscall", + "syscall.CPUID_CFLUSH": "syscall", + "syscall.CREAD": "syscall", + "syscall.CREATE_ALWAYS": "syscall", + "syscall.CREATE_NEW": "syscall", + "syscall.CREATE_NEW_PROCESS_GROUP": "syscall", + "syscall.CREATE_UNICODE_ENVIRONMENT": "syscall", + "syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL": "syscall", + "syscall.CRYPT_DELETEKEYSET": "syscall", + "syscall.CRYPT_MACHINE_KEYSET": "syscall", + "syscall.CRYPT_NEWKEYSET": "syscall", + "syscall.CRYPT_SILENT": "syscall", + "syscall.CRYPT_VERIFYCONTEXT": "syscall", + "syscall.CS5": "syscall", + "syscall.CS6": "syscall", + "syscall.CS7": "syscall", + "syscall.CS8": "syscall", + "syscall.CSIZE": "syscall", + "syscall.CSTART": "syscall", + "syscall.CSTATUS": "syscall", + "syscall.CSTOP": "syscall", + "syscall.CSTOPB": "syscall", + "syscall.CSUSP": "syscall", + "syscall.CTL_MAXNAME": "syscall", + "syscall.CTL_NET": "syscall", + "syscall.CTL_QUERY": "syscall", + "syscall.CTRL_BREAK_EVENT": "syscall", + "syscall.CTRL_C_EVENT": "syscall", + "syscall.CancelIo": "syscall", + "syscall.CancelIoEx": "syscall", + "syscall.CertAddCertificateContextToStore": "syscall", + "syscall.CertChainContext": "syscall", + "syscall.CertChainElement": "syscall", + "syscall.CertChainPara": "syscall", + "syscall.CertChainPolicyPara": "syscall", + "syscall.CertChainPolicyStatus": "syscall", + "syscall.CertCloseStore": "syscall", + "syscall.CertContext": "syscall", + "syscall.CertCreateCertificateContext": "syscall", + "syscall.CertEnhKeyUsage": "syscall", + "syscall.CertEnumCertificatesInStore": "syscall", + "syscall.CertFreeCertificateChain": "syscall", + "syscall.CertFreeCertificateContext": "syscall", + "syscall.CertGetCertificateChain": "syscall", + "syscall.CertInfo": "syscall", + "syscall.CertOpenStore": "syscall", + "syscall.CertOpenSystemStore": "syscall", + "syscall.CertRevocationCrlInfo": "syscall", + "syscall.CertRevocationInfo": "syscall", + "syscall.CertSimpleChain": "syscall", + "syscall.CertTrustListInfo": "syscall", + "syscall.CertTrustStatus": "syscall", + "syscall.CertUsageMatch": "syscall", + "syscall.CertVerifyCertificateChainPolicy": "syscall", + "syscall.Chdir": "syscall", + "syscall.CheckBpfVersion": "syscall", + "syscall.Chflags": "syscall", + "syscall.Chmod": "syscall", + "syscall.Chown": "syscall", + "syscall.Chroot": "syscall", + "syscall.Clearenv": "syscall", + "syscall.Close": "syscall", + "syscall.CloseHandle": "syscall", + "syscall.CloseOnExec": "syscall", + "syscall.Closesocket": "syscall", + "syscall.CmsgLen": "syscall", + "syscall.CmsgSpace": "syscall", + "syscall.Cmsghdr": "syscall", + "syscall.CommandLineToArgv": "syscall", + "syscall.ComputerName": "syscall", + "syscall.Conn": "syscall", + "syscall.Connect": "syscall", + "syscall.ConnectEx": "syscall", + "syscall.ConvertSidToStringSid": "syscall", + "syscall.ConvertStringSidToSid": "syscall", + "syscall.CopySid": "syscall", + "syscall.Creat": "syscall", + "syscall.CreateDirectory": "syscall", + "syscall.CreateFile": "syscall", + "syscall.CreateFileMapping": "syscall", + "syscall.CreateHardLink": "syscall", + "syscall.CreateIoCompletionPort": "syscall", + "syscall.CreatePipe": "syscall", + "syscall.CreateProcess": "syscall", + "syscall.CreateProcessAsUser": "syscall", + "syscall.CreateSymbolicLink": "syscall", + "syscall.CreateToolhelp32Snapshot": "syscall", + "syscall.Credential": "syscall", + "syscall.CryptAcquireContext": "syscall", + "syscall.CryptGenRandom": "syscall", + "syscall.CryptReleaseContext": "syscall", + "syscall.DIOCBSFLUSH": "syscall", + "syscall.DIOCOSFPFLUSH": "syscall", + "syscall.DLL": "syscall", + "syscall.DLLError": "syscall", + "syscall.DLT_A429": "syscall", + "syscall.DLT_A653_ICM": "syscall", + "syscall.DLT_AIRONET_HEADER": "syscall", + "syscall.DLT_AOS": "syscall", + "syscall.DLT_APPLE_IP_OVER_IEEE1394": "syscall", + "syscall.DLT_ARCNET": "syscall", + "syscall.DLT_ARCNET_LINUX": "syscall", + "syscall.DLT_ATM_CLIP": "syscall", + "syscall.DLT_ATM_RFC1483": "syscall", + "syscall.DLT_AURORA": "syscall", + "syscall.DLT_AX25": "syscall", + "syscall.DLT_AX25_KISS": "syscall", + "syscall.DLT_BACNET_MS_TP": "syscall", + "syscall.DLT_BLUETOOTH_HCI_H4": "syscall", + "syscall.DLT_BLUETOOTH_HCI_H4_WITH_PHDR": "syscall", + "syscall.DLT_CAN20B": "syscall", + "syscall.DLT_CAN_SOCKETCAN": "syscall", + "syscall.DLT_CHAOS": "syscall", + "syscall.DLT_CHDLC": "syscall", + "syscall.DLT_CISCO_IOS": "syscall", + "syscall.DLT_C_HDLC": "syscall", + "syscall.DLT_C_HDLC_WITH_DIR": "syscall", + "syscall.DLT_DBUS": "syscall", + "syscall.DLT_DECT": "syscall", + "syscall.DLT_DOCSIS": "syscall", + "syscall.DLT_DVB_CI": "syscall", + "syscall.DLT_ECONET": "syscall", + "syscall.DLT_EN10MB": "syscall", + "syscall.DLT_EN3MB": "syscall", + "syscall.DLT_ENC": "syscall", + "syscall.DLT_ERF": "syscall", + "syscall.DLT_ERF_ETH": "syscall", + "syscall.DLT_ERF_POS": "syscall", + "syscall.DLT_FC_2": "syscall", + "syscall.DLT_FC_2_WITH_FRAME_DELIMS": "syscall", + "syscall.DLT_FDDI": "syscall", + "syscall.DLT_FLEXRAY": "syscall", + "syscall.DLT_FRELAY": "syscall", + "syscall.DLT_FRELAY_WITH_DIR": "syscall", + "syscall.DLT_GCOM_SERIAL": "syscall", + "syscall.DLT_GCOM_T1E1": "syscall", + "syscall.DLT_GPF_F": "syscall", + "syscall.DLT_GPF_T": "syscall", + "syscall.DLT_GPRS_LLC": "syscall", + "syscall.DLT_GSMTAP_ABIS": "syscall", + "syscall.DLT_GSMTAP_UM": "syscall", + "syscall.DLT_HDLC": "syscall", + "syscall.DLT_HHDLC": "syscall", + "syscall.DLT_HIPPI": "syscall", + "syscall.DLT_IBM_SN": "syscall", + "syscall.DLT_IBM_SP": "syscall", + "syscall.DLT_IEEE802": "syscall", + "syscall.DLT_IEEE802_11": "syscall", + "syscall.DLT_IEEE802_11_RADIO": "syscall", + "syscall.DLT_IEEE802_11_RADIO_AVS": "syscall", + "syscall.DLT_IEEE802_15_4": "syscall", + "syscall.DLT_IEEE802_15_4_LINUX": "syscall", + "syscall.DLT_IEEE802_15_4_NOFCS": "syscall", + "syscall.DLT_IEEE802_15_4_NONASK_PHY": "syscall", + "syscall.DLT_IEEE802_16_MAC_CPS": "syscall", + "syscall.DLT_IEEE802_16_MAC_CPS_RADIO": "syscall", + "syscall.DLT_IPFILTER": "syscall", + "syscall.DLT_IPMB": "syscall", + "syscall.DLT_IPMB_LINUX": "syscall", + "syscall.DLT_IPNET": "syscall", + "syscall.DLT_IPOIB": "syscall", + "syscall.DLT_IPV4": "syscall", + "syscall.DLT_IPV6": "syscall", + "syscall.DLT_IP_OVER_FC": "syscall", + "syscall.DLT_JUNIPER_ATM1": "syscall", + "syscall.DLT_JUNIPER_ATM2": "syscall", + "syscall.DLT_JUNIPER_ATM_CEMIC": "syscall", + "syscall.DLT_JUNIPER_CHDLC": "syscall", + "syscall.DLT_JUNIPER_ES": "syscall", + "syscall.DLT_JUNIPER_ETHER": "syscall", + "syscall.DLT_JUNIPER_FIBRECHANNEL": "syscall", + "syscall.DLT_JUNIPER_FRELAY": "syscall", + "syscall.DLT_JUNIPER_GGSN": "syscall", + "syscall.DLT_JUNIPER_ISM": "syscall", + "syscall.DLT_JUNIPER_MFR": "syscall", + "syscall.DLT_JUNIPER_MLFR": "syscall", + "syscall.DLT_JUNIPER_MLPPP": "syscall", + "syscall.DLT_JUNIPER_MONITOR": "syscall", + "syscall.DLT_JUNIPER_PIC_PEER": "syscall", + "syscall.DLT_JUNIPER_PPP": "syscall", + "syscall.DLT_JUNIPER_PPPOE": "syscall", + "syscall.DLT_JUNIPER_PPPOE_ATM": "syscall", + "syscall.DLT_JUNIPER_SERVICES": "syscall", + "syscall.DLT_JUNIPER_SRX_E2E": "syscall", + "syscall.DLT_JUNIPER_ST": "syscall", + "syscall.DLT_JUNIPER_VP": "syscall", + "syscall.DLT_JUNIPER_VS": "syscall", + "syscall.DLT_LAPB_WITH_DIR": "syscall", + "syscall.DLT_LAPD": "syscall", + "syscall.DLT_LIN": "syscall", + "syscall.DLT_LINUX_EVDEV": "syscall", + "syscall.DLT_LINUX_IRDA": "syscall", + "syscall.DLT_LINUX_LAPD": "syscall", + "syscall.DLT_LINUX_PPP_WITHDIRECTION": "syscall", + "syscall.DLT_LINUX_SLL": "syscall", + "syscall.DLT_LOOP": "syscall", + "syscall.DLT_LTALK": "syscall", + "syscall.DLT_MATCHING_MAX": "syscall", + "syscall.DLT_MATCHING_MIN": "syscall", + "syscall.DLT_MFR": "syscall", + "syscall.DLT_MOST": "syscall", + "syscall.DLT_MPEG_2_TS": "syscall", + "syscall.DLT_MPLS": "syscall", + "syscall.DLT_MTP2": "syscall", + "syscall.DLT_MTP2_WITH_PHDR": "syscall", + "syscall.DLT_MTP3": "syscall", + "syscall.DLT_MUX27010": "syscall", + "syscall.DLT_NETANALYZER": "syscall", + "syscall.DLT_NETANALYZER_TRANSPARENT": "syscall", + "syscall.DLT_NFC_LLCP": "syscall", + "syscall.DLT_NFLOG": "syscall", + "syscall.DLT_NG40": "syscall", + "syscall.DLT_NULL": "syscall", + "syscall.DLT_PCI_EXP": "syscall", + "syscall.DLT_PFLOG": "syscall", + "syscall.DLT_PFSYNC": "syscall", + "syscall.DLT_PPI": "syscall", + "syscall.DLT_PPP": "syscall", + "syscall.DLT_PPP_BSDOS": "syscall", + "syscall.DLT_PPP_ETHER": "syscall", + "syscall.DLT_PPP_PPPD": "syscall", + "syscall.DLT_PPP_SERIAL": "syscall", + "syscall.DLT_PPP_WITH_DIR": "syscall", + "syscall.DLT_PPP_WITH_DIRECTION": "syscall", + "syscall.DLT_PRISM_HEADER": "syscall", + "syscall.DLT_PRONET": "syscall", + "syscall.DLT_RAIF1": "syscall", + "syscall.DLT_RAW": "syscall", + "syscall.DLT_RAWAF_MASK": "syscall", + "syscall.DLT_RIO": "syscall", + "syscall.DLT_SCCP": "syscall", + "syscall.DLT_SITA": "syscall", + "syscall.DLT_SLIP": "syscall", + "syscall.DLT_SLIP_BSDOS": "syscall", + "syscall.DLT_STANAG_5066_D_PDU": "syscall", + "syscall.DLT_SUNATM": "syscall", + "syscall.DLT_SYMANTEC_FIREWALL": "syscall", + "syscall.DLT_TZSP": "syscall", + "syscall.DLT_USB": "syscall", + "syscall.DLT_USB_LINUX": "syscall", + "syscall.DLT_USB_LINUX_MMAPPED": "syscall", + "syscall.DLT_USER0": "syscall", + "syscall.DLT_USER1": "syscall", + "syscall.DLT_USER10": "syscall", + "syscall.DLT_USER11": "syscall", + "syscall.DLT_USER12": "syscall", + "syscall.DLT_USER13": "syscall", + "syscall.DLT_USER14": "syscall", + "syscall.DLT_USER15": "syscall", + "syscall.DLT_USER2": "syscall", + "syscall.DLT_USER3": "syscall", + "syscall.DLT_USER4": "syscall", + "syscall.DLT_USER5": "syscall", + "syscall.DLT_USER6": "syscall", + "syscall.DLT_USER7": "syscall", + "syscall.DLT_USER8": "syscall", + "syscall.DLT_USER9": "syscall", + "syscall.DLT_WIHART": "syscall", + "syscall.DLT_X2E_SERIAL": "syscall", + "syscall.DLT_X2E_XORAYA": "syscall", + "syscall.DNSMXData": "syscall", + "syscall.DNSPTRData": "syscall", + "syscall.DNSRecord": "syscall", + "syscall.DNSSRVData": "syscall", + "syscall.DNSTXTData": "syscall", + "syscall.DNS_INFO_NO_RECORDS": "syscall", + "syscall.DNS_TYPE_A": "syscall", + "syscall.DNS_TYPE_A6": "syscall", + "syscall.DNS_TYPE_AAAA": "syscall", + "syscall.DNS_TYPE_ADDRS": "syscall", + "syscall.DNS_TYPE_AFSDB": "syscall", + "syscall.DNS_TYPE_ALL": "syscall", + "syscall.DNS_TYPE_ANY": "syscall", + "syscall.DNS_TYPE_ATMA": "syscall", + "syscall.DNS_TYPE_AXFR": "syscall", + "syscall.DNS_TYPE_CERT": "syscall", + "syscall.DNS_TYPE_CNAME": "syscall", + "syscall.DNS_TYPE_DHCID": "syscall", + "syscall.DNS_TYPE_DNAME": "syscall", + "syscall.DNS_TYPE_DNSKEY": "syscall", + "syscall.DNS_TYPE_DS": "syscall", + "syscall.DNS_TYPE_EID": "syscall", + "syscall.DNS_TYPE_GID": "syscall", + "syscall.DNS_TYPE_GPOS": "syscall", + "syscall.DNS_TYPE_HINFO": "syscall", + "syscall.DNS_TYPE_ISDN": "syscall", + "syscall.DNS_TYPE_IXFR": "syscall", + "syscall.DNS_TYPE_KEY": "syscall", + "syscall.DNS_TYPE_KX": "syscall", + "syscall.DNS_TYPE_LOC": "syscall", + "syscall.DNS_TYPE_MAILA": "syscall", + "syscall.DNS_TYPE_MAILB": "syscall", + "syscall.DNS_TYPE_MB": "syscall", + "syscall.DNS_TYPE_MD": "syscall", + "syscall.DNS_TYPE_MF": "syscall", + "syscall.DNS_TYPE_MG": "syscall", + "syscall.DNS_TYPE_MINFO": "syscall", + "syscall.DNS_TYPE_MR": "syscall", + "syscall.DNS_TYPE_MX": "syscall", + "syscall.DNS_TYPE_NAPTR": "syscall", + "syscall.DNS_TYPE_NBSTAT": "syscall", + "syscall.DNS_TYPE_NIMLOC": "syscall", + "syscall.DNS_TYPE_NS": "syscall", + "syscall.DNS_TYPE_NSAP": "syscall", + "syscall.DNS_TYPE_NSAPPTR": "syscall", + "syscall.DNS_TYPE_NSEC": "syscall", + "syscall.DNS_TYPE_NULL": "syscall", + "syscall.DNS_TYPE_NXT": "syscall", + "syscall.DNS_TYPE_OPT": "syscall", + "syscall.DNS_TYPE_PTR": "syscall", + "syscall.DNS_TYPE_PX": "syscall", + "syscall.DNS_TYPE_RP": "syscall", + "syscall.DNS_TYPE_RRSIG": "syscall", + "syscall.DNS_TYPE_RT": "syscall", + "syscall.DNS_TYPE_SIG": "syscall", + "syscall.DNS_TYPE_SINK": "syscall", + "syscall.DNS_TYPE_SOA": "syscall", + "syscall.DNS_TYPE_SRV": "syscall", + "syscall.DNS_TYPE_TEXT": "syscall", + "syscall.DNS_TYPE_TKEY": "syscall", + "syscall.DNS_TYPE_TSIG": "syscall", + "syscall.DNS_TYPE_UID": "syscall", + "syscall.DNS_TYPE_UINFO": "syscall", + "syscall.DNS_TYPE_UNSPEC": "syscall", + "syscall.DNS_TYPE_WINS": "syscall", + "syscall.DNS_TYPE_WINSR": "syscall", + "syscall.DNS_TYPE_WKS": "syscall", + "syscall.DNS_TYPE_X25": "syscall", + "syscall.DT_BLK": "syscall", + "syscall.DT_CHR": "syscall", + "syscall.DT_DIR": "syscall", + "syscall.DT_FIFO": "syscall", + "syscall.DT_LNK": "syscall", + "syscall.DT_REG": "syscall", + "syscall.DT_SOCK": "syscall", + "syscall.DT_UNKNOWN": "syscall", + "syscall.DT_WHT": "syscall", + "syscall.DUPLICATE_CLOSE_SOURCE": "syscall", + "syscall.DUPLICATE_SAME_ACCESS": "syscall", + "syscall.DeleteFile": "syscall", + "syscall.DetachLsf": "syscall", + "syscall.DeviceIoControl": "syscall", + "syscall.Dirent": "syscall", + "syscall.DnsNameCompare": "syscall", + "syscall.DnsQuery": "syscall", + "syscall.DnsRecordListFree": "syscall", + "syscall.DnsSectionAdditional": "syscall", + "syscall.DnsSectionAnswer": "syscall", + "syscall.DnsSectionAuthority": "syscall", + "syscall.DnsSectionQuestion": "syscall", + "syscall.Dup": "syscall", + "syscall.Dup2": "syscall", + "syscall.Dup3": "syscall", + "syscall.DuplicateHandle": "syscall", + "syscall.E2BIG": "syscall", + "syscall.EACCES": "syscall", + "syscall.EADDRINUSE": "syscall", + "syscall.EADDRNOTAVAIL": "syscall", + "syscall.EADV": "syscall", + "syscall.EAFNOSUPPORT": "syscall", + "syscall.EAGAIN": "syscall", + "syscall.EALREADY": "syscall", + "syscall.EAUTH": "syscall", + "syscall.EBADARCH": "syscall", + "syscall.EBADE": "syscall", + "syscall.EBADEXEC": "syscall", + "syscall.EBADF": "syscall", + "syscall.EBADFD": "syscall", + "syscall.EBADMACHO": "syscall", + "syscall.EBADMSG": "syscall", + "syscall.EBADR": "syscall", + "syscall.EBADRPC": "syscall", + "syscall.EBADRQC": "syscall", + "syscall.EBADSLT": "syscall", + "syscall.EBFONT": "syscall", + "syscall.EBUSY": "syscall", + "syscall.ECANCELED": "syscall", + "syscall.ECAPMODE": "syscall", + "syscall.ECHILD": "syscall", + "syscall.ECHO": "syscall", + "syscall.ECHOCTL": "syscall", + "syscall.ECHOE": "syscall", + "syscall.ECHOK": "syscall", + "syscall.ECHOKE": "syscall", + "syscall.ECHONL": "syscall", + "syscall.ECHOPRT": "syscall", + "syscall.ECHRNG": "syscall", + "syscall.ECOMM": "syscall", + "syscall.ECONNABORTED": "syscall", + "syscall.ECONNREFUSED": "syscall", + "syscall.ECONNRESET": "syscall", + "syscall.EDEADLK": "syscall", + "syscall.EDEADLOCK": "syscall", + "syscall.EDESTADDRREQ": "syscall", + "syscall.EDEVERR": "syscall", + "syscall.EDOM": "syscall", + "syscall.EDOOFUS": "syscall", + "syscall.EDOTDOT": "syscall", + "syscall.EDQUOT": "syscall", + "syscall.EEXIST": "syscall", + "syscall.EFAULT": "syscall", + "syscall.EFBIG": "syscall", + "syscall.EFER_LMA": "syscall", + "syscall.EFER_LME": "syscall", + "syscall.EFER_NXE": "syscall", + "syscall.EFER_SCE": "syscall", + "syscall.EFTYPE": "syscall", + "syscall.EHOSTDOWN": "syscall", + "syscall.EHOSTUNREACH": "syscall", + "syscall.EHWPOISON": "syscall", + "syscall.EIDRM": "syscall", + "syscall.EILSEQ": "syscall", + "syscall.EINPROGRESS": "syscall", + "syscall.EINTR": "syscall", + "syscall.EINVAL": "syscall", + "syscall.EIO": "syscall", + "syscall.EIPSEC": "syscall", + "syscall.EISCONN": "syscall", + "syscall.EISDIR": "syscall", + "syscall.EISNAM": "syscall", + "syscall.EKEYEXPIRED": "syscall", + "syscall.EKEYREJECTED": "syscall", + "syscall.EKEYREVOKED": "syscall", + "syscall.EL2HLT": "syscall", + "syscall.EL2NSYNC": "syscall", + "syscall.EL3HLT": "syscall", + "syscall.EL3RST": "syscall", + "syscall.ELAST": "syscall", + "syscall.ELF_NGREG": "syscall", + "syscall.ELF_PRARGSZ": "syscall", + "syscall.ELIBACC": "syscall", + "syscall.ELIBBAD": "syscall", + "syscall.ELIBEXEC": "syscall", + "syscall.ELIBMAX": "syscall", + "syscall.ELIBSCN": "syscall", + "syscall.ELNRNG": "syscall", + "syscall.ELOOP": "syscall", + "syscall.EMEDIUMTYPE": "syscall", + "syscall.EMFILE": "syscall", + "syscall.EMLINK": "syscall", + "syscall.EMSGSIZE": "syscall", + "syscall.EMT_TAGOVF": "syscall", + "syscall.EMULTIHOP": "syscall", + "syscall.EMUL_ENABLED": "syscall", + "syscall.EMUL_LINUX": "syscall", + "syscall.EMUL_LINUX32": "syscall", + "syscall.EMUL_MAXID": "syscall", + "syscall.EMUL_NATIVE": "syscall", + "syscall.ENAMETOOLONG": "syscall", + "syscall.ENAVAIL": "syscall", + "syscall.ENDRUNDISC": "syscall", + "syscall.ENEEDAUTH": "syscall", + "syscall.ENETDOWN": "syscall", + "syscall.ENETRESET": "syscall", + "syscall.ENETUNREACH": "syscall", + "syscall.ENFILE": "syscall", + "syscall.ENOANO": "syscall", + "syscall.ENOATTR": "syscall", + "syscall.ENOBUFS": "syscall", + "syscall.ENOCSI": "syscall", + "syscall.ENODATA": "syscall", + "syscall.ENODEV": "syscall", + "syscall.ENOENT": "syscall", + "syscall.ENOEXEC": "syscall", + "syscall.ENOKEY": "syscall", + "syscall.ENOLCK": "syscall", + "syscall.ENOLINK": "syscall", + "syscall.ENOMEDIUM": "syscall", + "syscall.ENOMEM": "syscall", + "syscall.ENOMSG": "syscall", + "syscall.ENONET": "syscall", + "syscall.ENOPKG": "syscall", + "syscall.ENOPOLICY": "syscall", + "syscall.ENOPROTOOPT": "syscall", + "syscall.ENOSPC": "syscall", + "syscall.ENOSR": "syscall", + "syscall.ENOSTR": "syscall", + "syscall.ENOSYS": "syscall", + "syscall.ENOTBLK": "syscall", + "syscall.ENOTCAPABLE": "syscall", + "syscall.ENOTCONN": "syscall", + "syscall.ENOTDIR": "syscall", + "syscall.ENOTEMPTY": "syscall", + "syscall.ENOTNAM": "syscall", + "syscall.ENOTRECOVERABLE": "syscall", + "syscall.ENOTSOCK": "syscall", + "syscall.ENOTSUP": "syscall", + "syscall.ENOTTY": "syscall", + "syscall.ENOTUNIQ": "syscall", + "syscall.ENXIO": "syscall", + "syscall.EN_SW_CTL_INF": "syscall", + "syscall.EN_SW_CTL_PREC": "syscall", + "syscall.EN_SW_CTL_ROUND": "syscall", + "syscall.EN_SW_DATACHAIN": "syscall", + "syscall.EN_SW_DENORM": "syscall", + "syscall.EN_SW_INVOP": "syscall", + "syscall.EN_SW_OVERFLOW": "syscall", + "syscall.EN_SW_PRECLOSS": "syscall", + "syscall.EN_SW_UNDERFLOW": "syscall", + "syscall.EN_SW_ZERODIV": "syscall", + "syscall.EOPNOTSUPP": "syscall", + "syscall.EOVERFLOW": "syscall", + "syscall.EOWNERDEAD": "syscall", + "syscall.EPERM": "syscall", + "syscall.EPFNOSUPPORT": "syscall", + "syscall.EPIPE": "syscall", + "syscall.EPOLLERR": "syscall", + "syscall.EPOLLET": "syscall", + "syscall.EPOLLHUP": "syscall", + "syscall.EPOLLIN": "syscall", + "syscall.EPOLLMSG": "syscall", + "syscall.EPOLLONESHOT": "syscall", + "syscall.EPOLLOUT": "syscall", + "syscall.EPOLLPRI": "syscall", + "syscall.EPOLLRDBAND": "syscall", + "syscall.EPOLLRDHUP": "syscall", + "syscall.EPOLLRDNORM": "syscall", + "syscall.EPOLLWRBAND": "syscall", + "syscall.EPOLLWRNORM": "syscall", + "syscall.EPOLL_CLOEXEC": "syscall", + "syscall.EPOLL_CTL_ADD": "syscall", + "syscall.EPOLL_CTL_DEL": "syscall", + "syscall.EPOLL_CTL_MOD": "syscall", + "syscall.EPOLL_NONBLOCK": "syscall", + "syscall.EPROCLIM": "syscall", + "syscall.EPROCUNAVAIL": "syscall", + "syscall.EPROGMISMATCH": "syscall", + "syscall.EPROGUNAVAIL": "syscall", + "syscall.EPROTO": "syscall", + "syscall.EPROTONOSUPPORT": "syscall", + "syscall.EPROTOTYPE": "syscall", + "syscall.EPWROFF": "syscall", + "syscall.ERANGE": "syscall", + "syscall.EREMCHG": "syscall", + "syscall.EREMOTE": "syscall", + "syscall.EREMOTEIO": "syscall", + "syscall.ERESTART": "syscall", + "syscall.ERFKILL": "syscall", + "syscall.EROFS": "syscall", + "syscall.ERPCMISMATCH": "syscall", + "syscall.ERROR_ACCESS_DENIED": "syscall", + "syscall.ERROR_ALREADY_EXISTS": "syscall", + "syscall.ERROR_BROKEN_PIPE": "syscall", + "syscall.ERROR_BUFFER_OVERFLOW": "syscall", + "syscall.ERROR_DIR_NOT_EMPTY": "syscall", + "syscall.ERROR_ENVVAR_NOT_FOUND": "syscall", + "syscall.ERROR_FILE_EXISTS": "syscall", + "syscall.ERROR_FILE_NOT_FOUND": "syscall", + "syscall.ERROR_HANDLE_EOF": "syscall", + "syscall.ERROR_INSUFFICIENT_BUFFER": "syscall", + "syscall.ERROR_IO_PENDING": "syscall", + "syscall.ERROR_MOD_NOT_FOUND": "syscall", + "syscall.ERROR_MORE_DATA": "syscall", + "syscall.ERROR_NETNAME_DELETED": "syscall", + "syscall.ERROR_NOT_FOUND": "syscall", + "syscall.ERROR_NO_MORE_FILES": "syscall", + "syscall.ERROR_OPERATION_ABORTED": "syscall", + "syscall.ERROR_PATH_NOT_FOUND": "syscall", + "syscall.ERROR_PRIVILEGE_NOT_HELD": "syscall", + "syscall.ERROR_PROC_NOT_FOUND": "syscall", + "syscall.ESHLIBVERS": "syscall", + "syscall.ESHUTDOWN": "syscall", + "syscall.ESOCKTNOSUPPORT": "syscall", + "syscall.ESPIPE": "syscall", + "syscall.ESRCH": "syscall", + "syscall.ESRMNT": "syscall", + "syscall.ESTALE": "syscall", + "syscall.ESTRPIPE": "syscall", + "syscall.ETHERCAP_JUMBO_MTU": "syscall", + "syscall.ETHERCAP_VLAN_HWTAGGING": "syscall", + "syscall.ETHERCAP_VLAN_MTU": "syscall", + "syscall.ETHERMIN": "syscall", + "syscall.ETHERMTU": "syscall", + "syscall.ETHERMTU_JUMBO": "syscall", + "syscall.ETHERTYPE_8023": "syscall", + "syscall.ETHERTYPE_AARP": "syscall", + "syscall.ETHERTYPE_ACCTON": "syscall", + "syscall.ETHERTYPE_AEONIC": "syscall", + "syscall.ETHERTYPE_ALPHA": "syscall", + "syscall.ETHERTYPE_AMBER": "syscall", + "syscall.ETHERTYPE_AMOEBA": "syscall", + "syscall.ETHERTYPE_AOE": "syscall", + "syscall.ETHERTYPE_APOLLO": "syscall", + "syscall.ETHERTYPE_APOLLODOMAIN": "syscall", + "syscall.ETHERTYPE_APPLETALK": "syscall", + "syscall.ETHERTYPE_APPLITEK": "syscall", + "syscall.ETHERTYPE_ARGONAUT": "syscall", + "syscall.ETHERTYPE_ARP": "syscall", + "syscall.ETHERTYPE_AT": "syscall", + "syscall.ETHERTYPE_ATALK": "syscall", + "syscall.ETHERTYPE_ATOMIC": "syscall", + "syscall.ETHERTYPE_ATT": "syscall", + "syscall.ETHERTYPE_ATTSTANFORD": "syscall", + "syscall.ETHERTYPE_AUTOPHON": "syscall", + "syscall.ETHERTYPE_AXIS": "syscall", + "syscall.ETHERTYPE_BCLOOP": "syscall", + "syscall.ETHERTYPE_BOFL": "syscall", + "syscall.ETHERTYPE_CABLETRON": "syscall", + "syscall.ETHERTYPE_CHAOS": "syscall", + "syscall.ETHERTYPE_COMDESIGN": "syscall", + "syscall.ETHERTYPE_COMPUGRAPHIC": "syscall", + "syscall.ETHERTYPE_COUNTERPOINT": "syscall", + "syscall.ETHERTYPE_CRONUS": "syscall", + "syscall.ETHERTYPE_CRONUSVLN": "syscall", + "syscall.ETHERTYPE_DCA": "syscall", + "syscall.ETHERTYPE_DDE": "syscall", + "syscall.ETHERTYPE_DEBNI": "syscall", + "syscall.ETHERTYPE_DECAM": "syscall", + "syscall.ETHERTYPE_DECCUST": "syscall", + "syscall.ETHERTYPE_DECDIAG": "syscall", + "syscall.ETHERTYPE_DECDNS": "syscall", + "syscall.ETHERTYPE_DECDTS": "syscall", + "syscall.ETHERTYPE_DECEXPER": "syscall", + "syscall.ETHERTYPE_DECLAST": "syscall", + "syscall.ETHERTYPE_DECLTM": "syscall", + "syscall.ETHERTYPE_DECMUMPS": "syscall", + "syscall.ETHERTYPE_DECNETBIOS": "syscall", + "syscall.ETHERTYPE_DELTACON": "syscall", + "syscall.ETHERTYPE_DIDDLE": "syscall", + "syscall.ETHERTYPE_DLOG1": "syscall", + "syscall.ETHERTYPE_DLOG2": "syscall", + "syscall.ETHERTYPE_DN": "syscall", + "syscall.ETHERTYPE_DOGFIGHT": "syscall", + "syscall.ETHERTYPE_DSMD": "syscall", + "syscall.ETHERTYPE_ECMA": "syscall", + "syscall.ETHERTYPE_ENCRYPT": "syscall", + "syscall.ETHERTYPE_ES": "syscall", + "syscall.ETHERTYPE_EXCELAN": "syscall", + "syscall.ETHERTYPE_EXPERDATA": "syscall", + "syscall.ETHERTYPE_FLIP": "syscall", + "syscall.ETHERTYPE_FLOWCONTROL": "syscall", + "syscall.ETHERTYPE_FRARP": "syscall", + "syscall.ETHERTYPE_GENDYN": "syscall", + "syscall.ETHERTYPE_HAYES": "syscall", + "syscall.ETHERTYPE_HIPPI_FP": "syscall", + "syscall.ETHERTYPE_HITACHI": "syscall", + "syscall.ETHERTYPE_HP": "syscall", + "syscall.ETHERTYPE_IEEEPUP": "syscall", + "syscall.ETHERTYPE_IEEEPUPAT": "syscall", + "syscall.ETHERTYPE_IMLBL": "syscall", + "syscall.ETHERTYPE_IMLBLDIAG": "syscall", + "syscall.ETHERTYPE_IP": "syscall", + "syscall.ETHERTYPE_IPAS": "syscall", + "syscall.ETHERTYPE_IPV6": "syscall", + "syscall.ETHERTYPE_IPX": "syscall", + "syscall.ETHERTYPE_IPXNEW": "syscall", + "syscall.ETHERTYPE_KALPANA": "syscall", + "syscall.ETHERTYPE_LANBRIDGE": "syscall", + "syscall.ETHERTYPE_LANPROBE": "syscall", + "syscall.ETHERTYPE_LAT": "syscall", + "syscall.ETHERTYPE_LBACK": "syscall", + "syscall.ETHERTYPE_LITTLE": "syscall", + "syscall.ETHERTYPE_LLDP": "syscall", + "syscall.ETHERTYPE_LOGICRAFT": "syscall", + "syscall.ETHERTYPE_LOOPBACK": "syscall", + "syscall.ETHERTYPE_MATRA": "syscall", + "syscall.ETHERTYPE_MAX": "syscall", + "syscall.ETHERTYPE_MERIT": "syscall", + "syscall.ETHERTYPE_MICP": "syscall", + "syscall.ETHERTYPE_MOPDL": "syscall", + "syscall.ETHERTYPE_MOPRC": "syscall", + "syscall.ETHERTYPE_MOTOROLA": "syscall", + "syscall.ETHERTYPE_MPLS": "syscall", + "syscall.ETHERTYPE_MPLS_MCAST": "syscall", + "syscall.ETHERTYPE_MUMPS": "syscall", + "syscall.ETHERTYPE_NBPCC": "syscall", + "syscall.ETHERTYPE_NBPCLAIM": "syscall", + "syscall.ETHERTYPE_NBPCLREQ": "syscall", + "syscall.ETHERTYPE_NBPCLRSP": "syscall", + "syscall.ETHERTYPE_NBPCREQ": "syscall", + "syscall.ETHERTYPE_NBPCRSP": "syscall", + "syscall.ETHERTYPE_NBPDG": "syscall", + "syscall.ETHERTYPE_NBPDGB": "syscall", + "syscall.ETHERTYPE_NBPDLTE": "syscall", + "syscall.ETHERTYPE_NBPRAR": "syscall", + "syscall.ETHERTYPE_NBPRAS": "syscall", + "syscall.ETHERTYPE_NBPRST": "syscall", + "syscall.ETHERTYPE_NBPSCD": "syscall", + "syscall.ETHERTYPE_NBPVCD": "syscall", + "syscall.ETHERTYPE_NBS": "syscall", + "syscall.ETHERTYPE_NCD": "syscall", + "syscall.ETHERTYPE_NESTAR": "syscall", + "syscall.ETHERTYPE_NETBEUI": "syscall", + "syscall.ETHERTYPE_NOVELL": "syscall", + "syscall.ETHERTYPE_NS": "syscall", + "syscall.ETHERTYPE_NSAT": "syscall", + "syscall.ETHERTYPE_NSCOMPAT": "syscall", + "syscall.ETHERTYPE_NTRAILER": "syscall", + "syscall.ETHERTYPE_OS9": "syscall", + "syscall.ETHERTYPE_OS9NET": "syscall", + "syscall.ETHERTYPE_PACER": "syscall", + "syscall.ETHERTYPE_PAE": "syscall", + "syscall.ETHERTYPE_PCS": "syscall", + "syscall.ETHERTYPE_PLANNING": "syscall", + "syscall.ETHERTYPE_PPP": "syscall", + "syscall.ETHERTYPE_PPPOE": "syscall", + "syscall.ETHERTYPE_PPPOEDISC": "syscall", + "syscall.ETHERTYPE_PRIMENTS": "syscall", + "syscall.ETHERTYPE_PUP": "syscall", + "syscall.ETHERTYPE_PUPAT": "syscall", + "syscall.ETHERTYPE_QINQ": "syscall", + "syscall.ETHERTYPE_RACAL": "syscall", + "syscall.ETHERTYPE_RATIONAL": "syscall", + "syscall.ETHERTYPE_RAWFR": "syscall", + "syscall.ETHERTYPE_RCL": "syscall", + "syscall.ETHERTYPE_RDP": "syscall", + "syscall.ETHERTYPE_RETIX": "syscall", + "syscall.ETHERTYPE_REVARP": "syscall", + "syscall.ETHERTYPE_SCA": "syscall", + "syscall.ETHERTYPE_SECTRA": "syscall", + "syscall.ETHERTYPE_SECUREDATA": "syscall", + "syscall.ETHERTYPE_SGITW": "syscall", + "syscall.ETHERTYPE_SG_BOUNCE": "syscall", + "syscall.ETHERTYPE_SG_DIAG": "syscall", + "syscall.ETHERTYPE_SG_NETGAMES": "syscall", + "syscall.ETHERTYPE_SG_RESV": "syscall", + "syscall.ETHERTYPE_SIMNET": "syscall", + "syscall.ETHERTYPE_SLOW": "syscall", + "syscall.ETHERTYPE_SLOWPROTOCOLS": "syscall", + "syscall.ETHERTYPE_SNA": "syscall", + "syscall.ETHERTYPE_SNMP": "syscall", + "syscall.ETHERTYPE_SONIX": "syscall", + "syscall.ETHERTYPE_SPIDER": "syscall", + "syscall.ETHERTYPE_SPRITE": "syscall", + "syscall.ETHERTYPE_STP": "syscall", + "syscall.ETHERTYPE_TALARIS": "syscall", + "syscall.ETHERTYPE_TALARISMC": "syscall", + "syscall.ETHERTYPE_TCPCOMP": "syscall", + "syscall.ETHERTYPE_TCPSM": "syscall", + "syscall.ETHERTYPE_TEC": "syscall", + "syscall.ETHERTYPE_TIGAN": "syscall", + "syscall.ETHERTYPE_TRAIL": "syscall", + "syscall.ETHERTYPE_TRANSETHER": "syscall", + "syscall.ETHERTYPE_TYMSHARE": "syscall", + "syscall.ETHERTYPE_UBBST": "syscall", + "syscall.ETHERTYPE_UBDEBUG": "syscall", + "syscall.ETHERTYPE_UBDIAGLOOP": "syscall", + "syscall.ETHERTYPE_UBDL": "syscall", + "syscall.ETHERTYPE_UBNIU": "syscall", + "syscall.ETHERTYPE_UBNMC": "syscall", + "syscall.ETHERTYPE_VALID": "syscall", + "syscall.ETHERTYPE_VARIAN": "syscall", + "syscall.ETHERTYPE_VAXELN": "syscall", + "syscall.ETHERTYPE_VEECO": "syscall", + "syscall.ETHERTYPE_VEXP": "syscall", + "syscall.ETHERTYPE_VGLAB": "syscall", + "syscall.ETHERTYPE_VINES": "syscall", + "syscall.ETHERTYPE_VINESECHO": "syscall", + "syscall.ETHERTYPE_VINESLOOP": "syscall", + "syscall.ETHERTYPE_VITAL": "syscall", + "syscall.ETHERTYPE_VLAN": "syscall", + "syscall.ETHERTYPE_VLTLMAN": "syscall", + "syscall.ETHERTYPE_VPROD": "syscall", + "syscall.ETHERTYPE_VURESERVED": "syscall", + "syscall.ETHERTYPE_WATERLOO": "syscall", + "syscall.ETHERTYPE_WELLFLEET": "syscall", + "syscall.ETHERTYPE_X25": "syscall", + "syscall.ETHERTYPE_X75": "syscall", + "syscall.ETHERTYPE_XNSSM": "syscall", + "syscall.ETHERTYPE_XTP": "syscall", + "syscall.ETHER_ADDR_LEN": "syscall", + "syscall.ETHER_ALIGN": "syscall", + "syscall.ETHER_CRC_LEN": "syscall", + "syscall.ETHER_CRC_POLY_BE": "syscall", + "syscall.ETHER_CRC_POLY_LE": "syscall", + "syscall.ETHER_HDR_LEN": "syscall", + "syscall.ETHER_MAX_DIX_LEN": "syscall", + "syscall.ETHER_MAX_LEN": "syscall", + "syscall.ETHER_MAX_LEN_JUMBO": "syscall", + "syscall.ETHER_MIN_LEN": "syscall", + "syscall.ETHER_PPPOE_ENCAP_LEN": "syscall", + "syscall.ETHER_TYPE_LEN": "syscall", + "syscall.ETHER_VLAN_ENCAP_LEN": "syscall", + "syscall.ETH_P_1588": "syscall", + "syscall.ETH_P_8021Q": "syscall", + "syscall.ETH_P_802_2": "syscall", + "syscall.ETH_P_802_3": "syscall", + "syscall.ETH_P_AARP": "syscall", + "syscall.ETH_P_ALL": "syscall", + "syscall.ETH_P_AOE": "syscall", + "syscall.ETH_P_ARCNET": "syscall", + "syscall.ETH_P_ARP": "syscall", + "syscall.ETH_P_ATALK": "syscall", + "syscall.ETH_P_ATMFATE": "syscall", + "syscall.ETH_P_ATMMPOA": "syscall", + "syscall.ETH_P_AX25": "syscall", + "syscall.ETH_P_BPQ": "syscall", + "syscall.ETH_P_CAIF": "syscall", + "syscall.ETH_P_CAN": "syscall", + "syscall.ETH_P_CONTROL": "syscall", + "syscall.ETH_P_CUST": "syscall", + "syscall.ETH_P_DDCMP": "syscall", + "syscall.ETH_P_DEC": "syscall", + "syscall.ETH_P_DIAG": "syscall", + "syscall.ETH_P_DNA_DL": "syscall", + "syscall.ETH_P_DNA_RC": "syscall", + "syscall.ETH_P_DNA_RT": "syscall", + "syscall.ETH_P_DSA": "syscall", + "syscall.ETH_P_ECONET": "syscall", + "syscall.ETH_P_EDSA": "syscall", + "syscall.ETH_P_FCOE": "syscall", + "syscall.ETH_P_FIP": "syscall", + "syscall.ETH_P_HDLC": "syscall", + "syscall.ETH_P_IEEE802154": "syscall", + "syscall.ETH_P_IEEEPUP": "syscall", + "syscall.ETH_P_IEEEPUPAT": "syscall", + "syscall.ETH_P_IP": "syscall", + "syscall.ETH_P_IPV6": "syscall", + "syscall.ETH_P_IPX": "syscall", + "syscall.ETH_P_IRDA": "syscall", + "syscall.ETH_P_LAT": "syscall", + "syscall.ETH_P_LINK_CTL": "syscall", + "syscall.ETH_P_LOCALTALK": "syscall", + "syscall.ETH_P_LOOP": "syscall", + "syscall.ETH_P_MOBITEX": "syscall", + "syscall.ETH_P_MPLS_MC": "syscall", + "syscall.ETH_P_MPLS_UC": "syscall", + "syscall.ETH_P_PAE": "syscall", + "syscall.ETH_P_PAUSE": "syscall", + "syscall.ETH_P_PHONET": "syscall", + "syscall.ETH_P_PPPTALK": "syscall", + "syscall.ETH_P_PPP_DISC": "syscall", + "syscall.ETH_P_PPP_MP": "syscall", + "syscall.ETH_P_PPP_SES": "syscall", + "syscall.ETH_P_PUP": "syscall", + "syscall.ETH_P_PUPAT": "syscall", + "syscall.ETH_P_RARP": "syscall", + "syscall.ETH_P_SCA": "syscall", + "syscall.ETH_P_SLOW": "syscall", + "syscall.ETH_P_SNAP": "syscall", + "syscall.ETH_P_TEB": "syscall", + "syscall.ETH_P_TIPC": "syscall", + "syscall.ETH_P_TRAILER": "syscall", + "syscall.ETH_P_TR_802_2": "syscall", + "syscall.ETH_P_WAN_PPP": "syscall", + "syscall.ETH_P_WCCP": "syscall", + "syscall.ETH_P_X25": "syscall", + "syscall.ETIME": "syscall", + "syscall.ETIMEDOUT": "syscall", + "syscall.ETOOMANYREFS": "syscall", + "syscall.ETXTBSY": "syscall", + "syscall.EUCLEAN": "syscall", + "syscall.EUNATCH": "syscall", + "syscall.EUSERS": "syscall", + "syscall.EVFILT_AIO": "syscall", + "syscall.EVFILT_FS": "syscall", + "syscall.EVFILT_LIO": "syscall", + "syscall.EVFILT_MACHPORT": "syscall", + "syscall.EVFILT_PROC": "syscall", + "syscall.EVFILT_READ": "syscall", + "syscall.EVFILT_SIGNAL": "syscall", + "syscall.EVFILT_SYSCOUNT": "syscall", + "syscall.EVFILT_THREADMARKER": "syscall", + "syscall.EVFILT_TIMER": "syscall", + "syscall.EVFILT_USER": "syscall", + "syscall.EVFILT_VM": "syscall", + "syscall.EVFILT_VNODE": "syscall", + "syscall.EVFILT_WRITE": "syscall", + "syscall.EV_ADD": "syscall", + "syscall.EV_CLEAR": "syscall", + "syscall.EV_DELETE": "syscall", + "syscall.EV_DISABLE": "syscall", + "syscall.EV_DISPATCH": "syscall", + "syscall.EV_DROP": "syscall", + "syscall.EV_ENABLE": "syscall", + "syscall.EV_EOF": "syscall", + "syscall.EV_ERROR": "syscall", + "syscall.EV_FLAG0": "syscall", + "syscall.EV_FLAG1": "syscall", + "syscall.EV_ONESHOT": "syscall", + "syscall.EV_OOBAND": "syscall", + "syscall.EV_POLL": "syscall", + "syscall.EV_RECEIPT": "syscall", + "syscall.EV_SYSFLAGS": "syscall", + "syscall.EWINDOWS": "syscall", + "syscall.EWOULDBLOCK": "syscall", + "syscall.EXDEV": "syscall", + "syscall.EXFULL": "syscall", + "syscall.EXTA": "syscall", + "syscall.EXTB": "syscall", + "syscall.EXTPROC": "syscall", + "syscall.Environ": "syscall", + "syscall.EpollCreate": "syscall", + "syscall.EpollCreate1": "syscall", + "syscall.EpollCtl": "syscall", + "syscall.EpollEvent": "syscall", + "syscall.EpollWait": "syscall", + "syscall.Errno": "syscall", + "syscall.EscapeArg": "syscall", + "syscall.Exchangedata": "syscall", + "syscall.Exec": "syscall", + "syscall.Exit": "syscall", + "syscall.ExitProcess": "syscall", + "syscall.FD_CLOEXEC": "syscall", + "syscall.FD_SETSIZE": "syscall", + "syscall.FILE_ACTION_ADDED": "syscall", + "syscall.FILE_ACTION_MODIFIED": "syscall", + "syscall.FILE_ACTION_REMOVED": "syscall", + "syscall.FILE_ACTION_RENAMED_NEW_NAME": "syscall", + "syscall.FILE_ACTION_RENAMED_OLD_NAME": "syscall", + "syscall.FILE_APPEND_DATA": "syscall", + "syscall.FILE_ATTRIBUTE_ARCHIVE": "syscall", + "syscall.FILE_ATTRIBUTE_DIRECTORY": "syscall", + "syscall.FILE_ATTRIBUTE_HIDDEN": "syscall", + "syscall.FILE_ATTRIBUTE_NORMAL": "syscall", + "syscall.FILE_ATTRIBUTE_READONLY": "syscall", + "syscall.FILE_ATTRIBUTE_REPARSE_POINT": "syscall", + "syscall.FILE_ATTRIBUTE_SYSTEM": "syscall", + "syscall.FILE_BEGIN": "syscall", + "syscall.FILE_CURRENT": "syscall", + "syscall.FILE_END": "syscall", + "syscall.FILE_FLAG_BACKUP_SEMANTICS": "syscall", + "syscall.FILE_FLAG_OPEN_REPARSE_POINT": "syscall", + "syscall.FILE_FLAG_OVERLAPPED": "syscall", + "syscall.FILE_LIST_DIRECTORY": "syscall", + "syscall.FILE_MAP_COPY": "syscall", + "syscall.FILE_MAP_EXECUTE": "syscall", + "syscall.FILE_MAP_READ": "syscall", + "syscall.FILE_MAP_WRITE": "syscall", + "syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES": "syscall", + "syscall.FILE_NOTIFY_CHANGE_CREATION": "syscall", + "syscall.FILE_NOTIFY_CHANGE_DIR_NAME": "syscall", + "syscall.FILE_NOTIFY_CHANGE_FILE_NAME": "syscall", + "syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS": "syscall", + "syscall.FILE_NOTIFY_CHANGE_LAST_WRITE": "syscall", + "syscall.FILE_NOTIFY_CHANGE_SIZE": "syscall", + "syscall.FILE_SHARE_DELETE": "syscall", + "syscall.FILE_SHARE_READ": "syscall", + "syscall.FILE_SHARE_WRITE": "syscall", + "syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "syscall", + "syscall.FILE_SKIP_SET_EVENT_ON_HANDLE": "syscall", + "syscall.FILE_TYPE_CHAR": "syscall", + "syscall.FILE_TYPE_DISK": "syscall", + "syscall.FILE_TYPE_PIPE": "syscall", + "syscall.FILE_TYPE_REMOTE": "syscall", + "syscall.FILE_TYPE_UNKNOWN": "syscall", + "syscall.FILE_WRITE_ATTRIBUTES": "syscall", + "syscall.FLUSHO": "syscall", + "syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER": "syscall", + "syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY": "syscall", + "syscall.FORMAT_MESSAGE_FROM_HMODULE": "syscall", + "syscall.FORMAT_MESSAGE_FROM_STRING": "syscall", + "syscall.FORMAT_MESSAGE_FROM_SYSTEM": "syscall", + "syscall.FORMAT_MESSAGE_IGNORE_INSERTS": "syscall", + "syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK": "syscall", + "syscall.FSCTL_GET_REPARSE_POINT": "syscall", + "syscall.F_ADDFILESIGS": "syscall", + "syscall.F_ADDSIGS": "syscall", + "syscall.F_ALLOCATEALL": "syscall", + "syscall.F_ALLOCATECONTIG": "syscall", + "syscall.F_CANCEL": "syscall", + "syscall.F_CHKCLEAN": "syscall", + "syscall.F_CLOSEM": "syscall", + "syscall.F_DUP2FD": "syscall", + "syscall.F_DUP2FD_CLOEXEC": "syscall", + "syscall.F_DUPFD": "syscall", + "syscall.F_DUPFD_CLOEXEC": "syscall", + "syscall.F_EXLCK": "syscall", + "syscall.F_FLUSH_DATA": "syscall", + "syscall.F_FREEZE_FS": "syscall", + "syscall.F_FSCTL": "syscall", + "syscall.F_FSDIRMASK": "syscall", + "syscall.F_FSIN": "syscall", + "syscall.F_FSINOUT": "syscall", + "syscall.F_FSOUT": "syscall", + "syscall.F_FSPRIV": "syscall", + "syscall.F_FSVOID": "syscall", + "syscall.F_FULLFSYNC": "syscall", + "syscall.F_GETFD": "syscall", + "syscall.F_GETFL": "syscall", + "syscall.F_GETLEASE": "syscall", + "syscall.F_GETLK": "syscall", + "syscall.F_GETLK64": "syscall", + "syscall.F_GETLKPID": "syscall", + "syscall.F_GETNOSIGPIPE": "syscall", + "syscall.F_GETOWN": "syscall", + "syscall.F_GETOWN_EX": "syscall", + "syscall.F_GETPATH": "syscall", + "syscall.F_GETPATH_MTMINFO": "syscall", + "syscall.F_GETPIPE_SZ": "syscall", + "syscall.F_GETPROTECTIONCLASS": "syscall", + "syscall.F_GETSIG": "syscall", + "syscall.F_GLOBAL_NOCACHE": "syscall", + "syscall.F_LOCK": "syscall", + "syscall.F_LOG2PHYS": "syscall", + "syscall.F_LOG2PHYS_EXT": "syscall", + "syscall.F_MARKDEPENDENCY": "syscall", + "syscall.F_MAXFD": "syscall", + "syscall.F_NOCACHE": "syscall", + "syscall.F_NODIRECT": "syscall", + "syscall.F_NOTIFY": "syscall", + "syscall.F_OGETLK": "syscall", + "syscall.F_OK": "syscall", + "syscall.F_OSETLK": "syscall", + "syscall.F_OSETLKW": "syscall", + "syscall.F_PARAM_MASK": "syscall", + "syscall.F_PARAM_MAX": "syscall", + "syscall.F_PATHPKG_CHECK": "syscall", + "syscall.F_PEOFPOSMODE": "syscall", + "syscall.F_PREALLOCATE": "syscall", + "syscall.F_RDADVISE": "syscall", + "syscall.F_RDAHEAD": "syscall", + "syscall.F_RDLCK": "syscall", + "syscall.F_READAHEAD": "syscall", + "syscall.F_READBOOTSTRAP": "syscall", + "syscall.F_SETBACKINGSTORE": "syscall", + "syscall.F_SETFD": "syscall", + "syscall.F_SETFL": "syscall", + "syscall.F_SETLEASE": "syscall", + "syscall.F_SETLK": "syscall", + "syscall.F_SETLK64": "syscall", + "syscall.F_SETLKW": "syscall", + "syscall.F_SETLKW64": "syscall", + "syscall.F_SETLK_REMOTE": "syscall", + "syscall.F_SETNOSIGPIPE": "syscall", + "syscall.F_SETOWN": "syscall", + "syscall.F_SETOWN_EX": "syscall", + "syscall.F_SETPIPE_SZ": "syscall", + "syscall.F_SETPROTECTIONCLASS": "syscall", + "syscall.F_SETSIG": "syscall", + "syscall.F_SETSIZE": "syscall", + "syscall.F_SHLCK": "syscall", + "syscall.F_TEST": "syscall", + "syscall.F_THAW_FS": "syscall", + "syscall.F_TLOCK": "syscall", + "syscall.F_ULOCK": "syscall", + "syscall.F_UNLCK": "syscall", + "syscall.F_UNLCKSYS": "syscall", + "syscall.F_VOLPOSMODE": "syscall", + "syscall.F_WRITEBOOTSTRAP": "syscall", + "syscall.F_WRLCK": "syscall", + "syscall.Faccessat": "syscall", + "syscall.Fallocate": "syscall", + "syscall.Fbootstraptransfer_t": "syscall", + "syscall.Fchdir": "syscall", + "syscall.Fchflags": "syscall", + "syscall.Fchmod": "syscall", + "syscall.Fchmodat": "syscall", + "syscall.Fchown": "syscall", + "syscall.Fchownat": "syscall", + "syscall.FcntlFlock": "syscall", + "syscall.FdSet": "syscall", + "syscall.Fdatasync": "syscall", + "syscall.FileNotifyInformation": "syscall", + "syscall.Filetime": "syscall", + "syscall.FindClose": "syscall", + "syscall.FindFirstFile": "syscall", + "syscall.FindNextFile": "syscall", + "syscall.Flock": "syscall", + "syscall.Flock_t": "syscall", + "syscall.FlushBpf": "syscall", + "syscall.FlushFileBuffers": "syscall", + "syscall.FlushViewOfFile": "syscall", + "syscall.ForkExec": "syscall", + "syscall.ForkLock": "syscall", + "syscall.FormatMessage": "syscall", + "syscall.Fpathconf": "syscall", + "syscall.FreeAddrInfoW": "syscall", + "syscall.FreeEnvironmentStrings": "syscall", + "syscall.FreeLibrary": "syscall", + "syscall.Fsid": "syscall", + "syscall.Fstat": "syscall", + "syscall.Fstatfs": "syscall", + "syscall.Fstore_t": "syscall", + "syscall.Fsync": "syscall", + "syscall.Ftruncate": "syscall", + "syscall.FullPath": "syscall", + "syscall.Futimes": "syscall", + "syscall.Futimesat": "syscall", + "syscall.GENERIC_ALL": "syscall", + "syscall.GENERIC_EXECUTE": "syscall", + "syscall.GENERIC_READ": "syscall", + "syscall.GENERIC_WRITE": "syscall", + "syscall.GUID": "syscall", + "syscall.GetAcceptExSockaddrs": "syscall", + "syscall.GetAdaptersInfo": "syscall", + "syscall.GetAddrInfoW": "syscall", + "syscall.GetCommandLine": "syscall", + "syscall.GetComputerName": "syscall", + "syscall.GetConsoleMode": "syscall", + "syscall.GetCurrentDirectory": "syscall", + "syscall.GetCurrentProcess": "syscall", + "syscall.GetEnvironmentStrings": "syscall", + "syscall.GetEnvironmentVariable": "syscall", + "syscall.GetExitCodeProcess": "syscall", + "syscall.GetFileAttributes": "syscall", + "syscall.GetFileAttributesEx": "syscall", + "syscall.GetFileExInfoStandard": "syscall", + "syscall.GetFileExMaxInfoLevel": "syscall", + "syscall.GetFileInformationByHandle": "syscall", + "syscall.GetFileType": "syscall", + "syscall.GetFullPathName": "syscall", + "syscall.GetHostByName": "syscall", + "syscall.GetIfEntry": "syscall", + "syscall.GetLastError": "syscall", + "syscall.GetLengthSid": "syscall", + "syscall.GetLongPathName": "syscall", + "syscall.GetProcAddress": "syscall", + "syscall.GetProcessTimes": "syscall", + "syscall.GetProtoByName": "syscall", + "syscall.GetQueuedCompletionStatus": "syscall", + "syscall.GetServByName": "syscall", + "syscall.GetShortPathName": "syscall", + "syscall.GetStartupInfo": "syscall", + "syscall.GetStdHandle": "syscall", + "syscall.GetSystemTimeAsFileTime": "syscall", + "syscall.GetTempPath": "syscall", + "syscall.GetTimeZoneInformation": "syscall", + "syscall.GetTokenInformation": "syscall", + "syscall.GetUserNameEx": "syscall", + "syscall.GetUserProfileDirectory": "syscall", + "syscall.GetVersion": "syscall", + "syscall.Getcwd": "syscall", + "syscall.Getdents": "syscall", + "syscall.Getdirentries": "syscall", + "syscall.Getdtablesize": "syscall", + "syscall.Getegid": "syscall", + "syscall.Getenv": "syscall", + "syscall.Geteuid": "syscall", + "syscall.Getfsstat": "syscall", + "syscall.Getgid": "syscall", + "syscall.Getgroups": "syscall", + "syscall.Getpagesize": "syscall", + "syscall.Getpeername": "syscall", + "syscall.Getpgid": "syscall", + "syscall.Getpgrp": "syscall", + "syscall.Getpid": "syscall", + "syscall.Getppid": "syscall", + "syscall.Getpriority": "syscall", + "syscall.Getrlimit": "syscall", + "syscall.Getrusage": "syscall", + "syscall.Getsid": "syscall", + "syscall.Getsockname": "syscall", + "syscall.Getsockopt": "syscall", + "syscall.GetsockoptByte": "syscall", + "syscall.GetsockoptICMPv6Filter": "syscall", + "syscall.GetsockoptIPMreq": "syscall", + "syscall.GetsockoptIPMreqn": "syscall", + "syscall.GetsockoptIPv6MTUInfo": "syscall", + "syscall.GetsockoptIPv6Mreq": "syscall", + "syscall.GetsockoptInet4Addr": "syscall", + "syscall.GetsockoptInt": "syscall", + "syscall.GetsockoptUcred": "syscall", + "syscall.Gettid": "syscall", + "syscall.Gettimeofday": "syscall", + "syscall.Getuid": "syscall", + "syscall.Getwd": "syscall", + "syscall.Getxattr": "syscall", + "syscall.HANDLE_FLAG_INHERIT": "syscall", + "syscall.HKEY_CLASSES_ROOT": "syscall", + "syscall.HKEY_CURRENT_CONFIG": "syscall", + "syscall.HKEY_CURRENT_USER": "syscall", + "syscall.HKEY_DYN_DATA": "syscall", + "syscall.HKEY_LOCAL_MACHINE": "syscall", + "syscall.HKEY_PERFORMANCE_DATA": "syscall", + "syscall.HKEY_USERS": "syscall", + "syscall.HUPCL": "syscall", + "syscall.Handle": "syscall", + "syscall.Hostent": "syscall", + "syscall.ICANON": "syscall", + "syscall.ICMP6_FILTER": "syscall", + "syscall.ICMPV6_FILTER": "syscall", + "syscall.ICMPv6Filter": "syscall", + "syscall.ICRNL": "syscall", + "syscall.IEXTEN": "syscall", + "syscall.IFAN_ARRIVAL": "syscall", + "syscall.IFAN_DEPARTURE": "syscall", + "syscall.IFA_ADDRESS": "syscall", + "syscall.IFA_ANYCAST": "syscall", + "syscall.IFA_BROADCAST": "syscall", + "syscall.IFA_CACHEINFO": "syscall", + "syscall.IFA_F_DADFAILED": "syscall", + "syscall.IFA_F_DEPRECATED": "syscall", + "syscall.IFA_F_HOMEADDRESS": "syscall", + "syscall.IFA_F_NODAD": "syscall", + "syscall.IFA_F_OPTIMISTIC": "syscall", + "syscall.IFA_F_PERMANENT": "syscall", + "syscall.IFA_F_SECONDARY": "syscall", + "syscall.IFA_F_TEMPORARY": "syscall", + "syscall.IFA_F_TENTATIVE": "syscall", + "syscall.IFA_LABEL": "syscall", + "syscall.IFA_LOCAL": "syscall", + "syscall.IFA_MAX": "syscall", + "syscall.IFA_MULTICAST": "syscall", + "syscall.IFA_ROUTE": "syscall", + "syscall.IFA_UNSPEC": "syscall", + "syscall.IFF_ALLMULTI": "syscall", + "syscall.IFF_ALTPHYS": "syscall", + "syscall.IFF_AUTOMEDIA": "syscall", + "syscall.IFF_BROADCAST": "syscall", + "syscall.IFF_CANTCHANGE": "syscall", + "syscall.IFF_CANTCONFIG": "syscall", + "syscall.IFF_DEBUG": "syscall", + "syscall.IFF_DRV_OACTIVE": "syscall", + "syscall.IFF_DRV_RUNNING": "syscall", + "syscall.IFF_DYING": "syscall", + "syscall.IFF_DYNAMIC": "syscall", + "syscall.IFF_LINK0": "syscall", + "syscall.IFF_LINK1": "syscall", + "syscall.IFF_LINK2": "syscall", + "syscall.IFF_LOOPBACK": "syscall", + "syscall.IFF_MASTER": "syscall", + "syscall.IFF_MONITOR": "syscall", + "syscall.IFF_MULTICAST": "syscall", + "syscall.IFF_NOARP": "syscall", + "syscall.IFF_NOTRAILERS": "syscall", + "syscall.IFF_NO_PI": "syscall", + "syscall.IFF_OACTIVE": "syscall", + "syscall.IFF_ONE_QUEUE": "syscall", + "syscall.IFF_POINTOPOINT": "syscall", + "syscall.IFF_POINTTOPOINT": "syscall", + "syscall.IFF_PORTSEL": "syscall", + "syscall.IFF_PPROMISC": "syscall", + "syscall.IFF_PROMISC": "syscall", + "syscall.IFF_RENAMING": "syscall", + "syscall.IFF_RUNNING": "syscall", + "syscall.IFF_SIMPLEX": "syscall", + "syscall.IFF_SLAVE": "syscall", + "syscall.IFF_SMART": "syscall", + "syscall.IFF_STATICARP": "syscall", + "syscall.IFF_TAP": "syscall", + "syscall.IFF_TUN": "syscall", + "syscall.IFF_TUN_EXCL": "syscall", + "syscall.IFF_UP": "syscall", + "syscall.IFF_VNET_HDR": "syscall", + "syscall.IFLA_ADDRESS": "syscall", + "syscall.IFLA_BROADCAST": "syscall", + "syscall.IFLA_COST": "syscall", + "syscall.IFLA_IFALIAS": "syscall", + "syscall.IFLA_IFNAME": "syscall", + "syscall.IFLA_LINK": "syscall", + "syscall.IFLA_LINKINFO": "syscall", + "syscall.IFLA_LINKMODE": "syscall", + "syscall.IFLA_MAP": "syscall", + "syscall.IFLA_MASTER": "syscall", + "syscall.IFLA_MAX": "syscall", + "syscall.IFLA_MTU": "syscall", + "syscall.IFLA_NET_NS_PID": "syscall", + "syscall.IFLA_OPERSTATE": "syscall", + "syscall.IFLA_PRIORITY": "syscall", + "syscall.IFLA_PROTINFO": "syscall", + "syscall.IFLA_QDISC": "syscall", + "syscall.IFLA_STATS": "syscall", + "syscall.IFLA_TXQLEN": "syscall", + "syscall.IFLA_UNSPEC": "syscall", + "syscall.IFLA_WEIGHT": "syscall", + "syscall.IFLA_WIRELESS": "syscall", + "syscall.IFNAMSIZ": "syscall", + "syscall.IFT_1822": "syscall", + "syscall.IFT_A12MPPSWITCH": "syscall", + "syscall.IFT_AAL2": "syscall", + "syscall.IFT_AAL5": "syscall", + "syscall.IFT_ADSL": "syscall", + "syscall.IFT_AFLANE8023": "syscall", + "syscall.IFT_AFLANE8025": "syscall", + "syscall.IFT_ARAP": "syscall", + "syscall.IFT_ARCNET": "syscall", + "syscall.IFT_ARCNETPLUS": "syscall", + "syscall.IFT_ASYNC": "syscall", + "syscall.IFT_ATM": "syscall", + "syscall.IFT_ATMDXI": "syscall", + "syscall.IFT_ATMFUNI": "syscall", + "syscall.IFT_ATMIMA": "syscall", + "syscall.IFT_ATMLOGICAL": "syscall", + "syscall.IFT_ATMRADIO": "syscall", + "syscall.IFT_ATMSUBINTERFACE": "syscall", + "syscall.IFT_ATMVCIENDPT": "syscall", + "syscall.IFT_ATMVIRTUAL": "syscall", + "syscall.IFT_BGPPOLICYACCOUNTING": "syscall", + "syscall.IFT_BLUETOOTH": "syscall", + "syscall.IFT_BRIDGE": "syscall", + "syscall.IFT_BSC": "syscall", + "syscall.IFT_CARP": "syscall", + "syscall.IFT_CCTEMUL": "syscall", + "syscall.IFT_CELLULAR": "syscall", + "syscall.IFT_CEPT": "syscall", + "syscall.IFT_CES": "syscall", + "syscall.IFT_CHANNEL": "syscall", + "syscall.IFT_CNR": "syscall", + "syscall.IFT_COFFEE": "syscall", + "syscall.IFT_COMPOSITELINK": "syscall", + "syscall.IFT_DCN": "syscall", + "syscall.IFT_DIGITALPOWERLINE": "syscall", + "syscall.IFT_DIGITALWRAPPEROVERHEADCHANNEL": "syscall", + "syscall.IFT_DLSW": "syscall", + "syscall.IFT_DOCSCABLEDOWNSTREAM": "syscall", + "syscall.IFT_DOCSCABLEMACLAYER": "syscall", + "syscall.IFT_DOCSCABLEUPSTREAM": "syscall", + "syscall.IFT_DOCSCABLEUPSTREAMCHANNEL": "syscall", + "syscall.IFT_DS0": "syscall", + "syscall.IFT_DS0BUNDLE": "syscall", + "syscall.IFT_DS1FDL": "syscall", + "syscall.IFT_DS3": "syscall", + "syscall.IFT_DTM": "syscall", + "syscall.IFT_DUMMY": "syscall", + "syscall.IFT_DVBASILN": "syscall", + "syscall.IFT_DVBASIOUT": "syscall", + "syscall.IFT_DVBRCCDOWNSTREAM": "syscall", + "syscall.IFT_DVBRCCMACLAYER": "syscall", + "syscall.IFT_DVBRCCUPSTREAM": "syscall", + "syscall.IFT_ECONET": "syscall", + "syscall.IFT_ENC": "syscall", + "syscall.IFT_EON": "syscall", + "syscall.IFT_EPLRS": "syscall", + "syscall.IFT_ESCON": "syscall", + "syscall.IFT_ETHER": "syscall", + "syscall.IFT_FAITH": "syscall", + "syscall.IFT_FAST": "syscall", + "syscall.IFT_FASTETHER": "syscall", + "syscall.IFT_FASTETHERFX": "syscall", + "syscall.IFT_FDDI": "syscall", + "syscall.IFT_FIBRECHANNEL": "syscall", + "syscall.IFT_FRAMERELAYINTERCONNECT": "syscall", + "syscall.IFT_FRAMERELAYMPI": "syscall", + "syscall.IFT_FRDLCIENDPT": "syscall", + "syscall.IFT_FRELAY": "syscall", + "syscall.IFT_FRELAYDCE": "syscall", + "syscall.IFT_FRF16MFRBUNDLE": "syscall", + "syscall.IFT_FRFORWARD": "syscall", + "syscall.IFT_G703AT2MB": "syscall", + "syscall.IFT_G703AT64K": "syscall", + "syscall.IFT_GIF": "syscall", + "syscall.IFT_GIGABITETHERNET": "syscall", + "syscall.IFT_GR303IDT": "syscall", + "syscall.IFT_GR303RDT": "syscall", + "syscall.IFT_H323GATEKEEPER": "syscall", + "syscall.IFT_H323PROXY": "syscall", + "syscall.IFT_HDH1822": "syscall", + "syscall.IFT_HDLC": "syscall", + "syscall.IFT_HDSL2": "syscall", + "syscall.IFT_HIPERLAN2": "syscall", + "syscall.IFT_HIPPI": "syscall", + "syscall.IFT_HIPPIINTERFACE": "syscall", + "syscall.IFT_HOSTPAD": "syscall", + "syscall.IFT_HSSI": "syscall", + "syscall.IFT_HY": "syscall", + "syscall.IFT_IBM370PARCHAN": "syscall", + "syscall.IFT_IDSL": "syscall", + "syscall.IFT_IEEE1394": "syscall", + "syscall.IFT_IEEE80211": "syscall", + "syscall.IFT_IEEE80212": "syscall", + "syscall.IFT_IEEE8023ADLAG": "syscall", + "syscall.IFT_IFGSN": "syscall", + "syscall.IFT_IMT": "syscall", + "syscall.IFT_INFINIBAND": "syscall", + "syscall.IFT_INTERLEAVE": "syscall", + "syscall.IFT_IP": "syscall", + "syscall.IFT_IPFORWARD": "syscall", + "syscall.IFT_IPOVERATM": "syscall", + "syscall.IFT_IPOVERCDLC": "syscall", + "syscall.IFT_IPOVERCLAW": "syscall", + "syscall.IFT_IPSWITCH": "syscall", + "syscall.IFT_IPXIP": "syscall", + "syscall.IFT_ISDN": "syscall", + "syscall.IFT_ISDNBASIC": "syscall", + "syscall.IFT_ISDNPRIMARY": "syscall", + "syscall.IFT_ISDNS": "syscall", + "syscall.IFT_ISDNU": "syscall", + "syscall.IFT_ISO88022LLC": "syscall", + "syscall.IFT_ISO88023": "syscall", + "syscall.IFT_ISO88024": "syscall", + "syscall.IFT_ISO88025": "syscall", + "syscall.IFT_ISO88025CRFPINT": "syscall", + "syscall.IFT_ISO88025DTR": "syscall", + "syscall.IFT_ISO88025FIBER": "syscall", + "syscall.IFT_ISO88026": "syscall", + "syscall.IFT_ISUP": "syscall", + "syscall.IFT_L2VLAN": "syscall", + "syscall.IFT_L3IPVLAN": "syscall", + "syscall.IFT_L3IPXVLAN": "syscall", + "syscall.IFT_LAPB": "syscall", + "syscall.IFT_LAPD": "syscall", + "syscall.IFT_LAPF": "syscall", + "syscall.IFT_LINEGROUP": "syscall", + "syscall.IFT_LOCALTALK": "syscall", + "syscall.IFT_LOOP": "syscall", + "syscall.IFT_MEDIAMAILOVERIP": "syscall", + "syscall.IFT_MFSIGLINK": "syscall", + "syscall.IFT_MIOX25": "syscall", + "syscall.IFT_MODEM": "syscall", + "syscall.IFT_MPC": "syscall", + "syscall.IFT_MPLS": "syscall", + "syscall.IFT_MPLSTUNNEL": "syscall", + "syscall.IFT_MSDSL": "syscall", + "syscall.IFT_MVL": "syscall", + "syscall.IFT_MYRINET": "syscall", + "syscall.IFT_NFAS": "syscall", + "syscall.IFT_NSIP": "syscall", + "syscall.IFT_OPTICALCHANNEL": "syscall", + "syscall.IFT_OPTICALTRANSPORT": "syscall", + "syscall.IFT_OTHER": "syscall", + "syscall.IFT_P10": "syscall", + "syscall.IFT_P80": "syscall", + "syscall.IFT_PARA": "syscall", + "syscall.IFT_PDP": "syscall", + "syscall.IFT_PFLOG": "syscall", + "syscall.IFT_PFLOW": "syscall", + "syscall.IFT_PFSYNC": "syscall", + "syscall.IFT_PLC": "syscall", + "syscall.IFT_PON155": "syscall", + "syscall.IFT_PON622": "syscall", + "syscall.IFT_POS": "syscall", + "syscall.IFT_PPP": "syscall", + "syscall.IFT_PPPMULTILINKBUNDLE": "syscall", + "syscall.IFT_PROPATM": "syscall", + "syscall.IFT_PROPBWAP2MP": "syscall", + "syscall.IFT_PROPCNLS": "syscall", + "syscall.IFT_PROPDOCSWIRELESSDOWNSTREAM": "syscall", + "syscall.IFT_PROPDOCSWIRELESSMACLAYER": "syscall", + "syscall.IFT_PROPDOCSWIRELESSUPSTREAM": "syscall", + "syscall.IFT_PROPMUX": "syscall", + "syscall.IFT_PROPVIRTUAL": "syscall", + "syscall.IFT_PROPWIRELESSP2P": "syscall", + "syscall.IFT_PTPSERIAL": "syscall", + "syscall.IFT_PVC": "syscall", + "syscall.IFT_Q2931": "syscall", + "syscall.IFT_QLLC": "syscall", + "syscall.IFT_RADIOMAC": "syscall", + "syscall.IFT_RADSL": "syscall", + "syscall.IFT_REACHDSL": "syscall", + "syscall.IFT_RFC1483": "syscall", + "syscall.IFT_RS232": "syscall", + "syscall.IFT_RSRB": "syscall", + "syscall.IFT_SDLC": "syscall", + "syscall.IFT_SDSL": "syscall", + "syscall.IFT_SHDSL": "syscall", + "syscall.IFT_SIP": "syscall", + "syscall.IFT_SIPSIG": "syscall", + "syscall.IFT_SIPTG": "syscall", + "syscall.IFT_SLIP": "syscall", + "syscall.IFT_SMDSDXI": "syscall", + "syscall.IFT_SMDSICIP": "syscall", + "syscall.IFT_SONET": "syscall", + "syscall.IFT_SONETOVERHEADCHANNEL": "syscall", + "syscall.IFT_SONETPATH": "syscall", + "syscall.IFT_SONETVT": "syscall", + "syscall.IFT_SRP": "syscall", + "syscall.IFT_SS7SIGLINK": "syscall", + "syscall.IFT_STACKTOSTACK": "syscall", + "syscall.IFT_STARLAN": "syscall", + "syscall.IFT_STF": "syscall", + "syscall.IFT_T1": "syscall", + "syscall.IFT_TDLC": "syscall", + "syscall.IFT_TELINK": "syscall", + "syscall.IFT_TERMPAD": "syscall", + "syscall.IFT_TR008": "syscall", + "syscall.IFT_TRANSPHDLC": "syscall", + "syscall.IFT_TUNNEL": "syscall", + "syscall.IFT_ULTRA": "syscall", + "syscall.IFT_USB": "syscall", + "syscall.IFT_V11": "syscall", + "syscall.IFT_V35": "syscall", + "syscall.IFT_V36": "syscall", + "syscall.IFT_V37": "syscall", + "syscall.IFT_VDSL": "syscall", + "syscall.IFT_VIRTUALIPADDRESS": "syscall", + "syscall.IFT_VIRTUALTG": "syscall", + "syscall.IFT_VOICEDID": "syscall", + "syscall.IFT_VOICEEM": "syscall", + "syscall.IFT_VOICEEMFGD": "syscall", + "syscall.IFT_VOICEENCAP": "syscall", + "syscall.IFT_VOICEFGDEANA": "syscall", + "syscall.IFT_VOICEFXO": "syscall", + "syscall.IFT_VOICEFXS": "syscall", + "syscall.IFT_VOICEOVERATM": "syscall", + "syscall.IFT_VOICEOVERCABLE": "syscall", + "syscall.IFT_VOICEOVERFRAMERELAY": "syscall", + "syscall.IFT_VOICEOVERIP": "syscall", + "syscall.IFT_X213": "syscall", + "syscall.IFT_X25": "syscall", + "syscall.IFT_X25DDN": "syscall", + "syscall.IFT_X25HUNTGROUP": "syscall", + "syscall.IFT_X25MLP": "syscall", + "syscall.IFT_X25PLE": "syscall", + "syscall.IFT_XETHER": "syscall", + "syscall.IGNBRK": "syscall", + "syscall.IGNCR": "syscall", + "syscall.IGNORE": "syscall", + "syscall.IGNPAR": "syscall", + "syscall.IMAXBEL": "syscall", + "syscall.INFINITE": "syscall", + "syscall.INLCR": "syscall", + "syscall.INPCK": "syscall", + "syscall.INVALID_FILE_ATTRIBUTES": "syscall", + "syscall.IN_ACCESS": "syscall", + "syscall.IN_ALL_EVENTS": "syscall", + "syscall.IN_ATTRIB": "syscall", + "syscall.IN_CLASSA_HOST": "syscall", + "syscall.IN_CLASSA_MAX": "syscall", + "syscall.IN_CLASSA_NET": "syscall", + "syscall.IN_CLASSA_NSHIFT": "syscall", + "syscall.IN_CLASSB_HOST": "syscall", + "syscall.IN_CLASSB_MAX": "syscall", + "syscall.IN_CLASSB_NET": "syscall", + "syscall.IN_CLASSB_NSHIFT": "syscall", + "syscall.IN_CLASSC_HOST": "syscall", + "syscall.IN_CLASSC_NET": "syscall", + "syscall.IN_CLASSC_NSHIFT": "syscall", + "syscall.IN_CLASSD_HOST": "syscall", + "syscall.IN_CLASSD_NET": "syscall", + "syscall.IN_CLASSD_NSHIFT": "syscall", + "syscall.IN_CLOEXEC": "syscall", + "syscall.IN_CLOSE": "syscall", + "syscall.IN_CLOSE_NOWRITE": "syscall", + "syscall.IN_CLOSE_WRITE": "syscall", + "syscall.IN_CREATE": "syscall", + "syscall.IN_DELETE": "syscall", + "syscall.IN_DELETE_SELF": "syscall", + "syscall.IN_DONT_FOLLOW": "syscall", + "syscall.IN_EXCL_UNLINK": "syscall", + "syscall.IN_IGNORED": "syscall", + "syscall.IN_ISDIR": "syscall", + "syscall.IN_LINKLOCALNETNUM": "syscall", + "syscall.IN_LOOPBACKNET": "syscall", + "syscall.IN_MASK_ADD": "syscall", + "syscall.IN_MODIFY": "syscall", + "syscall.IN_MOVE": "syscall", + "syscall.IN_MOVED_FROM": "syscall", + "syscall.IN_MOVED_TO": "syscall", + "syscall.IN_MOVE_SELF": "syscall", + "syscall.IN_NONBLOCK": "syscall", + "syscall.IN_ONESHOT": "syscall", + "syscall.IN_ONLYDIR": "syscall", + "syscall.IN_OPEN": "syscall", + "syscall.IN_Q_OVERFLOW": "syscall", + "syscall.IN_RFC3021_HOST": "syscall", + "syscall.IN_RFC3021_MASK": "syscall", + "syscall.IN_RFC3021_NET": "syscall", + "syscall.IN_RFC3021_NSHIFT": "syscall", + "syscall.IN_UNMOUNT": "syscall", + "syscall.IOC_IN": "syscall", + "syscall.IOC_INOUT": "syscall", + "syscall.IOC_OUT": "syscall", + "syscall.IOC_VENDOR": "syscall", + "syscall.IOC_WS2": "syscall", + "syscall.IO_REPARSE_TAG_SYMLINK": "syscall", + "syscall.IPMreq": "syscall", + "syscall.IPMreqn": "syscall", + "syscall.IPPROTO_3PC": "syscall", + "syscall.IPPROTO_ADFS": "syscall", + "syscall.IPPROTO_AH": "syscall", + "syscall.IPPROTO_AHIP": "syscall", + "syscall.IPPROTO_APES": "syscall", + "syscall.IPPROTO_ARGUS": "syscall", + "syscall.IPPROTO_AX25": "syscall", + "syscall.IPPROTO_BHA": "syscall", + "syscall.IPPROTO_BLT": "syscall", + "syscall.IPPROTO_BRSATMON": "syscall", + "syscall.IPPROTO_CARP": "syscall", + "syscall.IPPROTO_CFTP": "syscall", + "syscall.IPPROTO_CHAOS": "syscall", + "syscall.IPPROTO_CMTP": "syscall", + "syscall.IPPROTO_COMP": "syscall", + "syscall.IPPROTO_CPHB": "syscall", + "syscall.IPPROTO_CPNX": "syscall", + "syscall.IPPROTO_DCCP": "syscall", + "syscall.IPPROTO_DDP": "syscall", + "syscall.IPPROTO_DGP": "syscall", + "syscall.IPPROTO_DIVERT": "syscall", + "syscall.IPPROTO_DIVERT_INIT": "syscall", + "syscall.IPPROTO_DIVERT_RESP": "syscall", + "syscall.IPPROTO_DONE": "syscall", + "syscall.IPPROTO_DSTOPTS": "syscall", + "syscall.IPPROTO_EGP": "syscall", + "syscall.IPPROTO_EMCON": "syscall", + "syscall.IPPROTO_ENCAP": "syscall", + "syscall.IPPROTO_EON": "syscall", + "syscall.IPPROTO_ESP": "syscall", + "syscall.IPPROTO_ETHERIP": "syscall", + "syscall.IPPROTO_FRAGMENT": "syscall", + "syscall.IPPROTO_GGP": "syscall", + "syscall.IPPROTO_GMTP": "syscall", + "syscall.IPPROTO_GRE": "syscall", + "syscall.IPPROTO_HELLO": "syscall", + "syscall.IPPROTO_HMP": "syscall", + "syscall.IPPROTO_HOPOPTS": "syscall", + "syscall.IPPROTO_ICMP": "syscall", + "syscall.IPPROTO_ICMPV6": "syscall", + "syscall.IPPROTO_IDP": "syscall", + "syscall.IPPROTO_IDPR": "syscall", + "syscall.IPPROTO_IDRP": "syscall", + "syscall.IPPROTO_IGMP": "syscall", + "syscall.IPPROTO_IGP": "syscall", + "syscall.IPPROTO_IGRP": "syscall", + "syscall.IPPROTO_IL": "syscall", + "syscall.IPPROTO_INLSP": "syscall", + "syscall.IPPROTO_INP": "syscall", + "syscall.IPPROTO_IP": "syscall", + "syscall.IPPROTO_IPCOMP": "syscall", + "syscall.IPPROTO_IPCV": "syscall", + "syscall.IPPROTO_IPEIP": "syscall", + "syscall.IPPROTO_IPIP": "syscall", + "syscall.IPPROTO_IPPC": "syscall", + "syscall.IPPROTO_IPV4": "syscall", + "syscall.IPPROTO_IPV6": "syscall", + "syscall.IPPROTO_IPV6_ICMP": "syscall", + "syscall.IPPROTO_IRTP": "syscall", + "syscall.IPPROTO_KRYPTOLAN": "syscall", + "syscall.IPPROTO_LARP": "syscall", + "syscall.IPPROTO_LEAF1": "syscall", + "syscall.IPPROTO_LEAF2": "syscall", + "syscall.IPPROTO_MAX": "syscall", + "syscall.IPPROTO_MAXID": "syscall", + "syscall.IPPROTO_MEAS": "syscall", + "syscall.IPPROTO_MH": "syscall", + "syscall.IPPROTO_MHRP": "syscall", + "syscall.IPPROTO_MICP": "syscall", + "syscall.IPPROTO_MOBILE": "syscall", + "syscall.IPPROTO_MPLS": "syscall", + "syscall.IPPROTO_MTP": "syscall", + "syscall.IPPROTO_MUX": "syscall", + "syscall.IPPROTO_ND": "syscall", + "syscall.IPPROTO_NHRP": "syscall", + "syscall.IPPROTO_NONE": "syscall", + "syscall.IPPROTO_NSP": "syscall", + "syscall.IPPROTO_NVPII": "syscall", + "syscall.IPPROTO_OLD_DIVERT": "syscall", + "syscall.IPPROTO_OSPFIGP": "syscall", + "syscall.IPPROTO_PFSYNC": "syscall", + "syscall.IPPROTO_PGM": "syscall", + "syscall.IPPROTO_PIGP": "syscall", + "syscall.IPPROTO_PIM": "syscall", + "syscall.IPPROTO_PRM": "syscall", + "syscall.IPPROTO_PUP": "syscall", + "syscall.IPPROTO_PVP": "syscall", + "syscall.IPPROTO_RAW": "syscall", + "syscall.IPPROTO_RCCMON": "syscall", + "syscall.IPPROTO_RDP": "syscall", + "syscall.IPPROTO_ROUTING": "syscall", + "syscall.IPPROTO_RSVP": "syscall", + "syscall.IPPROTO_RVD": "syscall", + "syscall.IPPROTO_SATEXPAK": "syscall", + "syscall.IPPROTO_SATMON": "syscall", + "syscall.IPPROTO_SCCSP": "syscall", + "syscall.IPPROTO_SCTP": "syscall", + "syscall.IPPROTO_SDRP": "syscall", + "syscall.IPPROTO_SEND": "syscall", + "syscall.IPPROTO_SEP": "syscall", + "syscall.IPPROTO_SKIP": "syscall", + "syscall.IPPROTO_SPACER": "syscall", + "syscall.IPPROTO_SRPC": "syscall", + "syscall.IPPROTO_ST": "syscall", + "syscall.IPPROTO_SVMTP": "syscall", + "syscall.IPPROTO_SWIPE": "syscall", + "syscall.IPPROTO_TCF": "syscall", + "syscall.IPPROTO_TCP": "syscall", + "syscall.IPPROTO_TLSP": "syscall", + "syscall.IPPROTO_TP": "syscall", + "syscall.IPPROTO_TPXX": "syscall", + "syscall.IPPROTO_TRUNK1": "syscall", + "syscall.IPPROTO_TRUNK2": "syscall", + "syscall.IPPROTO_TTP": "syscall", + "syscall.IPPROTO_UDP": "syscall", + "syscall.IPPROTO_UDPLITE": "syscall", + "syscall.IPPROTO_VINES": "syscall", + "syscall.IPPROTO_VISA": "syscall", + "syscall.IPPROTO_VMTP": "syscall", + "syscall.IPPROTO_VRRP": "syscall", + "syscall.IPPROTO_WBEXPAK": "syscall", + "syscall.IPPROTO_WBMON": "syscall", + "syscall.IPPROTO_WSN": "syscall", + "syscall.IPPROTO_XNET": "syscall", + "syscall.IPPROTO_XTP": "syscall", + "syscall.IPV6_2292DSTOPTS": "syscall", + "syscall.IPV6_2292HOPLIMIT": "syscall", + "syscall.IPV6_2292HOPOPTS": "syscall", + "syscall.IPV6_2292NEXTHOP": "syscall", + "syscall.IPV6_2292PKTINFO": "syscall", + "syscall.IPV6_2292PKTOPTIONS": "syscall", + "syscall.IPV6_2292RTHDR": "syscall", + "syscall.IPV6_ADDRFORM": "syscall", + "syscall.IPV6_ADD_MEMBERSHIP": "syscall", + "syscall.IPV6_AUTHHDR": "syscall", + "syscall.IPV6_AUTH_LEVEL": "syscall", + "syscall.IPV6_AUTOFLOWLABEL": "syscall", + "syscall.IPV6_BINDANY": "syscall", + "syscall.IPV6_BINDV6ONLY": "syscall", + "syscall.IPV6_BOUND_IF": "syscall", + "syscall.IPV6_CHECKSUM": "syscall", + "syscall.IPV6_DEFAULT_MULTICAST_HOPS": "syscall", + "syscall.IPV6_DEFAULT_MULTICAST_LOOP": "syscall", + "syscall.IPV6_DEFHLIM": "syscall", + "syscall.IPV6_DONTFRAG": "syscall", + "syscall.IPV6_DROP_MEMBERSHIP": "syscall", + "syscall.IPV6_DSTOPTS": "syscall", + "syscall.IPV6_ESP_NETWORK_LEVEL": "syscall", + "syscall.IPV6_ESP_TRANS_LEVEL": "syscall", + "syscall.IPV6_FAITH": "syscall", + "syscall.IPV6_FLOWINFO_MASK": "syscall", + "syscall.IPV6_FLOWLABEL_MASK": "syscall", + "syscall.IPV6_FRAGTTL": "syscall", + "syscall.IPV6_FW_ADD": "syscall", + "syscall.IPV6_FW_DEL": "syscall", + "syscall.IPV6_FW_FLUSH": "syscall", + "syscall.IPV6_FW_GET": "syscall", + "syscall.IPV6_FW_ZERO": "syscall", + "syscall.IPV6_HLIMDEC": "syscall", + "syscall.IPV6_HOPLIMIT": "syscall", + "syscall.IPV6_HOPOPTS": "syscall", + "syscall.IPV6_IPCOMP_LEVEL": "syscall", + "syscall.IPV6_IPSEC_POLICY": "syscall", + "syscall.IPV6_JOIN_ANYCAST": "syscall", + "syscall.IPV6_JOIN_GROUP": "syscall", + "syscall.IPV6_LEAVE_ANYCAST": "syscall", + "syscall.IPV6_LEAVE_GROUP": "syscall", + "syscall.IPV6_MAXHLIM": "syscall", + "syscall.IPV6_MAXOPTHDR": "syscall", + "syscall.IPV6_MAXPACKET": "syscall", + "syscall.IPV6_MAX_GROUP_SRC_FILTER": "syscall", + "syscall.IPV6_MAX_MEMBERSHIPS": "syscall", + "syscall.IPV6_MAX_SOCK_SRC_FILTER": "syscall", + "syscall.IPV6_MIN_MEMBERSHIPS": "syscall", + "syscall.IPV6_MMTU": "syscall", + "syscall.IPV6_MSFILTER": "syscall", + "syscall.IPV6_MTU": "syscall", + "syscall.IPV6_MTU_DISCOVER": "syscall", + "syscall.IPV6_MULTICAST_HOPS": "syscall", + "syscall.IPV6_MULTICAST_IF": "syscall", + "syscall.IPV6_MULTICAST_LOOP": "syscall", + "syscall.IPV6_NEXTHOP": "syscall", + "syscall.IPV6_OPTIONS": "syscall", + "syscall.IPV6_PATHMTU": "syscall", + "syscall.IPV6_PIPEX": "syscall", + "syscall.IPV6_PKTINFO": "syscall", + "syscall.IPV6_PMTUDISC_DO": "syscall", + "syscall.IPV6_PMTUDISC_DONT": "syscall", + "syscall.IPV6_PMTUDISC_PROBE": "syscall", + "syscall.IPV6_PMTUDISC_WANT": "syscall", + "syscall.IPV6_PORTRANGE": "syscall", + "syscall.IPV6_PORTRANGE_DEFAULT": "syscall", + "syscall.IPV6_PORTRANGE_HIGH": "syscall", + "syscall.IPV6_PORTRANGE_LOW": "syscall", + "syscall.IPV6_PREFER_TEMPADDR": "syscall", + "syscall.IPV6_RECVDSTOPTS": "syscall", + "syscall.IPV6_RECVDSTPORT": "syscall", + "syscall.IPV6_RECVERR": "syscall", + "syscall.IPV6_RECVHOPLIMIT": "syscall", + "syscall.IPV6_RECVHOPOPTS": "syscall", + "syscall.IPV6_RECVPATHMTU": "syscall", + "syscall.IPV6_RECVPKTINFO": "syscall", + "syscall.IPV6_RECVRTHDR": "syscall", + "syscall.IPV6_RECVTCLASS": "syscall", + "syscall.IPV6_ROUTER_ALERT": "syscall", + "syscall.IPV6_RTABLE": "syscall", + "syscall.IPV6_RTHDR": "syscall", + "syscall.IPV6_RTHDRDSTOPTS": "syscall", + "syscall.IPV6_RTHDR_LOOSE": "syscall", + "syscall.IPV6_RTHDR_STRICT": "syscall", + "syscall.IPV6_RTHDR_TYPE_0": "syscall", + "syscall.IPV6_RXDSTOPTS": "syscall", + "syscall.IPV6_RXHOPOPTS": "syscall", + "syscall.IPV6_SOCKOPT_RESERVED1": "syscall", + "syscall.IPV6_TCLASS": "syscall", + "syscall.IPV6_UNICAST_HOPS": "syscall", + "syscall.IPV6_USE_MIN_MTU": "syscall", + "syscall.IPV6_V6ONLY": "syscall", + "syscall.IPV6_VERSION": "syscall", + "syscall.IPV6_VERSION_MASK": "syscall", + "syscall.IPV6_XFRM_POLICY": "syscall", + "syscall.IP_ADD_MEMBERSHIP": "syscall", + "syscall.IP_ADD_SOURCE_MEMBERSHIP": "syscall", + "syscall.IP_AUTH_LEVEL": "syscall", + "syscall.IP_BINDANY": "syscall", + "syscall.IP_BLOCK_SOURCE": "syscall", + "syscall.IP_BOUND_IF": "syscall", + "syscall.IP_DEFAULT_MULTICAST_LOOP": "syscall", + "syscall.IP_DEFAULT_MULTICAST_TTL": "syscall", + "syscall.IP_DF": "syscall", + "syscall.IP_DIVERTFL": "syscall", + "syscall.IP_DONTFRAG": "syscall", + "syscall.IP_DROP_MEMBERSHIP": "syscall", + "syscall.IP_DROP_SOURCE_MEMBERSHIP": "syscall", + "syscall.IP_DUMMYNET3": "syscall", + "syscall.IP_DUMMYNET_CONFIGURE": "syscall", + "syscall.IP_DUMMYNET_DEL": "syscall", + "syscall.IP_DUMMYNET_FLUSH": "syscall", + "syscall.IP_DUMMYNET_GET": "syscall", + "syscall.IP_EF": "syscall", + "syscall.IP_ERRORMTU": "syscall", + "syscall.IP_ESP_NETWORK_LEVEL": "syscall", + "syscall.IP_ESP_TRANS_LEVEL": "syscall", + "syscall.IP_FAITH": "syscall", + "syscall.IP_FREEBIND": "syscall", + "syscall.IP_FW3": "syscall", + "syscall.IP_FW_ADD": "syscall", + "syscall.IP_FW_DEL": "syscall", + "syscall.IP_FW_FLUSH": "syscall", + "syscall.IP_FW_GET": "syscall", + "syscall.IP_FW_NAT_CFG": "syscall", + "syscall.IP_FW_NAT_DEL": "syscall", + "syscall.IP_FW_NAT_GET_CONFIG": "syscall", + "syscall.IP_FW_NAT_GET_LOG": "syscall", + "syscall.IP_FW_RESETLOG": "syscall", + "syscall.IP_FW_TABLE_ADD": "syscall", + "syscall.IP_FW_TABLE_DEL": "syscall", + "syscall.IP_FW_TABLE_FLUSH": "syscall", + "syscall.IP_FW_TABLE_GETSIZE": "syscall", + "syscall.IP_FW_TABLE_LIST": "syscall", + "syscall.IP_FW_ZERO": "syscall", + "syscall.IP_HDRINCL": "syscall", + "syscall.IP_IPCOMP_LEVEL": "syscall", + "syscall.IP_IPSECFLOWINFO": "syscall", + "syscall.IP_IPSEC_LOCAL_AUTH": "syscall", + "syscall.IP_IPSEC_LOCAL_CRED": "syscall", + "syscall.IP_IPSEC_LOCAL_ID": "syscall", + "syscall.IP_IPSEC_POLICY": "syscall", + "syscall.IP_IPSEC_REMOTE_AUTH": "syscall", + "syscall.IP_IPSEC_REMOTE_CRED": "syscall", + "syscall.IP_IPSEC_REMOTE_ID": "syscall", + "syscall.IP_MAXPACKET": "syscall", + "syscall.IP_MAX_GROUP_SRC_FILTER": "syscall", + "syscall.IP_MAX_MEMBERSHIPS": "syscall", + "syscall.IP_MAX_SOCK_MUTE_FILTER": "syscall", + "syscall.IP_MAX_SOCK_SRC_FILTER": "syscall", + "syscall.IP_MAX_SOURCE_FILTER": "syscall", + "syscall.IP_MF": "syscall", + "syscall.IP_MINFRAGSIZE": "syscall", + "syscall.IP_MINTTL": "syscall", + "syscall.IP_MIN_MEMBERSHIPS": "syscall", + "syscall.IP_MSFILTER": "syscall", + "syscall.IP_MSS": "syscall", + "syscall.IP_MTU": "syscall", + "syscall.IP_MTU_DISCOVER": "syscall", + "syscall.IP_MULTICAST_IF": "syscall", + "syscall.IP_MULTICAST_IFINDEX": "syscall", + "syscall.IP_MULTICAST_LOOP": "syscall", + "syscall.IP_MULTICAST_TTL": "syscall", + "syscall.IP_MULTICAST_VIF": "syscall", + "syscall.IP_NAT__XXX": "syscall", + "syscall.IP_OFFMASK": "syscall", + "syscall.IP_OLD_FW_ADD": "syscall", + "syscall.IP_OLD_FW_DEL": "syscall", + "syscall.IP_OLD_FW_FLUSH": "syscall", + "syscall.IP_OLD_FW_GET": "syscall", + "syscall.IP_OLD_FW_RESETLOG": "syscall", + "syscall.IP_OLD_FW_ZERO": "syscall", + "syscall.IP_ONESBCAST": "syscall", + "syscall.IP_OPTIONS": "syscall", + "syscall.IP_ORIGDSTADDR": "syscall", + "syscall.IP_PASSSEC": "syscall", + "syscall.IP_PIPEX": "syscall", + "syscall.IP_PKTINFO": "syscall", + "syscall.IP_PKTOPTIONS": "syscall", + "syscall.IP_PMTUDISC": "syscall", + "syscall.IP_PMTUDISC_DO": "syscall", + "syscall.IP_PMTUDISC_DONT": "syscall", + "syscall.IP_PMTUDISC_PROBE": "syscall", + "syscall.IP_PMTUDISC_WANT": "syscall", + "syscall.IP_PORTRANGE": "syscall", + "syscall.IP_PORTRANGE_DEFAULT": "syscall", + "syscall.IP_PORTRANGE_HIGH": "syscall", + "syscall.IP_PORTRANGE_LOW": "syscall", + "syscall.IP_RECVDSTADDR": "syscall", + "syscall.IP_RECVDSTPORT": "syscall", + "syscall.IP_RECVERR": "syscall", + "syscall.IP_RECVIF": "syscall", + "syscall.IP_RECVOPTS": "syscall", + "syscall.IP_RECVORIGDSTADDR": "syscall", + "syscall.IP_RECVPKTINFO": "syscall", + "syscall.IP_RECVRETOPTS": "syscall", + "syscall.IP_RECVRTABLE": "syscall", + "syscall.IP_RECVTOS": "syscall", + "syscall.IP_RECVTTL": "syscall", + "syscall.IP_RETOPTS": "syscall", + "syscall.IP_RF": "syscall", + "syscall.IP_ROUTER_ALERT": "syscall", + "syscall.IP_RSVP_OFF": "syscall", + "syscall.IP_RSVP_ON": "syscall", + "syscall.IP_RSVP_VIF_OFF": "syscall", + "syscall.IP_RSVP_VIF_ON": "syscall", + "syscall.IP_RTABLE": "syscall", + "syscall.IP_SENDSRCADDR": "syscall", + "syscall.IP_STRIPHDR": "syscall", + "syscall.IP_TOS": "syscall", + "syscall.IP_TRAFFIC_MGT_BACKGROUND": "syscall", + "syscall.IP_TRANSPARENT": "syscall", + "syscall.IP_TTL": "syscall", + "syscall.IP_UNBLOCK_SOURCE": "syscall", + "syscall.IP_XFRM_POLICY": "syscall", + "syscall.IPv6MTUInfo": "syscall", + "syscall.IPv6Mreq": "syscall", + "syscall.ISIG": "syscall", + "syscall.ISTRIP": "syscall", + "syscall.IUCLC": "syscall", + "syscall.IUTF8": "syscall", + "syscall.IXANY": "syscall", + "syscall.IXOFF": "syscall", + "syscall.IXON": "syscall", + "syscall.IfAddrmsg": "syscall", + "syscall.IfAnnounceMsghdr": "syscall", + "syscall.IfData": "syscall", + "syscall.IfInfomsg": "syscall", + "syscall.IfMsghdr": "syscall", + "syscall.IfaMsghdr": "syscall", + "syscall.IfmaMsghdr": "syscall", + "syscall.IfmaMsghdr2": "syscall", + "syscall.ImplementsGetwd": "syscall", + "syscall.Inet4Pktinfo": "syscall", + "syscall.Inet6Pktinfo": "syscall", + "syscall.InotifyAddWatch": "syscall", + "syscall.InotifyEvent": "syscall", + "syscall.InotifyInit": "syscall", + "syscall.InotifyInit1": "syscall", + "syscall.InotifyRmWatch": "syscall", + "syscall.InterfaceAddrMessage": "syscall", + "syscall.InterfaceAnnounceMessage": "syscall", + "syscall.InterfaceInfo": "syscall", + "syscall.InterfaceMessage": "syscall", + "syscall.InterfaceMulticastAddrMessage": "syscall", + "syscall.InvalidHandle": "syscall", + "syscall.Ioperm": "syscall", + "syscall.Iopl": "syscall", + "syscall.Iovec": "syscall", + "syscall.IpAdapterInfo": "syscall", + "syscall.IpAddrString": "syscall", + "syscall.IpAddressString": "syscall", + "syscall.IpMaskString": "syscall", + "syscall.Issetugid": "syscall", + "syscall.KEY_ALL_ACCESS": "syscall", + "syscall.KEY_CREATE_LINK": "syscall", + "syscall.KEY_CREATE_SUB_KEY": "syscall", + "syscall.KEY_ENUMERATE_SUB_KEYS": "syscall", + "syscall.KEY_EXECUTE": "syscall", + "syscall.KEY_NOTIFY": "syscall", + "syscall.KEY_QUERY_VALUE": "syscall", + "syscall.KEY_READ": "syscall", + "syscall.KEY_SET_VALUE": "syscall", + "syscall.KEY_WOW64_32KEY": "syscall", + "syscall.KEY_WOW64_64KEY": "syscall", + "syscall.KEY_WRITE": "syscall", + "syscall.Kevent": "syscall", + "syscall.Kevent_t": "syscall", + "syscall.Kill": "syscall", + "syscall.Klogctl": "syscall", + "syscall.Kqueue": "syscall", + "syscall.LANG_ENGLISH": "syscall", + "syscall.LAYERED_PROTOCOL": "syscall", + "syscall.LCNT_OVERLOAD_FLUSH": "syscall", + "syscall.LINUX_REBOOT_CMD_CAD_OFF": "syscall", + "syscall.LINUX_REBOOT_CMD_CAD_ON": "syscall", + "syscall.LINUX_REBOOT_CMD_HALT": "syscall", + "syscall.LINUX_REBOOT_CMD_KEXEC": "syscall", + "syscall.LINUX_REBOOT_CMD_POWER_OFF": "syscall", + "syscall.LINUX_REBOOT_CMD_RESTART": "syscall", + "syscall.LINUX_REBOOT_CMD_RESTART2": "syscall", + "syscall.LINUX_REBOOT_CMD_SW_SUSPEND": "syscall", + "syscall.LINUX_REBOOT_MAGIC1": "syscall", + "syscall.LINUX_REBOOT_MAGIC2": "syscall", + "syscall.LOCK_EX": "syscall", + "syscall.LOCK_NB": "syscall", + "syscall.LOCK_SH": "syscall", + "syscall.LOCK_UN": "syscall", + "syscall.LazyDLL": "syscall", + "syscall.LazyProc": "syscall", + "syscall.Lchown": "syscall", + "syscall.Linger": "syscall", + "syscall.Link": "syscall", + "syscall.Listen": "syscall", + "syscall.Listxattr": "syscall", + "syscall.LoadCancelIoEx": "syscall", + "syscall.LoadConnectEx": "syscall", + "syscall.LoadCreateSymbolicLink": "syscall", + "syscall.LoadDLL": "syscall", + "syscall.LoadGetAddrInfo": "syscall", + "syscall.LoadLibrary": "syscall", + "syscall.LoadSetFileCompletionNotificationModes": "syscall", + "syscall.LocalFree": "syscall", + "syscall.Log2phys_t": "syscall", + "syscall.LookupAccountName": "syscall", + "syscall.LookupAccountSid": "syscall", + "syscall.LookupSID": "syscall", + "syscall.LsfJump": "syscall", + "syscall.LsfSocket": "syscall", + "syscall.LsfStmt": "syscall", + "syscall.Lstat": "syscall", + "syscall.MADV_AUTOSYNC": "syscall", + "syscall.MADV_CAN_REUSE": "syscall", + "syscall.MADV_CORE": "syscall", + "syscall.MADV_DOFORK": "syscall", + "syscall.MADV_DONTFORK": "syscall", + "syscall.MADV_DONTNEED": "syscall", + "syscall.MADV_FREE": "syscall", + "syscall.MADV_FREE_REUSABLE": "syscall", + "syscall.MADV_FREE_REUSE": "syscall", + "syscall.MADV_HUGEPAGE": "syscall", + "syscall.MADV_HWPOISON": "syscall", + "syscall.MADV_MERGEABLE": "syscall", + "syscall.MADV_NOCORE": "syscall", + "syscall.MADV_NOHUGEPAGE": "syscall", + "syscall.MADV_NORMAL": "syscall", + "syscall.MADV_NOSYNC": "syscall", + "syscall.MADV_PROTECT": "syscall", + "syscall.MADV_RANDOM": "syscall", + "syscall.MADV_REMOVE": "syscall", + "syscall.MADV_SEQUENTIAL": "syscall", + "syscall.MADV_SPACEAVAIL": "syscall", + "syscall.MADV_UNMERGEABLE": "syscall", + "syscall.MADV_WILLNEED": "syscall", + "syscall.MADV_ZERO_WIRED_PAGES": "syscall", + "syscall.MAP_32BIT": "syscall", + "syscall.MAP_ALIGNED_SUPER": "syscall", + "syscall.MAP_ALIGNMENT_16MB": "syscall", + "syscall.MAP_ALIGNMENT_1TB": "syscall", + "syscall.MAP_ALIGNMENT_256TB": "syscall", + "syscall.MAP_ALIGNMENT_4GB": "syscall", + "syscall.MAP_ALIGNMENT_64KB": "syscall", + "syscall.MAP_ALIGNMENT_64PB": "syscall", + "syscall.MAP_ALIGNMENT_MASK": "syscall", + "syscall.MAP_ALIGNMENT_SHIFT": "syscall", + "syscall.MAP_ANON": "syscall", + "syscall.MAP_ANONYMOUS": "syscall", + "syscall.MAP_COPY": "syscall", + "syscall.MAP_DENYWRITE": "syscall", + "syscall.MAP_EXECUTABLE": "syscall", + "syscall.MAP_FILE": "syscall", + "syscall.MAP_FIXED": "syscall", + "syscall.MAP_FLAGMASK": "syscall", + "syscall.MAP_GROWSDOWN": "syscall", + "syscall.MAP_HASSEMAPHORE": "syscall", + "syscall.MAP_HUGETLB": "syscall", + "syscall.MAP_INHERIT": "syscall", + "syscall.MAP_INHERIT_COPY": "syscall", + "syscall.MAP_INHERIT_DEFAULT": "syscall", + "syscall.MAP_INHERIT_DONATE_COPY": "syscall", + "syscall.MAP_INHERIT_NONE": "syscall", + "syscall.MAP_INHERIT_SHARE": "syscall", + "syscall.MAP_JIT": "syscall", + "syscall.MAP_LOCKED": "syscall", + "syscall.MAP_NOCACHE": "syscall", + "syscall.MAP_NOCORE": "syscall", + "syscall.MAP_NOEXTEND": "syscall", + "syscall.MAP_NONBLOCK": "syscall", + "syscall.MAP_NORESERVE": "syscall", + "syscall.MAP_NOSYNC": "syscall", + "syscall.MAP_POPULATE": "syscall", + "syscall.MAP_PREFAULT_READ": "syscall", + "syscall.MAP_PRIVATE": "syscall", + "syscall.MAP_RENAME": "syscall", + "syscall.MAP_RESERVED0080": "syscall", + "syscall.MAP_RESERVED0100": "syscall", + "syscall.MAP_SHARED": "syscall", + "syscall.MAP_STACK": "syscall", + "syscall.MAP_TRYFIXED": "syscall", + "syscall.MAP_TYPE": "syscall", + "syscall.MAP_WIRED": "syscall", + "syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE": "syscall", + "syscall.MAXLEN_IFDESCR": "syscall", + "syscall.MAXLEN_PHYSADDR": "syscall", + "syscall.MAX_ADAPTER_ADDRESS_LENGTH": "syscall", + "syscall.MAX_ADAPTER_DESCRIPTION_LENGTH": "syscall", + "syscall.MAX_ADAPTER_NAME_LENGTH": "syscall", + "syscall.MAX_COMPUTERNAME_LENGTH": "syscall", + "syscall.MAX_INTERFACE_NAME_LEN": "syscall", + "syscall.MAX_LONG_PATH": "syscall", + "syscall.MAX_PATH": "syscall", + "syscall.MAX_PROTOCOL_CHAIN": "syscall", + "syscall.MCL_CURRENT": "syscall", + "syscall.MCL_FUTURE": "syscall", + "syscall.MNT_DETACH": "syscall", + "syscall.MNT_EXPIRE": "syscall", + "syscall.MNT_FORCE": "syscall", + "syscall.MSG_BCAST": "syscall", + "syscall.MSG_CMSG_CLOEXEC": "syscall", + "syscall.MSG_COMPAT": "syscall", + "syscall.MSG_CONFIRM": "syscall", + "syscall.MSG_CONTROLMBUF": "syscall", + "syscall.MSG_CTRUNC": "syscall", + "syscall.MSG_DONTROUTE": "syscall", + "syscall.MSG_DONTWAIT": "syscall", + "syscall.MSG_EOF": "syscall", + "syscall.MSG_EOR": "syscall", + "syscall.MSG_ERRQUEUE": "syscall", + "syscall.MSG_FASTOPEN": "syscall", + "syscall.MSG_FIN": "syscall", + "syscall.MSG_FLUSH": "syscall", + "syscall.MSG_HAVEMORE": "syscall", + "syscall.MSG_HOLD": "syscall", + "syscall.MSG_IOVUSRSPACE": "syscall", + "syscall.MSG_LENUSRSPACE": "syscall", + "syscall.MSG_MCAST": "syscall", + "syscall.MSG_MORE": "syscall", + "syscall.MSG_NAMEMBUF": "syscall", + "syscall.MSG_NBIO": "syscall", + "syscall.MSG_NEEDSA": "syscall", + "syscall.MSG_NOSIGNAL": "syscall", + "syscall.MSG_NOTIFICATION": "syscall", + "syscall.MSG_OOB": "syscall", + "syscall.MSG_PEEK": "syscall", + "syscall.MSG_PROXY": "syscall", + "syscall.MSG_RCVMORE": "syscall", + "syscall.MSG_RST": "syscall", + "syscall.MSG_SEND": "syscall", + "syscall.MSG_SYN": "syscall", + "syscall.MSG_TRUNC": "syscall", + "syscall.MSG_TRYHARD": "syscall", + "syscall.MSG_USERFLAGS": "syscall", + "syscall.MSG_WAITALL": "syscall", + "syscall.MSG_WAITFORONE": "syscall", + "syscall.MSG_WAITSTREAM": "syscall", + "syscall.MS_ACTIVE": "syscall", + "syscall.MS_ASYNC": "syscall", + "syscall.MS_BIND": "syscall", + "syscall.MS_DEACTIVATE": "syscall", + "syscall.MS_DIRSYNC": "syscall", + "syscall.MS_INVALIDATE": "syscall", + "syscall.MS_I_VERSION": "syscall", + "syscall.MS_KERNMOUNT": "syscall", + "syscall.MS_KILLPAGES": "syscall", + "syscall.MS_MANDLOCK": "syscall", + "syscall.MS_MGC_MSK": "syscall", + "syscall.MS_MGC_VAL": "syscall", + "syscall.MS_MOVE": "syscall", + "syscall.MS_NOATIME": "syscall", + "syscall.MS_NODEV": "syscall", + "syscall.MS_NODIRATIME": "syscall", + "syscall.MS_NOEXEC": "syscall", + "syscall.MS_NOSUID": "syscall", + "syscall.MS_NOUSER": "syscall", + "syscall.MS_POSIXACL": "syscall", + "syscall.MS_PRIVATE": "syscall", + "syscall.MS_RDONLY": "syscall", + "syscall.MS_REC": "syscall", + "syscall.MS_RELATIME": "syscall", + "syscall.MS_REMOUNT": "syscall", + "syscall.MS_RMT_MASK": "syscall", + "syscall.MS_SHARED": "syscall", + "syscall.MS_SILENT": "syscall", + "syscall.MS_SLAVE": "syscall", + "syscall.MS_STRICTATIME": "syscall", + "syscall.MS_SYNC": "syscall", + "syscall.MS_SYNCHRONOUS": "syscall", + "syscall.MS_UNBINDABLE": "syscall", + "syscall.Madvise": "syscall", + "syscall.MapViewOfFile": "syscall", + "syscall.MaxTokenInfoClass": "syscall", + "syscall.Mclpool": "syscall", + "syscall.MibIfRow": "syscall", + "syscall.Mkdir": "syscall", + "syscall.Mkdirat": "syscall", + "syscall.Mkfifo": "syscall", + "syscall.Mknod": "syscall", + "syscall.Mknodat": "syscall", + "syscall.Mlock": "syscall", + "syscall.Mlockall": "syscall", + "syscall.Mmap": "syscall", + "syscall.Mount": "syscall", + "syscall.MoveFile": "syscall", + "syscall.Mprotect": "syscall", + "syscall.Msghdr": "syscall", + "syscall.Munlock": "syscall", + "syscall.Munlockall": "syscall", + "syscall.Munmap": "syscall", + "syscall.MustLoadDLL": "syscall", + "syscall.NAME_MAX": "syscall", + "syscall.NETLINK_ADD_MEMBERSHIP": "syscall", + "syscall.NETLINK_AUDIT": "syscall", + "syscall.NETLINK_BROADCAST_ERROR": "syscall", + "syscall.NETLINK_CONNECTOR": "syscall", + "syscall.NETLINK_DNRTMSG": "syscall", + "syscall.NETLINK_DROP_MEMBERSHIP": "syscall", + "syscall.NETLINK_ECRYPTFS": "syscall", + "syscall.NETLINK_FIB_LOOKUP": "syscall", + "syscall.NETLINK_FIREWALL": "syscall", + "syscall.NETLINK_GENERIC": "syscall", + "syscall.NETLINK_INET_DIAG": "syscall", + "syscall.NETLINK_IP6_FW": "syscall", + "syscall.NETLINK_ISCSI": "syscall", + "syscall.NETLINK_KOBJECT_UEVENT": "syscall", + "syscall.NETLINK_NETFILTER": "syscall", + "syscall.NETLINK_NFLOG": "syscall", + "syscall.NETLINK_NO_ENOBUFS": "syscall", + "syscall.NETLINK_PKTINFO": "syscall", + "syscall.NETLINK_RDMA": "syscall", + "syscall.NETLINK_ROUTE": "syscall", + "syscall.NETLINK_SCSITRANSPORT": "syscall", + "syscall.NETLINK_SELINUX": "syscall", + "syscall.NETLINK_UNUSED": "syscall", + "syscall.NETLINK_USERSOCK": "syscall", + "syscall.NETLINK_XFRM": "syscall", + "syscall.NET_RT_DUMP": "syscall", + "syscall.NET_RT_DUMP2": "syscall", + "syscall.NET_RT_FLAGS": "syscall", + "syscall.NET_RT_IFLIST": "syscall", + "syscall.NET_RT_IFLIST2": "syscall", + "syscall.NET_RT_IFLISTL": "syscall", + "syscall.NET_RT_IFMALIST": "syscall", + "syscall.NET_RT_MAXID": "syscall", + "syscall.NET_RT_OIFLIST": "syscall", + "syscall.NET_RT_OOIFLIST": "syscall", + "syscall.NET_RT_STAT": "syscall", + "syscall.NET_RT_STATS": "syscall", + "syscall.NET_RT_TABLE": "syscall", + "syscall.NET_RT_TRASH": "syscall", + "syscall.NLA_ALIGNTO": "syscall", + "syscall.NLA_F_NESTED": "syscall", + "syscall.NLA_F_NET_BYTEORDER": "syscall", + "syscall.NLA_HDRLEN": "syscall", + "syscall.NLMSG_ALIGNTO": "syscall", + "syscall.NLMSG_DONE": "syscall", + "syscall.NLMSG_ERROR": "syscall", + "syscall.NLMSG_HDRLEN": "syscall", + "syscall.NLMSG_MIN_TYPE": "syscall", + "syscall.NLMSG_NOOP": "syscall", + "syscall.NLMSG_OVERRUN": "syscall", + "syscall.NLM_F_ACK": "syscall", + "syscall.NLM_F_APPEND": "syscall", + "syscall.NLM_F_ATOMIC": "syscall", + "syscall.NLM_F_CREATE": "syscall", + "syscall.NLM_F_DUMP": "syscall", + "syscall.NLM_F_ECHO": "syscall", + "syscall.NLM_F_EXCL": "syscall", + "syscall.NLM_F_MATCH": "syscall", + "syscall.NLM_F_MULTI": "syscall", + "syscall.NLM_F_REPLACE": "syscall", + "syscall.NLM_F_REQUEST": "syscall", + "syscall.NLM_F_ROOT": "syscall", + "syscall.NOFLSH": "syscall", + "syscall.NOTE_ABSOLUTE": "syscall", + "syscall.NOTE_ATTRIB": "syscall", + "syscall.NOTE_CHILD": "syscall", + "syscall.NOTE_DELETE": "syscall", + "syscall.NOTE_EOF": "syscall", + "syscall.NOTE_EXEC": "syscall", + "syscall.NOTE_EXIT": "syscall", + "syscall.NOTE_EXITSTATUS": "syscall", + "syscall.NOTE_EXTEND": "syscall", + "syscall.NOTE_FFAND": "syscall", + "syscall.NOTE_FFCOPY": "syscall", + "syscall.NOTE_FFCTRLMASK": "syscall", + "syscall.NOTE_FFLAGSMASK": "syscall", + "syscall.NOTE_FFNOP": "syscall", + "syscall.NOTE_FFOR": "syscall", + "syscall.NOTE_FORK": "syscall", + "syscall.NOTE_LINK": "syscall", + "syscall.NOTE_LOWAT": "syscall", + "syscall.NOTE_NONE": "syscall", + "syscall.NOTE_NSECONDS": "syscall", + "syscall.NOTE_PCTRLMASK": "syscall", + "syscall.NOTE_PDATAMASK": "syscall", + "syscall.NOTE_REAP": "syscall", + "syscall.NOTE_RENAME": "syscall", + "syscall.NOTE_RESOURCEEND": "syscall", + "syscall.NOTE_REVOKE": "syscall", + "syscall.NOTE_SECONDS": "syscall", + "syscall.NOTE_SIGNAL": "syscall", + "syscall.NOTE_TRACK": "syscall", + "syscall.NOTE_TRACKERR": "syscall", + "syscall.NOTE_TRIGGER": "syscall", + "syscall.NOTE_TRUNCATE": "syscall", + "syscall.NOTE_USECONDS": "syscall", + "syscall.NOTE_VM_ERROR": "syscall", + "syscall.NOTE_VM_PRESSURE": "syscall", + "syscall.NOTE_VM_PRESSURE_SUDDEN_TERMINATE": "syscall", + "syscall.NOTE_VM_PRESSURE_TERMINATE": "syscall", + "syscall.NOTE_WRITE": "syscall", + "syscall.NameCanonical": "syscall", + "syscall.NameCanonicalEx": "syscall", + "syscall.NameDisplay": "syscall", + "syscall.NameDnsDomain": "syscall", + "syscall.NameFullyQualifiedDN": "syscall", + "syscall.NameSamCompatible": "syscall", + "syscall.NameServicePrincipal": "syscall", + "syscall.NameUniqueId": "syscall", + "syscall.NameUnknown": "syscall", + "syscall.NameUserPrincipal": "syscall", + "syscall.Nanosleep": "syscall", + "syscall.NetApiBufferFree": "syscall", + "syscall.NetGetJoinInformation": "syscall", + "syscall.NetSetupDomainName": "syscall", + "syscall.NetSetupUnjoined": "syscall", + "syscall.NetSetupUnknownStatus": "syscall", + "syscall.NetSetupWorkgroupName": "syscall", + "syscall.NetUserGetInfo": "syscall", + "syscall.NetlinkMessage": "syscall", + "syscall.NetlinkRIB": "syscall", + "syscall.NetlinkRouteAttr": "syscall", + "syscall.NetlinkRouteRequest": "syscall", + "syscall.NewCallback": "syscall", + "syscall.NewCallbackCDecl": "syscall", + "syscall.NewLazyDLL": "syscall", + "syscall.NlAttr": "syscall", + "syscall.NlMsgerr": "syscall", + "syscall.NlMsghdr": "syscall", + "syscall.NsecToFiletime": "syscall", + "syscall.NsecToTimespec": "syscall", + "syscall.NsecToTimeval": "syscall", + "syscall.Ntohs": "syscall", + "syscall.OCRNL": "syscall", + "syscall.OFDEL": "syscall", + "syscall.OFILL": "syscall", + "syscall.OFIOGETBMAP": "syscall", + "syscall.OID_PKIX_KP_SERVER_AUTH": "syscall", + "syscall.OID_SERVER_GATED_CRYPTO": "syscall", + "syscall.OID_SGC_NETSCAPE": "syscall", + "syscall.OLCUC": "syscall", + "syscall.ONLCR": "syscall", + "syscall.ONLRET": "syscall", + "syscall.ONOCR": "syscall", + "syscall.ONOEOT": "syscall", + "syscall.OPEN_ALWAYS": "syscall", + "syscall.OPEN_EXISTING": "syscall", + "syscall.OPOST": "syscall", + "syscall.O_ACCMODE": "syscall", + "syscall.O_ALERT": "syscall", + "syscall.O_ALT_IO": "syscall", + "syscall.O_APPEND": "syscall", + "syscall.O_ASYNC": "syscall", + "syscall.O_CLOEXEC": "syscall", + "syscall.O_CREAT": "syscall", + "syscall.O_DIRECT": "syscall", + "syscall.O_DIRECTORY": "syscall", + "syscall.O_DSYNC": "syscall", + "syscall.O_EVTONLY": "syscall", + "syscall.O_EXCL": "syscall", + "syscall.O_EXEC": "syscall", + "syscall.O_EXLOCK": "syscall", + "syscall.O_FSYNC": "syscall", + "syscall.O_LARGEFILE": "syscall", + "syscall.O_NDELAY": "syscall", + "syscall.O_NOATIME": "syscall", + "syscall.O_NOCTTY": "syscall", + "syscall.O_NOFOLLOW": "syscall", + "syscall.O_NONBLOCK": "syscall", + "syscall.O_NOSIGPIPE": "syscall", + "syscall.O_POPUP": "syscall", + "syscall.O_RDONLY": "syscall", + "syscall.O_RDWR": "syscall", + "syscall.O_RSYNC": "syscall", + "syscall.O_SHLOCK": "syscall", + "syscall.O_SYMLINK": "syscall", + "syscall.O_SYNC": "syscall", + "syscall.O_TRUNC": "syscall", + "syscall.O_TTY_INIT": "syscall", + "syscall.O_WRONLY": "syscall", + "syscall.Open": "syscall", + "syscall.OpenCurrentProcessToken": "syscall", + "syscall.OpenProcess": "syscall", + "syscall.OpenProcessToken": "syscall", + "syscall.Openat": "syscall", + "syscall.Overlapped": "syscall", + "syscall.PACKET_ADD_MEMBERSHIP": "syscall", + "syscall.PACKET_BROADCAST": "syscall", + "syscall.PACKET_DROP_MEMBERSHIP": "syscall", + "syscall.PACKET_FASTROUTE": "syscall", + "syscall.PACKET_HOST": "syscall", + "syscall.PACKET_LOOPBACK": "syscall", + "syscall.PACKET_MR_ALLMULTI": "syscall", + "syscall.PACKET_MR_MULTICAST": "syscall", + "syscall.PACKET_MR_PROMISC": "syscall", + "syscall.PACKET_MULTICAST": "syscall", + "syscall.PACKET_OTHERHOST": "syscall", + "syscall.PACKET_OUTGOING": "syscall", + "syscall.PACKET_RECV_OUTPUT": "syscall", + "syscall.PACKET_RX_RING": "syscall", + "syscall.PACKET_STATISTICS": "syscall", + "syscall.PAGE_EXECUTE_READ": "syscall", + "syscall.PAGE_EXECUTE_READWRITE": "syscall", + "syscall.PAGE_EXECUTE_WRITECOPY": "syscall", + "syscall.PAGE_READONLY": "syscall", + "syscall.PAGE_READWRITE": "syscall", + "syscall.PAGE_WRITECOPY": "syscall", + "syscall.PARENB": "syscall", + "syscall.PARMRK": "syscall", + "syscall.PARODD": "syscall", + "syscall.PENDIN": "syscall", + "syscall.PFL_HIDDEN": "syscall", + "syscall.PFL_MATCHES_PROTOCOL_ZERO": "syscall", + "syscall.PFL_MULTIPLE_PROTO_ENTRIES": "syscall", + "syscall.PFL_NETWORKDIRECT_PROVIDER": "syscall", + "syscall.PFL_RECOMMENDED_PROTO_ENTRY": "syscall", + "syscall.PF_FLUSH": "syscall", + "syscall.PKCS_7_ASN_ENCODING": "syscall", + "syscall.PMC5_PIPELINE_FLUSH": "syscall", + "syscall.PRIO_PGRP": "syscall", + "syscall.PRIO_PROCESS": "syscall", + "syscall.PRIO_USER": "syscall", + "syscall.PRI_IOFLUSH": "syscall", + "syscall.PROCESS_QUERY_INFORMATION": "syscall", + "syscall.PROCESS_TERMINATE": "syscall", + "syscall.PROT_EXEC": "syscall", + "syscall.PROT_GROWSDOWN": "syscall", + "syscall.PROT_GROWSUP": "syscall", + "syscall.PROT_NONE": "syscall", + "syscall.PROT_READ": "syscall", + "syscall.PROT_WRITE": "syscall", + "syscall.PROV_DH_SCHANNEL": "syscall", + "syscall.PROV_DSS": "syscall", + "syscall.PROV_DSS_DH": "syscall", + "syscall.PROV_EC_ECDSA_FULL": "syscall", + "syscall.PROV_EC_ECDSA_SIG": "syscall", + "syscall.PROV_EC_ECNRA_FULL": "syscall", + "syscall.PROV_EC_ECNRA_SIG": "syscall", + "syscall.PROV_FORTEZZA": "syscall", + "syscall.PROV_INTEL_SEC": "syscall", + "syscall.PROV_MS_EXCHANGE": "syscall", + "syscall.PROV_REPLACE_OWF": "syscall", + "syscall.PROV_RNG": "syscall", + "syscall.PROV_RSA_AES": "syscall", + "syscall.PROV_RSA_FULL": "syscall", + "syscall.PROV_RSA_SCHANNEL": "syscall", + "syscall.PROV_RSA_SIG": "syscall", + "syscall.PROV_SPYRUS_LYNKS": "syscall", + "syscall.PROV_SSL": "syscall", + "syscall.PR_CAPBSET_DROP": "syscall", + "syscall.PR_CAPBSET_READ": "syscall", + "syscall.PR_CLEAR_SECCOMP_FILTER": "syscall", + "syscall.PR_ENDIAN_BIG": "syscall", + "syscall.PR_ENDIAN_LITTLE": "syscall", + "syscall.PR_ENDIAN_PPC_LITTLE": "syscall", + "syscall.PR_FPEMU_NOPRINT": "syscall", + "syscall.PR_FPEMU_SIGFPE": "syscall", + "syscall.PR_FP_EXC_ASYNC": "syscall", + "syscall.PR_FP_EXC_DISABLED": "syscall", + "syscall.PR_FP_EXC_DIV": "syscall", + "syscall.PR_FP_EXC_INV": "syscall", + "syscall.PR_FP_EXC_NONRECOV": "syscall", + "syscall.PR_FP_EXC_OVF": "syscall", + "syscall.PR_FP_EXC_PRECISE": "syscall", + "syscall.PR_FP_EXC_RES": "syscall", + "syscall.PR_FP_EXC_SW_ENABLE": "syscall", + "syscall.PR_FP_EXC_UND": "syscall", + "syscall.PR_GET_DUMPABLE": "syscall", + "syscall.PR_GET_ENDIAN": "syscall", + "syscall.PR_GET_FPEMU": "syscall", + "syscall.PR_GET_FPEXC": "syscall", + "syscall.PR_GET_KEEPCAPS": "syscall", + "syscall.PR_GET_NAME": "syscall", + "syscall.PR_GET_PDEATHSIG": "syscall", + "syscall.PR_GET_SECCOMP": "syscall", + "syscall.PR_GET_SECCOMP_FILTER": "syscall", + "syscall.PR_GET_SECUREBITS": "syscall", + "syscall.PR_GET_TIMERSLACK": "syscall", + "syscall.PR_GET_TIMING": "syscall", + "syscall.PR_GET_TSC": "syscall", + "syscall.PR_GET_UNALIGN": "syscall", + "syscall.PR_MCE_KILL": "syscall", + "syscall.PR_MCE_KILL_CLEAR": "syscall", + "syscall.PR_MCE_KILL_DEFAULT": "syscall", + "syscall.PR_MCE_KILL_EARLY": "syscall", + "syscall.PR_MCE_KILL_GET": "syscall", + "syscall.PR_MCE_KILL_LATE": "syscall", + "syscall.PR_MCE_KILL_SET": "syscall", + "syscall.PR_SECCOMP_FILTER_EVENT": "syscall", + "syscall.PR_SECCOMP_FILTER_SYSCALL": "syscall", + "syscall.PR_SET_DUMPABLE": "syscall", + "syscall.PR_SET_ENDIAN": "syscall", + "syscall.PR_SET_FPEMU": "syscall", + "syscall.PR_SET_FPEXC": "syscall", + "syscall.PR_SET_KEEPCAPS": "syscall", + "syscall.PR_SET_NAME": "syscall", + "syscall.PR_SET_PDEATHSIG": "syscall", + "syscall.PR_SET_PTRACER": "syscall", + "syscall.PR_SET_SECCOMP": "syscall", + "syscall.PR_SET_SECCOMP_FILTER": "syscall", + "syscall.PR_SET_SECUREBITS": "syscall", + "syscall.PR_SET_TIMERSLACK": "syscall", + "syscall.PR_SET_TIMING": "syscall", + "syscall.PR_SET_TSC": "syscall", + "syscall.PR_SET_UNALIGN": "syscall", + "syscall.PR_TASK_PERF_EVENTS_DISABLE": "syscall", + "syscall.PR_TASK_PERF_EVENTS_ENABLE": "syscall", + "syscall.PR_TIMING_STATISTICAL": "syscall", + "syscall.PR_TIMING_TIMESTAMP": "syscall", + "syscall.PR_TSC_ENABLE": "syscall", + "syscall.PR_TSC_SIGSEGV": "syscall", + "syscall.PR_UNALIGN_NOPRINT": "syscall", + "syscall.PR_UNALIGN_SIGBUS": "syscall", + "syscall.PTRACE_ARCH_PRCTL": "syscall", + "syscall.PTRACE_ATTACH": "syscall", + "syscall.PTRACE_CONT": "syscall", + "syscall.PTRACE_DETACH": "syscall", + "syscall.PTRACE_EVENT_CLONE": "syscall", + "syscall.PTRACE_EVENT_EXEC": "syscall", + "syscall.PTRACE_EVENT_EXIT": "syscall", + "syscall.PTRACE_EVENT_FORK": "syscall", + "syscall.PTRACE_EVENT_VFORK": "syscall", + "syscall.PTRACE_EVENT_VFORK_DONE": "syscall", + "syscall.PTRACE_GETCRUNCHREGS": "syscall", + "syscall.PTRACE_GETEVENTMSG": "syscall", + "syscall.PTRACE_GETFPREGS": "syscall", + "syscall.PTRACE_GETFPXREGS": "syscall", + "syscall.PTRACE_GETHBPREGS": "syscall", + "syscall.PTRACE_GETREGS": "syscall", + "syscall.PTRACE_GETREGSET": "syscall", + "syscall.PTRACE_GETSIGINFO": "syscall", + "syscall.PTRACE_GETVFPREGS": "syscall", + "syscall.PTRACE_GETWMMXREGS": "syscall", + "syscall.PTRACE_GET_THREAD_AREA": "syscall", + "syscall.PTRACE_KILL": "syscall", + "syscall.PTRACE_OLDSETOPTIONS": "syscall", + "syscall.PTRACE_O_MASK": "syscall", + "syscall.PTRACE_O_TRACECLONE": "syscall", + "syscall.PTRACE_O_TRACEEXEC": "syscall", + "syscall.PTRACE_O_TRACEEXIT": "syscall", + "syscall.PTRACE_O_TRACEFORK": "syscall", + "syscall.PTRACE_O_TRACESYSGOOD": "syscall", + "syscall.PTRACE_O_TRACEVFORK": "syscall", + "syscall.PTRACE_O_TRACEVFORKDONE": "syscall", + "syscall.PTRACE_PEEKDATA": "syscall", + "syscall.PTRACE_PEEKTEXT": "syscall", + "syscall.PTRACE_PEEKUSR": "syscall", + "syscall.PTRACE_POKEDATA": "syscall", + "syscall.PTRACE_POKETEXT": "syscall", + "syscall.PTRACE_POKEUSR": "syscall", + "syscall.PTRACE_SETCRUNCHREGS": "syscall", + "syscall.PTRACE_SETFPREGS": "syscall", + "syscall.PTRACE_SETFPXREGS": "syscall", + "syscall.PTRACE_SETHBPREGS": "syscall", + "syscall.PTRACE_SETOPTIONS": "syscall", + "syscall.PTRACE_SETREGS": "syscall", + "syscall.PTRACE_SETREGSET": "syscall", + "syscall.PTRACE_SETSIGINFO": "syscall", + "syscall.PTRACE_SETVFPREGS": "syscall", + "syscall.PTRACE_SETWMMXREGS": "syscall", + "syscall.PTRACE_SET_SYSCALL": "syscall", + "syscall.PTRACE_SET_THREAD_AREA": "syscall", + "syscall.PTRACE_SINGLEBLOCK": "syscall", + "syscall.PTRACE_SINGLESTEP": "syscall", + "syscall.PTRACE_SYSCALL": "syscall", + "syscall.PTRACE_SYSEMU": "syscall", + "syscall.PTRACE_SYSEMU_SINGLESTEP": "syscall", + "syscall.PTRACE_TRACEME": "syscall", + "syscall.PT_ATTACH": "syscall", + "syscall.PT_ATTACHEXC": "syscall", + "syscall.PT_CONTINUE": "syscall", + "syscall.PT_DATA_ADDR": "syscall", + "syscall.PT_DENY_ATTACH": "syscall", + "syscall.PT_DETACH": "syscall", + "syscall.PT_FIRSTMACH": "syscall", + "syscall.PT_FORCEQUOTA": "syscall", + "syscall.PT_KILL": "syscall", + "syscall.PT_MASK": "syscall", + "syscall.PT_READ_D": "syscall", + "syscall.PT_READ_I": "syscall", + "syscall.PT_READ_U": "syscall", + "syscall.PT_SIGEXC": "syscall", + "syscall.PT_STEP": "syscall", + "syscall.PT_TEXT_ADDR": "syscall", + "syscall.PT_TEXT_END_ADDR": "syscall", + "syscall.PT_THUPDATE": "syscall", + "syscall.PT_TRACE_ME": "syscall", + "syscall.PT_WRITE_D": "syscall", + "syscall.PT_WRITE_I": "syscall", + "syscall.PT_WRITE_U": "syscall", + "syscall.ParseDirent": "syscall", + "syscall.ParseNetlinkMessage": "syscall", + "syscall.ParseNetlinkRouteAttr": "syscall", + "syscall.ParseRoutingMessage": "syscall", + "syscall.ParseRoutingSockaddr": "syscall", + "syscall.ParseSocketControlMessage": "syscall", + "syscall.ParseUnixCredentials": "syscall", + "syscall.ParseUnixRights": "syscall", + "syscall.PathMax": "syscall", + "syscall.Pathconf": "syscall", + "syscall.Pause": "syscall", + "syscall.Pipe": "syscall", + "syscall.Pipe2": "syscall", + "syscall.PivotRoot": "syscall", + "syscall.Pointer": "syscall", + "syscall.PostQueuedCompletionStatus": "syscall", + "syscall.Pread": "syscall", + "syscall.Proc": "syscall", + "syscall.ProcAttr": "syscall", + "syscall.Process32First": "syscall", + "syscall.Process32Next": "syscall", + "syscall.ProcessEntry32": "syscall", + "syscall.ProcessInformation": "syscall", + "syscall.Protoent": "syscall", + "syscall.PtraceAttach": "syscall", + "syscall.PtraceCont": "syscall", + "syscall.PtraceDetach": "syscall", + "syscall.PtraceGetEventMsg": "syscall", + "syscall.PtraceGetRegs": "syscall", + "syscall.PtracePeekData": "syscall", + "syscall.PtracePeekText": "syscall", + "syscall.PtracePokeData": "syscall", + "syscall.PtracePokeText": "syscall", + "syscall.PtraceRegs": "syscall", + "syscall.PtraceSetOptions": "syscall", + "syscall.PtraceSetRegs": "syscall", + "syscall.PtraceSingleStep": "syscall", + "syscall.PtraceSyscall": "syscall", + "syscall.Pwrite": "syscall", + "syscall.REG_BINARY": "syscall", + "syscall.REG_DWORD": "syscall", + "syscall.REG_DWORD_BIG_ENDIAN": "syscall", + "syscall.REG_DWORD_LITTLE_ENDIAN": "syscall", + "syscall.REG_EXPAND_SZ": "syscall", + "syscall.REG_FULL_RESOURCE_DESCRIPTOR": "syscall", + "syscall.REG_LINK": "syscall", + "syscall.REG_MULTI_SZ": "syscall", + "syscall.REG_NONE": "syscall", + "syscall.REG_QWORD": "syscall", + "syscall.REG_QWORD_LITTLE_ENDIAN": "syscall", + "syscall.REG_RESOURCE_LIST": "syscall", + "syscall.REG_RESOURCE_REQUIREMENTS_LIST": "syscall", + "syscall.REG_SZ": "syscall", + "syscall.RLIMIT_AS": "syscall", + "syscall.RLIMIT_CORE": "syscall", + "syscall.RLIMIT_CPU": "syscall", + "syscall.RLIMIT_DATA": "syscall", + "syscall.RLIMIT_FSIZE": "syscall", + "syscall.RLIMIT_NOFILE": "syscall", + "syscall.RLIMIT_STACK": "syscall", + "syscall.RLIM_INFINITY": "syscall", + "syscall.RTAX_ADVMSS": "syscall", + "syscall.RTAX_AUTHOR": "syscall", + "syscall.RTAX_BRD": "syscall", + "syscall.RTAX_CWND": "syscall", + "syscall.RTAX_DST": "syscall", + "syscall.RTAX_FEATURES": "syscall", + "syscall.RTAX_FEATURE_ALLFRAG": "syscall", + "syscall.RTAX_FEATURE_ECN": "syscall", + "syscall.RTAX_FEATURE_SACK": "syscall", + "syscall.RTAX_FEATURE_TIMESTAMP": "syscall", + "syscall.RTAX_GATEWAY": "syscall", + "syscall.RTAX_GENMASK": "syscall", + "syscall.RTAX_HOPLIMIT": "syscall", + "syscall.RTAX_IFA": "syscall", + "syscall.RTAX_IFP": "syscall", + "syscall.RTAX_INITCWND": "syscall", + "syscall.RTAX_INITRWND": "syscall", + "syscall.RTAX_LABEL": "syscall", + "syscall.RTAX_LOCK": "syscall", + "syscall.RTAX_MAX": "syscall", + "syscall.RTAX_MTU": "syscall", + "syscall.RTAX_NETMASK": "syscall", + "syscall.RTAX_REORDERING": "syscall", + "syscall.RTAX_RTO_MIN": "syscall", + "syscall.RTAX_RTT": "syscall", + "syscall.RTAX_RTTVAR": "syscall", + "syscall.RTAX_SRC": "syscall", + "syscall.RTAX_SRCMASK": "syscall", + "syscall.RTAX_SSTHRESH": "syscall", + "syscall.RTAX_TAG": "syscall", + "syscall.RTAX_UNSPEC": "syscall", + "syscall.RTAX_WINDOW": "syscall", + "syscall.RTA_ALIGNTO": "syscall", + "syscall.RTA_AUTHOR": "syscall", + "syscall.RTA_BRD": "syscall", + "syscall.RTA_CACHEINFO": "syscall", + "syscall.RTA_DST": "syscall", + "syscall.RTA_FLOW": "syscall", + "syscall.RTA_GATEWAY": "syscall", + "syscall.RTA_GENMASK": "syscall", + "syscall.RTA_IFA": "syscall", + "syscall.RTA_IFP": "syscall", + "syscall.RTA_IIF": "syscall", + "syscall.RTA_LABEL": "syscall", + "syscall.RTA_MAX": "syscall", + "syscall.RTA_METRICS": "syscall", + "syscall.RTA_MULTIPATH": "syscall", + "syscall.RTA_NETMASK": "syscall", + "syscall.RTA_OIF": "syscall", + "syscall.RTA_PREFSRC": "syscall", + "syscall.RTA_PRIORITY": "syscall", + "syscall.RTA_SRC": "syscall", + "syscall.RTA_SRCMASK": "syscall", + "syscall.RTA_TABLE": "syscall", + "syscall.RTA_TAG": "syscall", + "syscall.RTA_UNSPEC": "syscall", + "syscall.RTCF_DIRECTSRC": "syscall", + "syscall.RTCF_DOREDIRECT": "syscall", + "syscall.RTCF_LOG": "syscall", + "syscall.RTCF_MASQ": "syscall", + "syscall.RTCF_NAT": "syscall", + "syscall.RTCF_VALVE": "syscall", + "syscall.RTF_ADDRCLASSMASK": "syscall", + "syscall.RTF_ADDRCONF": "syscall", + "syscall.RTF_ALLONLINK": "syscall", + "syscall.RTF_ANNOUNCE": "syscall", + "syscall.RTF_BLACKHOLE": "syscall", + "syscall.RTF_BROADCAST": "syscall", + "syscall.RTF_CACHE": "syscall", + "syscall.RTF_CLONED": "syscall", + "syscall.RTF_CLONING": "syscall", + "syscall.RTF_CONDEMNED": "syscall", + "syscall.RTF_DEFAULT": "syscall", + "syscall.RTF_DELCLONE": "syscall", + "syscall.RTF_DONE": "syscall", + "syscall.RTF_DYNAMIC": "syscall", + "syscall.RTF_FLOW": "syscall", + "syscall.RTF_FMASK": "syscall", + "syscall.RTF_GATEWAY": "syscall", + "syscall.RTF_GWFLAG_COMPAT": "syscall", + "syscall.RTF_HOST": "syscall", + "syscall.RTF_IFREF": "syscall", + "syscall.RTF_IFSCOPE": "syscall", + "syscall.RTF_INTERFACE": "syscall", + "syscall.RTF_IRTT": "syscall", + "syscall.RTF_LINKRT": "syscall", + "syscall.RTF_LLDATA": "syscall", + "syscall.RTF_LLINFO": "syscall", + "syscall.RTF_LOCAL": "syscall", + "syscall.RTF_MASK": "syscall", + "syscall.RTF_MODIFIED": "syscall", + "syscall.RTF_MPATH": "syscall", + "syscall.RTF_MPLS": "syscall", + "syscall.RTF_MSS": "syscall", + "syscall.RTF_MTU": "syscall", + "syscall.RTF_MULTICAST": "syscall", + "syscall.RTF_NAT": "syscall", + "syscall.RTF_NOFORWARD": "syscall", + "syscall.RTF_NONEXTHOP": "syscall", + "syscall.RTF_NOPMTUDISC": "syscall", + "syscall.RTF_PERMANENT_ARP": "syscall", + "syscall.RTF_PINNED": "syscall", + "syscall.RTF_POLICY": "syscall", + "syscall.RTF_PRCLONING": "syscall", + "syscall.RTF_PROTO1": "syscall", + "syscall.RTF_PROTO2": "syscall", + "syscall.RTF_PROTO3": "syscall", + "syscall.RTF_REINSTATE": "syscall", + "syscall.RTF_REJECT": "syscall", + "syscall.RTF_RNH_LOCKED": "syscall", + "syscall.RTF_SOURCE": "syscall", + "syscall.RTF_SRC": "syscall", + "syscall.RTF_STATIC": "syscall", + "syscall.RTF_STICKY": "syscall", + "syscall.RTF_THROW": "syscall", + "syscall.RTF_TUNNEL": "syscall", + "syscall.RTF_UP": "syscall", + "syscall.RTF_USETRAILERS": "syscall", + "syscall.RTF_WASCLONED": "syscall", + "syscall.RTF_WINDOW": "syscall", + "syscall.RTF_XRESOLVE": "syscall", + "syscall.RTM_ADD": "syscall", + "syscall.RTM_BASE": "syscall", + "syscall.RTM_CHANGE": "syscall", + "syscall.RTM_CHGADDR": "syscall", + "syscall.RTM_DELACTION": "syscall", + "syscall.RTM_DELADDR": "syscall", + "syscall.RTM_DELADDRLABEL": "syscall", + "syscall.RTM_DELETE": "syscall", + "syscall.RTM_DELLINK": "syscall", + "syscall.RTM_DELMADDR": "syscall", + "syscall.RTM_DELNEIGH": "syscall", + "syscall.RTM_DELQDISC": "syscall", + "syscall.RTM_DELROUTE": "syscall", + "syscall.RTM_DELRULE": "syscall", + "syscall.RTM_DELTCLASS": "syscall", + "syscall.RTM_DELTFILTER": "syscall", + "syscall.RTM_DESYNC": "syscall", + "syscall.RTM_F_CLONED": "syscall", + "syscall.RTM_F_EQUALIZE": "syscall", + "syscall.RTM_F_NOTIFY": "syscall", + "syscall.RTM_F_PREFIX": "syscall", + "syscall.RTM_GET": "syscall", + "syscall.RTM_GET2": "syscall", + "syscall.RTM_GETACTION": "syscall", + "syscall.RTM_GETADDR": "syscall", + "syscall.RTM_GETADDRLABEL": "syscall", + "syscall.RTM_GETANYCAST": "syscall", + "syscall.RTM_GETDCB": "syscall", + "syscall.RTM_GETLINK": "syscall", + "syscall.RTM_GETMULTICAST": "syscall", + "syscall.RTM_GETNEIGH": "syscall", + "syscall.RTM_GETNEIGHTBL": "syscall", + "syscall.RTM_GETQDISC": "syscall", + "syscall.RTM_GETROUTE": "syscall", + "syscall.RTM_GETRULE": "syscall", + "syscall.RTM_GETTCLASS": "syscall", + "syscall.RTM_GETTFILTER": "syscall", + "syscall.RTM_IEEE80211": "syscall", + "syscall.RTM_IFANNOUNCE": "syscall", + "syscall.RTM_IFINFO": "syscall", + "syscall.RTM_IFINFO2": "syscall", + "syscall.RTM_LLINFO_UPD": "syscall", + "syscall.RTM_LOCK": "syscall", + "syscall.RTM_LOSING": "syscall", + "syscall.RTM_MAX": "syscall", + "syscall.RTM_MAXSIZE": "syscall", + "syscall.RTM_MISS": "syscall", + "syscall.RTM_NEWACTION": "syscall", + "syscall.RTM_NEWADDR": "syscall", + "syscall.RTM_NEWADDRLABEL": "syscall", + "syscall.RTM_NEWLINK": "syscall", + "syscall.RTM_NEWMADDR": "syscall", + "syscall.RTM_NEWMADDR2": "syscall", + "syscall.RTM_NEWNDUSEROPT": "syscall", + "syscall.RTM_NEWNEIGH": "syscall", + "syscall.RTM_NEWNEIGHTBL": "syscall", + "syscall.RTM_NEWPREFIX": "syscall", + "syscall.RTM_NEWQDISC": "syscall", + "syscall.RTM_NEWROUTE": "syscall", + "syscall.RTM_NEWRULE": "syscall", + "syscall.RTM_NEWTCLASS": "syscall", + "syscall.RTM_NEWTFILTER": "syscall", + "syscall.RTM_NR_FAMILIES": "syscall", + "syscall.RTM_NR_MSGTYPES": "syscall", + "syscall.RTM_OIFINFO": "syscall", + "syscall.RTM_OLDADD": "syscall", + "syscall.RTM_OLDDEL": "syscall", + "syscall.RTM_OOIFINFO": "syscall", + "syscall.RTM_REDIRECT": "syscall", + "syscall.RTM_RESOLVE": "syscall", + "syscall.RTM_RTTUNIT": "syscall", + "syscall.RTM_SETDCB": "syscall", + "syscall.RTM_SETGATE": "syscall", + "syscall.RTM_SETLINK": "syscall", + "syscall.RTM_SETNEIGHTBL": "syscall", + "syscall.RTM_VERSION": "syscall", + "syscall.RTNH_ALIGNTO": "syscall", + "syscall.RTNH_F_DEAD": "syscall", + "syscall.RTNH_F_ONLINK": "syscall", + "syscall.RTNH_F_PERVASIVE": "syscall", + "syscall.RTNLGRP_IPV4_IFADDR": "syscall", + "syscall.RTNLGRP_IPV4_MROUTE": "syscall", + "syscall.RTNLGRP_IPV4_ROUTE": "syscall", + "syscall.RTNLGRP_IPV4_RULE": "syscall", + "syscall.RTNLGRP_IPV6_IFADDR": "syscall", + "syscall.RTNLGRP_IPV6_IFINFO": "syscall", + "syscall.RTNLGRP_IPV6_MROUTE": "syscall", + "syscall.RTNLGRP_IPV6_PREFIX": "syscall", + "syscall.RTNLGRP_IPV6_ROUTE": "syscall", + "syscall.RTNLGRP_IPV6_RULE": "syscall", + "syscall.RTNLGRP_LINK": "syscall", + "syscall.RTNLGRP_ND_USEROPT": "syscall", + "syscall.RTNLGRP_NEIGH": "syscall", + "syscall.RTNLGRP_NONE": "syscall", + "syscall.RTNLGRP_NOTIFY": "syscall", + "syscall.RTNLGRP_TC": "syscall", + "syscall.RTN_ANYCAST": "syscall", + "syscall.RTN_BLACKHOLE": "syscall", + "syscall.RTN_BROADCAST": "syscall", + "syscall.RTN_LOCAL": "syscall", + "syscall.RTN_MAX": "syscall", + "syscall.RTN_MULTICAST": "syscall", + "syscall.RTN_NAT": "syscall", + "syscall.RTN_PROHIBIT": "syscall", + "syscall.RTN_THROW": "syscall", + "syscall.RTN_UNICAST": "syscall", + "syscall.RTN_UNREACHABLE": "syscall", + "syscall.RTN_UNSPEC": "syscall", + "syscall.RTN_XRESOLVE": "syscall", + "syscall.RTPROT_BIRD": "syscall", + "syscall.RTPROT_BOOT": "syscall", + "syscall.RTPROT_DHCP": "syscall", + "syscall.RTPROT_DNROUTED": "syscall", + "syscall.RTPROT_GATED": "syscall", + "syscall.RTPROT_KERNEL": "syscall", + "syscall.RTPROT_MRT": "syscall", + "syscall.RTPROT_NTK": "syscall", + "syscall.RTPROT_RA": "syscall", + "syscall.RTPROT_REDIRECT": "syscall", + "syscall.RTPROT_STATIC": "syscall", + "syscall.RTPROT_UNSPEC": "syscall", + "syscall.RTPROT_XORP": "syscall", + "syscall.RTPROT_ZEBRA": "syscall", + "syscall.RTV_EXPIRE": "syscall", + "syscall.RTV_HOPCOUNT": "syscall", + "syscall.RTV_MTU": "syscall", + "syscall.RTV_RPIPE": "syscall", + "syscall.RTV_RTT": "syscall", + "syscall.RTV_RTTVAR": "syscall", + "syscall.RTV_SPIPE": "syscall", + "syscall.RTV_SSTHRESH": "syscall", + "syscall.RTV_WEIGHT": "syscall", + "syscall.RT_CACHING_CONTEXT": "syscall", + "syscall.RT_CLASS_DEFAULT": "syscall", + "syscall.RT_CLASS_LOCAL": "syscall", + "syscall.RT_CLASS_MAIN": "syscall", + "syscall.RT_CLASS_MAX": "syscall", + "syscall.RT_CLASS_UNSPEC": "syscall", + "syscall.RT_DEFAULT_FIB": "syscall", + "syscall.RT_NORTREF": "syscall", + "syscall.RT_SCOPE_HOST": "syscall", + "syscall.RT_SCOPE_LINK": "syscall", + "syscall.RT_SCOPE_NOWHERE": "syscall", + "syscall.RT_SCOPE_SITE": "syscall", + "syscall.RT_SCOPE_UNIVERSE": "syscall", + "syscall.RT_TABLEID_MAX": "syscall", + "syscall.RT_TABLE_COMPAT": "syscall", + "syscall.RT_TABLE_DEFAULT": "syscall", + "syscall.RT_TABLE_LOCAL": "syscall", + "syscall.RT_TABLE_MAIN": "syscall", + "syscall.RT_TABLE_MAX": "syscall", + "syscall.RT_TABLE_UNSPEC": "syscall", + "syscall.RUSAGE_CHILDREN": "syscall", + "syscall.RUSAGE_SELF": "syscall", + "syscall.RUSAGE_THREAD": "syscall", + "syscall.Radvisory_t": "syscall", + "syscall.RawConn": "syscall", + "syscall.RawSockaddr": "syscall", + "syscall.RawSockaddrAny": "syscall", + "syscall.RawSockaddrDatalink": "syscall", + "syscall.RawSockaddrInet4": "syscall", + "syscall.RawSockaddrInet6": "syscall", + "syscall.RawSockaddrLinklayer": "syscall", + "syscall.RawSockaddrNetlink": "syscall", + "syscall.RawSockaddrUnix": "syscall", + "syscall.RawSyscall": "syscall", + "syscall.RawSyscall6": "syscall", + "syscall.Read": "syscall", + "syscall.ReadConsole": "syscall", + "syscall.ReadDirectoryChanges": "syscall", + "syscall.ReadDirent": "syscall", + "syscall.ReadFile": "syscall", + "syscall.Readlink": "syscall", + "syscall.Reboot": "syscall", + "syscall.Recvfrom": "syscall", + "syscall.Recvmsg": "syscall", + "syscall.RegCloseKey": "syscall", + "syscall.RegEnumKeyEx": "syscall", + "syscall.RegOpenKeyEx": "syscall", + "syscall.RegQueryInfoKey": "syscall", + "syscall.RegQueryValueEx": "syscall", + "syscall.RemoveDirectory": "syscall", + "syscall.Removexattr": "syscall", + "syscall.Rename": "syscall", + "syscall.Renameat": "syscall", + "syscall.Revoke": "syscall", + "syscall.Rlimit": "syscall", + "syscall.Rmdir": "syscall", + "syscall.RouteMessage": "syscall", + "syscall.RouteRIB": "syscall", + "syscall.RtAttr": "syscall", + "syscall.RtGenmsg": "syscall", + "syscall.RtMetrics": "syscall", + "syscall.RtMsg": "syscall", + "syscall.RtMsghdr": "syscall", + "syscall.RtNexthop": "syscall", + "syscall.Rusage": "syscall", + "syscall.SCM_BINTIME": "syscall", + "syscall.SCM_CREDENTIALS": "syscall", + "syscall.SCM_CREDS": "syscall", + "syscall.SCM_RIGHTS": "syscall", + "syscall.SCM_TIMESTAMP": "syscall", + "syscall.SCM_TIMESTAMPING": "syscall", + "syscall.SCM_TIMESTAMPNS": "syscall", + "syscall.SCM_TIMESTAMP_MONOTONIC": "syscall", + "syscall.SHUT_RD": "syscall", + "syscall.SHUT_RDWR": "syscall", + "syscall.SHUT_WR": "syscall", + "syscall.SID": "syscall", + "syscall.SIDAndAttributes": "syscall", + "syscall.SIGABRT": "syscall", + "syscall.SIGALRM": "syscall", + "syscall.SIGBUS": "syscall", + "syscall.SIGCHLD": "syscall", + "syscall.SIGCLD": "syscall", + "syscall.SIGCONT": "syscall", + "syscall.SIGEMT": "syscall", + "syscall.SIGFPE": "syscall", + "syscall.SIGHUP": "syscall", + "syscall.SIGILL": "syscall", + "syscall.SIGINFO": "syscall", + "syscall.SIGINT": "syscall", + "syscall.SIGIO": "syscall", + "syscall.SIGIOT": "syscall", + "syscall.SIGKILL": "syscall", + "syscall.SIGLIBRT": "syscall", + "syscall.SIGLWP": "syscall", + "syscall.SIGPIPE": "syscall", + "syscall.SIGPOLL": "syscall", + "syscall.SIGPROF": "syscall", + "syscall.SIGPWR": "syscall", + "syscall.SIGQUIT": "syscall", + "syscall.SIGSEGV": "syscall", + "syscall.SIGSTKFLT": "syscall", + "syscall.SIGSTOP": "syscall", + "syscall.SIGSYS": "syscall", + "syscall.SIGTERM": "syscall", + "syscall.SIGTHR": "syscall", + "syscall.SIGTRAP": "syscall", + "syscall.SIGTSTP": "syscall", + "syscall.SIGTTIN": "syscall", + "syscall.SIGTTOU": "syscall", + "syscall.SIGUNUSED": "syscall", + "syscall.SIGURG": "syscall", + "syscall.SIGUSR1": "syscall", + "syscall.SIGUSR2": "syscall", + "syscall.SIGVTALRM": "syscall", + "syscall.SIGWINCH": "syscall", + "syscall.SIGXCPU": "syscall", + "syscall.SIGXFSZ": "syscall", + "syscall.SIOCADDDLCI": "syscall", + "syscall.SIOCADDMULTI": "syscall", + "syscall.SIOCADDRT": "syscall", + "syscall.SIOCAIFADDR": "syscall", + "syscall.SIOCAIFGROUP": "syscall", + "syscall.SIOCALIFADDR": "syscall", + "syscall.SIOCARPIPLL": "syscall", + "syscall.SIOCATMARK": "syscall", + "syscall.SIOCAUTOADDR": "syscall", + "syscall.SIOCAUTONETMASK": "syscall", + "syscall.SIOCBRDGADD": "syscall", + "syscall.SIOCBRDGADDS": "syscall", + "syscall.SIOCBRDGARL": "syscall", + "syscall.SIOCBRDGDADDR": "syscall", + "syscall.SIOCBRDGDEL": "syscall", + "syscall.SIOCBRDGDELS": "syscall", + "syscall.SIOCBRDGFLUSH": "syscall", + "syscall.SIOCBRDGFRL": "syscall", + "syscall.SIOCBRDGGCACHE": "syscall", + "syscall.SIOCBRDGGFD": "syscall", + "syscall.SIOCBRDGGHT": "syscall", + "syscall.SIOCBRDGGIFFLGS": "syscall", + "syscall.SIOCBRDGGMA": "syscall", + "syscall.SIOCBRDGGPARAM": "syscall", + "syscall.SIOCBRDGGPRI": "syscall", + "syscall.SIOCBRDGGRL": "syscall", + "syscall.SIOCBRDGGSIFS": "syscall", + "syscall.SIOCBRDGGTO": "syscall", + "syscall.SIOCBRDGIFS": "syscall", + "syscall.SIOCBRDGRTS": "syscall", + "syscall.SIOCBRDGSADDR": "syscall", + "syscall.SIOCBRDGSCACHE": "syscall", + "syscall.SIOCBRDGSFD": "syscall", + "syscall.SIOCBRDGSHT": "syscall", + "syscall.SIOCBRDGSIFCOST": "syscall", + "syscall.SIOCBRDGSIFFLGS": "syscall", + "syscall.SIOCBRDGSIFPRIO": "syscall", + "syscall.SIOCBRDGSMA": "syscall", + "syscall.SIOCBRDGSPRI": "syscall", + "syscall.SIOCBRDGSPROTO": "syscall", + "syscall.SIOCBRDGSTO": "syscall", + "syscall.SIOCBRDGSTXHC": "syscall", + "syscall.SIOCDARP": "syscall", + "syscall.SIOCDELDLCI": "syscall", + "syscall.SIOCDELMULTI": "syscall", + "syscall.SIOCDELRT": "syscall", + "syscall.SIOCDEVPRIVATE": "syscall", + "syscall.SIOCDIFADDR": "syscall", + "syscall.SIOCDIFGROUP": "syscall", + "syscall.SIOCDIFPHYADDR": "syscall", + "syscall.SIOCDLIFADDR": "syscall", + "syscall.SIOCDRARP": "syscall", + "syscall.SIOCGARP": "syscall", + "syscall.SIOCGDRVSPEC": "syscall", + "syscall.SIOCGETKALIVE": "syscall", + "syscall.SIOCGETLABEL": "syscall", + "syscall.SIOCGETPFLOW": "syscall", + "syscall.SIOCGETPFSYNC": "syscall", + "syscall.SIOCGETSGCNT": "syscall", + "syscall.SIOCGETVIFCNT": "syscall", + "syscall.SIOCGETVLAN": "syscall", + "syscall.SIOCGHIWAT": "syscall", + "syscall.SIOCGIFADDR": "syscall", + "syscall.SIOCGIFADDRPREF": "syscall", + "syscall.SIOCGIFALIAS": "syscall", + "syscall.SIOCGIFALTMTU": "syscall", + "syscall.SIOCGIFASYNCMAP": "syscall", + "syscall.SIOCGIFBOND": "syscall", + "syscall.SIOCGIFBR": "syscall", + "syscall.SIOCGIFBRDADDR": "syscall", + "syscall.SIOCGIFCAP": "syscall", + "syscall.SIOCGIFCONF": "syscall", + "syscall.SIOCGIFCOUNT": "syscall", + "syscall.SIOCGIFDATA": "syscall", + "syscall.SIOCGIFDESCR": "syscall", + "syscall.SIOCGIFDEVMTU": "syscall", + "syscall.SIOCGIFDLT": "syscall", + "syscall.SIOCGIFDSTADDR": "syscall", + "syscall.SIOCGIFENCAP": "syscall", + "syscall.SIOCGIFFIB": "syscall", + "syscall.SIOCGIFFLAGS": "syscall", + "syscall.SIOCGIFGATTR": "syscall", + "syscall.SIOCGIFGENERIC": "syscall", + "syscall.SIOCGIFGMEMB": "syscall", + "syscall.SIOCGIFGROUP": "syscall", + "syscall.SIOCGIFHARDMTU": "syscall", + "syscall.SIOCGIFHWADDR": "syscall", + "syscall.SIOCGIFINDEX": "syscall", + "syscall.SIOCGIFKPI": "syscall", + "syscall.SIOCGIFMAC": "syscall", + "syscall.SIOCGIFMAP": "syscall", + "syscall.SIOCGIFMEDIA": "syscall", + "syscall.SIOCGIFMEM": "syscall", + "syscall.SIOCGIFMETRIC": "syscall", + "syscall.SIOCGIFMTU": "syscall", + "syscall.SIOCGIFNAME": "syscall", + "syscall.SIOCGIFNETMASK": "syscall", + "syscall.SIOCGIFPDSTADDR": "syscall", + "syscall.SIOCGIFPFLAGS": "syscall", + "syscall.SIOCGIFPHYS": "syscall", + "syscall.SIOCGIFPRIORITY": "syscall", + "syscall.SIOCGIFPSRCADDR": "syscall", + "syscall.SIOCGIFRDOMAIN": "syscall", + "syscall.SIOCGIFRTLABEL": "syscall", + "syscall.SIOCGIFSLAVE": "syscall", + "syscall.SIOCGIFSTATUS": "syscall", + "syscall.SIOCGIFTIMESLOT": "syscall", + "syscall.SIOCGIFTXQLEN": "syscall", + "syscall.SIOCGIFVLAN": "syscall", + "syscall.SIOCGIFWAKEFLAGS": "syscall", + "syscall.SIOCGIFXFLAGS": "syscall", + "syscall.SIOCGLIFADDR": "syscall", + "syscall.SIOCGLIFPHYADDR": "syscall", + "syscall.SIOCGLIFPHYRTABLE": "syscall", + "syscall.SIOCGLIFPHYTTL": "syscall", + "syscall.SIOCGLINKSTR": "syscall", + "syscall.SIOCGLOWAT": "syscall", + "syscall.SIOCGPGRP": "syscall", + "syscall.SIOCGPRIVATE_0": "syscall", + "syscall.SIOCGPRIVATE_1": "syscall", + "syscall.SIOCGRARP": "syscall", + "syscall.SIOCGSPPPPARAMS": "syscall", + "syscall.SIOCGSTAMP": "syscall", + "syscall.SIOCGSTAMPNS": "syscall", + "syscall.SIOCGVH": "syscall", + "syscall.SIOCGVNETID": "syscall", + "syscall.SIOCIFCREATE": "syscall", + "syscall.SIOCIFCREATE2": "syscall", + "syscall.SIOCIFDESTROY": "syscall", + "syscall.SIOCIFGCLONERS": "syscall", + "syscall.SIOCINITIFADDR": "syscall", + "syscall.SIOCPROTOPRIVATE": "syscall", + "syscall.SIOCRSLVMULTI": "syscall", + "syscall.SIOCRTMSG": "syscall", + "syscall.SIOCSARP": "syscall", + "syscall.SIOCSDRVSPEC": "syscall", + "syscall.SIOCSETKALIVE": "syscall", + "syscall.SIOCSETLABEL": "syscall", + "syscall.SIOCSETPFLOW": "syscall", + "syscall.SIOCSETPFSYNC": "syscall", + "syscall.SIOCSETVLAN": "syscall", + "syscall.SIOCSHIWAT": "syscall", + "syscall.SIOCSIFADDR": "syscall", + "syscall.SIOCSIFADDRPREF": "syscall", + "syscall.SIOCSIFALTMTU": "syscall", + "syscall.SIOCSIFASYNCMAP": "syscall", + "syscall.SIOCSIFBOND": "syscall", + "syscall.SIOCSIFBR": "syscall", + "syscall.SIOCSIFBRDADDR": "syscall", + "syscall.SIOCSIFCAP": "syscall", + "syscall.SIOCSIFDESCR": "syscall", + "syscall.SIOCSIFDSTADDR": "syscall", + "syscall.SIOCSIFENCAP": "syscall", + "syscall.SIOCSIFFIB": "syscall", + "syscall.SIOCSIFFLAGS": "syscall", + "syscall.SIOCSIFGATTR": "syscall", + "syscall.SIOCSIFGENERIC": "syscall", + "syscall.SIOCSIFHWADDR": "syscall", + "syscall.SIOCSIFHWBROADCAST": "syscall", + "syscall.SIOCSIFKPI": "syscall", + "syscall.SIOCSIFLINK": "syscall", + "syscall.SIOCSIFLLADDR": "syscall", + "syscall.SIOCSIFMAC": "syscall", + "syscall.SIOCSIFMAP": "syscall", + "syscall.SIOCSIFMEDIA": "syscall", + "syscall.SIOCSIFMEM": "syscall", + "syscall.SIOCSIFMETRIC": "syscall", + "syscall.SIOCSIFMTU": "syscall", + "syscall.SIOCSIFNAME": "syscall", + "syscall.SIOCSIFNETMASK": "syscall", + "syscall.SIOCSIFPFLAGS": "syscall", + "syscall.SIOCSIFPHYADDR": "syscall", + "syscall.SIOCSIFPHYS": "syscall", + "syscall.SIOCSIFPRIORITY": "syscall", + "syscall.SIOCSIFRDOMAIN": "syscall", + "syscall.SIOCSIFRTLABEL": "syscall", + "syscall.SIOCSIFRVNET": "syscall", + "syscall.SIOCSIFSLAVE": "syscall", + "syscall.SIOCSIFTIMESLOT": "syscall", + "syscall.SIOCSIFTXQLEN": "syscall", + "syscall.SIOCSIFVLAN": "syscall", + "syscall.SIOCSIFVNET": "syscall", + "syscall.SIOCSIFXFLAGS": "syscall", + "syscall.SIOCSLIFPHYADDR": "syscall", + "syscall.SIOCSLIFPHYRTABLE": "syscall", + "syscall.SIOCSLIFPHYTTL": "syscall", + "syscall.SIOCSLINKSTR": "syscall", + "syscall.SIOCSLOWAT": "syscall", + "syscall.SIOCSPGRP": "syscall", + "syscall.SIOCSRARP": "syscall", + "syscall.SIOCSSPPPPARAMS": "syscall", + "syscall.SIOCSVH": "syscall", + "syscall.SIOCSVNETID": "syscall", + "syscall.SIOCZIFDATA": "syscall", + "syscall.SIO_GET_EXTENSION_FUNCTION_POINTER": "syscall", + "syscall.SIO_GET_INTERFACE_LIST": "syscall", + "syscall.SIO_KEEPALIVE_VALS": "syscall", + "syscall.SIO_UDP_CONNRESET": "syscall", + "syscall.SOCK_CLOEXEC": "syscall", + "syscall.SOCK_DCCP": "syscall", + "syscall.SOCK_DGRAM": "syscall", + "syscall.SOCK_FLAGS_MASK": "syscall", + "syscall.SOCK_MAXADDRLEN": "syscall", + "syscall.SOCK_NONBLOCK": "syscall", + "syscall.SOCK_NOSIGPIPE": "syscall", + "syscall.SOCK_PACKET": "syscall", + "syscall.SOCK_RAW": "syscall", + "syscall.SOCK_RDM": "syscall", + "syscall.SOCK_SEQPACKET": "syscall", + "syscall.SOCK_STREAM": "syscall", + "syscall.SOL_AAL": "syscall", + "syscall.SOL_ATM": "syscall", + "syscall.SOL_DECNET": "syscall", + "syscall.SOL_ICMPV6": "syscall", + "syscall.SOL_IP": "syscall", + "syscall.SOL_IPV6": "syscall", + "syscall.SOL_IRDA": "syscall", + "syscall.SOL_PACKET": "syscall", + "syscall.SOL_RAW": "syscall", + "syscall.SOL_SOCKET": "syscall", + "syscall.SOL_TCP": "syscall", + "syscall.SOL_X25": "syscall", + "syscall.SOMAXCONN": "syscall", + "syscall.SO_ACCEPTCONN": "syscall", + "syscall.SO_ACCEPTFILTER": "syscall", + "syscall.SO_ATTACH_FILTER": "syscall", + "syscall.SO_BINDANY": "syscall", + "syscall.SO_BINDTODEVICE": "syscall", + "syscall.SO_BINTIME": "syscall", + "syscall.SO_BROADCAST": "syscall", + "syscall.SO_BSDCOMPAT": "syscall", + "syscall.SO_DEBUG": "syscall", + "syscall.SO_DETACH_FILTER": "syscall", + "syscall.SO_DOMAIN": "syscall", + "syscall.SO_DONTROUTE": "syscall", + "syscall.SO_DONTTRUNC": "syscall", + "syscall.SO_ERROR": "syscall", + "syscall.SO_KEEPALIVE": "syscall", + "syscall.SO_LABEL": "syscall", + "syscall.SO_LINGER": "syscall", + "syscall.SO_LINGER_SEC": "syscall", + "syscall.SO_LISTENINCQLEN": "syscall", + "syscall.SO_LISTENQLEN": "syscall", + "syscall.SO_LISTENQLIMIT": "syscall", + "syscall.SO_MARK": "syscall", + "syscall.SO_NETPROC": "syscall", + "syscall.SO_NKE": "syscall", + "syscall.SO_NOADDRERR": "syscall", + "syscall.SO_NOHEADER": "syscall", + "syscall.SO_NOSIGPIPE": "syscall", + "syscall.SO_NOTIFYCONFLICT": "syscall", + "syscall.SO_NO_CHECK": "syscall", + "syscall.SO_NO_DDP": "syscall", + "syscall.SO_NO_OFFLOAD": "syscall", + "syscall.SO_NP_EXTENSIONS": "syscall", + "syscall.SO_NREAD": "syscall", + "syscall.SO_NWRITE": "syscall", + "syscall.SO_OOBINLINE": "syscall", + "syscall.SO_OVERFLOWED": "syscall", + "syscall.SO_PASSCRED": "syscall", + "syscall.SO_PASSSEC": "syscall", + "syscall.SO_PEERCRED": "syscall", + "syscall.SO_PEERLABEL": "syscall", + "syscall.SO_PEERNAME": "syscall", + "syscall.SO_PEERSEC": "syscall", + "syscall.SO_PRIORITY": "syscall", + "syscall.SO_PROTOCOL": "syscall", + "syscall.SO_PROTOTYPE": "syscall", + "syscall.SO_RANDOMPORT": "syscall", + "syscall.SO_RCVBUF": "syscall", + "syscall.SO_RCVBUFFORCE": "syscall", + "syscall.SO_RCVLOWAT": "syscall", + "syscall.SO_RCVTIMEO": "syscall", + "syscall.SO_RESTRICTIONS": "syscall", + "syscall.SO_RESTRICT_DENYIN": "syscall", + "syscall.SO_RESTRICT_DENYOUT": "syscall", + "syscall.SO_RESTRICT_DENYSET": "syscall", + "syscall.SO_REUSEADDR": "syscall", + "syscall.SO_REUSEPORT": "syscall", + "syscall.SO_REUSESHAREUID": "syscall", + "syscall.SO_RTABLE": "syscall", + "syscall.SO_RXQ_OVFL": "syscall", + "syscall.SO_SECURITY_AUTHENTICATION": "syscall", + "syscall.SO_SECURITY_ENCRYPTION_NETWORK": "syscall", + "syscall.SO_SECURITY_ENCRYPTION_TRANSPORT": "syscall", + "syscall.SO_SETFIB": "syscall", + "syscall.SO_SNDBUF": "syscall", + "syscall.SO_SNDBUFFORCE": "syscall", + "syscall.SO_SNDLOWAT": "syscall", + "syscall.SO_SNDTIMEO": "syscall", + "syscall.SO_SPLICE": "syscall", + "syscall.SO_TIMESTAMP": "syscall", + "syscall.SO_TIMESTAMPING": "syscall", + "syscall.SO_TIMESTAMPNS": "syscall", + "syscall.SO_TIMESTAMP_MONOTONIC": "syscall", + "syscall.SO_TYPE": "syscall", + "syscall.SO_UPCALLCLOSEWAIT": "syscall", + "syscall.SO_UPDATE_ACCEPT_CONTEXT": "syscall", + "syscall.SO_UPDATE_CONNECT_CONTEXT": "syscall", + "syscall.SO_USELOOPBACK": "syscall", + "syscall.SO_USER_COOKIE": "syscall", + "syscall.SO_VENDOR": "syscall", + "syscall.SO_WANTMORE": "syscall", + "syscall.SO_WANTOOBFLAG": "syscall", + "syscall.SSLExtraCertChainPolicyPara": "syscall", + "syscall.STANDARD_RIGHTS_ALL": "syscall", + "syscall.STANDARD_RIGHTS_EXECUTE": "syscall", + "syscall.STANDARD_RIGHTS_READ": "syscall", + "syscall.STANDARD_RIGHTS_REQUIRED": "syscall", + "syscall.STANDARD_RIGHTS_WRITE": "syscall", + "syscall.STARTF_USESHOWWINDOW": "syscall", + "syscall.STARTF_USESTDHANDLES": "syscall", + "syscall.STD_ERROR_HANDLE": "syscall", + "syscall.STD_INPUT_HANDLE": "syscall", + "syscall.STD_OUTPUT_HANDLE": "syscall", + "syscall.SUBLANG_ENGLISH_US": "syscall", + "syscall.SW_FORCEMINIMIZE": "syscall", + "syscall.SW_HIDE": "syscall", + "syscall.SW_MAXIMIZE": "syscall", + "syscall.SW_MINIMIZE": "syscall", + "syscall.SW_NORMAL": "syscall", + "syscall.SW_RESTORE": "syscall", + "syscall.SW_SHOW": "syscall", + "syscall.SW_SHOWDEFAULT": "syscall", + "syscall.SW_SHOWMAXIMIZED": "syscall", + "syscall.SW_SHOWMINIMIZED": "syscall", + "syscall.SW_SHOWMINNOACTIVE": "syscall", + "syscall.SW_SHOWNA": "syscall", + "syscall.SW_SHOWNOACTIVATE": "syscall", + "syscall.SW_SHOWNORMAL": "syscall", + "syscall.SYMBOLIC_LINK_FLAG_DIRECTORY": "syscall", + "syscall.SYNCHRONIZE": "syscall", + "syscall.SYSCTL_VERSION": "syscall", + "syscall.SYSCTL_VERS_0": "syscall", + "syscall.SYSCTL_VERS_1": "syscall", + "syscall.SYSCTL_VERS_MASK": "syscall", + "syscall.SYS_ABORT2": "syscall", + "syscall.SYS_ACCEPT": "syscall", + "syscall.SYS_ACCEPT4": "syscall", + "syscall.SYS_ACCEPT_NOCANCEL": "syscall", + "syscall.SYS_ACCESS": "syscall", + "syscall.SYS_ACCESS_EXTENDED": "syscall", + "syscall.SYS_ACCT": "syscall", + "syscall.SYS_ADD_KEY": "syscall", + "syscall.SYS_ADD_PROFIL": "syscall", + "syscall.SYS_ADJFREQ": "syscall", + "syscall.SYS_ADJTIME": "syscall", + "syscall.SYS_ADJTIMEX": "syscall", + "syscall.SYS_AFS_SYSCALL": "syscall", + "syscall.SYS_AIO_CANCEL": "syscall", + "syscall.SYS_AIO_ERROR": "syscall", + "syscall.SYS_AIO_FSYNC": "syscall", + "syscall.SYS_AIO_READ": "syscall", + "syscall.SYS_AIO_RETURN": "syscall", + "syscall.SYS_AIO_SUSPEND": "syscall", + "syscall.SYS_AIO_SUSPEND_NOCANCEL": "syscall", + "syscall.SYS_AIO_WRITE": "syscall", + "syscall.SYS_ALARM": "syscall", + "syscall.SYS_ARCH_PRCTL": "syscall", + "syscall.SYS_ARM_FADVISE64_64": "syscall", + "syscall.SYS_ARM_SYNC_FILE_RANGE": "syscall", + "syscall.SYS_ATGETMSG": "syscall", + "syscall.SYS_ATPGETREQ": "syscall", + "syscall.SYS_ATPGETRSP": "syscall", + "syscall.SYS_ATPSNDREQ": "syscall", + "syscall.SYS_ATPSNDRSP": "syscall", + "syscall.SYS_ATPUTMSG": "syscall", + "syscall.SYS_ATSOCKET": "syscall", + "syscall.SYS_AUDIT": "syscall", + "syscall.SYS_AUDITCTL": "syscall", + "syscall.SYS_AUDITON": "syscall", + "syscall.SYS_AUDIT_SESSION_JOIN": "syscall", + "syscall.SYS_AUDIT_SESSION_PORT": "syscall", + "syscall.SYS_AUDIT_SESSION_SELF": "syscall", + "syscall.SYS_BDFLUSH": "syscall", + "syscall.SYS_BIND": "syscall", + "syscall.SYS_BINDAT": "syscall", + "syscall.SYS_BREAK": "syscall", + "syscall.SYS_BRK": "syscall", + "syscall.SYS_BSDTHREAD_CREATE": "syscall", + "syscall.SYS_BSDTHREAD_REGISTER": "syscall", + "syscall.SYS_BSDTHREAD_TERMINATE": "syscall", + "syscall.SYS_CAPGET": "syscall", + "syscall.SYS_CAPSET": "syscall", + "syscall.SYS_CAP_ENTER": "syscall", + "syscall.SYS_CAP_FCNTLS_GET": "syscall", + "syscall.SYS_CAP_FCNTLS_LIMIT": "syscall", + "syscall.SYS_CAP_GETMODE": "syscall", + "syscall.SYS_CAP_GETRIGHTS": "syscall", + "syscall.SYS_CAP_IOCTLS_GET": "syscall", + "syscall.SYS_CAP_IOCTLS_LIMIT": "syscall", + "syscall.SYS_CAP_NEW": "syscall", + "syscall.SYS_CAP_RIGHTS_GET": "syscall", + "syscall.SYS_CAP_RIGHTS_LIMIT": "syscall", + "syscall.SYS_CHDIR": "syscall", + "syscall.SYS_CHFLAGS": "syscall", + "syscall.SYS_CHFLAGSAT": "syscall", + "syscall.SYS_CHMOD": "syscall", + "syscall.SYS_CHMOD_EXTENDED": "syscall", + "syscall.SYS_CHOWN": "syscall", + "syscall.SYS_CHOWN32": "syscall", + "syscall.SYS_CHROOT": "syscall", + "syscall.SYS_CHUD": "syscall", + "syscall.SYS_CLOCK_ADJTIME": "syscall", + "syscall.SYS_CLOCK_GETCPUCLOCKID2": "syscall", + "syscall.SYS_CLOCK_GETRES": "syscall", + "syscall.SYS_CLOCK_GETTIME": "syscall", + "syscall.SYS_CLOCK_NANOSLEEP": "syscall", + "syscall.SYS_CLOCK_SETTIME": "syscall", + "syscall.SYS_CLONE": "syscall", + "syscall.SYS_CLOSE": "syscall", + "syscall.SYS_CLOSEFROM": "syscall", + "syscall.SYS_CLOSE_NOCANCEL": "syscall", + "syscall.SYS_CONNECT": "syscall", + "syscall.SYS_CONNECTAT": "syscall", + "syscall.SYS_CONNECT_NOCANCEL": "syscall", + "syscall.SYS_COPYFILE": "syscall", + "syscall.SYS_CPUSET": "syscall", + "syscall.SYS_CPUSET_GETAFFINITY": "syscall", + "syscall.SYS_CPUSET_GETID": "syscall", + "syscall.SYS_CPUSET_SETAFFINITY": "syscall", + "syscall.SYS_CPUSET_SETID": "syscall", + "syscall.SYS_CREAT": "syscall", + "syscall.SYS_CREATE_MODULE": "syscall", + "syscall.SYS_CSOPS": "syscall", + "syscall.SYS_DELETE": "syscall", + "syscall.SYS_DELETE_MODULE": "syscall", + "syscall.SYS_DUP": "syscall", + "syscall.SYS_DUP2": "syscall", + "syscall.SYS_DUP3": "syscall", + "syscall.SYS_EACCESS": "syscall", + "syscall.SYS_EPOLL_CREATE": "syscall", + "syscall.SYS_EPOLL_CREATE1": "syscall", + "syscall.SYS_EPOLL_CTL": "syscall", + "syscall.SYS_EPOLL_CTL_OLD": "syscall", + "syscall.SYS_EPOLL_PWAIT": "syscall", + "syscall.SYS_EPOLL_WAIT": "syscall", + "syscall.SYS_EPOLL_WAIT_OLD": "syscall", + "syscall.SYS_EVENTFD": "syscall", + "syscall.SYS_EVENTFD2": "syscall", + "syscall.SYS_EXCHANGEDATA": "syscall", + "syscall.SYS_EXECVE": "syscall", + "syscall.SYS_EXIT": "syscall", + "syscall.SYS_EXIT_GROUP": "syscall", + "syscall.SYS_EXTATTRCTL": "syscall", + "syscall.SYS_EXTATTR_DELETE_FD": "syscall", + "syscall.SYS_EXTATTR_DELETE_FILE": "syscall", + "syscall.SYS_EXTATTR_DELETE_LINK": "syscall", + "syscall.SYS_EXTATTR_GET_FD": "syscall", + "syscall.SYS_EXTATTR_GET_FILE": "syscall", + "syscall.SYS_EXTATTR_GET_LINK": "syscall", + "syscall.SYS_EXTATTR_LIST_FD": "syscall", + "syscall.SYS_EXTATTR_LIST_FILE": "syscall", + "syscall.SYS_EXTATTR_LIST_LINK": "syscall", + "syscall.SYS_EXTATTR_SET_FD": "syscall", + "syscall.SYS_EXTATTR_SET_FILE": "syscall", + "syscall.SYS_EXTATTR_SET_LINK": "syscall", + "syscall.SYS_FACCESSAT": "syscall", + "syscall.SYS_FADVISE64": "syscall", + "syscall.SYS_FADVISE64_64": "syscall", + "syscall.SYS_FALLOCATE": "syscall", + "syscall.SYS_FANOTIFY_INIT": "syscall", + "syscall.SYS_FANOTIFY_MARK": "syscall", + "syscall.SYS_FCHDIR": "syscall", + "syscall.SYS_FCHFLAGS": "syscall", + "syscall.SYS_FCHMOD": "syscall", + "syscall.SYS_FCHMODAT": "syscall", + "syscall.SYS_FCHMOD_EXTENDED": "syscall", + "syscall.SYS_FCHOWN": "syscall", + "syscall.SYS_FCHOWN32": "syscall", + "syscall.SYS_FCHOWNAT": "syscall", + "syscall.SYS_FCHROOT": "syscall", + "syscall.SYS_FCNTL": "syscall", + "syscall.SYS_FCNTL64": "syscall", + "syscall.SYS_FCNTL_NOCANCEL": "syscall", + "syscall.SYS_FDATASYNC": "syscall", + "syscall.SYS_FEXECVE": "syscall", + "syscall.SYS_FFCLOCK_GETCOUNTER": "syscall", + "syscall.SYS_FFCLOCK_GETESTIMATE": "syscall", + "syscall.SYS_FFCLOCK_SETESTIMATE": "syscall", + "syscall.SYS_FFSCTL": "syscall", + "syscall.SYS_FGETATTRLIST": "syscall", + "syscall.SYS_FGETXATTR": "syscall", + "syscall.SYS_FHOPEN": "syscall", + "syscall.SYS_FHSTAT": "syscall", + "syscall.SYS_FHSTATFS": "syscall", + "syscall.SYS_FILEPORT_MAKEFD": "syscall", + "syscall.SYS_FILEPORT_MAKEPORT": "syscall", + "syscall.SYS_FKTRACE": "syscall", + "syscall.SYS_FLISTXATTR": "syscall", + "syscall.SYS_FLOCK": "syscall", + "syscall.SYS_FORK": "syscall", + "syscall.SYS_FPATHCONF": "syscall", + "syscall.SYS_FREEBSD6_FTRUNCATE": "syscall", + "syscall.SYS_FREEBSD6_LSEEK": "syscall", + "syscall.SYS_FREEBSD6_MMAP": "syscall", + "syscall.SYS_FREEBSD6_PREAD": "syscall", + "syscall.SYS_FREEBSD6_PWRITE": "syscall", + "syscall.SYS_FREEBSD6_TRUNCATE": "syscall", + "syscall.SYS_FREMOVEXATTR": "syscall", + "syscall.SYS_FSCTL": "syscall", + "syscall.SYS_FSETATTRLIST": "syscall", + "syscall.SYS_FSETXATTR": "syscall", + "syscall.SYS_FSGETPATH": "syscall", + "syscall.SYS_FSTAT": "syscall", + "syscall.SYS_FSTAT64": "syscall", + "syscall.SYS_FSTAT64_EXTENDED": "syscall", + "syscall.SYS_FSTATAT": "syscall", + "syscall.SYS_FSTATAT64": "syscall", + "syscall.SYS_FSTATFS": "syscall", + "syscall.SYS_FSTATFS64": "syscall", + "syscall.SYS_FSTATV": "syscall", + "syscall.SYS_FSTATVFS1": "syscall", + "syscall.SYS_FSTAT_EXTENDED": "syscall", + "syscall.SYS_FSYNC": "syscall", + "syscall.SYS_FSYNC_NOCANCEL": "syscall", + "syscall.SYS_FSYNC_RANGE": "syscall", + "syscall.SYS_FTIME": "syscall", + "syscall.SYS_FTRUNCATE": "syscall", + "syscall.SYS_FTRUNCATE64": "syscall", + "syscall.SYS_FUTEX": "syscall", + "syscall.SYS_FUTIMENS": "syscall", + "syscall.SYS_FUTIMES": "syscall", + "syscall.SYS_FUTIMESAT": "syscall", + "syscall.SYS_GETATTRLIST": "syscall", + "syscall.SYS_GETAUDIT": "syscall", + "syscall.SYS_GETAUDIT_ADDR": "syscall", + "syscall.SYS_GETAUID": "syscall", + "syscall.SYS_GETCONTEXT": "syscall", + "syscall.SYS_GETCPU": "syscall", + "syscall.SYS_GETCWD": "syscall", + "syscall.SYS_GETDENTS": "syscall", + "syscall.SYS_GETDENTS64": "syscall", + "syscall.SYS_GETDIRENTRIES": "syscall", + "syscall.SYS_GETDIRENTRIES64": "syscall", + "syscall.SYS_GETDIRENTRIESATTR": "syscall", + "syscall.SYS_GETDTABLECOUNT": "syscall", + "syscall.SYS_GETDTABLESIZE": "syscall", + "syscall.SYS_GETEGID": "syscall", + "syscall.SYS_GETEGID32": "syscall", + "syscall.SYS_GETEUID": "syscall", + "syscall.SYS_GETEUID32": "syscall", + "syscall.SYS_GETFH": "syscall", + "syscall.SYS_GETFSSTAT": "syscall", + "syscall.SYS_GETFSSTAT64": "syscall", + "syscall.SYS_GETGID": "syscall", + "syscall.SYS_GETGID32": "syscall", + "syscall.SYS_GETGROUPS": "syscall", + "syscall.SYS_GETGROUPS32": "syscall", + "syscall.SYS_GETHOSTUUID": "syscall", + "syscall.SYS_GETITIMER": "syscall", + "syscall.SYS_GETLCID": "syscall", + "syscall.SYS_GETLOGIN": "syscall", + "syscall.SYS_GETLOGINCLASS": "syscall", + "syscall.SYS_GETPEERNAME": "syscall", + "syscall.SYS_GETPGID": "syscall", + "syscall.SYS_GETPGRP": "syscall", + "syscall.SYS_GETPID": "syscall", + "syscall.SYS_GETPMSG": "syscall", + "syscall.SYS_GETPPID": "syscall", + "syscall.SYS_GETPRIORITY": "syscall", + "syscall.SYS_GETRESGID": "syscall", + "syscall.SYS_GETRESGID32": "syscall", + "syscall.SYS_GETRESUID": "syscall", + "syscall.SYS_GETRESUID32": "syscall", + "syscall.SYS_GETRLIMIT": "syscall", + "syscall.SYS_GETRTABLE": "syscall", + "syscall.SYS_GETRUSAGE": "syscall", + "syscall.SYS_GETSGROUPS": "syscall", + "syscall.SYS_GETSID": "syscall", + "syscall.SYS_GETSOCKNAME": "syscall", + "syscall.SYS_GETSOCKOPT": "syscall", + "syscall.SYS_GETTHRID": "syscall", + "syscall.SYS_GETTID": "syscall", + "syscall.SYS_GETTIMEOFDAY": "syscall", + "syscall.SYS_GETUID": "syscall", + "syscall.SYS_GETUID32": "syscall", + "syscall.SYS_GETVFSSTAT": "syscall", + "syscall.SYS_GETWGROUPS": "syscall", + "syscall.SYS_GETXATTR": "syscall", + "syscall.SYS_GET_KERNEL_SYMS": "syscall", + "syscall.SYS_GET_MEMPOLICY": "syscall", + "syscall.SYS_GET_ROBUST_LIST": "syscall", + "syscall.SYS_GET_THREAD_AREA": "syscall", + "syscall.SYS_GTTY": "syscall", + "syscall.SYS_IDENTITYSVC": "syscall", + "syscall.SYS_IDLE": "syscall", + "syscall.SYS_INITGROUPS": "syscall", + "syscall.SYS_INIT_MODULE": "syscall", + "syscall.SYS_INOTIFY_ADD_WATCH": "syscall", + "syscall.SYS_INOTIFY_INIT": "syscall", + "syscall.SYS_INOTIFY_INIT1": "syscall", + "syscall.SYS_INOTIFY_RM_WATCH": "syscall", + "syscall.SYS_IOCTL": "syscall", + "syscall.SYS_IOPERM": "syscall", + "syscall.SYS_IOPL": "syscall", + "syscall.SYS_IOPOLICYSYS": "syscall", + "syscall.SYS_IOPRIO_GET": "syscall", + "syscall.SYS_IOPRIO_SET": "syscall", + "syscall.SYS_IO_CANCEL": "syscall", + "syscall.SYS_IO_DESTROY": "syscall", + "syscall.SYS_IO_GETEVENTS": "syscall", + "syscall.SYS_IO_SETUP": "syscall", + "syscall.SYS_IO_SUBMIT": "syscall", + "syscall.SYS_IPC": "syscall", + "syscall.SYS_ISSETUGID": "syscall", + "syscall.SYS_JAIL": "syscall", + "syscall.SYS_JAIL_ATTACH": "syscall", + "syscall.SYS_JAIL_GET": "syscall", + "syscall.SYS_JAIL_REMOVE": "syscall", + "syscall.SYS_JAIL_SET": "syscall", + "syscall.SYS_KDEBUG_TRACE": "syscall", + "syscall.SYS_KENV": "syscall", + "syscall.SYS_KEVENT": "syscall", + "syscall.SYS_KEVENT64": "syscall", + "syscall.SYS_KEXEC_LOAD": "syscall", + "syscall.SYS_KEYCTL": "syscall", + "syscall.SYS_KILL": "syscall", + "syscall.SYS_KLDFIND": "syscall", + "syscall.SYS_KLDFIRSTMOD": "syscall", + "syscall.SYS_KLDLOAD": "syscall", + "syscall.SYS_KLDNEXT": "syscall", + "syscall.SYS_KLDSTAT": "syscall", + "syscall.SYS_KLDSYM": "syscall", + "syscall.SYS_KLDUNLOAD": "syscall", + "syscall.SYS_KLDUNLOADF": "syscall", + "syscall.SYS_KQUEUE": "syscall", + "syscall.SYS_KQUEUE1": "syscall", + "syscall.SYS_KTIMER_CREATE": "syscall", + "syscall.SYS_KTIMER_DELETE": "syscall", + "syscall.SYS_KTIMER_GETOVERRUN": "syscall", + "syscall.SYS_KTIMER_GETTIME": "syscall", + "syscall.SYS_KTIMER_SETTIME": "syscall", + "syscall.SYS_KTRACE": "syscall", + "syscall.SYS_LCHFLAGS": "syscall", + "syscall.SYS_LCHMOD": "syscall", + "syscall.SYS_LCHOWN": "syscall", + "syscall.SYS_LCHOWN32": "syscall", + "syscall.SYS_LGETFH": "syscall", + "syscall.SYS_LGETXATTR": "syscall", + "syscall.SYS_LINK": "syscall", + "syscall.SYS_LINKAT": "syscall", + "syscall.SYS_LIO_LISTIO": "syscall", + "syscall.SYS_LISTEN": "syscall", + "syscall.SYS_LISTXATTR": "syscall", + "syscall.SYS_LLISTXATTR": "syscall", + "syscall.SYS_LOCK": "syscall", + "syscall.SYS_LOOKUP_DCOOKIE": "syscall", + "syscall.SYS_LPATHCONF": "syscall", + "syscall.SYS_LREMOVEXATTR": "syscall", + "syscall.SYS_LSEEK": "syscall", + "syscall.SYS_LSETXATTR": "syscall", + "syscall.SYS_LSTAT": "syscall", + "syscall.SYS_LSTAT64": "syscall", + "syscall.SYS_LSTAT64_EXTENDED": "syscall", + "syscall.SYS_LSTATV": "syscall", + "syscall.SYS_LSTAT_EXTENDED": "syscall", + "syscall.SYS_LUTIMES": "syscall", + "syscall.SYS_MAC_SYSCALL": "syscall", + "syscall.SYS_MADVISE": "syscall", + "syscall.SYS_MADVISE1": "syscall", + "syscall.SYS_MAXSYSCALL": "syscall", + "syscall.SYS_MBIND": "syscall", + "syscall.SYS_MIGRATE_PAGES": "syscall", + "syscall.SYS_MINCORE": "syscall", + "syscall.SYS_MINHERIT": "syscall", + "syscall.SYS_MKCOMPLEX": "syscall", + "syscall.SYS_MKDIR": "syscall", + "syscall.SYS_MKDIRAT": "syscall", + "syscall.SYS_MKDIR_EXTENDED": "syscall", + "syscall.SYS_MKFIFO": "syscall", + "syscall.SYS_MKFIFOAT": "syscall", + "syscall.SYS_MKFIFO_EXTENDED": "syscall", + "syscall.SYS_MKNOD": "syscall", + "syscall.SYS_MKNODAT": "syscall", + "syscall.SYS_MLOCK": "syscall", + "syscall.SYS_MLOCKALL": "syscall", + "syscall.SYS_MMAP": "syscall", + "syscall.SYS_MMAP2": "syscall", + "syscall.SYS_MODCTL": "syscall", + "syscall.SYS_MODFIND": "syscall", + "syscall.SYS_MODFNEXT": "syscall", + "syscall.SYS_MODIFY_LDT": "syscall", + "syscall.SYS_MODNEXT": "syscall", + "syscall.SYS_MODSTAT": "syscall", + "syscall.SYS_MODWATCH": "syscall", + "syscall.SYS_MOUNT": "syscall", + "syscall.SYS_MOVE_PAGES": "syscall", + "syscall.SYS_MPROTECT": "syscall", + "syscall.SYS_MPX": "syscall", + "syscall.SYS_MQUERY": "syscall", + "syscall.SYS_MQ_GETSETATTR": "syscall", + "syscall.SYS_MQ_NOTIFY": "syscall", + "syscall.SYS_MQ_OPEN": "syscall", + "syscall.SYS_MQ_TIMEDRECEIVE": "syscall", + "syscall.SYS_MQ_TIMEDSEND": "syscall", + "syscall.SYS_MQ_UNLINK": "syscall", + "syscall.SYS_MREMAP": "syscall", + "syscall.SYS_MSGCTL": "syscall", + "syscall.SYS_MSGGET": "syscall", + "syscall.SYS_MSGRCV": "syscall", + "syscall.SYS_MSGRCV_NOCANCEL": "syscall", + "syscall.SYS_MSGSND": "syscall", + "syscall.SYS_MSGSND_NOCANCEL": "syscall", + "syscall.SYS_MSGSYS": "syscall", + "syscall.SYS_MSYNC": "syscall", + "syscall.SYS_MSYNC_NOCANCEL": "syscall", + "syscall.SYS_MUNLOCK": "syscall", + "syscall.SYS_MUNLOCKALL": "syscall", + "syscall.SYS_MUNMAP": "syscall", + "syscall.SYS_NAME_TO_HANDLE_AT": "syscall", + "syscall.SYS_NANOSLEEP": "syscall", + "syscall.SYS_NEWFSTATAT": "syscall", + "syscall.SYS_NFSCLNT": "syscall", + "syscall.SYS_NFSSERVCTL": "syscall", + "syscall.SYS_NFSSVC": "syscall", + "syscall.SYS_NFSTAT": "syscall", + "syscall.SYS_NICE": "syscall", + "syscall.SYS_NLSTAT": "syscall", + "syscall.SYS_NMOUNT": "syscall", + "syscall.SYS_NSTAT": "syscall", + "syscall.SYS_NTP_ADJTIME": "syscall", + "syscall.SYS_NTP_GETTIME": "syscall", + "syscall.SYS_OABI_SYSCALL_BASE": "syscall", + "syscall.SYS_OBREAK": "syscall", + "syscall.SYS_OLDFSTAT": "syscall", + "syscall.SYS_OLDLSTAT": "syscall", + "syscall.SYS_OLDOLDUNAME": "syscall", + "syscall.SYS_OLDSTAT": "syscall", + "syscall.SYS_OLDUNAME": "syscall", + "syscall.SYS_OPEN": "syscall", + "syscall.SYS_OPENAT": "syscall", + "syscall.SYS_OPENBSD_POLL": "syscall", + "syscall.SYS_OPEN_BY_HANDLE_AT": "syscall", + "syscall.SYS_OPEN_EXTENDED": "syscall", + "syscall.SYS_OPEN_NOCANCEL": "syscall", + "syscall.SYS_OVADVISE": "syscall", + "syscall.SYS_PACCEPT": "syscall", + "syscall.SYS_PATHCONF": "syscall", + "syscall.SYS_PAUSE": "syscall", + "syscall.SYS_PCICONFIG_IOBASE": "syscall", + "syscall.SYS_PCICONFIG_READ": "syscall", + "syscall.SYS_PCICONFIG_WRITE": "syscall", + "syscall.SYS_PDFORK": "syscall", + "syscall.SYS_PDGETPID": "syscall", + "syscall.SYS_PDKILL": "syscall", + "syscall.SYS_PERF_EVENT_OPEN": "syscall", + "syscall.SYS_PERSONALITY": "syscall", + "syscall.SYS_PID_HIBERNATE": "syscall", + "syscall.SYS_PID_RESUME": "syscall", + "syscall.SYS_PID_SHUTDOWN_SOCKETS": "syscall", + "syscall.SYS_PID_SUSPEND": "syscall", + "syscall.SYS_PIPE": "syscall", + "syscall.SYS_PIPE2": "syscall", + "syscall.SYS_PIVOT_ROOT": "syscall", + "syscall.SYS_PMC_CONTROL": "syscall", + "syscall.SYS_PMC_GET_INFO": "syscall", + "syscall.SYS_POLL": "syscall", + "syscall.SYS_POLLTS": "syscall", + "syscall.SYS_POLL_NOCANCEL": "syscall", + "syscall.SYS_POSIX_FADVISE": "syscall", + "syscall.SYS_POSIX_FALLOCATE": "syscall", + "syscall.SYS_POSIX_OPENPT": "syscall", + "syscall.SYS_POSIX_SPAWN": "syscall", + "syscall.SYS_PPOLL": "syscall", + "syscall.SYS_PRCTL": "syscall", + "syscall.SYS_PREAD": "syscall", + "syscall.SYS_PREAD64": "syscall", + "syscall.SYS_PREADV": "syscall", + "syscall.SYS_PREAD_NOCANCEL": "syscall", + "syscall.SYS_PRLIMIT64": "syscall", + "syscall.SYS_PROCCTL": "syscall", + "syscall.SYS_PROCESS_POLICY": "syscall", + "syscall.SYS_PROCESS_VM_READV": "syscall", + "syscall.SYS_PROCESS_VM_WRITEV": "syscall", + "syscall.SYS_PROC_INFO": "syscall", + "syscall.SYS_PROF": "syscall", + "syscall.SYS_PROFIL": "syscall", + "syscall.SYS_PSELECT": "syscall", + "syscall.SYS_PSELECT6": "syscall", + "syscall.SYS_PSET_ASSIGN": "syscall", + "syscall.SYS_PSET_CREATE": "syscall", + "syscall.SYS_PSET_DESTROY": "syscall", + "syscall.SYS_PSYNCH_CVBROAD": "syscall", + "syscall.SYS_PSYNCH_CVCLRPREPOST": "syscall", + "syscall.SYS_PSYNCH_CVSIGNAL": "syscall", + "syscall.SYS_PSYNCH_CVWAIT": "syscall", + "syscall.SYS_PSYNCH_MUTEXDROP": "syscall", + "syscall.SYS_PSYNCH_MUTEXWAIT": "syscall", + "syscall.SYS_PSYNCH_RW_DOWNGRADE": "syscall", + "syscall.SYS_PSYNCH_RW_LONGRDLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_RDLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_UNLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_UNLOCK2": "syscall", + "syscall.SYS_PSYNCH_RW_UPGRADE": "syscall", + "syscall.SYS_PSYNCH_RW_WRLOCK": "syscall", + "syscall.SYS_PSYNCH_RW_YIELDWRLOCK": "syscall", + "syscall.SYS_PTRACE": "syscall", + "syscall.SYS_PUTPMSG": "syscall", + "syscall.SYS_PWRITE": "syscall", + "syscall.SYS_PWRITE64": "syscall", + "syscall.SYS_PWRITEV": "syscall", + "syscall.SYS_PWRITE_NOCANCEL": "syscall", + "syscall.SYS_QUERY_MODULE": "syscall", + "syscall.SYS_QUOTACTL": "syscall", + "syscall.SYS_RASCTL": "syscall", + "syscall.SYS_RCTL_ADD_RULE": "syscall", + "syscall.SYS_RCTL_GET_LIMITS": "syscall", + "syscall.SYS_RCTL_GET_RACCT": "syscall", + "syscall.SYS_RCTL_GET_RULES": "syscall", + "syscall.SYS_RCTL_REMOVE_RULE": "syscall", + "syscall.SYS_READ": "syscall", + "syscall.SYS_READAHEAD": "syscall", + "syscall.SYS_READDIR": "syscall", + "syscall.SYS_READLINK": "syscall", + "syscall.SYS_READLINKAT": "syscall", + "syscall.SYS_READV": "syscall", + "syscall.SYS_READV_NOCANCEL": "syscall", + "syscall.SYS_READ_NOCANCEL": "syscall", + "syscall.SYS_REBOOT": "syscall", + "syscall.SYS_RECV": "syscall", + "syscall.SYS_RECVFROM": "syscall", + "syscall.SYS_RECVFROM_NOCANCEL": "syscall", + "syscall.SYS_RECVMMSG": "syscall", + "syscall.SYS_RECVMSG": "syscall", + "syscall.SYS_RECVMSG_NOCANCEL": "syscall", + "syscall.SYS_REMAP_FILE_PAGES": "syscall", + "syscall.SYS_REMOVEXATTR": "syscall", + "syscall.SYS_RENAME": "syscall", + "syscall.SYS_RENAMEAT": "syscall", + "syscall.SYS_REQUEST_KEY": "syscall", + "syscall.SYS_RESTART_SYSCALL": "syscall", + "syscall.SYS_REVOKE": "syscall", + "syscall.SYS_RFORK": "syscall", + "syscall.SYS_RMDIR": "syscall", + "syscall.SYS_RTPRIO": "syscall", + "syscall.SYS_RTPRIO_THREAD": "syscall", + "syscall.SYS_RT_SIGACTION": "syscall", + "syscall.SYS_RT_SIGPENDING": "syscall", + "syscall.SYS_RT_SIGPROCMASK": "syscall", + "syscall.SYS_RT_SIGQUEUEINFO": "syscall", + "syscall.SYS_RT_SIGRETURN": "syscall", + "syscall.SYS_RT_SIGSUSPEND": "syscall", + "syscall.SYS_RT_SIGTIMEDWAIT": "syscall", + "syscall.SYS_RT_TGSIGQUEUEINFO": "syscall", + "syscall.SYS_SBRK": "syscall", + "syscall.SYS_SCHED_GETAFFINITY": "syscall", + "syscall.SYS_SCHED_GETPARAM": "syscall", + "syscall.SYS_SCHED_GETSCHEDULER": "syscall", + "syscall.SYS_SCHED_GET_PRIORITY_MAX": "syscall", + "syscall.SYS_SCHED_GET_PRIORITY_MIN": "syscall", + "syscall.SYS_SCHED_RR_GET_INTERVAL": "syscall", + "syscall.SYS_SCHED_SETAFFINITY": "syscall", + "syscall.SYS_SCHED_SETPARAM": "syscall", + "syscall.SYS_SCHED_SETSCHEDULER": "syscall", + "syscall.SYS_SCHED_YIELD": "syscall", + "syscall.SYS_SCTP_GENERIC_RECVMSG": "syscall", + "syscall.SYS_SCTP_GENERIC_SENDMSG": "syscall", + "syscall.SYS_SCTP_GENERIC_SENDMSG_IOV": "syscall", + "syscall.SYS_SCTP_PEELOFF": "syscall", + "syscall.SYS_SEARCHFS": "syscall", + "syscall.SYS_SECURITY": "syscall", + "syscall.SYS_SELECT": "syscall", + "syscall.SYS_SELECT_NOCANCEL": "syscall", + "syscall.SYS_SEMCONFIG": "syscall", + "syscall.SYS_SEMCTL": "syscall", + "syscall.SYS_SEMGET": "syscall", + "syscall.SYS_SEMOP": "syscall", + "syscall.SYS_SEMSYS": "syscall", + "syscall.SYS_SEMTIMEDOP": "syscall", + "syscall.SYS_SEM_CLOSE": "syscall", + "syscall.SYS_SEM_DESTROY": "syscall", + "syscall.SYS_SEM_GETVALUE": "syscall", + "syscall.SYS_SEM_INIT": "syscall", + "syscall.SYS_SEM_OPEN": "syscall", + "syscall.SYS_SEM_POST": "syscall", + "syscall.SYS_SEM_TRYWAIT": "syscall", + "syscall.SYS_SEM_UNLINK": "syscall", + "syscall.SYS_SEM_WAIT": "syscall", + "syscall.SYS_SEM_WAIT_NOCANCEL": "syscall", + "syscall.SYS_SEND": "syscall", + "syscall.SYS_SENDFILE": "syscall", + "syscall.SYS_SENDFILE64": "syscall", + "syscall.SYS_SENDMMSG": "syscall", + "syscall.SYS_SENDMSG": "syscall", + "syscall.SYS_SENDMSG_NOCANCEL": "syscall", + "syscall.SYS_SENDTO": "syscall", + "syscall.SYS_SENDTO_NOCANCEL": "syscall", + "syscall.SYS_SETATTRLIST": "syscall", + "syscall.SYS_SETAUDIT": "syscall", + "syscall.SYS_SETAUDIT_ADDR": "syscall", + "syscall.SYS_SETAUID": "syscall", + "syscall.SYS_SETCONTEXT": "syscall", + "syscall.SYS_SETDOMAINNAME": "syscall", + "syscall.SYS_SETEGID": "syscall", + "syscall.SYS_SETEUID": "syscall", + "syscall.SYS_SETFIB": "syscall", + "syscall.SYS_SETFSGID": "syscall", + "syscall.SYS_SETFSGID32": "syscall", + "syscall.SYS_SETFSUID": "syscall", + "syscall.SYS_SETFSUID32": "syscall", + "syscall.SYS_SETGID": "syscall", + "syscall.SYS_SETGID32": "syscall", + "syscall.SYS_SETGROUPS": "syscall", + "syscall.SYS_SETGROUPS32": "syscall", + "syscall.SYS_SETHOSTNAME": "syscall", + "syscall.SYS_SETITIMER": "syscall", + "syscall.SYS_SETLCID": "syscall", + "syscall.SYS_SETLOGIN": "syscall", + "syscall.SYS_SETLOGINCLASS": "syscall", + "syscall.SYS_SETNS": "syscall", + "syscall.SYS_SETPGID": "syscall", + "syscall.SYS_SETPRIORITY": "syscall", + "syscall.SYS_SETPRIVEXEC": "syscall", + "syscall.SYS_SETREGID": "syscall", + "syscall.SYS_SETREGID32": "syscall", + "syscall.SYS_SETRESGID": "syscall", + "syscall.SYS_SETRESGID32": "syscall", + "syscall.SYS_SETRESUID": "syscall", + "syscall.SYS_SETRESUID32": "syscall", + "syscall.SYS_SETREUID": "syscall", + "syscall.SYS_SETREUID32": "syscall", + "syscall.SYS_SETRLIMIT": "syscall", + "syscall.SYS_SETRTABLE": "syscall", + "syscall.SYS_SETSGROUPS": "syscall", + "syscall.SYS_SETSID": "syscall", + "syscall.SYS_SETSOCKOPT": "syscall", + "syscall.SYS_SETTID": "syscall", + "syscall.SYS_SETTID_WITH_PID": "syscall", + "syscall.SYS_SETTIMEOFDAY": "syscall", + "syscall.SYS_SETUID": "syscall", + "syscall.SYS_SETUID32": "syscall", + "syscall.SYS_SETWGROUPS": "syscall", + "syscall.SYS_SETXATTR": "syscall", + "syscall.SYS_SET_MEMPOLICY": "syscall", + "syscall.SYS_SET_ROBUST_LIST": "syscall", + "syscall.SYS_SET_THREAD_AREA": "syscall", + "syscall.SYS_SET_TID_ADDRESS": "syscall", + "syscall.SYS_SGETMASK": "syscall", + "syscall.SYS_SHARED_REGION_CHECK_NP": "syscall", + "syscall.SYS_SHARED_REGION_MAP_AND_SLIDE_NP": "syscall", + "syscall.SYS_SHMAT": "syscall", + "syscall.SYS_SHMCTL": "syscall", + "syscall.SYS_SHMDT": "syscall", + "syscall.SYS_SHMGET": "syscall", + "syscall.SYS_SHMSYS": "syscall", + "syscall.SYS_SHM_OPEN": "syscall", + "syscall.SYS_SHM_UNLINK": "syscall", + "syscall.SYS_SHUTDOWN": "syscall", + "syscall.SYS_SIGACTION": "syscall", + "syscall.SYS_SIGALTSTACK": "syscall", + "syscall.SYS_SIGNAL": "syscall", + "syscall.SYS_SIGNALFD": "syscall", + "syscall.SYS_SIGNALFD4": "syscall", + "syscall.SYS_SIGPENDING": "syscall", + "syscall.SYS_SIGPROCMASK": "syscall", + "syscall.SYS_SIGQUEUE": "syscall", + "syscall.SYS_SIGQUEUEINFO": "syscall", + "syscall.SYS_SIGRETURN": "syscall", + "syscall.SYS_SIGSUSPEND": "syscall", + "syscall.SYS_SIGSUSPEND_NOCANCEL": "syscall", + "syscall.SYS_SIGTIMEDWAIT": "syscall", + "syscall.SYS_SIGWAIT": "syscall", + "syscall.SYS_SIGWAITINFO": "syscall", + "syscall.SYS_SOCKET": "syscall", + "syscall.SYS_SOCKETCALL": "syscall", + "syscall.SYS_SOCKETPAIR": "syscall", + "syscall.SYS_SPLICE": "syscall", + "syscall.SYS_SSETMASK": "syscall", + "syscall.SYS_SSTK": "syscall", + "syscall.SYS_STACK_SNAPSHOT": "syscall", + "syscall.SYS_STAT": "syscall", + "syscall.SYS_STAT64": "syscall", + "syscall.SYS_STAT64_EXTENDED": "syscall", + "syscall.SYS_STATFS": "syscall", + "syscall.SYS_STATFS64": "syscall", + "syscall.SYS_STATV": "syscall", + "syscall.SYS_STATVFS1": "syscall", + "syscall.SYS_STAT_EXTENDED": "syscall", + "syscall.SYS_STIME": "syscall", + "syscall.SYS_STTY": "syscall", + "syscall.SYS_SWAPCONTEXT": "syscall", + "syscall.SYS_SWAPCTL": "syscall", + "syscall.SYS_SWAPOFF": "syscall", + "syscall.SYS_SWAPON": "syscall", + "syscall.SYS_SYMLINK": "syscall", + "syscall.SYS_SYMLINKAT": "syscall", + "syscall.SYS_SYNC": "syscall", + "syscall.SYS_SYNCFS": "syscall", + "syscall.SYS_SYNC_FILE_RANGE": "syscall", + "syscall.SYS_SYSARCH": "syscall", + "syscall.SYS_SYSCALL": "syscall", + "syscall.SYS_SYSCALL_BASE": "syscall", + "syscall.SYS_SYSFS": "syscall", + "syscall.SYS_SYSINFO": "syscall", + "syscall.SYS_SYSLOG": "syscall", + "syscall.SYS_TEE": "syscall", + "syscall.SYS_TGKILL": "syscall", + "syscall.SYS_THREAD_SELFID": "syscall", + "syscall.SYS_THR_CREATE": "syscall", + "syscall.SYS_THR_EXIT": "syscall", + "syscall.SYS_THR_KILL": "syscall", + "syscall.SYS_THR_KILL2": "syscall", + "syscall.SYS_THR_NEW": "syscall", + "syscall.SYS_THR_SELF": "syscall", + "syscall.SYS_THR_SET_NAME": "syscall", + "syscall.SYS_THR_SUSPEND": "syscall", + "syscall.SYS_THR_WAKE": "syscall", + "syscall.SYS_TIME": "syscall", + "syscall.SYS_TIMERFD_CREATE": "syscall", + "syscall.SYS_TIMERFD_GETTIME": "syscall", + "syscall.SYS_TIMERFD_SETTIME": "syscall", + "syscall.SYS_TIMER_CREATE": "syscall", + "syscall.SYS_TIMER_DELETE": "syscall", + "syscall.SYS_TIMER_GETOVERRUN": "syscall", + "syscall.SYS_TIMER_GETTIME": "syscall", + "syscall.SYS_TIMER_SETTIME": "syscall", + "syscall.SYS_TIMES": "syscall", + "syscall.SYS_TKILL": "syscall", + "syscall.SYS_TRUNCATE": "syscall", + "syscall.SYS_TRUNCATE64": "syscall", + "syscall.SYS_TUXCALL": "syscall", + "syscall.SYS_UGETRLIMIT": "syscall", + "syscall.SYS_ULIMIT": "syscall", + "syscall.SYS_UMASK": "syscall", + "syscall.SYS_UMASK_EXTENDED": "syscall", + "syscall.SYS_UMOUNT": "syscall", + "syscall.SYS_UMOUNT2": "syscall", + "syscall.SYS_UNAME": "syscall", + "syscall.SYS_UNDELETE": "syscall", + "syscall.SYS_UNLINK": "syscall", + "syscall.SYS_UNLINKAT": "syscall", + "syscall.SYS_UNMOUNT": "syscall", + "syscall.SYS_UNSHARE": "syscall", + "syscall.SYS_USELIB": "syscall", + "syscall.SYS_USTAT": "syscall", + "syscall.SYS_UTIME": "syscall", + "syscall.SYS_UTIMENSAT": "syscall", + "syscall.SYS_UTIMES": "syscall", + "syscall.SYS_UTRACE": "syscall", + "syscall.SYS_UUIDGEN": "syscall", + "syscall.SYS_VADVISE": "syscall", + "syscall.SYS_VFORK": "syscall", + "syscall.SYS_VHANGUP": "syscall", + "syscall.SYS_VM86": "syscall", + "syscall.SYS_VM86OLD": "syscall", + "syscall.SYS_VMSPLICE": "syscall", + "syscall.SYS_VM_PRESSURE_MONITOR": "syscall", + "syscall.SYS_VSERVER": "syscall", + "syscall.SYS_WAIT4": "syscall", + "syscall.SYS_WAIT4_NOCANCEL": "syscall", + "syscall.SYS_WAIT6": "syscall", + "syscall.SYS_WAITEVENT": "syscall", + "syscall.SYS_WAITID": "syscall", + "syscall.SYS_WAITID_NOCANCEL": "syscall", + "syscall.SYS_WAITPID": "syscall", + "syscall.SYS_WATCHEVENT": "syscall", + "syscall.SYS_WORKQ_KERNRETURN": "syscall", + "syscall.SYS_WORKQ_OPEN": "syscall", + "syscall.SYS_WRITE": "syscall", + "syscall.SYS_WRITEV": "syscall", + "syscall.SYS_WRITEV_NOCANCEL": "syscall", + "syscall.SYS_WRITE_NOCANCEL": "syscall", + "syscall.SYS_YIELD": "syscall", + "syscall.SYS__LLSEEK": "syscall", + "syscall.SYS__LWP_CONTINUE": "syscall", + "syscall.SYS__LWP_CREATE": "syscall", + "syscall.SYS__LWP_CTL": "syscall", + "syscall.SYS__LWP_DETACH": "syscall", + "syscall.SYS__LWP_EXIT": "syscall", + "syscall.SYS__LWP_GETNAME": "syscall", + "syscall.SYS__LWP_GETPRIVATE": "syscall", + "syscall.SYS__LWP_KILL": "syscall", + "syscall.SYS__LWP_PARK": "syscall", + "syscall.SYS__LWP_SELF": "syscall", + "syscall.SYS__LWP_SETNAME": "syscall", + "syscall.SYS__LWP_SETPRIVATE": "syscall", + "syscall.SYS__LWP_SUSPEND": "syscall", + "syscall.SYS__LWP_UNPARK": "syscall", + "syscall.SYS__LWP_UNPARK_ALL": "syscall", + "syscall.SYS__LWP_WAIT": "syscall", + "syscall.SYS__LWP_WAKEUP": "syscall", + "syscall.SYS__NEWSELECT": "syscall", + "syscall.SYS__PSET_BIND": "syscall", + "syscall.SYS__SCHED_GETAFFINITY": "syscall", + "syscall.SYS__SCHED_GETPARAM": "syscall", + "syscall.SYS__SCHED_SETAFFINITY": "syscall", + "syscall.SYS__SCHED_SETPARAM": "syscall", + "syscall.SYS__SYSCTL": "syscall", + "syscall.SYS__UMTX_LOCK": "syscall", + "syscall.SYS__UMTX_OP": "syscall", + "syscall.SYS__UMTX_UNLOCK": "syscall", + "syscall.SYS___ACL_ACLCHECK_FD": "syscall", + "syscall.SYS___ACL_ACLCHECK_FILE": "syscall", + "syscall.SYS___ACL_ACLCHECK_LINK": "syscall", + "syscall.SYS___ACL_DELETE_FD": "syscall", + "syscall.SYS___ACL_DELETE_FILE": "syscall", + "syscall.SYS___ACL_DELETE_LINK": "syscall", + "syscall.SYS___ACL_GET_FD": "syscall", + "syscall.SYS___ACL_GET_FILE": "syscall", + "syscall.SYS___ACL_GET_LINK": "syscall", + "syscall.SYS___ACL_SET_FD": "syscall", + "syscall.SYS___ACL_SET_FILE": "syscall", + "syscall.SYS___ACL_SET_LINK": "syscall", + "syscall.SYS___CLONE": "syscall", + "syscall.SYS___DISABLE_THREADSIGNAL": "syscall", + "syscall.SYS___GETCWD": "syscall", + "syscall.SYS___GETLOGIN": "syscall", + "syscall.SYS___GET_TCB": "syscall", + "syscall.SYS___MAC_EXECVE": "syscall", + "syscall.SYS___MAC_GETFSSTAT": "syscall", + "syscall.SYS___MAC_GET_FD": "syscall", + "syscall.SYS___MAC_GET_FILE": "syscall", + "syscall.SYS___MAC_GET_LCID": "syscall", + "syscall.SYS___MAC_GET_LCTX": "syscall", + "syscall.SYS___MAC_GET_LINK": "syscall", + "syscall.SYS___MAC_GET_MOUNT": "syscall", + "syscall.SYS___MAC_GET_PID": "syscall", + "syscall.SYS___MAC_GET_PROC": "syscall", + "syscall.SYS___MAC_MOUNT": "syscall", + "syscall.SYS___MAC_SET_FD": "syscall", + "syscall.SYS___MAC_SET_FILE": "syscall", + "syscall.SYS___MAC_SET_LCTX": "syscall", + "syscall.SYS___MAC_SET_LINK": "syscall", + "syscall.SYS___MAC_SET_PROC": "syscall", + "syscall.SYS___MAC_SYSCALL": "syscall", + "syscall.SYS___OLD_SEMWAIT_SIGNAL": "syscall", + "syscall.SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": "syscall", + "syscall.SYS___POSIX_CHOWN": "syscall", + "syscall.SYS___POSIX_FCHOWN": "syscall", + "syscall.SYS___POSIX_LCHOWN": "syscall", + "syscall.SYS___POSIX_RENAME": "syscall", + "syscall.SYS___PTHREAD_CANCELED": "syscall", + "syscall.SYS___PTHREAD_CHDIR": "syscall", + "syscall.SYS___PTHREAD_FCHDIR": "syscall", + "syscall.SYS___PTHREAD_KILL": "syscall", + "syscall.SYS___PTHREAD_MARKCANCEL": "syscall", + "syscall.SYS___PTHREAD_SIGMASK": "syscall", + "syscall.SYS___QUOTACTL": "syscall", + "syscall.SYS___SEMCTL": "syscall", + "syscall.SYS___SEMWAIT_SIGNAL": "syscall", + "syscall.SYS___SEMWAIT_SIGNAL_NOCANCEL": "syscall", + "syscall.SYS___SETLOGIN": "syscall", + "syscall.SYS___SETUGID": "syscall", + "syscall.SYS___SET_TCB": "syscall", + "syscall.SYS___SIGACTION_SIGTRAMP": "syscall", + "syscall.SYS___SIGTIMEDWAIT": "syscall", + "syscall.SYS___SIGWAIT": "syscall", + "syscall.SYS___SIGWAIT_NOCANCEL": "syscall", + "syscall.SYS___SYSCTL": "syscall", + "syscall.SYS___TFORK": "syscall", + "syscall.SYS___THREXIT": "syscall", + "syscall.SYS___THRSIGDIVERT": "syscall", + "syscall.SYS___THRSLEEP": "syscall", + "syscall.SYS___THRWAKEUP": "syscall", + "syscall.S_ARCH1": "syscall", + "syscall.S_ARCH2": "syscall", + "syscall.S_BLKSIZE": "syscall", + "syscall.S_IEXEC": "syscall", + "syscall.S_IFBLK": "syscall", + "syscall.S_IFCHR": "syscall", + "syscall.S_IFDIR": "syscall", + "syscall.S_IFIFO": "syscall", + "syscall.S_IFLNK": "syscall", + "syscall.S_IFMT": "syscall", + "syscall.S_IFREG": "syscall", + "syscall.S_IFSOCK": "syscall", + "syscall.S_IFWHT": "syscall", + "syscall.S_IREAD": "syscall", + "syscall.S_IRGRP": "syscall", + "syscall.S_IROTH": "syscall", + "syscall.S_IRUSR": "syscall", + "syscall.S_IRWXG": "syscall", + "syscall.S_IRWXO": "syscall", + "syscall.S_IRWXU": "syscall", + "syscall.S_ISGID": "syscall", + "syscall.S_ISTXT": "syscall", + "syscall.S_ISUID": "syscall", + "syscall.S_ISVTX": "syscall", + "syscall.S_IWGRP": "syscall", + "syscall.S_IWOTH": "syscall", + "syscall.S_IWRITE": "syscall", + "syscall.S_IWUSR": "syscall", + "syscall.S_IXGRP": "syscall", + "syscall.S_IXOTH": "syscall", + "syscall.S_IXUSR": "syscall", + "syscall.S_LOGIN_SET": "syscall", + "syscall.SecurityAttributes": "syscall", + "syscall.Seek": "syscall", + "syscall.Select": "syscall", + "syscall.Sendfile": "syscall", + "syscall.Sendmsg": "syscall", + "syscall.SendmsgN": "syscall", + "syscall.Sendto": "syscall", + "syscall.Servent": "syscall", + "syscall.SetBpf": "syscall", + "syscall.SetBpfBuflen": "syscall", + "syscall.SetBpfDatalink": "syscall", + "syscall.SetBpfHeadercmpl": "syscall", + "syscall.SetBpfImmediate": "syscall", + "syscall.SetBpfInterface": "syscall", + "syscall.SetBpfPromisc": "syscall", + "syscall.SetBpfTimeout": "syscall", + "syscall.SetCurrentDirectory": "syscall", + "syscall.SetEndOfFile": "syscall", + "syscall.SetEnvironmentVariable": "syscall", + "syscall.SetFileAttributes": "syscall", + "syscall.SetFileCompletionNotificationModes": "syscall", + "syscall.SetFilePointer": "syscall", + "syscall.SetFileTime": "syscall", + "syscall.SetHandleInformation": "syscall", + "syscall.SetKevent": "syscall", + "syscall.SetLsfPromisc": "syscall", + "syscall.SetNonblock": "syscall", + "syscall.Setdomainname": "syscall", + "syscall.Setegid": "syscall", + "syscall.Setenv": "syscall", + "syscall.Seteuid": "syscall", + "syscall.Setfsgid": "syscall", + "syscall.Setfsuid": "syscall", + "syscall.Setgid": "syscall", + "syscall.Setgroups": "syscall", + "syscall.Sethostname": "syscall", + "syscall.Setlogin": "syscall", + "syscall.Setpgid": "syscall", + "syscall.Setpriority": "syscall", + "syscall.Setprivexec": "syscall", + "syscall.Setregid": "syscall", + "syscall.Setresgid": "syscall", + "syscall.Setresuid": "syscall", + "syscall.Setreuid": "syscall", + "syscall.Setrlimit": "syscall", + "syscall.Setsid": "syscall", + "syscall.Setsockopt": "syscall", + "syscall.SetsockoptByte": "syscall", + "syscall.SetsockoptICMPv6Filter": "syscall", + "syscall.SetsockoptIPMreq": "syscall", + "syscall.SetsockoptIPMreqn": "syscall", + "syscall.SetsockoptIPv6Mreq": "syscall", + "syscall.SetsockoptInet4Addr": "syscall", + "syscall.SetsockoptInt": "syscall", + "syscall.SetsockoptLinger": "syscall", + "syscall.SetsockoptString": "syscall", + "syscall.SetsockoptTimeval": "syscall", + "syscall.Settimeofday": "syscall", + "syscall.Setuid": "syscall", + "syscall.Setxattr": "syscall", + "syscall.Shutdown": "syscall", + "syscall.SidTypeAlias": "syscall", + "syscall.SidTypeComputer": "syscall", + "syscall.SidTypeDeletedAccount": "syscall", + "syscall.SidTypeDomain": "syscall", + "syscall.SidTypeGroup": "syscall", + "syscall.SidTypeInvalid": "syscall", + "syscall.SidTypeLabel": "syscall", + "syscall.SidTypeUnknown": "syscall", + "syscall.SidTypeUser": "syscall", + "syscall.SidTypeWellKnownGroup": "syscall", + "syscall.Signal": "syscall", + "syscall.SizeofBpfHdr": "syscall", + "syscall.SizeofBpfInsn": "syscall", + "syscall.SizeofBpfProgram": "syscall", + "syscall.SizeofBpfStat": "syscall", + "syscall.SizeofBpfVersion": "syscall", + "syscall.SizeofBpfZbuf": "syscall", + "syscall.SizeofBpfZbufHeader": "syscall", + "syscall.SizeofCmsghdr": "syscall", + "syscall.SizeofICMPv6Filter": "syscall", + "syscall.SizeofIPMreq": "syscall", + "syscall.SizeofIPMreqn": "syscall", + "syscall.SizeofIPv6MTUInfo": "syscall", + "syscall.SizeofIPv6Mreq": "syscall", + "syscall.SizeofIfAddrmsg": "syscall", + "syscall.SizeofIfAnnounceMsghdr": "syscall", + "syscall.SizeofIfData": "syscall", + "syscall.SizeofIfInfomsg": "syscall", + "syscall.SizeofIfMsghdr": "syscall", + "syscall.SizeofIfaMsghdr": "syscall", + "syscall.SizeofIfmaMsghdr": "syscall", + "syscall.SizeofIfmaMsghdr2": "syscall", + "syscall.SizeofInet4Pktinfo": "syscall", + "syscall.SizeofInet6Pktinfo": "syscall", + "syscall.SizeofInotifyEvent": "syscall", + "syscall.SizeofLinger": "syscall", + "syscall.SizeofMsghdr": "syscall", + "syscall.SizeofNlAttr": "syscall", + "syscall.SizeofNlMsgerr": "syscall", + "syscall.SizeofNlMsghdr": "syscall", + "syscall.SizeofRtAttr": "syscall", + "syscall.SizeofRtGenmsg": "syscall", + "syscall.SizeofRtMetrics": "syscall", + "syscall.SizeofRtMsg": "syscall", + "syscall.SizeofRtMsghdr": "syscall", + "syscall.SizeofRtNexthop": "syscall", + "syscall.SizeofSockFilter": "syscall", + "syscall.SizeofSockFprog": "syscall", + "syscall.SizeofSockaddrAny": "syscall", + "syscall.SizeofSockaddrDatalink": "syscall", + "syscall.SizeofSockaddrInet4": "syscall", + "syscall.SizeofSockaddrInet6": "syscall", + "syscall.SizeofSockaddrLinklayer": "syscall", + "syscall.SizeofSockaddrNetlink": "syscall", + "syscall.SizeofSockaddrUnix": "syscall", + "syscall.SizeofTCPInfo": "syscall", + "syscall.SizeofUcred": "syscall", + "syscall.SlicePtrFromStrings": "syscall", + "syscall.SockFilter": "syscall", + "syscall.SockFprog": "syscall", + "syscall.SockaddrDatalink": "syscall", + "syscall.SockaddrGen": "syscall", + "syscall.SockaddrInet4": "syscall", + "syscall.SockaddrInet6": "syscall", + "syscall.SockaddrLinklayer": "syscall", + "syscall.SockaddrNetlink": "syscall", + "syscall.SockaddrUnix": "syscall", + "syscall.Socket": "syscall", + "syscall.SocketControlMessage": "syscall", + "syscall.SocketDisableIPv6": "syscall", + "syscall.Socketpair": "syscall", + "syscall.Splice": "syscall", + "syscall.StartProcess": "syscall", + "syscall.StartupInfo": "syscall", + "syscall.Stat": "syscall", + "syscall.Stat_t": "syscall", + "syscall.Statfs": "syscall", + "syscall.Statfs_t": "syscall", + "syscall.Stderr": "syscall", + "syscall.Stdin": "syscall", + "syscall.Stdout": "syscall", + "syscall.StringBytePtr": "syscall", + "syscall.StringByteSlice": "syscall", + "syscall.StringSlicePtr": "syscall", + "syscall.StringToSid": "syscall", + "syscall.StringToUTF16": "syscall", + "syscall.StringToUTF16Ptr": "syscall", + "syscall.Symlink": "syscall", + "syscall.Sync": "syscall", + "syscall.SyncFileRange": "syscall", + "syscall.SysProcAttr": "syscall", + "syscall.SysProcIDMap": "syscall", + "syscall.Syscall": "syscall", + "syscall.Syscall12": "syscall", + "syscall.Syscall15": "syscall", + "syscall.Syscall6": "syscall", + "syscall.Syscall9": "syscall", + "syscall.Sysctl": "syscall", + "syscall.SysctlUint32": "syscall", + "syscall.Sysctlnode": "syscall", + "syscall.Sysinfo": "syscall", + "syscall.Sysinfo_t": "syscall", + "syscall.Systemtime": "syscall", + "syscall.TCGETS": "syscall", + "syscall.TCIFLUSH": "syscall", + "syscall.TCIOFLUSH": "syscall", + "syscall.TCOFLUSH": "syscall", + "syscall.TCPInfo": "syscall", + "syscall.TCPKeepalive": "syscall", + "syscall.TCP_CA_NAME_MAX": "syscall", + "syscall.TCP_CONGCTL": "syscall", + "syscall.TCP_CONGESTION": "syscall", + "syscall.TCP_CONNECTIONTIMEOUT": "syscall", + "syscall.TCP_CORK": "syscall", + "syscall.TCP_DEFER_ACCEPT": "syscall", + "syscall.TCP_INFO": "syscall", + "syscall.TCP_KEEPALIVE": "syscall", + "syscall.TCP_KEEPCNT": "syscall", + "syscall.TCP_KEEPIDLE": "syscall", + "syscall.TCP_KEEPINIT": "syscall", + "syscall.TCP_KEEPINTVL": "syscall", + "syscall.TCP_LINGER2": "syscall", + "syscall.TCP_MAXBURST": "syscall", + "syscall.TCP_MAXHLEN": "syscall", + "syscall.TCP_MAXOLEN": "syscall", + "syscall.TCP_MAXSEG": "syscall", + "syscall.TCP_MAXWIN": "syscall", + "syscall.TCP_MAX_SACK": "syscall", + "syscall.TCP_MAX_WINSHIFT": "syscall", + "syscall.TCP_MD5SIG": "syscall", + "syscall.TCP_MD5SIG_MAXKEYLEN": "syscall", + "syscall.TCP_MINMSS": "syscall", + "syscall.TCP_MINMSSOVERLOAD": "syscall", + "syscall.TCP_MSS": "syscall", + "syscall.TCP_NODELAY": "syscall", + "syscall.TCP_NOOPT": "syscall", + "syscall.TCP_NOPUSH": "syscall", + "syscall.TCP_NSTATES": "syscall", + "syscall.TCP_QUICKACK": "syscall", + "syscall.TCP_RXT_CONNDROPTIME": "syscall", + "syscall.TCP_RXT_FINDROP": "syscall", + "syscall.TCP_SACK_ENABLE": "syscall", + "syscall.TCP_SYNCNT": "syscall", + "syscall.TCP_VENDOR": "syscall", + "syscall.TCP_WINDOW_CLAMP": "syscall", + "syscall.TCSAFLUSH": "syscall", + "syscall.TCSETS": "syscall", + "syscall.TF_DISCONNECT": "syscall", + "syscall.TF_REUSE_SOCKET": "syscall", + "syscall.TF_USE_DEFAULT_WORKER": "syscall", + "syscall.TF_USE_KERNEL_APC": "syscall", + "syscall.TF_USE_SYSTEM_THREAD": "syscall", + "syscall.TF_WRITE_BEHIND": "syscall", + "syscall.TH32CS_INHERIT": "syscall", + "syscall.TH32CS_SNAPALL": "syscall", + "syscall.TH32CS_SNAPHEAPLIST": "syscall", + "syscall.TH32CS_SNAPMODULE": "syscall", + "syscall.TH32CS_SNAPMODULE32": "syscall", + "syscall.TH32CS_SNAPPROCESS": "syscall", + "syscall.TH32CS_SNAPTHREAD": "syscall", + "syscall.TIME_ZONE_ID_DAYLIGHT": "syscall", + "syscall.TIME_ZONE_ID_STANDARD": "syscall", + "syscall.TIME_ZONE_ID_UNKNOWN": "syscall", + "syscall.TIOCCBRK": "syscall", + "syscall.TIOCCDTR": "syscall", + "syscall.TIOCCONS": "syscall", + "syscall.TIOCDCDTIMESTAMP": "syscall", + "syscall.TIOCDRAIN": "syscall", + "syscall.TIOCDSIMICROCODE": "syscall", + "syscall.TIOCEXCL": "syscall", + "syscall.TIOCEXT": "syscall", + "syscall.TIOCFLAG_CDTRCTS": "syscall", + "syscall.TIOCFLAG_CLOCAL": "syscall", + "syscall.TIOCFLAG_CRTSCTS": "syscall", + "syscall.TIOCFLAG_MDMBUF": "syscall", + "syscall.TIOCFLAG_PPS": "syscall", + "syscall.TIOCFLAG_SOFTCAR": "syscall", + "syscall.TIOCFLUSH": "syscall", + "syscall.TIOCGDEV": "syscall", + "syscall.TIOCGDRAINWAIT": "syscall", + "syscall.TIOCGETA": "syscall", + "syscall.TIOCGETD": "syscall", + "syscall.TIOCGFLAGS": "syscall", + "syscall.TIOCGICOUNT": "syscall", + "syscall.TIOCGLCKTRMIOS": "syscall", + "syscall.TIOCGLINED": "syscall", + "syscall.TIOCGPGRP": "syscall", + "syscall.TIOCGPTN": "syscall", + "syscall.TIOCGQSIZE": "syscall", + "syscall.TIOCGRANTPT": "syscall", + "syscall.TIOCGRS485": "syscall", + "syscall.TIOCGSERIAL": "syscall", + "syscall.TIOCGSID": "syscall", + "syscall.TIOCGSIZE": "syscall", + "syscall.TIOCGSOFTCAR": "syscall", + "syscall.TIOCGTSTAMP": "syscall", + "syscall.TIOCGWINSZ": "syscall", + "syscall.TIOCINQ": "syscall", + "syscall.TIOCIXOFF": "syscall", + "syscall.TIOCIXON": "syscall", + "syscall.TIOCLINUX": "syscall", + "syscall.TIOCMBIC": "syscall", + "syscall.TIOCMBIS": "syscall", + "syscall.TIOCMGDTRWAIT": "syscall", + "syscall.TIOCMGET": "syscall", + "syscall.TIOCMIWAIT": "syscall", + "syscall.TIOCMODG": "syscall", + "syscall.TIOCMODS": "syscall", + "syscall.TIOCMSDTRWAIT": "syscall", + "syscall.TIOCMSET": "syscall", + "syscall.TIOCM_CAR": "syscall", + "syscall.TIOCM_CD": "syscall", + "syscall.TIOCM_CTS": "syscall", + "syscall.TIOCM_DCD": "syscall", + "syscall.TIOCM_DSR": "syscall", + "syscall.TIOCM_DTR": "syscall", + "syscall.TIOCM_LE": "syscall", + "syscall.TIOCM_RI": "syscall", + "syscall.TIOCM_RNG": "syscall", + "syscall.TIOCM_RTS": "syscall", + "syscall.TIOCM_SR": "syscall", + "syscall.TIOCM_ST": "syscall", + "syscall.TIOCNOTTY": "syscall", + "syscall.TIOCNXCL": "syscall", + "syscall.TIOCOUTQ": "syscall", + "syscall.TIOCPKT": "syscall", + "syscall.TIOCPKT_DATA": "syscall", + "syscall.TIOCPKT_DOSTOP": "syscall", + "syscall.TIOCPKT_FLUSHREAD": "syscall", + "syscall.TIOCPKT_FLUSHWRITE": "syscall", + "syscall.TIOCPKT_IOCTL": "syscall", + "syscall.TIOCPKT_NOSTOP": "syscall", + "syscall.TIOCPKT_START": "syscall", + "syscall.TIOCPKT_STOP": "syscall", + "syscall.TIOCPTMASTER": "syscall", + "syscall.TIOCPTMGET": "syscall", + "syscall.TIOCPTSNAME": "syscall", + "syscall.TIOCPTYGNAME": "syscall", + "syscall.TIOCPTYGRANT": "syscall", + "syscall.TIOCPTYUNLK": "syscall", + "syscall.TIOCRCVFRAME": "syscall", + "syscall.TIOCREMOTE": "syscall", + "syscall.TIOCSBRK": "syscall", + "syscall.TIOCSCONS": "syscall", + "syscall.TIOCSCTTY": "syscall", + "syscall.TIOCSDRAINWAIT": "syscall", + "syscall.TIOCSDTR": "syscall", + "syscall.TIOCSERCONFIG": "syscall", + "syscall.TIOCSERGETLSR": "syscall", + "syscall.TIOCSERGETMULTI": "syscall", + "syscall.TIOCSERGSTRUCT": "syscall", + "syscall.TIOCSERGWILD": "syscall", + "syscall.TIOCSERSETMULTI": "syscall", + "syscall.TIOCSERSWILD": "syscall", + "syscall.TIOCSER_TEMT": "syscall", + "syscall.TIOCSETA": "syscall", + "syscall.TIOCSETAF": "syscall", + "syscall.TIOCSETAW": "syscall", + "syscall.TIOCSETD": "syscall", + "syscall.TIOCSFLAGS": "syscall", + "syscall.TIOCSIG": "syscall", + "syscall.TIOCSLCKTRMIOS": "syscall", + "syscall.TIOCSLINED": "syscall", + "syscall.TIOCSPGRP": "syscall", + "syscall.TIOCSPTLCK": "syscall", + "syscall.TIOCSQSIZE": "syscall", + "syscall.TIOCSRS485": "syscall", + "syscall.TIOCSSERIAL": "syscall", + "syscall.TIOCSSIZE": "syscall", + "syscall.TIOCSSOFTCAR": "syscall", + "syscall.TIOCSTART": "syscall", + "syscall.TIOCSTAT": "syscall", + "syscall.TIOCSTI": "syscall", + "syscall.TIOCSTOP": "syscall", + "syscall.TIOCSTSTAMP": "syscall", + "syscall.TIOCSWINSZ": "syscall", + "syscall.TIOCTIMESTAMP": "syscall", + "syscall.TIOCUCNTL": "syscall", + "syscall.TIOCVHANGUP": "syscall", + "syscall.TIOCXMTFRAME": "syscall", + "syscall.TOKEN_ADJUST_DEFAULT": "syscall", + "syscall.TOKEN_ADJUST_GROUPS": "syscall", + "syscall.TOKEN_ADJUST_PRIVILEGES": "syscall", + "syscall.TOKEN_ADJUST_SESSIONID": "syscall", + "syscall.TOKEN_ALL_ACCESS": "syscall", + "syscall.TOKEN_ASSIGN_PRIMARY": "syscall", + "syscall.TOKEN_DUPLICATE": "syscall", + "syscall.TOKEN_EXECUTE": "syscall", + "syscall.TOKEN_IMPERSONATE": "syscall", + "syscall.TOKEN_QUERY": "syscall", + "syscall.TOKEN_QUERY_SOURCE": "syscall", + "syscall.TOKEN_READ": "syscall", + "syscall.TOKEN_WRITE": "syscall", + "syscall.TOSTOP": "syscall", + "syscall.TRUNCATE_EXISTING": "syscall", + "syscall.TUNATTACHFILTER": "syscall", + "syscall.TUNDETACHFILTER": "syscall", + "syscall.TUNGETFEATURES": "syscall", + "syscall.TUNGETIFF": "syscall", + "syscall.TUNGETSNDBUF": "syscall", + "syscall.TUNGETVNETHDRSZ": "syscall", + "syscall.TUNSETDEBUG": "syscall", + "syscall.TUNSETGROUP": "syscall", + "syscall.TUNSETIFF": "syscall", + "syscall.TUNSETLINK": "syscall", + "syscall.TUNSETNOCSUM": "syscall", + "syscall.TUNSETOFFLOAD": "syscall", + "syscall.TUNSETOWNER": "syscall", + "syscall.TUNSETPERSIST": "syscall", + "syscall.TUNSETSNDBUF": "syscall", + "syscall.TUNSETTXFILTER": "syscall", + "syscall.TUNSETVNETHDRSZ": "syscall", + "syscall.Tee": "syscall", + "syscall.TerminateProcess": "syscall", + "syscall.Termios": "syscall", + "syscall.Tgkill": "syscall", + "syscall.Time": "syscall", + "syscall.Time_t": "syscall", + "syscall.Times": "syscall", + "syscall.Timespec": "syscall", + "syscall.TimespecToNsec": "syscall", + "syscall.Timeval": "syscall", + "syscall.Timeval32": "syscall", + "syscall.TimevalToNsec": "syscall", + "syscall.Timex": "syscall", + "syscall.Timezoneinformation": "syscall", + "syscall.Tms": "syscall", + "syscall.Token": "syscall", + "syscall.TokenAccessInformation": "syscall", + "syscall.TokenAuditPolicy": "syscall", + "syscall.TokenDefaultDacl": "syscall", + "syscall.TokenElevation": "syscall", + "syscall.TokenElevationType": "syscall", + "syscall.TokenGroups": "syscall", + "syscall.TokenGroupsAndPrivileges": "syscall", + "syscall.TokenHasRestrictions": "syscall", + "syscall.TokenImpersonationLevel": "syscall", + "syscall.TokenIntegrityLevel": "syscall", + "syscall.TokenLinkedToken": "syscall", + "syscall.TokenLogonSid": "syscall", + "syscall.TokenMandatoryPolicy": "syscall", + "syscall.TokenOrigin": "syscall", + "syscall.TokenOwner": "syscall", + "syscall.TokenPrimaryGroup": "syscall", + "syscall.TokenPrivileges": "syscall", + "syscall.TokenRestrictedSids": "syscall", + "syscall.TokenSandBoxInert": "syscall", + "syscall.TokenSessionId": "syscall", + "syscall.TokenSessionReference": "syscall", + "syscall.TokenSource": "syscall", + "syscall.TokenStatistics": "syscall", + "syscall.TokenType": "syscall", + "syscall.TokenUIAccess": "syscall", + "syscall.TokenUser": "syscall", + "syscall.TokenVirtualizationAllowed": "syscall", + "syscall.TokenVirtualizationEnabled": "syscall", + "syscall.Tokenprimarygroup": "syscall", + "syscall.Tokenuser": "syscall", + "syscall.TranslateAccountName": "syscall", + "syscall.TranslateName": "syscall", + "syscall.TransmitFile": "syscall", + "syscall.TransmitFileBuffers": "syscall", + "syscall.Truncate": "syscall", + "syscall.USAGE_MATCH_TYPE_AND": "syscall", + "syscall.USAGE_MATCH_TYPE_OR": "syscall", + "syscall.UTF16FromString": "syscall", + "syscall.UTF16PtrFromString": "syscall", + "syscall.UTF16ToString": "syscall", + "syscall.Ucred": "syscall", + "syscall.Umask": "syscall", + "syscall.Uname": "syscall", + "syscall.Undelete": "syscall", + "syscall.UnixCredentials": "syscall", + "syscall.UnixRights": "syscall", + "syscall.Unlink": "syscall", + "syscall.Unlinkat": "syscall", + "syscall.UnmapViewOfFile": "syscall", + "syscall.Unmount": "syscall", + "syscall.Unsetenv": "syscall", + "syscall.Unshare": "syscall", + "syscall.UserInfo10": "syscall", + "syscall.Ustat": "syscall", + "syscall.Ustat_t": "syscall", + "syscall.Utimbuf": "syscall", + "syscall.Utime": "syscall", + "syscall.Utimes": "syscall", + "syscall.UtimesNano": "syscall", + "syscall.Utsname": "syscall", + "syscall.VDISCARD": "syscall", + "syscall.VDSUSP": "syscall", + "syscall.VEOF": "syscall", + "syscall.VEOL": "syscall", + "syscall.VEOL2": "syscall", + "syscall.VERASE": "syscall", + "syscall.VERASE2": "syscall", + "syscall.VINTR": "syscall", + "syscall.VKILL": "syscall", + "syscall.VLNEXT": "syscall", + "syscall.VMIN": "syscall", + "syscall.VQUIT": "syscall", + "syscall.VREPRINT": "syscall", + "syscall.VSTART": "syscall", + "syscall.VSTATUS": "syscall", + "syscall.VSTOP": "syscall", + "syscall.VSUSP": "syscall", + "syscall.VSWTC": "syscall", + "syscall.VT0": "syscall", + "syscall.VT1": "syscall", + "syscall.VTDLY": "syscall", + "syscall.VTIME": "syscall", + "syscall.VWERASE": "syscall", + "syscall.VirtualLock": "syscall", + "syscall.VirtualUnlock": "syscall", + "syscall.WAIT_ABANDONED": "syscall", + "syscall.WAIT_FAILED": "syscall", + "syscall.WAIT_OBJECT_0": "syscall", + "syscall.WAIT_TIMEOUT": "syscall", + "syscall.WALL": "syscall", + "syscall.WALLSIG": "syscall", + "syscall.WALTSIG": "syscall", + "syscall.WCLONE": "syscall", + "syscall.WCONTINUED": "syscall", + "syscall.WCOREFLAG": "syscall", + "syscall.WEXITED": "syscall", + "syscall.WLINUXCLONE": "syscall", + "syscall.WNOHANG": "syscall", + "syscall.WNOTHREAD": "syscall", + "syscall.WNOWAIT": "syscall", + "syscall.WNOZOMBIE": "syscall", + "syscall.WOPTSCHECKED": "syscall", + "syscall.WORDSIZE": "syscall", + "syscall.WSABuf": "syscall", + "syscall.WSACleanup": "syscall", + "syscall.WSADESCRIPTION_LEN": "syscall", + "syscall.WSAData": "syscall", + "syscall.WSAEACCES": "syscall", + "syscall.WSAECONNABORTED": "syscall", + "syscall.WSAECONNRESET": "syscall", + "syscall.WSAEnumProtocols": "syscall", + "syscall.WSAID_CONNECTEX": "syscall", + "syscall.WSAIoctl": "syscall", + "syscall.WSAPROTOCOL_LEN": "syscall", + "syscall.WSAProtocolChain": "syscall", + "syscall.WSAProtocolInfo": "syscall", + "syscall.WSARecv": "syscall", + "syscall.WSARecvFrom": "syscall", + "syscall.WSASYS_STATUS_LEN": "syscall", + "syscall.WSASend": "syscall", + "syscall.WSASendTo": "syscall", + "syscall.WSASendto": "syscall", + "syscall.WSAStartup": "syscall", + "syscall.WSTOPPED": "syscall", + "syscall.WTRAPPED": "syscall", + "syscall.WUNTRACED": "syscall", + "syscall.Wait4": "syscall", + "syscall.WaitForSingleObject": "syscall", + "syscall.WaitStatus": "syscall", + "syscall.Win32FileAttributeData": "syscall", + "syscall.Win32finddata": "syscall", + "syscall.Write": "syscall", + "syscall.WriteConsole": "syscall", + "syscall.WriteFile": "syscall", + "syscall.X509_ASN_ENCODING": "syscall", + "syscall.XCASE": "syscall", + "syscall.XP1_CONNECTIONLESS": "syscall", + "syscall.XP1_CONNECT_DATA": "syscall", + "syscall.XP1_DISCONNECT_DATA": "syscall", + "syscall.XP1_EXPEDITED_DATA": "syscall", + "syscall.XP1_GRACEFUL_CLOSE": "syscall", + "syscall.XP1_GUARANTEED_DELIVERY": "syscall", + "syscall.XP1_GUARANTEED_ORDER": "syscall", + "syscall.XP1_IFS_HANDLES": "syscall", + "syscall.XP1_MESSAGE_ORIENTED": "syscall", + "syscall.XP1_MULTIPOINT_CONTROL_PLANE": "syscall", + "syscall.XP1_MULTIPOINT_DATA_PLANE": "syscall", + "syscall.XP1_PARTIAL_MESSAGE": "syscall", + "syscall.XP1_PSEUDO_STREAM": "syscall", + "syscall.XP1_QOS_SUPPORTED": "syscall", + "syscall.XP1_SAN_SUPPORT_SDP": "syscall", + "syscall.XP1_SUPPORT_BROADCAST": "syscall", + "syscall.XP1_SUPPORT_MULTIPOINT": "syscall", + "syscall.XP1_UNI_RECV": "syscall", + "syscall.XP1_UNI_SEND": "syscall", + "syslog.Dial": "log/syslog", + "syslog.LOG_ALERT": "log/syslog", + "syslog.LOG_AUTH": "log/syslog", + "syslog.LOG_AUTHPRIV": "log/syslog", + "syslog.LOG_CRIT": "log/syslog", + "syslog.LOG_CRON": "log/syslog", + "syslog.LOG_DAEMON": "log/syslog", + "syslog.LOG_DEBUG": "log/syslog", + "syslog.LOG_EMERG": "log/syslog", + "syslog.LOG_ERR": "log/syslog", + "syslog.LOG_FTP": "log/syslog", + "syslog.LOG_INFO": "log/syslog", + "syslog.LOG_KERN": "log/syslog", + "syslog.LOG_LOCAL0": "log/syslog", + "syslog.LOG_LOCAL1": "log/syslog", + "syslog.LOG_LOCAL2": "log/syslog", + "syslog.LOG_LOCAL3": "log/syslog", + "syslog.LOG_LOCAL4": "log/syslog", + "syslog.LOG_LOCAL5": "log/syslog", + "syslog.LOG_LOCAL6": "log/syslog", + "syslog.LOG_LOCAL7": "log/syslog", + "syslog.LOG_LPR": "log/syslog", + "syslog.LOG_MAIL": "log/syslog", + "syslog.LOG_NEWS": "log/syslog", + "syslog.LOG_NOTICE": "log/syslog", + "syslog.LOG_SYSLOG": "log/syslog", + "syslog.LOG_USER": "log/syslog", + "syslog.LOG_UUCP": "log/syslog", + "syslog.LOG_WARNING": "log/syslog", + "syslog.New": "log/syslog", + "syslog.NewLogger": "log/syslog", + "syslog.Priority": "log/syslog", + "syslog.Writer": "log/syslog", + "tabwriter.AlignRight": "text/tabwriter", + "tabwriter.Debug": "text/tabwriter", + "tabwriter.DiscardEmptyColumns": "text/tabwriter", + "tabwriter.Escape": "text/tabwriter", + "tabwriter.FilterHTML": "text/tabwriter", + "tabwriter.NewWriter": "text/tabwriter", + "tabwriter.StripEscape": "text/tabwriter", + "tabwriter.TabIndent": "text/tabwriter", + "tabwriter.Writer": "text/tabwriter", + "tar.ErrFieldTooLong": "archive/tar", + "tar.ErrHeader": "archive/tar", + "tar.ErrWriteAfterClose": "archive/tar", + "tar.ErrWriteTooLong": "archive/tar", + "tar.FileInfoHeader": "archive/tar", + "tar.Format": "archive/tar", + "tar.FormatGNU": "archive/tar", + "tar.FormatPAX": "archive/tar", + "tar.FormatUSTAR": "archive/tar", + "tar.FormatUnknown": "archive/tar", + "tar.Header": "archive/tar", + "tar.NewReader": "archive/tar", + "tar.NewWriter": "archive/tar", + "tar.Reader": "archive/tar", + "tar.TypeBlock": "archive/tar", + "tar.TypeChar": "archive/tar", + "tar.TypeCont": "archive/tar", + "tar.TypeDir": "archive/tar", + "tar.TypeFifo": "archive/tar", + "tar.TypeGNULongLink": "archive/tar", + "tar.TypeGNULongName": "archive/tar", + "tar.TypeGNUSparse": "archive/tar", + "tar.TypeLink": "archive/tar", + "tar.TypeReg": "archive/tar", + "tar.TypeRegA": "archive/tar", + "tar.TypeSymlink": "archive/tar", + "tar.TypeXGlobalHeader": "archive/tar", + "tar.TypeXHeader": "archive/tar", + "tar.Writer": "archive/tar", + "template.CSS": "html/template", + "template.ErrAmbigContext": "html/template", + "template.ErrBadHTML": "html/template", + "template.ErrBranchEnd": "html/template", + "template.ErrEndContext": "html/template", + "template.ErrNoSuchTemplate": "html/template", + "template.ErrOutputContext": "html/template", + "template.ErrPartialCharset": "html/template", + "template.ErrPartialEscape": "html/template", + "template.ErrPredefinedEscaper": "html/template", + "template.ErrRangeLoopReentry": "html/template", + "template.ErrSlashAmbig": "html/template", + "template.Error": "html/template", + "template.ErrorCode": "html/template", + "template.ExecError": "text/template", // "template.FuncMap" is ambiguous "template.HTML": "html/template", "template.HTMLAttr": "html/template", @@ -8571,152 +9065,155 @@ var Symbols = map[string]string{ "template.OK": "html/template", // "template.ParseFiles" is ambiguous // "template.ParseGlob" is ambiguous + "template.Srcset": "html/template", // "template.Template" is ambiguous "template.URL": "html/template", // "template.URLQueryEscaper" is ambiguous - "testing.AllocsPerRun": "testing", - "testing.B": "testing", - "testing.Benchmark": "testing", - "testing.BenchmarkResult": "testing", - "testing.Cover": "testing", - "testing.CoverBlock": "testing", - "testing.CoverMode": "testing", - "testing.Coverage": "testing", - "testing.InternalBenchmark": "testing", - "testing.InternalExample": "testing", - "testing.InternalTest": "testing", - "testing.M": "testing", - "testing.Main": "testing", - "testing.MainStart": "testing", - "testing.PB": "testing", - "testing.RegisterCover": "testing", - "testing.RunBenchmarks": "testing", - "testing.RunExamples": "testing", - "testing.RunTests": "testing", - "testing.Short": "testing", - "testing.T": "testing", - "testing.Verbose": "testing", - "textproto.CanonicalMIMEHeaderKey": "net/textproto", - "textproto.Conn": "net/textproto", - "textproto.Dial": "net/textproto", - "textproto.Error": "net/textproto", - "textproto.MIMEHeader": "net/textproto", - "textproto.NewConn": "net/textproto", - "textproto.NewReader": "net/textproto", - "textproto.NewWriter": "net/textproto", - "textproto.Pipeline": "net/textproto", - "textproto.ProtocolError": "net/textproto", - "textproto.Reader": "net/textproto", - "textproto.TrimBytes": "net/textproto", - "textproto.TrimString": "net/textproto", - "textproto.Writer": "net/textproto", - "time.ANSIC": "time", - "time.After": "time", - "time.AfterFunc": "time", - "time.April": "time", - "time.August": "time", - "time.Date": "time", - "time.December": "time", - "time.Duration": "time", - "time.February": "time", - "time.FixedZone": "time", - "time.Friday": "time", - "time.Hour": "time", - "time.January": "time", - "time.July": "time", - "time.June": "time", - "time.Kitchen": "time", - "time.LoadLocation": "time", - "time.Local": "time", - "time.Location": "time", - "time.March": "time", - "time.May": "time", - "time.Microsecond": "time", - "time.Millisecond": "time", - "time.Minute": "time", - "time.Monday": "time", - "time.Month": "time", - "time.Nanosecond": "time", - "time.NewTicker": "time", - "time.NewTimer": "time", - "time.November": "time", - "time.Now": "time", - "time.October": "time", - "time.Parse": "time", - "time.ParseDuration": "time", - "time.ParseError": "time", - "time.ParseInLocation": "time", - "time.RFC1123": "time", - "time.RFC1123Z": "time", - "time.RFC3339": "time", - "time.RFC3339Nano": "time", - "time.RFC822": "time", - "time.RFC822Z": "time", - "time.RFC850": "time", - "time.RubyDate": "time", - "time.Saturday": "time", - "time.Second": "time", - "time.September": "time", - "time.Since": "time", - "time.Sleep": "time", - "time.Stamp": "time", - "time.StampMicro": "time", - "time.StampMilli": "time", - "time.StampNano": "time", - "time.Sunday": "time", - "time.Thursday": "time", - "time.Tick": "time", - "time.Ticker": "time", - "time.Time": "time", - "time.Timer": "time", - "time.Tuesday": "time", - "time.UTC": "time", - "time.Unix": "time", - "time.UnixDate": "time", - "time.Until": "time", - "time.Wednesday": "time", - "time.Weekday": "time", - "tls.Certificate": "crypto/tls", - "tls.CertificateRequestInfo": "crypto/tls", - "tls.Client": "crypto/tls", - "tls.ClientAuthType": "crypto/tls", - "tls.ClientHelloInfo": "crypto/tls", - "tls.ClientSessionCache": "crypto/tls", - "tls.ClientSessionState": "crypto/tls", - "tls.Config": "crypto/tls", - "tls.Conn": "crypto/tls", - "tls.ConnectionState": "crypto/tls", - "tls.CurveID": "crypto/tls", - "tls.CurveP256": "crypto/tls", - "tls.CurveP384": "crypto/tls", - "tls.CurveP521": "crypto/tls", - "tls.Dial": "crypto/tls", - "tls.DialWithDialer": "crypto/tls", - "tls.ECDSAWithP256AndSHA256": "crypto/tls", - "tls.ECDSAWithP384AndSHA384": "crypto/tls", - "tls.ECDSAWithP521AndSHA512": "crypto/tls", - "tls.Listen": "crypto/tls", - "tls.LoadX509KeyPair": "crypto/tls", - "tls.NewLRUClientSessionCache": "crypto/tls", - "tls.NewListener": "crypto/tls", - "tls.NoClientCert": "crypto/tls", - "tls.PKCS1WithSHA1": "crypto/tls", - "tls.PKCS1WithSHA256": "crypto/tls", - "tls.PKCS1WithSHA384": "crypto/tls", - "tls.PKCS1WithSHA512": "crypto/tls", - "tls.PSSWithSHA256": "crypto/tls", - "tls.PSSWithSHA384": "crypto/tls", - "tls.PSSWithSHA512": "crypto/tls", - "tls.RecordHeaderError": "crypto/tls", - "tls.RenegotiateFreelyAsClient": "crypto/tls", - "tls.RenegotiateNever": "crypto/tls", - "tls.RenegotiateOnceAsClient": "crypto/tls", - "tls.RenegotiationSupport": "crypto/tls", - "tls.RequestClientCert": "crypto/tls", - "tls.RequireAndVerifyClientCert": "crypto/tls", - "tls.RequireAnyClientCert": "crypto/tls", - "tls.Server": "crypto/tls", - "tls.SignatureScheme": "crypto/tls", + "testing.AllocsPerRun": "testing", + "testing.B": "testing", + "testing.Benchmark": "testing", + "testing.BenchmarkResult": "testing", + "testing.Cover": "testing", + "testing.CoverBlock": "testing", + "testing.CoverMode": "testing", + "testing.Coverage": "testing", + "testing.InternalBenchmark": "testing", + "testing.InternalExample": "testing", + "testing.InternalTest": "testing", + "testing.M": "testing", + "testing.Main": "testing", + "testing.MainStart": "testing", + "testing.PB": "testing", + "testing.RegisterCover": "testing", + "testing.RunBenchmarks": "testing", + "testing.RunExamples": "testing", + "testing.RunTests": "testing", + "testing.Short": "testing", + "testing.T": "testing", + "testing.Verbose": "testing", + "textproto.CanonicalMIMEHeaderKey": "net/textproto", + "textproto.Conn": "net/textproto", + "textproto.Dial": "net/textproto", + "textproto.Error": "net/textproto", + "textproto.MIMEHeader": "net/textproto", + "textproto.NewConn": "net/textproto", + "textproto.NewReader": "net/textproto", + "textproto.NewWriter": "net/textproto", + "textproto.Pipeline": "net/textproto", + "textproto.ProtocolError": "net/textproto", + "textproto.Reader": "net/textproto", + "textproto.TrimBytes": "net/textproto", + "textproto.TrimString": "net/textproto", + "textproto.Writer": "net/textproto", + "time.ANSIC": "time", + "time.After": "time", + "time.AfterFunc": "time", + "time.April": "time", + "time.August": "time", + "time.Date": "time", + "time.December": "time", + "time.Duration": "time", + "time.February": "time", + "time.FixedZone": "time", + "time.Friday": "time", + "time.Hour": "time", + "time.January": "time", + "time.July": "time", + "time.June": "time", + "time.Kitchen": "time", + "time.LoadLocation": "time", + "time.LoadLocationFromTZData": "time", + "time.Local": "time", + "time.Location": "time", + "time.March": "time", + "time.May": "time", + "time.Microsecond": "time", + "time.Millisecond": "time", + "time.Minute": "time", + "time.Monday": "time", + "time.Month": "time", + "time.Nanosecond": "time", + "time.NewTicker": "time", + "time.NewTimer": "time", + "time.November": "time", + "time.Now": "time", + "time.October": "time", + "time.Parse": "time", + "time.ParseDuration": "time", + "time.ParseError": "time", + "time.ParseInLocation": "time", + "time.RFC1123": "time", + "time.RFC1123Z": "time", + "time.RFC3339": "time", + "time.RFC3339Nano": "time", + "time.RFC822": "time", + "time.RFC822Z": "time", + "time.RFC850": "time", + "time.RubyDate": "time", + "time.Saturday": "time", + "time.Second": "time", + "time.September": "time", + "time.Since": "time", + "time.Sleep": "time", + "time.Stamp": "time", + "time.StampMicro": "time", + "time.StampMilli": "time", + "time.StampNano": "time", + "time.Sunday": "time", + "time.Thursday": "time", + "time.Tick": "time", + "time.Ticker": "time", + "time.Time": "time", + "time.Timer": "time", + "time.Tuesday": "time", + "time.UTC": "time", + "time.Unix": "time", + "time.UnixDate": "time", + "time.Until": "time", + "time.Wednesday": "time", + "time.Weekday": "time", + "tls.Certificate": "crypto/tls", + "tls.CertificateRequestInfo": "crypto/tls", + "tls.Client": "crypto/tls", + "tls.ClientAuthType": "crypto/tls", + "tls.ClientHelloInfo": "crypto/tls", + "tls.ClientSessionCache": "crypto/tls", + "tls.ClientSessionState": "crypto/tls", + "tls.Config": "crypto/tls", + "tls.Conn": "crypto/tls", + "tls.ConnectionState": "crypto/tls", + "tls.CurveID": "crypto/tls", + "tls.CurveP256": "crypto/tls", + "tls.CurveP384": "crypto/tls", + "tls.CurveP521": "crypto/tls", + "tls.Dial": "crypto/tls", + "tls.DialWithDialer": "crypto/tls", + "tls.ECDSAWithP256AndSHA256": "crypto/tls", + "tls.ECDSAWithP384AndSHA384": "crypto/tls", + "tls.ECDSAWithP521AndSHA512": "crypto/tls", + "tls.ECDSAWithSHA1": "crypto/tls", + "tls.Listen": "crypto/tls", + "tls.LoadX509KeyPair": "crypto/tls", + "tls.NewLRUClientSessionCache": "crypto/tls", + "tls.NewListener": "crypto/tls", + "tls.NoClientCert": "crypto/tls", + "tls.PKCS1WithSHA1": "crypto/tls", + "tls.PKCS1WithSHA256": "crypto/tls", + "tls.PKCS1WithSHA384": "crypto/tls", + "tls.PKCS1WithSHA512": "crypto/tls", + "tls.PSSWithSHA256": "crypto/tls", + "tls.PSSWithSHA384": "crypto/tls", + "tls.PSSWithSHA512": "crypto/tls", + "tls.RecordHeaderError": "crypto/tls", + "tls.RenegotiateFreelyAsClient": "crypto/tls", + "tls.RenegotiateNever": "crypto/tls", + "tls.RenegotiateOnceAsClient": "crypto/tls", + "tls.RenegotiationSupport": "crypto/tls", + "tls.RequestClientCert": "crypto/tls", + "tls.RequireAndVerifyClientCert": "crypto/tls", + "tls.RequireAnyClientCert": "crypto/tls", + "tls.Server": "crypto/tls", + "tls.SignatureScheme": "crypto/tls", "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls", "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": "crypto/tls", "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls", @@ -8839,8 +9336,16 @@ var Symbols = map[string]string{ "token.VAR": "go/token", "token.XOR": "go/token", "token.XOR_ASSIGN": "go/token", + "trace.IsEnabled": "runtime/trace", + "trace.Log": "runtime/trace", + "trace.Logf": "runtime/trace", + "trace.NewTask": "runtime/trace", + "trace.Region": "runtime/trace", "trace.Start": "runtime/trace", + "trace.StartRegion": "runtime/trace", "trace.Stop": "runtime/trace", + "trace.Task": "runtime/trace", + "trace.WithRegion": "runtime/trace", "types.Array": "go/types", "types.AssertableTo": "go/types", "types.AssignableTo": "go/types", @@ -8910,6 +9415,7 @@ var Symbols = map[string]string{ "types.NewField": "go/types", "types.NewFunc": "go/types", "types.NewInterface": "go/types", + "types.NewInterfaceType": "go/types", "types.NewLabel": "go/types", "types.NewMap": "go/types", "types.NewMethodSet": "go/types", @@ -9100,6 +9606,7 @@ var Symbols = map[string]string{ "unicode.Manichaean": "unicode", "unicode.Marchen": "unicode", "unicode.Mark": "unicode", + "unicode.Masaram_Gondi": "unicode", "unicode.MaxASCII": "unicode", "unicode.MaxCase": "unicode", "unicode.MaxLatin1": "unicode", @@ -9127,6 +9634,7 @@ var Symbols = map[string]string{ "unicode.No": "unicode", "unicode.Noncharacter_Code_Point": "unicode", "unicode.Number": "unicode", + "unicode.Nushu": "unicode", "unicode.Ogham": "unicode", "unicode.Ol_Chiki": "unicode", "unicode.Old_Hungarian": "unicode", @@ -9141,302 +9649,316 @@ var Symbols = map[string]string{ "unicode.Osmanya": "unicode", "unicode.Other": "unicode", "unicode.Other_Alphabetic": "unicode", - "unicode.Other_Default_Ignorable_Code_Point": "unicode", - "unicode.Other_Grapheme_Extend": "unicode", - "unicode.Other_ID_Continue": "unicode", - "unicode.Other_ID_Start": "unicode", - "unicode.Other_Lowercase": "unicode", - "unicode.Other_Math": "unicode", - "unicode.Other_Uppercase": "unicode", - "unicode.P": "unicode", - "unicode.Pahawh_Hmong": "unicode", - "unicode.Palmyrene": "unicode", - "unicode.Pattern_Syntax": "unicode", - "unicode.Pattern_White_Space": "unicode", - "unicode.Pau_Cin_Hau": "unicode", - "unicode.Pc": "unicode", - "unicode.Pd": "unicode", - "unicode.Pe": "unicode", - "unicode.Pf": "unicode", - "unicode.Phags_Pa": "unicode", - "unicode.Phoenician": "unicode", - "unicode.Pi": "unicode", - "unicode.Po": "unicode", - "unicode.Prepended_Concatenation_Mark": "unicode", - "unicode.PrintRanges": "unicode", - "unicode.Properties": "unicode", - "unicode.Ps": "unicode", - "unicode.Psalter_Pahlavi": "unicode", - "unicode.Punct": "unicode", - "unicode.Quotation_Mark": "unicode", - "unicode.Radical": "unicode", - "unicode.Range16": "unicode", - "unicode.Range32": "unicode", - "unicode.RangeTable": "unicode", - "unicode.Rejang": "unicode", - "unicode.ReplacementChar": "unicode", - "unicode.Runic": "unicode", - "unicode.S": "unicode", - "unicode.STerm": "unicode", - "unicode.Samaritan": "unicode", - "unicode.Saurashtra": "unicode", - "unicode.Sc": "unicode", - "unicode.Scripts": "unicode", - "unicode.Sentence_Terminal": "unicode", - "unicode.Sharada": "unicode", - "unicode.Shavian": "unicode", - "unicode.Siddham": "unicode", - "unicode.SignWriting": "unicode", - "unicode.SimpleFold": "unicode", - "unicode.Sinhala": "unicode", - "unicode.Sk": "unicode", - "unicode.Sm": "unicode", - "unicode.So": "unicode", - "unicode.Soft_Dotted": "unicode", - "unicode.Sora_Sompeng": "unicode", - "unicode.Space": "unicode", - "unicode.SpecialCase": "unicode", - "unicode.Sundanese": "unicode", - "unicode.Syloti_Nagri": "unicode", - "unicode.Symbol": "unicode", - "unicode.Syriac": "unicode", - "unicode.Tagalog": "unicode", - "unicode.Tagbanwa": "unicode", - "unicode.Tai_Le": "unicode", - "unicode.Tai_Tham": "unicode", - "unicode.Tai_Viet": "unicode", - "unicode.Takri": "unicode", - "unicode.Tamil": "unicode", - "unicode.Tangut": "unicode", - "unicode.Telugu": "unicode", - "unicode.Terminal_Punctuation": "unicode", - "unicode.Thaana": "unicode", - "unicode.Thai": "unicode", - "unicode.Tibetan": "unicode", - "unicode.Tifinagh": "unicode", - "unicode.Tirhuta": "unicode", - "unicode.Title": "unicode", - "unicode.TitleCase": "unicode", - "unicode.To": "unicode", - "unicode.ToLower": "unicode", - "unicode.ToTitle": "unicode", - "unicode.ToUpper": "unicode", - "unicode.TurkishCase": "unicode", - "unicode.Ugaritic": "unicode", - "unicode.Unified_Ideograph": "unicode", - "unicode.Upper": "unicode", - "unicode.UpperCase": "unicode", - "unicode.UpperLower": "unicode", - "unicode.Vai": "unicode", - "unicode.Variation_Selector": "unicode", - "unicode.Version": "unicode", - "unicode.Warang_Citi": "unicode", - "unicode.White_Space": "unicode", - "unicode.Yi": "unicode", - "unicode.Z": "unicode", - "unicode.Zl": "unicode", - "unicode.Zp": "unicode", - "unicode.Zs": "unicode", - "url.Error": "net/url", - "url.EscapeError": "net/url", - "url.InvalidHostError": "net/url", - "url.Parse": "net/url", - "url.ParseQuery": "net/url", - "url.ParseRequestURI": "net/url", - "url.PathEscape": "net/url", - "url.PathUnescape": "net/url", - "url.QueryEscape": "net/url", - "url.QueryUnescape": "net/url", - "url.URL": "net/url", - "url.User": "net/url", - "url.UserPassword": "net/url", - "url.Userinfo": "net/url", - "url.Values": "net/url", - "user.Current": "os/user", - "user.Group": "os/user", - "user.Lookup": "os/user", - "user.LookupGroup": "os/user", - "user.LookupGroupId": "os/user", - "user.LookupId": "os/user", - "user.UnknownGroupError": "os/user", - "user.UnknownGroupIdError": "os/user", - "user.UnknownUserError": "os/user", - "user.UnknownUserIdError": "os/user", - "user.User": "os/user", - "utf16.Decode": "unicode/utf16", - "utf16.DecodeRune": "unicode/utf16", - "utf16.Encode": "unicode/utf16", - "utf16.EncodeRune": "unicode/utf16", - "utf16.IsSurrogate": "unicode/utf16", - "utf8.DecodeLastRune": "unicode/utf8", - "utf8.DecodeLastRuneInString": "unicode/utf8", - "utf8.DecodeRune": "unicode/utf8", - "utf8.DecodeRuneInString": "unicode/utf8", - "utf8.EncodeRune": "unicode/utf8", - "utf8.FullRune": "unicode/utf8", - "utf8.FullRuneInString": "unicode/utf8", - "utf8.MaxRune": "unicode/utf8", - "utf8.RuneCount": "unicode/utf8", - "utf8.RuneCountInString": "unicode/utf8", - "utf8.RuneError": "unicode/utf8", - "utf8.RuneLen": "unicode/utf8", - "utf8.RuneSelf": "unicode/utf8", - "utf8.RuneStart": "unicode/utf8", - "utf8.UTFMax": "unicode/utf8", - "utf8.Valid": "unicode/utf8", - "utf8.ValidRune": "unicode/utf8", - "utf8.ValidString": "unicode/utf8", - "x509.CANotAuthorizedForThisName": "crypto/x509", - "x509.CertPool": "crypto/x509", - "x509.Certificate": "crypto/x509", - "x509.CertificateInvalidError": "crypto/x509", - "x509.CertificateRequest": "crypto/x509", - "x509.ConstraintViolationError": "crypto/x509", - "x509.CreateCertificate": "crypto/x509", - "x509.CreateCertificateRequest": "crypto/x509", - "x509.DSA": "crypto/x509", - "x509.DSAWithSHA1": "crypto/x509", - "x509.DSAWithSHA256": "crypto/x509", - "x509.DecryptPEMBlock": "crypto/x509", - "x509.ECDSA": "crypto/x509", - "x509.ECDSAWithSHA1": "crypto/x509", - "x509.ECDSAWithSHA256": "crypto/x509", - "x509.ECDSAWithSHA384": "crypto/x509", - "x509.ECDSAWithSHA512": "crypto/x509", - "x509.EncryptPEMBlock": "crypto/x509", - "x509.ErrUnsupportedAlgorithm": "crypto/x509", - "x509.Expired": "crypto/x509", - "x509.ExtKeyUsage": "crypto/x509", - "x509.ExtKeyUsageAny": "crypto/x509", - "x509.ExtKeyUsageClientAuth": "crypto/x509", - "x509.ExtKeyUsageCodeSigning": "crypto/x509", - "x509.ExtKeyUsageEmailProtection": "crypto/x509", - "x509.ExtKeyUsageIPSECEndSystem": "crypto/x509", - "x509.ExtKeyUsageIPSECTunnel": "crypto/x509", - "x509.ExtKeyUsageIPSECUser": "crypto/x509", - "x509.ExtKeyUsageMicrosoftServerGatedCrypto": "crypto/x509", - "x509.ExtKeyUsageNetscapeServerGatedCrypto": "crypto/x509", - "x509.ExtKeyUsageOCSPSigning": "crypto/x509", - "x509.ExtKeyUsageServerAuth": "crypto/x509", - "x509.ExtKeyUsageTimeStamping": "crypto/x509", - "x509.HostnameError": "crypto/x509", - "x509.IncompatibleUsage": "crypto/x509", - "x509.IncorrectPasswordError": "crypto/x509", - "x509.InsecureAlgorithmError": "crypto/x509", - "x509.InvalidReason": "crypto/x509", - "x509.IsEncryptedPEMBlock": "crypto/x509", - "x509.KeyUsage": "crypto/x509", - "x509.KeyUsageCRLSign": "crypto/x509", - "x509.KeyUsageCertSign": "crypto/x509", - "x509.KeyUsageContentCommitment": "crypto/x509", - "x509.KeyUsageDataEncipherment": "crypto/x509", - "x509.KeyUsageDecipherOnly": "crypto/x509", - "x509.KeyUsageDigitalSignature": "crypto/x509", - "x509.KeyUsageEncipherOnly": "crypto/x509", - "x509.KeyUsageKeyAgreement": "crypto/x509", - "x509.KeyUsageKeyEncipherment": "crypto/x509", - "x509.MD2WithRSA": "crypto/x509", - "x509.MD5WithRSA": "crypto/x509", - "x509.MarshalECPrivateKey": "crypto/x509", - "x509.MarshalPKCS1PrivateKey": "crypto/x509", - "x509.MarshalPKIXPublicKey": "crypto/x509", - "x509.NameMismatch": "crypto/x509", - "x509.NewCertPool": "crypto/x509", - "x509.NotAuthorizedToSign": "crypto/x509", - "x509.PEMCipher": "crypto/x509", - "x509.PEMCipher3DES": "crypto/x509", - "x509.PEMCipherAES128": "crypto/x509", - "x509.PEMCipherAES192": "crypto/x509", - "x509.PEMCipherAES256": "crypto/x509", - "x509.PEMCipherDES": "crypto/x509", - "x509.ParseCRL": "crypto/x509", - "x509.ParseCertificate": "crypto/x509", - "x509.ParseCertificateRequest": "crypto/x509", - "x509.ParseCertificates": "crypto/x509", - "x509.ParseDERCRL": "crypto/x509", - "x509.ParseECPrivateKey": "crypto/x509", - "x509.ParsePKCS1PrivateKey": "crypto/x509", - "x509.ParsePKCS8PrivateKey": "crypto/x509", - "x509.ParsePKIXPublicKey": "crypto/x509", - "x509.PublicKeyAlgorithm": "crypto/x509", - "x509.RSA": "crypto/x509", - "x509.SHA1WithRSA": "crypto/x509", - "x509.SHA256WithRSA": "crypto/x509", - "x509.SHA256WithRSAPSS": "crypto/x509", - "x509.SHA384WithRSA": "crypto/x509", - "x509.SHA384WithRSAPSS": "crypto/x509", - "x509.SHA512WithRSA": "crypto/x509", - "x509.SHA512WithRSAPSS": "crypto/x509", - "x509.SignatureAlgorithm": "crypto/x509", - "x509.SystemCertPool": "crypto/x509", - "x509.SystemRootsError": "crypto/x509", - "x509.TooManyIntermediates": "crypto/x509", - "x509.UnhandledCriticalExtension": "crypto/x509", - "x509.UnknownAuthorityError": "crypto/x509", - "x509.UnknownPublicKeyAlgorithm": "crypto/x509", - "x509.UnknownSignatureAlgorithm": "crypto/x509", - "x509.VerifyOptions": "crypto/x509", - "xml.Attr": "encoding/xml", - "xml.CharData": "encoding/xml", - "xml.Comment": "encoding/xml", - "xml.CopyToken": "encoding/xml", - "xml.Decoder": "encoding/xml", - "xml.Directive": "encoding/xml", - "xml.Encoder": "encoding/xml", - "xml.EndElement": "encoding/xml", - "xml.Escape": "encoding/xml", - "xml.EscapeText": "encoding/xml", - "xml.HTMLAutoClose": "encoding/xml", - "xml.HTMLEntity": "encoding/xml", - "xml.Header": "encoding/xml", - "xml.Marshal": "encoding/xml", - "xml.MarshalIndent": "encoding/xml", - "xml.Marshaler": "encoding/xml", - "xml.MarshalerAttr": "encoding/xml", - "xml.Name": "encoding/xml", - "xml.NewDecoder": "encoding/xml", - "xml.NewEncoder": "encoding/xml", - "xml.ProcInst": "encoding/xml", - "xml.StartElement": "encoding/xml", - "xml.SyntaxError": "encoding/xml", - "xml.TagPathError": "encoding/xml", - "xml.Token": "encoding/xml", - "xml.Unmarshal": "encoding/xml", - "xml.UnmarshalError": "encoding/xml", - "xml.Unmarshaler": "encoding/xml", - "xml.UnmarshalerAttr": "encoding/xml", - "xml.UnsupportedTypeError": "encoding/xml", - "zip.Compressor": "archive/zip", - "zip.Decompressor": "archive/zip", - "zip.Deflate": "archive/zip", - "zip.ErrAlgorithm": "archive/zip", - "zip.ErrChecksum": "archive/zip", - "zip.ErrFormat": "archive/zip", - "zip.File": "archive/zip", - "zip.FileHeader": "archive/zip", - "zip.FileInfoHeader": "archive/zip", - "zip.NewReader": "archive/zip", - "zip.NewWriter": "archive/zip", - "zip.OpenReader": "archive/zip", - "zip.ReadCloser": "archive/zip", - "zip.Reader": "archive/zip", - "zip.RegisterCompressor": "archive/zip", - "zip.RegisterDecompressor": "archive/zip", - "zip.Store": "archive/zip", - "zip.Writer": "archive/zip", - "zlib.BestCompression": "compress/zlib", - "zlib.BestSpeed": "compress/zlib", - "zlib.DefaultCompression": "compress/zlib", - "zlib.ErrChecksum": "compress/zlib", - "zlib.ErrDictionary": "compress/zlib", - "zlib.ErrHeader": "compress/zlib", - "zlib.HuffmanOnly": "compress/zlib", - "zlib.NewReader": "compress/zlib", - "zlib.NewReaderDict": "compress/zlib", - "zlib.NewWriter": "compress/zlib", - "zlib.NewWriterLevel": "compress/zlib", - "zlib.NewWriterLevelDict": "compress/zlib", - "zlib.NoCompression": "compress/zlib", - "zlib.Resetter": "compress/zlib", - "zlib.Writer": "compress/zlib", + "unicode.Other_Default_Ignorable_Code_Point": "unicode", + "unicode.Other_Grapheme_Extend": "unicode", + "unicode.Other_ID_Continue": "unicode", + "unicode.Other_ID_Start": "unicode", + "unicode.Other_Lowercase": "unicode", + "unicode.Other_Math": "unicode", + "unicode.Other_Uppercase": "unicode", + "unicode.P": "unicode", + "unicode.Pahawh_Hmong": "unicode", + "unicode.Palmyrene": "unicode", + "unicode.Pattern_Syntax": "unicode", + "unicode.Pattern_White_Space": "unicode", + "unicode.Pau_Cin_Hau": "unicode", + "unicode.Pc": "unicode", + "unicode.Pd": "unicode", + "unicode.Pe": "unicode", + "unicode.Pf": "unicode", + "unicode.Phags_Pa": "unicode", + "unicode.Phoenician": "unicode", + "unicode.Pi": "unicode", + "unicode.Po": "unicode", + "unicode.Prepended_Concatenation_Mark": "unicode", + "unicode.PrintRanges": "unicode", + "unicode.Properties": "unicode", + "unicode.Ps": "unicode", + "unicode.Psalter_Pahlavi": "unicode", + "unicode.Punct": "unicode", + "unicode.Quotation_Mark": "unicode", + "unicode.Radical": "unicode", + "unicode.Range16": "unicode", + "unicode.Range32": "unicode", + "unicode.RangeTable": "unicode", + "unicode.Regional_Indicator": "unicode", + "unicode.Rejang": "unicode", + "unicode.ReplacementChar": "unicode", + "unicode.Runic": "unicode", + "unicode.S": "unicode", + "unicode.STerm": "unicode", + "unicode.Samaritan": "unicode", + "unicode.Saurashtra": "unicode", + "unicode.Sc": "unicode", + "unicode.Scripts": "unicode", + "unicode.Sentence_Terminal": "unicode", + "unicode.Sharada": "unicode", + "unicode.Shavian": "unicode", + "unicode.Siddham": "unicode", + "unicode.SignWriting": "unicode", + "unicode.SimpleFold": "unicode", + "unicode.Sinhala": "unicode", + "unicode.Sk": "unicode", + "unicode.Sm": "unicode", + "unicode.So": "unicode", + "unicode.Soft_Dotted": "unicode", + "unicode.Sora_Sompeng": "unicode", + "unicode.Soyombo": "unicode", + "unicode.Space": "unicode", + "unicode.SpecialCase": "unicode", + "unicode.Sundanese": "unicode", + "unicode.Syloti_Nagri": "unicode", + "unicode.Symbol": "unicode", + "unicode.Syriac": "unicode", + "unicode.Tagalog": "unicode", + "unicode.Tagbanwa": "unicode", + "unicode.Tai_Le": "unicode", + "unicode.Tai_Tham": "unicode", + "unicode.Tai_Viet": "unicode", + "unicode.Takri": "unicode", + "unicode.Tamil": "unicode", + "unicode.Tangut": "unicode", + "unicode.Telugu": "unicode", + "unicode.Terminal_Punctuation": "unicode", + "unicode.Thaana": "unicode", + "unicode.Thai": "unicode", + "unicode.Tibetan": "unicode", + "unicode.Tifinagh": "unicode", + "unicode.Tirhuta": "unicode", + "unicode.Title": "unicode", + "unicode.TitleCase": "unicode", + "unicode.To": "unicode", + "unicode.ToLower": "unicode", + "unicode.ToTitle": "unicode", + "unicode.ToUpper": "unicode", + "unicode.TurkishCase": "unicode", + "unicode.Ugaritic": "unicode", + "unicode.Unified_Ideograph": "unicode", + "unicode.Upper": "unicode", + "unicode.UpperCase": "unicode", + "unicode.UpperLower": "unicode", + "unicode.Vai": "unicode", + "unicode.Variation_Selector": "unicode", + "unicode.Version": "unicode", + "unicode.Warang_Citi": "unicode", + "unicode.White_Space": "unicode", + "unicode.Yi": "unicode", + "unicode.Z": "unicode", + "unicode.Zanabazar_Square": "unicode", + "unicode.Zl": "unicode", + "unicode.Zp": "unicode", + "unicode.Zs": "unicode", + "url.Error": "net/url", + "url.EscapeError": "net/url", + "url.InvalidHostError": "net/url", + "url.Parse": "net/url", + "url.ParseQuery": "net/url", + "url.ParseRequestURI": "net/url", + "url.PathEscape": "net/url", + "url.PathUnescape": "net/url", + "url.QueryEscape": "net/url", + "url.QueryUnescape": "net/url", + "url.URL": "net/url", + "url.User": "net/url", + "url.UserPassword": "net/url", + "url.Userinfo": "net/url", + "url.Values": "net/url", + "user.Current": "os/user", + "user.Group": "os/user", + "user.Lookup": "os/user", + "user.LookupGroup": "os/user", + "user.LookupGroupId": "os/user", + "user.LookupId": "os/user", + "user.UnknownGroupError": "os/user", + "user.UnknownGroupIdError": "os/user", + "user.UnknownUserError": "os/user", + "user.UnknownUserIdError": "os/user", + "user.User": "os/user", + "utf16.Decode": "unicode/utf16", + "utf16.DecodeRune": "unicode/utf16", + "utf16.Encode": "unicode/utf16", + "utf16.EncodeRune": "unicode/utf16", + "utf16.IsSurrogate": "unicode/utf16", + "utf8.DecodeLastRune": "unicode/utf8", + "utf8.DecodeLastRuneInString": "unicode/utf8", + "utf8.DecodeRune": "unicode/utf8", + "utf8.DecodeRuneInString": "unicode/utf8", + "utf8.EncodeRune": "unicode/utf8", + "utf8.FullRune": "unicode/utf8", + "utf8.FullRuneInString": "unicode/utf8", + "utf8.MaxRune": "unicode/utf8", + "utf8.RuneCount": "unicode/utf8", + "utf8.RuneCountInString": "unicode/utf8", + "utf8.RuneError": "unicode/utf8", + "utf8.RuneLen": "unicode/utf8", + "utf8.RuneSelf": "unicode/utf8", + "utf8.RuneStart": "unicode/utf8", + "utf8.UTFMax": "unicode/utf8", + "utf8.Valid": "unicode/utf8", + "utf8.ValidRune": "unicode/utf8", + "utf8.ValidString": "unicode/utf8", + "x509.CANotAuthorizedForExtKeyUsage": "crypto/x509", + "x509.CANotAuthorizedForThisName": "crypto/x509", + "x509.CertPool": "crypto/x509", + "x509.Certificate": "crypto/x509", + "x509.CertificateInvalidError": "crypto/x509", + "x509.CertificateRequest": "crypto/x509", + "x509.ConstraintViolationError": "crypto/x509", + "x509.CreateCertificate": "crypto/x509", + "x509.CreateCertificateRequest": "crypto/x509", + "x509.DSA": "crypto/x509", + "x509.DSAWithSHA1": "crypto/x509", + "x509.DSAWithSHA256": "crypto/x509", + "x509.DecryptPEMBlock": "crypto/x509", + "x509.ECDSA": "crypto/x509", + "x509.ECDSAWithSHA1": "crypto/x509", + "x509.ECDSAWithSHA256": "crypto/x509", + "x509.ECDSAWithSHA384": "crypto/x509", + "x509.ECDSAWithSHA512": "crypto/x509", + "x509.EncryptPEMBlock": "crypto/x509", + "x509.ErrUnsupportedAlgorithm": "crypto/x509", + "x509.Expired": "crypto/x509", + "x509.ExtKeyUsage": "crypto/x509", + "x509.ExtKeyUsageAny": "crypto/x509", + "x509.ExtKeyUsageClientAuth": "crypto/x509", + "x509.ExtKeyUsageCodeSigning": "crypto/x509", + "x509.ExtKeyUsageEmailProtection": "crypto/x509", + "x509.ExtKeyUsageIPSECEndSystem": "crypto/x509", + "x509.ExtKeyUsageIPSECTunnel": "crypto/x509", + "x509.ExtKeyUsageIPSECUser": "crypto/x509", + "x509.ExtKeyUsageMicrosoftCommercialCodeSigning": "crypto/x509", + "x509.ExtKeyUsageMicrosoftKernelCodeSigning": "crypto/x509", + "x509.ExtKeyUsageMicrosoftServerGatedCrypto": "crypto/x509", + "x509.ExtKeyUsageNetscapeServerGatedCrypto": "crypto/x509", + "x509.ExtKeyUsageOCSPSigning": "crypto/x509", + "x509.ExtKeyUsageServerAuth": "crypto/x509", + "x509.ExtKeyUsageTimeStamping": "crypto/x509", + "x509.HostnameError": "crypto/x509", + "x509.IncompatibleUsage": "crypto/x509", + "x509.IncorrectPasswordError": "crypto/x509", + "x509.InsecureAlgorithmError": "crypto/x509", + "x509.InvalidReason": "crypto/x509", + "x509.IsEncryptedPEMBlock": "crypto/x509", + "x509.KeyUsage": "crypto/x509", + "x509.KeyUsageCRLSign": "crypto/x509", + "x509.KeyUsageCertSign": "crypto/x509", + "x509.KeyUsageContentCommitment": "crypto/x509", + "x509.KeyUsageDataEncipherment": "crypto/x509", + "x509.KeyUsageDecipherOnly": "crypto/x509", + "x509.KeyUsageDigitalSignature": "crypto/x509", + "x509.KeyUsageEncipherOnly": "crypto/x509", + "x509.KeyUsageKeyAgreement": "crypto/x509", + "x509.KeyUsageKeyEncipherment": "crypto/x509", + "x509.MD2WithRSA": "crypto/x509", + "x509.MD5WithRSA": "crypto/x509", + "x509.MarshalECPrivateKey": "crypto/x509", + "x509.MarshalPKCS1PrivateKey": "crypto/x509", + "x509.MarshalPKCS1PublicKey": "crypto/x509", + "x509.MarshalPKCS8PrivateKey": "crypto/x509", + "x509.MarshalPKIXPublicKey": "crypto/x509", + "x509.NameConstraintsWithoutSANs": "crypto/x509", + "x509.NameMismatch": "crypto/x509", + "x509.NewCertPool": "crypto/x509", + "x509.NotAuthorizedToSign": "crypto/x509", + "x509.PEMCipher": "crypto/x509", + "x509.PEMCipher3DES": "crypto/x509", + "x509.PEMCipherAES128": "crypto/x509", + "x509.PEMCipherAES192": "crypto/x509", + "x509.PEMCipherAES256": "crypto/x509", + "x509.PEMCipherDES": "crypto/x509", + "x509.ParseCRL": "crypto/x509", + "x509.ParseCertificate": "crypto/x509", + "x509.ParseCertificateRequest": "crypto/x509", + "x509.ParseCertificates": "crypto/x509", + "x509.ParseDERCRL": "crypto/x509", + "x509.ParseECPrivateKey": "crypto/x509", + "x509.ParsePKCS1PrivateKey": "crypto/x509", + "x509.ParsePKCS1PublicKey": "crypto/x509", + "x509.ParsePKCS8PrivateKey": "crypto/x509", + "x509.ParsePKIXPublicKey": "crypto/x509", + "x509.PublicKeyAlgorithm": "crypto/x509", + "x509.RSA": "crypto/x509", + "x509.SHA1WithRSA": "crypto/x509", + "x509.SHA256WithRSA": "crypto/x509", + "x509.SHA256WithRSAPSS": "crypto/x509", + "x509.SHA384WithRSA": "crypto/x509", + "x509.SHA384WithRSAPSS": "crypto/x509", + "x509.SHA512WithRSA": "crypto/x509", + "x509.SHA512WithRSAPSS": "crypto/x509", + "x509.SignatureAlgorithm": "crypto/x509", + "x509.SystemCertPool": "crypto/x509", + "x509.SystemRootsError": "crypto/x509", + "x509.TooManyConstraints": "crypto/x509", + "x509.TooManyIntermediates": "crypto/x509", + "x509.UnconstrainedName": "crypto/x509", + "x509.UnhandledCriticalExtension": "crypto/x509", + "x509.UnknownAuthorityError": "crypto/x509", + "x509.UnknownPublicKeyAlgorithm": "crypto/x509", + "x509.UnknownSignatureAlgorithm": "crypto/x509", + "x509.VerifyOptions": "crypto/x509", + "xml.Attr": "encoding/xml", + "xml.CharData": "encoding/xml", + "xml.Comment": "encoding/xml", + "xml.CopyToken": "encoding/xml", + "xml.Decoder": "encoding/xml", + "xml.Directive": "encoding/xml", + "xml.Encoder": "encoding/xml", + "xml.EndElement": "encoding/xml", + "xml.Escape": "encoding/xml", + "xml.EscapeText": "encoding/xml", + "xml.HTMLAutoClose": "encoding/xml", + "xml.HTMLEntity": "encoding/xml", + "xml.Header": "encoding/xml", + "xml.Marshal": "encoding/xml", + "xml.MarshalIndent": "encoding/xml", + "xml.Marshaler": "encoding/xml", + "xml.MarshalerAttr": "encoding/xml", + "xml.Name": "encoding/xml", + "xml.NewDecoder": "encoding/xml", + "xml.NewEncoder": "encoding/xml", + "xml.NewTokenDecoder": "encoding/xml", + "xml.ProcInst": "encoding/xml", + "xml.StartElement": "encoding/xml", + "xml.SyntaxError": "encoding/xml", + "xml.TagPathError": "encoding/xml", + "xml.Token": "encoding/xml", + "xml.TokenReader": "encoding/xml", + "xml.Unmarshal": "encoding/xml", + "xml.UnmarshalError": "encoding/xml", + "xml.Unmarshaler": "encoding/xml", + "xml.UnmarshalerAttr": "encoding/xml", + "xml.UnsupportedTypeError": "encoding/xml", + "zip.Compressor": "archive/zip", + "zip.Decompressor": "archive/zip", + "zip.Deflate": "archive/zip", + "zip.ErrAlgorithm": "archive/zip", + "zip.ErrChecksum": "archive/zip", + "zip.ErrFormat": "archive/zip", + "zip.File": "archive/zip", + "zip.FileHeader": "archive/zip", + "zip.FileInfoHeader": "archive/zip", + "zip.NewReader": "archive/zip", + "zip.NewWriter": "archive/zip", + "zip.OpenReader": "archive/zip", + "zip.ReadCloser": "archive/zip", + "zip.Reader": "archive/zip", + "zip.RegisterCompressor": "archive/zip", + "zip.RegisterDecompressor": "archive/zip", + "zip.Store": "archive/zip", + "zip.Writer": "archive/zip", + "zlib.BestCompression": "compress/zlib", + "zlib.BestSpeed": "compress/zlib", + "zlib.DefaultCompression": "compress/zlib", + "zlib.ErrChecksum": "compress/zlib", + "zlib.ErrDictionary": "compress/zlib", + "zlib.ErrHeader": "compress/zlib", + "zlib.HuffmanOnly": "compress/zlib", + "zlib.NewReader": "compress/zlib", + "zlib.NewReaderDict": "compress/zlib", + "zlib.NewWriter": "compress/zlib", + "zlib.NewWriterLevel": "compress/zlib", + "zlib.NewWriterLevelDict": "compress/zlib", + "zlib.NoCompression": "compress/zlib", + "zlib.Resetter": "compress/zlib", + "zlib.Writer": "compress/zlib", } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index c1c3ecdf..6aeca5a7 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -346,6 +346,12 @@ func (w *PkgWalker) importPath(path string, mode build.ImportMode) (*build.Packa return pkg, err } } + if path == "syscall/js" { + ctx := *w.Context + ctx.BuildTags = append(ctx.BuildTags, "js") + ctx.BuildTags = append(ctx.BuildTags, "wasm") + return ctx.Import(path, "", mode) + } return w.Context.Import(path, "", mode) } From 0c4411db045aa62392a382d09a25561014de2117 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 2 Sep 2018 09:22:50 +0800 Subject: [PATCH 027/133] add daemon name flag --- gocode.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gocode.go b/gocode.go index b0dd5a27..a9656910 100644 --- a/gocode.go +++ b/gocode.go @@ -11,13 +11,14 @@ import ( ) var ( - g_is_server = flag.Bool("s", false, "run a server instead of a client") - g_format = flag.String("f", "nice", "output format (vim | emacs | nice | csv | csv-with-package | json)") - g_input = flag.String("in", "", "use this file instead of stdin input") - g_sock = create_sock_flag("sock", "socket type (unix | tcp)") - g_addr = flag.String("addr", "127.0.0.1:37373", "address for tcp socket") - g_debug = flag.Bool("debug", false, "enable server-side debug mode") - g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling") + g_is_server = flag.Bool("s", false, "run a server instead of a client") + g_format = flag.String("f", "nice", "output format (vim | emacs | nice | csv | csv-with-package | json)") + g_input = flag.String("in", "", "use this file instead of stdin input") + g_sock = create_sock_flag("sock", "socket type (unix | tcp)") + g_addr = flag.String("addr", "127.0.0.1:37373", "address for tcp socket") + g_debug = flag.Bool("debug", false, "enable server-side debug mode") + g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling") + g_daemon_name = flag.String("daemon", "gocode-daemon", "unix socket daemon prefix name") ) func get_socket_filename() string { @@ -25,7 +26,7 @@ func get_socket_filename() string { if user == "" { user = "all" } - return filepath.Join(os.TempDir(), fmt.Sprintf("gocode-daemon.%s", user)) + return filepath.Join(os.TempDir(), fmt.Sprintf("%s.%s", *g_daemon_name, user)) } func show_usage() { From 08a66b5525c8bb65d9985d50bff6b1981a9d748b Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 2 Sep 2018 10:02:44 +0800 Subject: [PATCH 028/133] change unix daemon name --- gocode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gocode.go b/gocode.go index a9656910..24de24ad 100644 --- a/gocode.go +++ b/gocode.go @@ -18,7 +18,7 @@ var ( g_addr = flag.String("addr", "127.0.0.1:37373", "address for tcp socket") g_debug = flag.Bool("debug", false, "enable server-side debug mode") g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling") - g_daemon_name = flag.String("daemon", "gocode-daemon", "unix socket daemon prefix name") + g_daemon_name = flag.String("daemon", "gocode-daemon-x", "unix socket daemon prefix name") ) func get_socket_filename() string { From 62cb84cc965512f457aaac560a9d35b52a669283 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 21 Sep 2018 10:17:20 +0800 Subject: [PATCH 029/133] fix gc_bin_parser unknownTag --- package_bin.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package_bin.go b/package_bin.go index b1ab3af1..6efce740 100644 --- a/package_bin.go +++ b/package_bin.go @@ -615,6 +615,8 @@ func (p *gc_bin_parser) skipValue() { p.float() case stringTag: p.string() + case unknownTag: + break default: panic(fmt.Sprintf("unexpected value tag %d", tag)) } From 79d93906b3333d8107c554bf747ba9b2bfb0c5fb Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 26 Sep 2018 21:04:05 +0800 Subject: [PATCH 030/133] update gomod --- Godeps/Godeps.json | 22 ++++++----- .../visualfc/gotools/pkg/gomod/gomod.go | 20 ++++++++++ .../visualfc/gotools/types/types.go | 38 ++++++++++++------- 3 files changed, 58 insertions(+), 22 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a2db4326..883c7905 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,39 +8,43 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "f80ce778a7707fedba4bfad5642bce06f7d37b83" + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" + "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" + "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "7d1dc997617fb662918b6ea95efc19faa87e1cf8" + "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", + "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" } ] } diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 651ca691..24519041 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -17,6 +17,7 @@ func LooupModList(dir string) *ModuleList { return nil } ms := parseModuleJson(data) + ms.Dir = dir return &ms } @@ -41,6 +42,7 @@ func ListModuleJson(dir string) []byte { } type ModuleList struct { + Dir string Module Module Require []*Module } @@ -54,6 +56,13 @@ func makePath(path, dir string, addin string) string { return filepath.Join(dir[pos:], addin) } +type Package struct { + Dir string + ImportPath string + Name string + Module *Module +} + func (m *ModuleList) LookupModule(pkgname string) (require *Module, path string, dir string) { for _, r := range m.Require { if strings.HasPrefix(pkgname, r.Path) { @@ -66,6 +75,17 @@ func (m *ModuleList) LookupModule(pkgname string) (require *Module, path string, return r, path, filepath.Join(r.Dir, addin) } } + c := exec.Command("go", "list", "-json", "-e", pkgname) + c.Dir = m.Dir + data, err := c.Output() + if err == nil { + var p Package + err = json.Unmarshal(data, &p) + if err == nil { + return p.Module, p.ImportPath, p.Dir + } + } + return nil, "", "" } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 6aeca5a7..b2cc1022 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -40,17 +40,18 @@ var Command = &command.Command{ } var ( - typesVerbose bool - typesAllowBinary bool - typesFilePos string - typesFileStdin bool - typesFindUse bool - typesFindDef bool - typesFindUseAll bool - typesFindInfo bool - typesFindDoc bool - typesTags string - typesTagList = []string{} // exploded version of tags flag; set in main + typesVerbose bool + typesAllowBinary bool + typesFilePos string + typesFileStdin bool + typesFindUse bool + typesFindDef bool + typesFindUseAll bool + typesFindSkipGoroot bool + typesFindInfo bool + typesFindDoc bool + typesTags string + typesTagList = []string{} // exploded version of tags flag; set in main ) //func init @@ -63,6 +64,7 @@ func init() { Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define") Command.Flag.BoolVar(&typesFindUse, "use", false, "find cursor usages") Command.Flag.BoolVar(&typesFindUseAll, "all", false, "find cursor all usages in GOPATH") + Command.Flag.BoolVar(&typesFindSkipGoroot, "skip_goroot", false, "find cursor all usages skip GOROOT") Command.Flag.BoolVar(&typesFindDoc, "doc", false, "find cursor def doc") Command.Flag.StringVar(&typesTags, "tags", "", "space-separated list of build tags to apply when parsing") } @@ -1289,7 +1291,14 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { var uses_paths []string if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { find_def_pkg = cursorPkg.Path() - uses_paths = append(uses_paths, cursorPkg.Path()) + if typesFindSkipGoroot { + bp, err := w.importPath(find_def_pkg, 0) + if err == nil && !bp.Goroot { + uses_paths = append(uses_paths, find_def_pkg) + } + } else { + uses_paths = append(uses_paths, find_def_pkg) + } } cursorPkgPath := cursorObj.Pkg().Path() @@ -1325,11 +1334,14 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return } } + if typesFindSkipGoroot && bp.Goroot { + return + } uses_paths = append(uses_paths, bp.ImportPath) } }) - w.Imported = make(map[string]*types.Package) + //w.Imported = make(map[string]*types.Package) for _, v := range uses_paths { conf := &PkgConfig{ IgnoreFuncBodies: false, From 2741456b513a3c0d42c223f1f7bfaa46425d36df Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 27 Sep 2018 21:40:44 +0800 Subject: [PATCH 031/133] update gomod cached --- Godeps/Godeps.json | 14 +++++++------- .../visualfc/gotools/pkg/gomod/gomod.go | 4 +++- .../github.com/visualfc/gotools/types/types.go | 16 ++++++++++++++-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 883c7905..1aa84559 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,27 +8,27 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -44,7 +44,7 @@ }, { "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "161f8daa758ff3bf33cff43da5087069b268ae54" + "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" } ] } diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go index 24519041..34de3272 100644 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go @@ -82,7 +82,9 @@ func (m *ModuleList) LookupModule(pkgname string) (require *Module, path string, var p Package err = json.Unmarshal(data, &p) if err == nil { - return p.Module, p.ImportPath, p.Dir + add := &Module{Path: p.ImportPath, Dir: p.Dir} + m.Require = append(m.Require, add) + return add, p.ImportPath, p.Dir } } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index b2cc1022..666e26c3 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -296,7 +296,20 @@ type PkgWalker struct { } func DefaultPkgConfig() *PkgConfig { - conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} + conf := &PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + //Types: make(map[ast.Expr]types.TypeAndValue), + //Scopes : make(map[ast.Node]*types.Scope) + //Implicits : make(map[ast.Node]types.Object) + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } return conf } @@ -998,7 +1011,6 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } - var kind ObjKind if cursorObj != nil { var err error From 26b7158ccc90b6ab9604143c015241774dd409bb Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 3 Oct 2018 20:27:57 +0800 Subject: [PATCH 032/133] update dep --- Godeps/Godeps.json | 14 ++--- .../visualfc/gotools/types/types.go | 61 +++++++++++++------ 2 files changed, 51 insertions(+), 24 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 1aa84559..90052264 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,27 +8,27 @@ "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -44,7 +44,7 @@ }, { "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "bf3d840faa6c31bec859fd52c9ede480680beb87" + "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" } ] } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 666e26c3..60e2a93a 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -205,6 +205,10 @@ func runTypes(cmd *command.Command, args []string) error { } pkgName = pkgPath } + if cursor.src != nil { + w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src) + } + conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: true} if cursor != nil { cursor.pkgName = pkgName @@ -273,6 +277,7 @@ func NewPkgWalker(context *build.Context) *PkgWalker { fset: token.NewFileSet(), parsedFileCache: map[string]*ast.File{}, parsedFileMod: map[string]int64{}, + fileSourceData: map[string]*SourceData{}, importingName: map[string]bool{}, Imported: map[string]*types.Package{"unsafe": types.Unsafe}, ImportedMod: map[string]int64{}, @@ -280,6 +285,11 @@ func NewPkgWalker(context *build.Context) *PkgWalker { } } +type SourceData struct { + data interface{} + mtime int64 +} + type PkgWalker struct { fset *token.FileSet Context *build.Context @@ -287,6 +297,7 @@ type PkgWalker struct { importingName map[string]bool parsedFileCache map[string]*ast.File parsedFileMod map[string]int64 + fileSourceData map[string]*SourceData Imported map[string]*types.Package // packages already imported ImportedMod map[string]int64 gcimported types.Importer @@ -295,6 +306,10 @@ type PkgWalker struct { mod *gomod.ModuleList } +func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { + w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} +} + func DefaultPkgConfig() *PkgConfig { conf := &PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} conf.Info = &types.Info{ @@ -425,7 +440,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri return nil, err } GoFiles := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...) - XTestFiles := append([]string{}, bp.XTestGoFiles...) + XTestGoFiles := append([]string{}, bp.XTestGoFiles...) if conf.WithTestFiles { GoFiles = append(GoFiles, bp.TestGoFiles...) @@ -485,7 +500,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri if conf.Cursor != nil && conf.Cursor.fileName != "" { cursor := conf.Cursor - f, _ := w.parseFileEx(bp.Dir, cursor.fileName, cursor.src, cursor.mtime, true) + f, _ := w.parseFile(bp.Dir, cursor.fileName) if f != nil { cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir @@ -495,18 +510,18 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri isXTest = true } cursor.xtest = isXTest - checkAppend := func(filenames []string, file string) []string { + checkInsert := func(filenames []string, file string) []string { for _, f := range filenames { if f == file { return filenames } } - return append(filenames, file) + return append([]string{file}, filenames...) } if isXTest { - XTestFiles = checkAppend(XTestFiles, cursor.fileName) + XTestGoFiles = checkInsert(XTestGoFiles, cursor.fileName) } else { - GoFiles = checkAppend(GoFiles, cursor.fileName) + GoFiles = checkInsert(GoFiles, cursor.fileName) } } } @@ -515,13 +530,11 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri fileMap = make(map[string]*ast.File) for _, file := range filenames { var f *ast.File + f, err = w.parseFile(bp.Dir, file) if cursor != nil && cursor.fileName == file { - f, err = w.parseFileEx(bp.Dir, file, cursor.src, cursor.mtime, true) cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir cursor.xtest = xtest - } else { - f, err = w.parseFile(bp.Dir, file) } if err != nil && typesVerbose { fmt.Fprintln(w.cmd.Stderr, err) @@ -534,7 +547,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri var files []*ast.File var xfiles []*ast.File files, conf.Files = parserFiles(GoFiles, conf.Cursor, false) - xfiles, conf.XTestFiles = parserFiles(bp.XTestGoFiles, conf.Cursor, true) + xfiles, conf.XTestFiles = parserFiles(XTestGoFiles, conf.Cursor, true) typesConf := types.Config{ IgnoreFuncBodies: conf.IgnoreFuncBodies, @@ -592,14 +605,18 @@ func (im *Importer) Import(name string) (pkg *types.Package, err error) { } func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { - return w.parseFileEx(dir, file, nil, -1, typesFindDoc) + return w.parseFileEx(dir, file, nil, 0, typesFindDoc) } func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, findDoc bool) (*ast.File, error) { filename := filepath.Join(dir, file) + if sd, ok := w.fileSourceData[filename]; ok { + src = sd.data + mtime = sd.mtime + } if f, ok := w.parsedFileCache[filename]; ok { if i, ok := w.parsedFileMod[filename]; ok { - if mtime != -1 && mtime == i { + if mtime != 0 && mtime == i { return f, nil } info, err := os.Stat(filename) @@ -608,7 +625,6 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } } } - var f *ast.File var err error // generate missing context-dependent files. @@ -638,7 +654,7 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, return f, err } } - if mtime != -1 { + if mtime != 0 { w.parsedFileMod[filename] = mtime } else { info, err := os.Stat(filename) @@ -1024,7 +1040,6 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { //TODO return nil } - if kind == ObjField { if cursorObj.(*types.Var).Anonymous() { typ := orgType(cursorObj.Type()) @@ -1080,6 +1095,18 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if na != nil { fieldTypeObj = na.Obj() } + //check current pkg + if fieldTypeObj != nil && fieldTypeObj.Pkg() == pkg { + cursorPkg = fieldTypeObj.Pkg() + if t, ok := fieldTypeObj.Type().Underlying().(*types.Struct); ok { + for i := 0; i < t.NumFields(); i++ { + if t.Field(i).Id() == cursorObj.Id() { + cursorPos = t.Field(i).Pos() + break + } + } + } + } } } } @@ -1400,7 +1427,7 @@ func (w *PkgWalker) CheckIsName(cursor *FileCursor) *ast.Ident { if cursor.fileDir == "" { return nil } - file, _ := w.parseFileEx(cursor.fileDir, cursor.fileName, cursor.src, cursor.mtime, true) + file, _ := w.parseFile(cursor.fileDir, cursor.fileName) if file == nil { return nil } @@ -1414,7 +1441,7 @@ func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec { if cursor.fileDir == "" { return nil } - file, _ := w.parseFileEx(cursor.fileDir, cursor.fileName, cursor.src, cursor.mtime, true) + file, _ := w.parseFile(cursor.fileDir, cursor.fileName) if file == nil { return nil } From dee5e96f02dd56e7226bf8b28ff5f9a1cc5d7ea7 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 5 Oct 2018 21:30:52 +0800 Subject: [PATCH 033/133] update dep --- Godeps/Godeps.json | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 90052264..7fe6a60d 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,49 +2,42 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", - "Packages": [ - "./..." - ], "Deps": [ { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" + "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" + "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "90fa682c2a6e6a37b3a1364ce2fe1d5e41af9d6d" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "0f6d0d43f84f9dc1084beae3b95009f8b22eb05f" + "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" } ] } From d6d01dab5d079a50374ef75581f17910a2e8a41b Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 11 Oct 2018 13:14:27 +0800 Subject: [PATCH 034/133] types: use fastmod to parse large Go module project (gohugoio/hugo) --- Godeps/Godeps.json | 33 +- package.go | 2 +- vendor/github.com/visualfc/fastmod/LICENSE | 28 + vendor/github.com/visualfc/fastmod/README.md | 12 + vendor/github.com/visualfc/fastmod/fastmod.go | 137 +++ .../fastmod/internal/modfile/gopkgin.go | 47 + .../fastmod/internal/modfile/print.go | 164 ++++ .../visualfc/fastmod/internal/modfile/read.go | 869 ++++++++++++++++++ .../visualfc/fastmod/internal/modfile/rule.go | 724 +++++++++++++++ .../fastmod/internal/module/module.go | 540 +++++++++++ .../fastmod/internal/semver/semver.go | 388 ++++++++ .../visualfc/gotools/pkg/gomod/gomod.go | 130 --- .../visualfc/gotools/types/types.go | 66 +- 13 files changed, 2968 insertions(+), 172 deletions(-) create mode 100644 vendor/github.com/visualfc/fastmod/LICENSE create mode 100644 vendor/github.com/visualfc/fastmod/README.md create mode 100644 vendor/github.com/visualfc/fastmod/fastmod.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/modfile/print.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/modfile/read.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/modfile/rule.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/module/module.go create mode 100644 vendor/github.com/visualfc/fastmod/internal/semver/semver.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 7fe6a60d..244875e7 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,30 +2,45 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", + "Packages": [ + "." + ], "Deps": [ { - "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "ImportPath": "github.com/visualfc/fastmod", + "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" }, { - "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "ImportPath": "github.com/visualfc/fastmod/internal/modfile", + "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + }, + { + "ImportPath": "github.com/visualfc/fastmod/internal/module", + "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + }, + { + "ImportPath": "github.com/visualfc/fastmod/internal/semver", + "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" }, { - "ImportPath": "github.com/visualfc/gotools/pkg/gomod", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", + "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkg/command", + "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "ab2a027143bf3b73c73e33e00164ceaa77ad4e39" + "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/package.go b/package.go index 3fbebed2..9e8c478a 100644 --- a/package.go +++ b/package.go @@ -92,7 +92,7 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { log.Println("error parser", import_path) return } - if t, ok := c.walker.ImportedMod[import_path]; ok { + if t, ok := c.walker.ImportedModTime[import_path]; ok { if m.mtime == t { return } diff --git a/vendor/github.com/visualfc/fastmod/LICENSE b/vendor/github.com/visualfc/fastmod/LICENSE new file mode 100644 index 00000000..ca2493d5 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2011-2017, visualfc +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of gotools nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/visualfc/fastmod/README.md b/vendor/github.com/visualfc/fastmod/README.md new file mode 100644 index 00000000..3b67499b --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/README.md @@ -0,0 +1,12 @@ +## Fast parse Go modules + + go get github.com/visualfc/fastmod + +Usages: + + modList := fastmod.NewModuleList(&build.Default) + mod, err := modList.LoadModule(dir) + if err != nil { + return + } + path, dir := mod.Lookup(pkg) \ No newline at end of file diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go new file mode 100644 index 00000000..62eb0d48 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -0,0 +1,137 @@ +// Copyright 2018 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// +// internal modfile/module/semver copy from Go1.11 source + +package fastmod + +import ( + "go/build" + "io/ioutil" + "os/exec" + "path/filepath" + "strings" + + "github.com/visualfc/fastmod/internal/modfile" +) + +var ( + PkgMod string +) + +func UpdatePkgMod(ctx *build.Context) { + if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { + PkgMod = filepath.Join(list[0], "pkg/mod") + } +} + +func fixVersion(path, vers string) (string, error) { + return vers, nil +} + +func LookupModFile(dir string) (string, error) { + command := exec.Command("go", "env", "GOMOD") + command.Dir = dir + data, err := command.Output() + if err != nil { + return "", err + } + return strings.TrimSpace(string(data)), nil +} + +type ModuleList struct { + mods map[string]*Module +} + +func NewModuleList(ctx *build.Context) *ModuleList { + UpdatePkgMod(ctx) + return &ModuleList{make(map[string]*Module)} +} + +type Version struct { + Path string + Version string +} + +type Mod struct { + Require *Version + Replace *Version +} + +type Module struct { + f *modfile.File + path string + fmod string + fdir string + mods []*Mod +} + +func (m *Module) init() { + for _, r := range m.f.Require { + mod := &Mod{Require: &Version{r.Mod.Path, r.Mod.Version}} + for _, v := range m.f.Replace { + if r.Mod.Path == v.Old.Path && r.Mod.Version == r.Mod.Version { + mod.Replace = &Version{v.New.Path, v.New.Version} + } + } + m.mods = append(m.mods, mod) + } +} + +func (m *Module) Path() string { + return m.f.Module.Mod.Path +} + +func (m *Module) ModFile() string { + return m.fmod +} + +func (m *Module) ModDir() string { + return m.fdir +} + +func (m *Module) Lookup(pkg string) (path string, dir string) { + if strings.HasPrefix(pkg, m.path+"/") { + return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]) + } + + for _, r := range m.mods { + if r.Require.Path == pkg { + if r.Replace != nil { + path = r.Replace.Path + "@" + r.Replace.Version + } else { + path = r.Require.Path + "@" + r.Require.Version + } + } else if strings.HasPrefix(pkg, r.Require.Path+"/") { + if r.Replace != nil { + path = r.Replace.Path + "@" + r.Replace.Version + pkg[len(r.Require.Path):] + } else { + path = r.Require.Path + "@" + r.Require.Version + pkg[len(r.Require.Path):] + } + } + } + return path, filepath.Join(PkgMod, path) +} + +func (mc *ModuleList) LoadModule(dir string) (*Module, error) { + fmod, err := LookupModFile(dir) + if fmod == "" { + return nil, err + } + if m, ok := mc.mods[fmod]; ok { + return m, nil + } + data, err := ioutil.ReadFile(fmod) + if err != nil { + return nil, err + } + f, err := modfile.Parse(fmod, data, fixVersion) + if err != nil { + return nil, err + } + m := &Module{f, f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} + m.init() + mc.mods[fmod] = m + return m, nil +} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go b/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go new file mode 100644 index 00000000..c94b3848 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go @@ -0,0 +1,47 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// TODO: Figure out what gopkg.in should do. + +package modfile + +import "strings" + +// ParseGopkgIn splits gopkg.in import paths into their constituent parts +func ParseGopkgIn(path string) (root, repo, major, subdir string, ok bool) { + if !strings.HasPrefix(path, "gopkg.in/") { + return + } + f := strings.Split(path, "/") + if len(f) >= 2 { + if elem, v, ok := dotV(f[1]); ok { + root = strings.Join(f[:2], "/") + repo = "github.com/go-" + elem + "/" + elem + major = v + subdir = strings.Join(f[2:], "/") + return root, repo, major, subdir, true + } + } + if len(f) >= 3 { + if elem, v, ok := dotV(f[2]); ok { + root = strings.Join(f[:3], "/") + repo = "github.com/" + f[1] + "/" + elem + major = v + subdir = strings.Join(f[3:], "/") + return root, repo, major, subdir, true + } + } + return +} + +func dotV(name string) (elem, v string, ok bool) { + i := len(name) - 1 + for i >= 0 && '0' <= name[i] && name[i] <= '9' { + i-- + } + if i <= 2 || i+1 >= len(name) || name[i-1] != '.' || name[i] != 'v' || name[i+1] == '0' && len(name) != i+2 { + return "", "", false + } + return name[:i-1], name[i:], true +} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/print.go b/vendor/github.com/visualfc/fastmod/internal/modfile/print.go new file mode 100644 index 00000000..cefc43b1 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/modfile/print.go @@ -0,0 +1,164 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Module file printer. + +package modfile + +import ( + "bytes" + "fmt" + "strings" +) + +func Format(f *FileSyntax) []byte { + pr := &printer{} + pr.file(f) + return pr.Bytes() +} + +// A printer collects the state during printing of a file or expression. +type printer struct { + bytes.Buffer // output buffer + comment []Comment // pending end-of-line comments + margin int // left margin (indent), a number of tabs +} + +// printf prints to the buffer. +func (p *printer) printf(format string, args ...interface{}) { + fmt.Fprintf(p, format, args...) +} + +// indent returns the position on the current line, in bytes, 0-indexed. +func (p *printer) indent() int { + b := p.Bytes() + n := 0 + for n < len(b) && b[len(b)-1-n] != '\n' { + n++ + } + return n +} + +// newline ends the current line, flushing end-of-line comments. +func (p *printer) newline() { + if len(p.comment) > 0 { + p.printf(" ") + for i, com := range p.comment { + if i > 0 { + p.trim() + p.printf("\n") + for i := 0; i < p.margin; i++ { + p.printf("\t") + } + } + p.printf("%s", strings.TrimSpace(com.Token)) + } + p.comment = p.comment[:0] + } + + p.trim() + p.printf("\n") + for i := 0; i < p.margin; i++ { + p.printf("\t") + } +} + +// trim removes trailing spaces and tabs from the current line. +func (p *printer) trim() { + // Remove trailing spaces and tabs from line we're about to end. + b := p.Bytes() + n := len(b) + for n > 0 && (b[n-1] == '\t' || b[n-1] == ' ') { + n-- + } + p.Truncate(n) +} + +// file formats the given file into the print buffer. +func (p *printer) file(f *FileSyntax) { + for _, com := range f.Before { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + + for i, stmt := range f.Stmt { + switch x := stmt.(type) { + case *CommentBlock: + // comments already handled + p.expr(x) + + default: + p.expr(x) + p.newline() + } + + for _, com := range stmt.Comment().After { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + + if i+1 < len(f.Stmt) { + p.newline() + } + } +} + +func (p *printer) expr(x Expr) { + // Emit line-comments preceding this expression. + if before := x.Comment().Before; len(before) > 0 { + // Want to print a line comment. + // Line comments must be at the current margin. + p.trim() + if p.indent() > 0 { + // There's other text on the line. Start a new line. + p.printf("\n") + } + // Re-indent to margin. + for i := 0; i < p.margin; i++ { + p.printf("\t") + } + for _, com := range before { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + } + + switch x := x.(type) { + default: + panic(fmt.Errorf("printer: unexpected type %T", x)) + + case *CommentBlock: + // done + + case *LParen: + p.printf("(") + case *RParen: + p.printf(")") + + case *Line: + sep := "" + for _, tok := range x.Token { + p.printf("%s%s", sep, tok) + sep = " " + } + + case *LineBlock: + for _, tok := range x.Token { + p.printf("%s ", tok) + } + p.expr(&x.LParen) + p.margin++ + for _, l := range x.Line { + p.newline() + p.expr(l) + } + p.margin-- + p.newline() + p.expr(&x.RParen) + } + + // Queue end-of-line comments for printing when we + // reach the end of the line. + p.comment = append(p.comment, x.Comment().Suffix...) +} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/read.go b/vendor/github.com/visualfc/fastmod/internal/modfile/read.go new file mode 100644 index 00000000..1d81ff1a --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/modfile/read.go @@ -0,0 +1,869 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Module file parser. +// This is a simplified copy of Google's buildifier parser. + +package modfile + +import ( + "bytes" + "fmt" + "os" + "strconv" + "strings" + "unicode" + "unicode/utf8" +) + +// A Position describes the position between two bytes of input. +type Position struct { + Line int // line in input (starting at 1) + LineRune int // rune in line (starting at 1) + Byte int // byte in input (starting at 0) +} + +// add returns the position at the end of s, assuming it starts at p. +func (p Position) add(s string) Position { + p.Byte += len(s) + if n := strings.Count(s, "\n"); n > 0 { + p.Line += n + s = s[strings.LastIndex(s, "\n")+1:] + p.LineRune = 1 + } + p.LineRune += utf8.RuneCountInString(s) + return p +} + +// An Expr represents an input element. +type Expr interface { + // Span returns the start and end position of the expression, + // excluding leading or trailing comments. + Span() (start, end Position) + + // Comment returns the comments attached to the expression. + // This method would normally be named 'Comments' but that + // would interfere with embedding a type of the same name. + Comment() *Comments +} + +// A Comment represents a single // comment. +type Comment struct { + Start Position + Token string // without trailing newline + Suffix bool // an end of line (not whole line) comment +} + +// Comments collects the comments associated with an expression. +type Comments struct { + Before []Comment // whole-line comments before this expression + Suffix []Comment // end-of-line comments after this expression + + // For top-level expressions only, After lists whole-line + // comments following the expression. + After []Comment +} + +// Comment returns the receiver. This isn't useful by itself, but +// a Comments struct is embedded into all the expression +// implementation types, and this gives each of those a Comment +// method to satisfy the Expr interface. +func (c *Comments) Comment() *Comments { + return c +} + +// A FileSyntax represents an entire go.mod file. +type FileSyntax struct { + Name string // file path + Comments + Stmt []Expr +} + +func (x *FileSyntax) Span() (start, end Position) { + if len(x.Stmt) == 0 { + return + } + start, _ = x.Stmt[0].Span() + _, end = x.Stmt[len(x.Stmt)-1].Span() + return start, end +} + +func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { + if hint == nil { + // If no hint given, add to the last statement of the given type. + Loop: + for i := len(x.Stmt) - 1; i >= 0; i-- { + stmt := x.Stmt[i] + switch stmt := stmt.(type) { + case *Line: + if stmt.Token != nil && stmt.Token[0] == tokens[0] { + hint = stmt + break Loop + } + case *LineBlock: + if stmt.Token[0] == tokens[0] { + hint = stmt + break Loop + } + } + } + } + + if hint != nil { + for i, stmt := range x.Stmt { + switch stmt := stmt.(type) { + case *Line: + if stmt == hint { + // Convert line to line block. + stmt.InBlock = true + block := &LineBlock{Token: stmt.Token[:1], Line: []*Line{stmt}} + stmt.Token = stmt.Token[1:] + x.Stmt[i] = block + new := &Line{Token: tokens[1:], InBlock: true} + block.Line = append(block.Line, new) + return new + } + case *LineBlock: + if stmt == hint { + new := &Line{Token: tokens[1:], InBlock: true} + stmt.Line = append(stmt.Line, new) + return new + } + for j, line := range stmt.Line { + if line == hint { + // Add new line after hint. + stmt.Line = append(stmt.Line, nil) + copy(stmt.Line[j+2:], stmt.Line[j+1:]) + new := &Line{Token: tokens[1:], InBlock: true} + stmt.Line[j+1] = new + return new + } + } + } + } + } + + new := &Line{Token: tokens} + x.Stmt = append(x.Stmt, new) + return new +} + +func (x *FileSyntax) updateLine(line *Line, tokens ...string) { + if line.InBlock { + tokens = tokens[1:] + } + line.Token = tokens +} + +func (x *FileSyntax) removeLine(line *Line) { + line.Token = nil +} + +// Cleanup cleans up the file syntax x after any edit operations. +// To avoid quadratic behavior, removeLine marks the line as dead +// by setting line.Token = nil but does not remove it from the slice +// in which it appears. After edits have all been indicated, +// calling Cleanup cleans out the dead lines. +func (x *FileSyntax) Cleanup() { + w := 0 + for _, stmt := range x.Stmt { + switch stmt := stmt.(type) { + case *Line: + if stmt.Token == nil { + continue + } + case *LineBlock: + ww := 0 + for _, line := range stmt.Line { + if line.Token != nil { + stmt.Line[ww] = line + ww++ + } + } + if ww == 0 { + continue + } + if ww == 1 { + // Collapse block into single line. + line := &Line{ + Comments: Comments{ + Before: commentsAdd(stmt.Before, stmt.Line[0].Before), + Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix), + After: commentsAdd(stmt.Line[0].After, stmt.After), + }, + Token: stringsAdd(stmt.Token, stmt.Line[0].Token), + } + x.Stmt[w] = line + w++ + continue + } + stmt.Line = stmt.Line[:ww] + } + x.Stmt[w] = stmt + w++ + } + x.Stmt = x.Stmt[:w] +} + +func commentsAdd(x, y []Comment) []Comment { + return append(x[:len(x):len(x)], y...) +} + +func stringsAdd(x, y []string) []string { + return append(x[:len(x):len(x)], y...) +} + +// A CommentBlock represents a top-level block of comments separate +// from any rule. +type CommentBlock struct { + Comments + Start Position +} + +func (x *CommentBlock) Span() (start, end Position) { + return x.Start, x.Start +} + +// A Line is a single line of tokens. +type Line struct { + Comments + Start Position + Token []string + InBlock bool + End Position +} + +func (x *Line) Span() (start, end Position) { + return x.Start, x.End +} + +// A LineBlock is a factored block of lines, like +// +// require ( +// "x" +// "y" +// ) +// +type LineBlock struct { + Comments + Start Position + LParen LParen + Token []string + Line []*Line + RParen RParen +} + +func (x *LineBlock) Span() (start, end Position) { + return x.Start, x.RParen.Pos.add(")") +} + +// An LParen represents the beginning of a parenthesized line block. +// It is a place to store suffix comments. +type LParen struct { + Comments + Pos Position +} + +func (x *LParen) Span() (start, end Position) { + return x.Pos, x.Pos.add(")") +} + +// An RParen represents the end of a parenthesized line block. +// It is a place to store whole-line (before) comments. +type RParen struct { + Comments + Pos Position +} + +func (x *RParen) Span() (start, end Position) { + return x.Pos, x.Pos.add(")") +} + +// An input represents a single input file being parsed. +type input struct { + // Lexing state. + filename string // name of input file, for errors + complete []byte // entire input + remaining []byte // remaining input + token []byte // token being scanned + lastToken string // most recently returned token, for error messages + pos Position // current input position + comments []Comment // accumulated comments + endRule int // position of end of current rule + + // Parser state. + file *FileSyntax // returned top-level syntax tree + parseError error // error encountered during parsing + + // Comment assignment state. + pre []Expr // all expressions, in preorder traversal + post []Expr // all expressions, in postorder traversal +} + +func newInput(filename string, data []byte) *input { + return &input{ + filename: filename, + complete: data, + remaining: data, + pos: Position{Line: 1, LineRune: 1, Byte: 0}, + } +} + +// parse parses the input file. +func parse(file string, data []byte) (f *FileSyntax, err error) { + in := newInput(file, data) + // The parser panics for both routine errors like syntax errors + // and for programmer bugs like array index errors. + // Turn both into error returns. Catching bug panics is + // especially important when processing many files. + defer func() { + if e := recover(); e != nil { + if e == in.parseError { + err = in.parseError + } else { + err = fmt.Errorf("%s:%d:%d: internal error: %v", in.filename, in.pos.Line, in.pos.LineRune, e) + } + } + }() + + // Invoke the parser. + in.parseFile() + if in.parseError != nil { + return nil, in.parseError + } + in.file.Name = in.filename + + // Assign comments to nearby syntax. + in.assignComments() + + return in.file, nil +} + +// Error is called to report an error. +// The reason s is often "syntax error". +// Error does not return: it panics. +func (in *input) Error(s string) { + if s == "syntax error" && in.lastToken != "" { + s += " near " + in.lastToken + } + in.parseError = fmt.Errorf("%s:%d:%d: %v", in.filename, in.pos.Line, in.pos.LineRune, s) + panic(in.parseError) +} + +// eof reports whether the input has reached end of file. +func (in *input) eof() bool { + return len(in.remaining) == 0 +} + +// peekRune returns the next rune in the input without consuming it. +func (in *input) peekRune() int { + if len(in.remaining) == 0 { + return 0 + } + r, _ := utf8.DecodeRune(in.remaining) + return int(r) +} + +// peekPrefix reports whether the remaining input begins with the given prefix. +func (in *input) peekPrefix(prefix string) bool { + // This is like bytes.HasPrefix(in.remaining, []byte(prefix)) + // but without the allocation of the []byte copy of prefix. + for i := 0; i < len(prefix); i++ { + if i >= len(in.remaining) || in.remaining[i] != prefix[i] { + return false + } + } + return true +} + +// readRune consumes and returns the next rune in the input. +func (in *input) readRune() int { + if len(in.remaining) == 0 { + in.Error("internal lexer error: readRune at EOF") + } + r, size := utf8.DecodeRune(in.remaining) + in.remaining = in.remaining[size:] + if r == '\n' { + in.pos.Line++ + in.pos.LineRune = 1 + } else { + in.pos.LineRune++ + } + in.pos.Byte += size + return int(r) +} + +type symType struct { + pos Position + endPos Position + text string +} + +// startToken marks the beginning of the next input token. +// It must be followed by a call to endToken, once the token has +// been consumed using readRune. +func (in *input) startToken(sym *symType) { + in.token = in.remaining + sym.text = "" + sym.pos = in.pos +} + +// endToken marks the end of an input token. +// It records the actual token string in sym.text if the caller +// has not done that already. +func (in *input) endToken(sym *symType) { + if sym.text == "" { + tok := string(in.token[:len(in.token)-len(in.remaining)]) + sym.text = tok + in.lastToken = sym.text + } + sym.endPos = in.pos +} + +// lex is called from the parser to obtain the next input token. +// It returns the token value (either a rune like '+' or a symbolic token _FOR) +// and sets val to the data associated with the token. +// For all our input tokens, the associated data is +// val.Pos (the position where the token begins) +// and val.Token (the input string corresponding to the token). +func (in *input) lex(sym *symType) int { + // Skip past spaces, stopping at non-space or EOF. + countNL := 0 // number of newlines we've skipped past + for !in.eof() { + // Skip over spaces. Count newlines so we can give the parser + // information about where top-level blank lines are, + // for top-level comment assignment. + c := in.peekRune() + if c == ' ' || c == '\t' || c == '\r' { + in.readRune() + continue + } + + // Comment runs to end of line. + if in.peekPrefix("//") { + in.startToken(sym) + + // Is this comment the only thing on its line? + // Find the last \n before this // and see if it's all + // spaces from there to here. + i := bytes.LastIndex(in.complete[:in.pos.Byte], []byte("\n")) + suffix := len(bytes.TrimSpace(in.complete[i+1:in.pos.Byte])) > 0 + in.readRune() + in.readRune() + + // Consume comment. + for len(in.remaining) > 0 && in.readRune() != '\n' { + } + in.endToken(sym) + + sym.text = strings.TrimRight(sym.text, "\n") + in.lastToken = "comment" + + // If we are at top level (not in a statement), hand the comment to + // the parser as a _COMMENT token. The grammar is written + // to handle top-level comments itself. + if !suffix { + // Not in a statement. Tell parser about top-level comment. + return _COMMENT + } + + // Otherwise, save comment for later attachment to syntax tree. + if countNL > 1 { + in.comments = append(in.comments, Comment{sym.pos, "", false}) + } + in.comments = append(in.comments, Comment{sym.pos, sym.text, suffix}) + countNL = 1 + return _EOL + } + + if in.peekPrefix("/*") { + in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) + } + + // Found non-space non-comment. + break + } + + // Found the beginning of the next token. + in.startToken(sym) + defer in.endToken(sym) + + // End of file. + if in.eof() { + in.lastToken = "EOF" + return _EOF + } + + // Punctuation tokens. + switch c := in.peekRune(); c { + case '\n': + in.readRune() + return c + + case '(': + in.readRune() + return c + + case ')': + in.readRune() + return c + + case '"', '`': // quoted string + quote := c + in.readRune() + for { + if in.eof() { + in.pos = sym.pos + in.Error("unexpected EOF in string") + } + if in.peekRune() == '\n' { + in.Error("unexpected newline in string") + } + c := in.readRune() + if c == quote { + break + } + if c == '\\' && quote != '`' { + if in.eof() { + in.pos = sym.pos + in.Error("unexpected EOF in string") + } + in.readRune() + } + } + in.endToken(sym) + return _STRING + } + + // Checked all punctuation. Must be identifier token. + if c := in.peekRune(); !isIdent(c) { + in.Error(fmt.Sprintf("unexpected input character %#q", c)) + } + + // Scan over identifier. + for isIdent(in.peekRune()) { + if in.peekPrefix("//") { + break + } + if in.peekPrefix("/*") { + in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) + } + in.readRune() + } + return _IDENT +} + +// isIdent reports whether c is an identifier rune. +// We treat nearly all runes as identifier runes. +func isIdent(c int) bool { + return c != 0 && !unicode.IsSpace(rune(c)) +} + +// Comment assignment. +// We build two lists of all subexpressions, preorder and postorder. +// The preorder list is ordered by start location, with outer expressions first. +// The postorder list is ordered by end location, with outer expressions last. +// We use the preorder list to assign each whole-line comment to the syntax +// immediately following it, and we use the postorder list to assign each +// end-of-line comment to the syntax immediately preceding it. + +// order walks the expression adding it and its subexpressions to the +// preorder and postorder lists. +func (in *input) order(x Expr) { + if x != nil { + in.pre = append(in.pre, x) + } + switch x := x.(type) { + default: + panic(fmt.Errorf("order: unexpected type %T", x)) + case nil: + // nothing + case *LParen, *RParen: + // nothing + case *CommentBlock: + // nothing + case *Line: + // nothing + case *FileSyntax: + for _, stmt := range x.Stmt { + in.order(stmt) + } + case *LineBlock: + in.order(&x.LParen) + for _, l := range x.Line { + in.order(l) + } + in.order(&x.RParen) + } + if x != nil { + in.post = append(in.post, x) + } +} + +// assignComments attaches comments to nearby syntax. +func (in *input) assignComments() { + const debug = false + + // Generate preorder and postorder lists. + in.order(in.file) + + // Split into whole-line comments and suffix comments. + var line, suffix []Comment + for _, com := range in.comments { + if com.Suffix { + suffix = append(suffix, com) + } else { + line = append(line, com) + } + } + + if debug { + for _, c := range line { + fmt.Fprintf(os.Stderr, "LINE %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) + } + } + + // Assign line comments to syntax immediately following. + for _, x := range in.pre { + start, _ := x.Span() + if debug { + fmt.Printf("pre %T :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte) + } + xcom := x.Comment() + for len(line) > 0 && start.Byte >= line[0].Start.Byte { + if debug { + fmt.Fprintf(os.Stderr, "ASSIGN LINE %q #%d\n", line[0].Token, line[0].Start.Byte) + } + xcom.Before = append(xcom.Before, line[0]) + line = line[1:] + } + } + + // Remaining line comments go at end of file. + in.file.After = append(in.file.After, line...) + + if debug { + for _, c := range suffix { + fmt.Fprintf(os.Stderr, "SUFFIX %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) + } + } + + // Assign suffix comments to syntax immediately before. + for i := len(in.post) - 1; i >= 0; i-- { + x := in.post[i] + + start, end := x.Span() + if debug { + fmt.Printf("post %T :%d:%d #%d :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte, end.Line, end.LineRune, end.Byte) + } + + // Do not assign suffix comments to end of line block or whole file. + // Instead assign them to the last element inside. + switch x.(type) { + case *FileSyntax: + continue + } + + // Do not assign suffix comments to something that starts + // on an earlier line, so that in + // + // x ( y + // z ) // comment + // + // we assign the comment to z and not to x ( ... ). + if start.Line != end.Line { + continue + } + xcom := x.Comment() + for len(suffix) > 0 && end.Byte <= suffix[len(suffix)-1].Start.Byte { + if debug { + fmt.Fprintf(os.Stderr, "ASSIGN SUFFIX %q #%d\n", suffix[len(suffix)-1].Token, suffix[len(suffix)-1].Start.Byte) + } + xcom.Suffix = append(xcom.Suffix, suffix[len(suffix)-1]) + suffix = suffix[:len(suffix)-1] + } + } + + // We assigned suffix comments in reverse. + // If multiple suffix comments were appended to the same + // expression node, they are now in reverse. Fix that. + for _, x := range in.post { + reverseComments(x.Comment().Suffix) + } + + // Remaining suffix comments go at beginning of file. + in.file.Before = append(in.file.Before, suffix...) +} + +// reverseComments reverses the []Comment list. +func reverseComments(list []Comment) { + for i, j := 0, len(list)-1; i < j; i, j = i+1, j-1 { + list[i], list[j] = list[j], list[i] + } +} + +func (in *input) parseFile() { + in.file = new(FileSyntax) + var sym symType + var cb *CommentBlock + for { + tok := in.lex(&sym) + switch tok { + case '\n': + if cb != nil { + in.file.Stmt = append(in.file.Stmt, cb) + cb = nil + } + case _COMMENT: + if cb == nil { + cb = &CommentBlock{Start: sym.pos} + } + com := cb.Comment() + com.Before = append(com.Before, Comment{Start: sym.pos, Token: sym.text}) + case _EOF: + if cb != nil { + in.file.Stmt = append(in.file.Stmt, cb) + } + return + default: + in.parseStmt(&sym) + if cb != nil { + in.file.Stmt[len(in.file.Stmt)-1].Comment().Before = cb.Before + cb = nil + } + } + } +} + +func (in *input) parseStmt(sym *symType) { + start := sym.pos + end := sym.endPos + token := []string{sym.text} + for { + tok := in.lex(sym) + switch tok { + case '\n', _EOF, _EOL: + in.file.Stmt = append(in.file.Stmt, &Line{ + Start: start, + Token: token, + End: end, + }) + return + case '(': + in.file.Stmt = append(in.file.Stmt, in.parseLineBlock(start, token, sym)) + return + default: + token = append(token, sym.text) + end = sym.endPos + } + } +} + +func (in *input) parseLineBlock(start Position, token []string, sym *symType) *LineBlock { + x := &LineBlock{ + Start: start, + Token: token, + LParen: LParen{Pos: sym.pos}, + } + var comments []Comment + for { + tok := in.lex(sym) + switch tok { + case _EOL: + // ignore + case '\n': + if len(comments) == 0 && len(x.Line) > 0 || len(comments) > 0 && comments[len(comments)-1].Token != "" { + comments = append(comments, Comment{}) + } + case _COMMENT: + comments = append(comments, Comment{Start: sym.pos, Token: sym.text}) + case _EOF: + in.Error(fmt.Sprintf("syntax error (unterminated block started at %s:%d:%d)", in.filename, x.Start.Line, x.Start.LineRune)) + case ')': + x.RParen.Before = comments + x.RParen.Pos = sym.pos + tok = in.lex(sym) + if tok != '\n' && tok != _EOF && tok != _EOL { + in.Error("syntax error (expected newline after closing paren)") + } + return x + default: + l := in.parseLine(sym) + x.Line = append(x.Line, l) + l.Comment().Before = comments + comments = nil + } + } +} + +func (in *input) parseLine(sym *symType) *Line { + start := sym.pos + end := sym.endPos + token := []string{sym.text} + for { + tok := in.lex(sym) + switch tok { + case '\n', _EOF, _EOL: + return &Line{ + Start: start, + Token: token, + End: end, + InBlock: true, + } + default: + token = append(token, sym.text) + end = sym.endPos + } + } +} + +const ( + _EOF = -(1 + iota) + _EOL + _IDENT + _STRING + _COMMENT +) + +var ( + slashSlash = []byte("//") + moduleStr = []byte("module") +) + +// ModulePath returns the module path from the gomod file text. +// If it cannot find a module path, it returns an empty string. +// It is tolerant of unrelated problems in the go.mod file. +func ModulePath(mod []byte) string { + for len(mod) > 0 { + line := mod + mod = nil + if i := bytes.IndexByte(line, '\n'); i >= 0 { + line, mod = line[:i], line[i+1:] + } + if i := bytes.Index(line, slashSlash); i >= 0 { + line = line[:i] + } + line = bytes.TrimSpace(line) + if !bytes.HasPrefix(line, moduleStr) { + continue + } + line = line[len(moduleStr):] + n := len(line) + line = bytes.TrimSpace(line) + if len(line) == n || len(line) == 0 { + continue + } + + if line[0] == '"' || line[0] == '`' { + p, err := strconv.Unquote(string(line)) + if err != nil { + return "" // malformed quoted string or multiline module path + } + return p + } + + return string(line) + } + return "" // missing module path +} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/rule.go b/vendor/github.com/visualfc/fastmod/internal/modfile/rule.go new file mode 100644 index 00000000..b5a75c77 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/modfile/rule.go @@ -0,0 +1,724 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package modfile + +import ( + "bytes" + "errors" + "fmt" + "path/filepath" + "regexp" + "sort" + "strconv" + "strings" + "unicode" + + "github.com/visualfc/fastmod/internal/module" + "github.com/visualfc/fastmod/internal/semver" +) + +// A File is the parsed, interpreted form of a go.mod file. +type File struct { + Module *Module + Go *Go + Require []*Require + Exclude []*Exclude + Replace []*Replace + + Syntax *FileSyntax +} + +// A Module is the module statement. +type Module struct { + Mod module.Version + Syntax *Line +} + +// A Go is the go statement. +type Go struct { + Version string // "1.23" + Syntax *Line +} + +// A Require is a single require statement. +type Require struct { + Mod module.Version + Indirect bool // has "// indirect" comment + Syntax *Line +} + +// An Exclude is a single exclude statement. +type Exclude struct { + Mod module.Version + Syntax *Line +} + +// A Replace is a single replace statement. +type Replace struct { + Old module.Version + New module.Version + Syntax *Line +} + +func (f *File) AddModuleStmt(path string) error { + if f.Syntax == nil { + f.Syntax = new(FileSyntax) + } + if f.Module == nil { + f.Module = &Module{ + Mod: module.Version{Path: path}, + Syntax: f.Syntax.addLine(nil, "module", AutoQuote(path)), + } + } else { + f.Module.Mod.Path = path + f.Syntax.updateLine(f.Module.Syntax, "module", AutoQuote(path)) + } + return nil +} + +func (f *File) AddComment(text string) { + if f.Syntax == nil { + f.Syntax = new(FileSyntax) + } + f.Syntax.Stmt = append(f.Syntax.Stmt, &CommentBlock{ + Comments: Comments{ + Before: []Comment{ + { + Token: text, + }, + }, + }, + }) +} + +type VersionFixer func(path, version string) (string, error) + +// Parse parses the data, reported in errors as being from file, +// into a File struct. It applies fix, if non-nil, to canonicalize all module versions found. +func Parse(file string, data []byte, fix VersionFixer) (*File, error) { + return parseToFile(file, data, fix, true) +} + +// ParseLax is like Parse but ignores unknown statements. +// It is used when parsing go.mod files other than the main module, +// under the theory that most statement types we add in the future will +// only apply in the main module, like exclude and replace, +// and so we get better gradual deployments if old go commands +// simply ignore those statements when found in go.mod files +// in dependencies. +func ParseLax(file string, data []byte, fix VersionFixer) (*File, error) { + return parseToFile(file, data, fix, false) +} + +func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (*File, error) { + fs, err := parse(file, data) + if err != nil { + return nil, err + } + f := &File{ + Syntax: fs, + } + + var errs bytes.Buffer + for _, x := range fs.Stmt { + switch x := x.(type) { + case *Line: + f.add(&errs, x, x.Token[0], x.Token[1:], fix, strict) + + case *LineBlock: + if len(x.Token) > 1 { + if strict { + fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) + } + continue + } + switch x.Token[0] { + default: + if strict { + fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) + } + continue + case "module", "require", "exclude", "replace": + for _, l := range x.Line { + f.add(&errs, l, x.Token[0], l.Token, fix, strict) + } + } + } + } + + if errs.Len() > 0 { + return nil, errors.New(strings.TrimRight(errs.String(), "\n")) + } + return f, nil +} + +var goVersionRE = regexp.MustCompile(`([1-9][0-9]*)\.(0|[1-9][0-9]*)`) + +func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, fix VersionFixer, strict bool) { + // If strict is false, this module is a dependency. + // We ignore all unknown directives as well as main-module-only + // directives like replace and exclude. It will work better for + // forward compatibility if we can depend on modules that have unknown + // statements (presumed relevant only when acting as the main module) + // and simply ignore those statements. + if !strict { + switch verb { + case "module", "require", "go": + // want these even for dependency go.mods + default: + return + } + } + + switch verb { + default: + fmt.Fprintf(errs, "%s:%d: unknown directive: %s\n", f.Syntax.Name, line.Start.Line, verb) + + case "go": + if f.Go != nil { + fmt.Fprintf(errs, "%s:%d: repeated go statement\n", f.Syntax.Name, line.Start.Line) + return + } + if len(args) != 1 || !goVersionRE.MatchString(args[0]) { + fmt.Fprintf(errs, "%s:%d: usage: go 1.23\n", f.Syntax.Name, line.Start.Line) + return + } + f.Go = &Go{Syntax: line} + f.Go.Version = args[0] + case "module": + if f.Module != nil { + fmt.Fprintf(errs, "%s:%d: repeated module statement\n", f.Syntax.Name, line.Start.Line) + return + } + f.Module = &Module{Syntax: line} + if len(args) != 1 { + + fmt.Fprintf(errs, "%s:%d: usage: module module/path [version]\n", f.Syntax.Name, line.Start.Line) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + f.Module.Mod = module.Version{Path: s} + case "require", "exclude": + if len(args) != 2 { + fmt.Fprintf(errs, "%s:%d: usage: %s module/path v1.2.3\n", f.Syntax.Name, line.Start.Line, verb) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + old := args[1] + v, err := parseVersion(s, &args[1], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid module version %q: %v\n", f.Syntax.Name, line.Start.Line, old, err) + return + } + pathMajor, err := modulePathMajor(s) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + if !module.MatchPathMajor(v, pathMajor) { + if pathMajor == "" { + pathMajor = "v0 or v1" + } + fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) + return + } + if verb == "require" { + f.Require = append(f.Require, &Require{ + Mod: module.Version{Path: s, Version: v}, + Syntax: line, + Indirect: isIndirect(line), + }) + } else { + f.Exclude = append(f.Exclude, &Exclude{ + Mod: module.Version{Path: s, Version: v}, + Syntax: line, + }) + } + case "replace": + arrow := 2 + if len(args) >= 2 && args[1] == "=>" { + arrow = 1 + } + if len(args) < arrow+2 || len(args) > arrow+3 || args[arrow] != "=>" { + fmt.Fprintf(errs, "%s:%d: usage: %s module/path [v1.2.3] => other/module v1.4\n\t or %s module/path [v1.2.3] => ../local/directory\n", f.Syntax.Name, line.Start.Line, verb, verb) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + pathMajor, err := modulePathMajor(s) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + var v string + if arrow == 2 { + old := args[1] + v, err = parseVersion(s, &args[1], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) + return + } + if !module.MatchPathMajor(v, pathMajor) { + if pathMajor == "" { + pathMajor = "v0 or v1" + } + fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) + return + } + } + ns, err := parseString(&args[arrow+1]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + nv := "" + if len(args) == arrow+2 { + if !IsDirectoryPath(ns) { + fmt.Fprintf(errs, "%s:%d: replacement module without version must be directory path (rooted or starting with ./ or ../)\n", f.Syntax.Name, line.Start.Line) + return + } + if filepath.Separator == '/' && strings.Contains(ns, `\`) { + fmt.Fprintf(errs, "%s:%d: replacement directory appears to be Windows path (on a non-windows system)\n", f.Syntax.Name, line.Start.Line) + return + } + } + if len(args) == arrow+3 { + old := args[arrow+1] + nv, err = parseVersion(ns, &args[arrow+2], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) + return + } + if IsDirectoryPath(ns) { + fmt.Fprintf(errs, "%s:%d: replacement module directory path %q cannot have version\n", f.Syntax.Name, line.Start.Line, ns) + return + } + } + f.Replace = append(f.Replace, &Replace{ + Old: module.Version{Path: s, Version: v}, + New: module.Version{Path: ns, Version: nv}, + Syntax: line, + }) + } +} + +// isIndirect reports whether line has a "// indirect" comment, +// meaning it is in go.mod only for its effect on indirect dependencies, +// so that it can be dropped entirely once the effective version of the +// indirect dependency reaches the given minimum version. +func isIndirect(line *Line) bool { + if len(line.Suffix) == 0 { + return false + } + f := strings.Fields(line.Suffix[0].Token) + return (len(f) == 2 && f[1] == "indirect" || len(f) > 2 && f[1] == "indirect;") && f[0] == "//" +} + +// setIndirect sets line to have (or not have) a "// indirect" comment. +func setIndirect(line *Line, indirect bool) { + if isIndirect(line) == indirect { + return + } + if indirect { + // Adding comment. + if len(line.Suffix) == 0 { + // New comment. + line.Suffix = []Comment{{Token: "// indirect", Suffix: true}} + return + } + // Insert at beginning of existing comment. + com := &line.Suffix[0] + space := " " + if len(com.Token) > 2 && com.Token[2] == ' ' || com.Token[2] == '\t' { + space = "" + } + com.Token = "// indirect;" + space + com.Token[2:] + return + } + + // Removing comment. + f := strings.Fields(line.Suffix[0].Token) + if len(f) == 2 { + // Remove whole comment. + line.Suffix = nil + return + } + + // Remove comment prefix. + com := &line.Suffix[0] + i := strings.Index(com.Token, "indirect;") + com.Token = "//" + com.Token[i+len("indirect;"):] +} + +// IsDirectoryPath reports whether the given path should be interpreted +// as a directory path. Just like on the go command line, relative paths +// and rooted paths are directory paths; the rest are module paths. +func IsDirectoryPath(ns string) bool { + // Because go.mod files can move from one system to another, + // we check all known path syntaxes, both Unix and Windows. + return strings.HasPrefix(ns, "./") || strings.HasPrefix(ns, "../") || strings.HasPrefix(ns, "/") || + strings.HasPrefix(ns, `.\`) || strings.HasPrefix(ns, `..\`) || strings.HasPrefix(ns, `\`) || + len(ns) >= 2 && ('A' <= ns[0] && ns[0] <= 'Z' || 'a' <= ns[0] && ns[0] <= 'z') && ns[1] == ':' +} + +// MustQuote reports whether s must be quoted in order to appear as +// a single token in a go.mod line. +func MustQuote(s string) bool { + for _, r := range s { + if !unicode.IsPrint(r) || r == ' ' || r == '"' || r == '\'' || r == '`' { + return true + } + } + return s == "" || strings.Contains(s, "//") || strings.Contains(s, "/*") +} + +// AutoQuote returns s or, if quoting is required for s to appear in a go.mod, +// the quotation of s. +func AutoQuote(s string) string { + if MustQuote(s) { + return strconv.Quote(s) + } + return s +} + +func parseString(s *string) (string, error) { + t := *s + if strings.HasPrefix(t, `"`) { + var err error + if t, err = strconv.Unquote(t); err != nil { + return "", err + } + } else if strings.ContainsAny(t, "\"'`") { + // Other quotes are reserved both for possible future expansion + // and to avoid confusion. For example if someone types 'x' + // we want that to be a syntax error and not a literal x in literal quotation marks. + return "", fmt.Errorf("unquoted string cannot contain quote") + } + *s = AutoQuote(t) + return t, nil +} + +func parseVersion(path string, s *string, fix VersionFixer) (string, error) { + t, err := parseString(s) + if err != nil { + return "", err + } + if fix != nil { + var err error + t, err = fix(path, t) + if err != nil { + return "", err + } + } + if v := module.CanonicalVersion(t); v != "" { + *s = v + return *s, nil + } + return "", fmt.Errorf("version must be of the form v1.2.3") +} + +func modulePathMajor(path string) (string, error) { + _, major, ok := module.SplitPathVersion(path) + if !ok { + return "", fmt.Errorf("invalid module path") + } + return major, nil +} + +func (f *File) Format() ([]byte, error) { + return Format(f.Syntax), nil +} + +// Cleanup cleans up the file f after any edit operations. +// To avoid quadratic behavior, modifications like DropRequire +// clear the entry but do not remove it from the slice. +// Cleanup cleans out all the cleared entries. +func (f *File) Cleanup() { + w := 0 + for _, r := range f.Require { + if r.Mod.Path != "" { + f.Require[w] = r + w++ + } + } + f.Require = f.Require[:w] + + w = 0 + for _, x := range f.Exclude { + if x.Mod.Path != "" { + f.Exclude[w] = x + w++ + } + } + f.Exclude = f.Exclude[:w] + + w = 0 + for _, r := range f.Replace { + if r.Old.Path != "" { + f.Replace[w] = r + w++ + } + } + f.Replace = f.Replace[:w] + + f.Syntax.Cleanup() +} + +func (f *File) AddRequire(path, vers string) error { + need := true + for _, r := range f.Require { + if r.Mod.Path == path { + if need { + r.Mod.Version = vers + f.Syntax.updateLine(r.Syntax, "require", AutoQuote(path), vers) + need = false + } else { + f.Syntax.removeLine(r.Syntax) + *r = Require{} + } + } + } + + if need { + f.AddNewRequire(path, vers, false) + } + return nil +} + +func (f *File) AddNewRequire(path, vers string, indirect bool) { + line := f.Syntax.addLine(nil, "require", AutoQuote(path), vers) + setIndirect(line, indirect) + f.Require = append(f.Require, &Require{module.Version{Path: path, Version: vers}, indirect, line}) +} + +func (f *File) SetRequire(req []*Require) { + need := make(map[string]string) + indirect := make(map[string]bool) + for _, r := range req { + need[r.Mod.Path] = r.Mod.Version + indirect[r.Mod.Path] = r.Indirect + } + + for _, r := range f.Require { + if v, ok := need[r.Mod.Path]; ok { + r.Mod.Version = v + r.Indirect = indirect[r.Mod.Path] + } + } + + var newStmts []Expr + for _, stmt := range f.Syntax.Stmt { + switch stmt := stmt.(type) { + case *LineBlock: + if len(stmt.Token) > 0 && stmt.Token[0] == "require" { + var newLines []*Line + for _, line := range stmt.Line { + if p, err := parseString(&line.Token[0]); err == nil && need[p] != "" { + line.Token[1] = need[p] + delete(need, p) + setIndirect(line, indirect[p]) + newLines = append(newLines, line) + } + } + if len(newLines) == 0 { + continue // drop stmt + } + stmt.Line = newLines + } + + case *Line: + if len(stmt.Token) > 0 && stmt.Token[0] == "require" { + if p, err := parseString(&stmt.Token[1]); err == nil && need[p] != "" { + stmt.Token[2] = need[p] + delete(need, p) + setIndirect(stmt, indirect[p]) + } else { + continue // drop stmt + } + } + } + newStmts = append(newStmts, stmt) + } + f.Syntax.Stmt = newStmts + + for path, vers := range need { + f.AddNewRequire(path, vers, indirect[path]) + } + f.SortBlocks() +} + +func (f *File) DropRequire(path string) error { + for _, r := range f.Require { + if r.Mod.Path == path { + f.Syntax.removeLine(r.Syntax) + *r = Require{} + } + } + return nil +} + +func (f *File) AddExclude(path, vers string) error { + var hint *Line + for _, x := range f.Exclude { + if x.Mod.Path == path && x.Mod.Version == vers { + return nil + } + if x.Mod.Path == path { + hint = x.Syntax + } + } + + f.Exclude = append(f.Exclude, &Exclude{Mod: module.Version{Path: path, Version: vers}, Syntax: f.Syntax.addLine(hint, "exclude", AutoQuote(path), vers)}) + return nil +} + +func (f *File) DropExclude(path, vers string) error { + for _, x := range f.Exclude { + if x.Mod.Path == path && x.Mod.Version == vers { + f.Syntax.removeLine(x.Syntax) + *x = Exclude{} + } + } + return nil +} + +func (f *File) AddReplace(oldPath, oldVers, newPath, newVers string) error { + need := true + old := module.Version{Path: oldPath, Version: oldVers} + new := module.Version{Path: newPath, Version: newVers} + tokens := []string{"replace", AutoQuote(oldPath)} + if oldVers != "" { + tokens = append(tokens, oldVers) + } + tokens = append(tokens, "=>", AutoQuote(newPath)) + if newVers != "" { + tokens = append(tokens, newVers) + } + + var hint *Line + for _, r := range f.Replace { + if r.Old.Path == oldPath && (oldVers == "" || r.Old.Version == oldVers) { + if need { + // Found replacement for old; update to use new. + r.New = new + f.Syntax.updateLine(r.Syntax, tokens...) + need = false + continue + } + // Already added; delete other replacements for same. + f.Syntax.removeLine(r.Syntax) + *r = Replace{} + } + if r.Old.Path == oldPath { + hint = r.Syntax + } + } + if need { + f.Replace = append(f.Replace, &Replace{Old: old, New: new, Syntax: f.Syntax.addLine(hint, tokens...)}) + } + return nil +} + +func (f *File) DropReplace(oldPath, oldVers string) error { + for _, r := range f.Replace { + if r.Old.Path == oldPath && r.Old.Version == oldVers { + f.Syntax.removeLine(r.Syntax) + *r = Replace{} + } + } + return nil +} + +func (f *File) SortBlocks() { + f.removeDups() // otherwise sorting is unsafe + + for _, stmt := range f.Syntax.Stmt { + block, ok := stmt.(*LineBlock) + if !ok { + continue + } + sort.Slice(block.Line, func(i, j int) bool { + li := block.Line[i] + lj := block.Line[j] + for k := 0; k < len(li.Token) && k < len(lj.Token); k++ { + if li.Token[k] != lj.Token[k] { + return li.Token[k] < lj.Token[k] + } + } + return len(li.Token) < len(lj.Token) + }) + } +} + +func (f *File) removeDups() { + have := make(map[module.Version]bool) + kill := make(map[*Line]bool) + for _, x := range f.Exclude { + if have[x.Mod] { + kill[x.Syntax] = true + continue + } + have[x.Mod] = true + } + var excl []*Exclude + for _, x := range f.Exclude { + if !kill[x.Syntax] { + excl = append(excl, x) + } + } + f.Exclude = excl + + have = make(map[module.Version]bool) + // Later replacements take priority over earlier ones. + for i := len(f.Replace) - 1; i >= 0; i-- { + x := f.Replace[i] + if have[x.Old] { + kill[x.Syntax] = true + continue + } + have[x.Old] = true + } + var repl []*Replace + for _, x := range f.Replace { + if !kill[x.Syntax] { + repl = append(repl, x) + } + } + f.Replace = repl + + var stmts []Expr + for _, stmt := range f.Syntax.Stmt { + switch stmt := stmt.(type) { + case *Line: + if kill[stmt] { + continue + } + case *LineBlock: + var lines []*Line + for _, line := range stmt.Line { + if !kill[line] { + lines = append(lines, line) + } + } + stmt.Line = lines + if len(lines) == 0 { + continue + } + } + stmts = append(stmts, stmt) + } + f.Syntax.Stmt = stmts +} diff --git a/vendor/github.com/visualfc/fastmod/internal/module/module.go b/vendor/github.com/visualfc/fastmod/internal/module/module.go new file mode 100644 index 00000000..5754f4c9 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/module/module.go @@ -0,0 +1,540 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package module defines the module.Version type +// along with support code. +package module + +// IMPORTANT NOTE +// +// This file essentially defines the set of valid import paths for the go command. +// There are many subtle considerations, including Unicode ambiguity, +// security, network, and file system representations. +// +// This file also defines the set of valid module path and version combinations, +// another topic with many subtle considerations. +// +// Changes to the semantics in this file require approval from rsc. + +import ( + "fmt" + "sort" + "strings" + "unicode" + "unicode/utf8" + + "github.com/visualfc/fastmod/internal/semver" +) + +// A Version is defined by a module path and version pair. +type Version struct { + Path string + + // Version is usually a semantic version in canonical form. + // There are two exceptions to this general rule. + // First, the top-level target of a build has no specific version + // and uses Version = "". + // Second, during MVS calculations the version "none" is used + // to represent the decision to take no version of a given module. + Version string `json:",omitempty"` +} + +// Check checks that a given module path, version pair is valid. +// In addition to the path being a valid module path +// and the version being a valid semantic version, +// the two must correspond. +// For example, the path "yaml/v2" only corresponds to +// semantic versions beginning with "v2.". +func Check(path, version string) error { + if err := CheckPath(path); err != nil { + return err + } + if !semver.IsValid(version) { + return fmt.Errorf("malformed semantic version %v", version) + } + _, pathMajor, _ := SplitPathVersion(path) + if !MatchPathMajor(version, pathMajor) { + if pathMajor == "" { + pathMajor = "v0 or v1" + } + if pathMajor[0] == '.' { // .v1 + pathMajor = pathMajor[1:] + } + return fmt.Errorf("mismatched module path %v and version %v (want %v)", path, version, pathMajor) + } + return nil +} + +// firstPathOK reports whether r can appear in the first element of a module path. +// The first element of the path must be an LDH domain name, at least for now. +// To avoid case ambiguity, the domain name must be entirely lower case. +func firstPathOK(r rune) bool { + return r == '-' || r == '.' || + '0' <= r && r <= '9' || + 'a' <= r && r <= 'z' +} + +// pathOK reports whether r can appear in an import path element. +// Paths can be ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. +// This matches what "go get" has historically recognized in import paths. +// TODO(rsc): We would like to allow Unicode letters, but that requires additional +// care in the safe encoding (see note below). +func pathOK(r rune) bool { + if r < utf8.RuneSelf { + return r == '+' || r == '-' || r == '.' || r == '_' || r == '~' || + '0' <= r && r <= '9' || + 'A' <= r && r <= 'Z' || + 'a' <= r && r <= 'z' + } + return false +} + +// fileNameOK reports whether r can appear in a file name. +// For now we allow all Unicode letters but otherwise limit to pathOK plus a few more punctuation characters. +// If we expand the set of allowed characters here, we have to +// work harder at detecting potential case-folding and normalization collisions. +// See note about "safe encoding" below. +func fileNameOK(r rune) bool { + if r < utf8.RuneSelf { + // Entire set of ASCII punctuation, from which we remove characters: + // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ + // We disallow some shell special characters: " ' * < > ? ` | + // (Note that some of those are disallowed by the Windows file system as well.) + // We also disallow path separators / : and \ (fileNameOK is only called on path element characters). + // We allow spaces (U+0020) in file names. + const allowed = "!#$%&()+,-.=@[]^_{}~ " + if '0' <= r && r <= '9' || 'A' <= r && r <= 'Z' || 'a' <= r && r <= 'z' { + return true + } + for i := 0; i < len(allowed); i++ { + if rune(allowed[i]) == r { + return true + } + } + return false + } + // It may be OK to add more ASCII punctuation here, but only carefully. + // For example Windows disallows < > \, and macOS disallows :, so we must not allow those. + return unicode.IsLetter(r) +} + +// CheckPath checks that a module path is valid. +func CheckPath(path string) error { + if err := checkPath(path, false); err != nil { + return fmt.Errorf("malformed module path %q: %v", path, err) + } + i := strings.Index(path, "/") + if i < 0 { + i = len(path) + } + if i == 0 { + return fmt.Errorf("malformed module path %q: leading slash", path) + } + if !strings.Contains(path[:i], ".") { + return fmt.Errorf("malformed module path %q: missing dot in first path element", path) + } + if path[0] == '-' { + return fmt.Errorf("malformed module path %q: leading dash in first path element", path) + } + for _, r := range path[:i] { + if !firstPathOK(r) { + return fmt.Errorf("malformed module path %q: invalid char %q in first path element", path, r) + } + } + if _, _, ok := SplitPathVersion(path); !ok { + return fmt.Errorf("malformed module path %q: invalid version", path) + } + return nil +} + +// CheckImportPath checks that an import path is valid. +func CheckImportPath(path string) error { + if err := checkPath(path, false); err != nil { + return fmt.Errorf("malformed import path %q: %v", path, err) + } + return nil +} + +// checkPath checks that a general path is valid. +// It returns an error describing why but not mentioning path. +// Because these checks apply to both module paths and import paths, +// the caller is expected to add the "malformed ___ path %q: " prefix. +// fileName indicates whether the final element of the path is a file name +// (as opposed to a directory name). +func checkPath(path string, fileName bool) error { + if !utf8.ValidString(path) { + return fmt.Errorf("invalid UTF-8") + } + if path == "" { + return fmt.Errorf("empty string") + } + if strings.Contains(path, "..") { + return fmt.Errorf("double dot") + } + if strings.Contains(path, "//") { + return fmt.Errorf("double slash") + } + if path[len(path)-1] == '/' { + return fmt.Errorf("trailing slash") + } + elemStart := 0 + for i, r := range path { + if r == '/' { + if err := checkElem(path[elemStart:i], fileName); err != nil { + return err + } + elemStart = i + 1 + } + } + if err := checkElem(path[elemStart:], fileName); err != nil { + return err + } + return nil +} + +// checkElem checks whether an individual path element is valid. +// fileName indicates whether the element is a file name (not a directory name). +func checkElem(elem string, fileName bool) error { + if elem == "" { + return fmt.Errorf("empty path element") + } + if strings.Count(elem, ".") == len(elem) { + return fmt.Errorf("invalid path element %q", elem) + } + if elem[0] == '.' && !fileName { + return fmt.Errorf("leading dot in path element") + } + if elem[len(elem)-1] == '.' { + return fmt.Errorf("trailing dot in path element") + } + charOK := pathOK + if fileName { + charOK = fileNameOK + } + for _, r := range elem { + if !charOK(r) { + return fmt.Errorf("invalid char %q", r) + } + } + + // Windows disallows a bunch of path elements, sadly. + // See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file + short := elem + if i := strings.Index(short, "."); i >= 0 { + short = short[:i] + } + for _, bad := range badWindowsNames { + if strings.EqualFold(bad, short) { + return fmt.Errorf("disallowed path element %q", elem) + } + } + return nil +} + +// CheckFilePath checks whether a slash-separated file path is valid. +func CheckFilePath(path string) error { + if err := checkPath(path, true); err != nil { + return fmt.Errorf("malformed file path %q: %v", path, err) + } + return nil +} + +// badWindowsNames are the reserved file path elements on Windows. +// See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file +var badWindowsNames = []string{ + "CON", + "PRN", + "AUX", + "NUL", + "COM1", + "COM2", + "COM3", + "COM4", + "COM5", + "COM6", + "COM7", + "COM8", + "COM9", + "LPT1", + "LPT2", + "LPT3", + "LPT4", + "LPT5", + "LPT6", + "LPT7", + "LPT8", + "LPT9", +} + +// SplitPathVersion returns prefix and major version such that prefix+pathMajor == path +// and version is either empty or "/vN" for N >= 2. +// As a special case, gopkg.in paths are recognized directly; +// they require ".vN" instead of "/vN", and for all N, not just N >= 2. +func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { + if strings.HasPrefix(path, "gopkg.in/") { + return splitGopkgIn(path) + } + + i := len(path) + dot := false + for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9' || path[i-1] == '.') { + if path[i-1] == '.' { + dot = true + } + i-- + } + if i <= 1 || path[i-1] != 'v' || path[i-2] != '/' { + return path, "", true + } + prefix, pathMajor = path[:i-2], path[i-2:] + if dot || len(pathMajor) <= 2 || pathMajor[2] == '0' || pathMajor == "/v1" { + return path, "", false + } + return prefix, pathMajor, true +} + +// splitGopkgIn is like SplitPathVersion but only for gopkg.in paths. +func splitGopkgIn(path string) (prefix, pathMajor string, ok bool) { + if !strings.HasPrefix(path, "gopkg.in/") { + return path, "", false + } + i := len(path) + if strings.HasSuffix(path, "-unstable") { + i -= len("-unstable") + } + for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9') { + i-- + } + if i <= 1 || path[i-1] != 'v' || path[i-2] != '.' { + // All gopkg.in paths must end in vN for some N. + return path, "", false + } + prefix, pathMajor = path[:i-2], path[i-2:] + if len(pathMajor) <= 2 || pathMajor[2] == '0' && pathMajor != ".v0" { + return path, "", false + } + return prefix, pathMajor, true +} + +// MatchPathMajor reports whether the semantic version v +// matches the path major version pathMajor. +func MatchPathMajor(v, pathMajor string) bool { + if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { + pathMajor = strings.TrimSuffix(pathMajor, "-unstable") + } + if strings.HasPrefix(v, "v0.0.0-") && pathMajor == ".v1" { + // Allow old bug in pseudo-versions that generated v0.0.0- pseudoversion for gopkg .v1. + // For example, gopkg.in/yaml.v2@v2.2.1's go.mod requires gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405. + return true + } + m := semver.Major(v) + if pathMajor == "" { + return m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" + } + return (pathMajor[0] == '/' || pathMajor[0] == '.') && m == pathMajor[1:] +} + +// CanonicalVersion returns the canonical form of the version string v. +// It is the same as semver.Canonical(v) except that it preserves the special build suffix "+incompatible". +func CanonicalVersion(v string) string { + cv := semver.Canonical(v) + if semver.Build(v) == "+incompatible" { + cv += "+incompatible" + } + return cv +} + +// Sort sorts the list by Path, breaking ties by comparing Versions. +func Sort(list []Version) { + sort.Slice(list, func(i, j int) bool { + mi := list[i] + mj := list[j] + if mi.Path != mj.Path { + return mi.Path < mj.Path + } + // To help go.sum formatting, allow version/file. + // Compare semver prefix by semver rules, + // file by string order. + vi := mi.Version + vj := mj.Version + var fi, fj string + if k := strings.Index(vi, "/"); k >= 0 { + vi, fi = vi[:k], vi[k:] + } + if k := strings.Index(vj, "/"); k >= 0 { + vj, fj = vj[:k], vj[k:] + } + if vi != vj { + return semver.Compare(vi, vj) < 0 + } + return fi < fj + }) +} + +// Safe encodings +// +// Module paths appear as substrings of file system paths +// (in the download cache) and of web server URLs in the proxy protocol. +// In general we cannot rely on file systems to be case-sensitive, +// nor can we rely on web servers, since they read from file systems. +// That is, we cannot rely on the file system to keep rsc.io/QUOTE +// and rsc.io/quote separate. Windows and macOS don't. +// Instead, we must never require two different casings of a file path. +// Because we want the download cache to match the proxy protocol, +// and because we want the proxy protocol to be possible to serve +// from a tree of static files (which might be stored on a case-insensitive +// file system), the proxy protocol must never require two different casings +// of a URL path either. +// +// One possibility would be to make the safe encoding be the lowercase +// hexadecimal encoding of the actual path bytes. This would avoid ever +// needing different casings of a file path, but it would be fairly illegible +// to most programmers when those paths appeared in the file system +// (including in file paths in compiler errors and stack traces) +// in web server logs, and so on. Instead, we want a safe encoding that +// leaves most paths unaltered. +// +// The safe encoding is this: +// replace every uppercase letter with an exclamation mark +// followed by the letter's lowercase equivalent. +// +// For example, +// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. +// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy +// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. +// +// Import paths that avoid upper-case letters are left unchanged. +// Note that because import paths are ASCII-only and avoid various +// problematic punctuation (like : < and >), the safe encoding is also ASCII-only +// and avoids the same problematic punctuation. +// +// Import paths have never allowed exclamation marks, so there is no +// need to define how to encode a literal !. +// +// Although paths are disallowed from using Unicode (see pathOK above), +// the eventual plan is to allow Unicode letters as well, to assume that +// file systems and URLs are Unicode-safe (storing UTF-8), and apply +// the !-for-uppercase convention. Note however that not all runes that +// are different but case-fold equivalent are an upper/lower pair. +// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) +// are considered to case-fold to each other. When we do add Unicode +// letters, we must not assume that upper/lower are the only case-equivalent pairs. +// Perhaps the Kelvin symbol would be disallowed entirely, for example. +// Or perhaps it would encode as "!!k", or perhaps as "(212A)". +// +// Also, it would be nice to allow Unicode marks as well as letters, +// but marks include combining marks, and then we must deal not +// only with case folding but also normalization: both U+00E9 ('é') +// and U+0065 U+0301 ('e' followed by combining acute accent) +// look the same on the page and are treated by some file systems +// as the same path. If we do allow Unicode marks in paths, there +// must be some kind of normalization to allow only one canonical +// encoding of any character used in an import path. + +// EncodePath returns the safe encoding of the given module path. +// It fails if the module path is invalid. +func EncodePath(path string) (encoding string, err error) { + if err := CheckPath(path); err != nil { + return "", err + } + + return encodeString(path) +} + +// EncodeVersion returns the safe encoding of the given module version. +// Versions are allowed to be in non-semver form but must be valid file names +// and not contain exclamation marks. +func EncodeVersion(v string) (encoding string, err error) { + if err := checkElem(v, true); err != nil || strings.Contains(v, "!") { + return "", fmt.Errorf("disallowed version string %q", v) + } + return encodeString(v) +} + +func encodeString(s string) (encoding string, err error) { + haveUpper := false + for _, r := range s { + if r == '!' || r >= utf8.RuneSelf { + // This should be disallowed by CheckPath, but diagnose anyway. + // The correctness of the encoding loop below depends on it. + return "", fmt.Errorf("internal error: inconsistency in EncodePath") + } + if 'A' <= r && r <= 'Z' { + haveUpper = true + } + } + + if !haveUpper { + return s, nil + } + + var buf []byte + for _, r := range s { + if 'A' <= r && r <= 'Z' { + buf = append(buf, '!', byte(r+'a'-'A')) + } else { + buf = append(buf, byte(r)) + } + } + return string(buf), nil +} + +// DecodePath returns the module path of the given safe encoding. +// It fails if the encoding is invalid or encodes an invalid path. +func DecodePath(encoding string) (path string, err error) { + path, ok := decodeString(encoding) + if !ok { + return "", fmt.Errorf("invalid module path encoding %q", encoding) + } + if err := CheckPath(path); err != nil { + return "", fmt.Errorf("invalid module path encoding %q: %v", encoding, err) + } + return path, nil +} + +// DecodeVersion returns the version string for the given safe encoding. +// It fails if the encoding is invalid or encodes an invalid version. +// Versions are allowed to be in non-semver form but must be valid file names +// and not contain exclamation marks. +func DecodeVersion(encoding string) (v string, err error) { + v, ok := decodeString(encoding) + if !ok { + return "", fmt.Errorf("invalid version encoding %q", encoding) + } + if err := checkElem(v, true); err != nil { + return "", fmt.Errorf("disallowed version string %q", v) + } + return v, nil +} + +func decodeString(encoding string) (string, bool) { + var buf []byte + + bang := false + for _, r := range encoding { + if r >= utf8.RuneSelf { + return "", false + } + if bang { + bang = false + if r < 'a' || 'z' < r { + return "", false + } + buf = append(buf, byte(r+'A'-'a')) + continue + } + if r == '!' { + bang = true + continue + } + if 'A' <= r && r <= 'Z' { + return "", false + } + buf = append(buf, byte(r)) + } + if bang { + return "", false + } + return string(buf), true +} diff --git a/vendor/github.com/visualfc/fastmod/internal/semver/semver.go b/vendor/github.com/visualfc/fastmod/internal/semver/semver.go new file mode 100644 index 00000000..4af7118e --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/internal/semver/semver.go @@ -0,0 +1,388 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package semver implements comparison of semantic version strings. +// In this package, semantic version strings must begin with a leading "v", +// as in "v1.0.0". +// +// The general form of a semantic version string accepted by this package is +// +// vMAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]] +// +// where square brackets indicate optional parts of the syntax; +// MAJOR, MINOR, and PATCH are decimal integers without extra leading zeros; +// PRERELEASE and BUILD are each a series of non-empty dot-separated identifiers +// using only alphanumeric characters and hyphens; and +// all-numeric PRERELEASE identifiers must not have leading zeros. +// +// This package follows Semantic Versioning 2.0.0 (see semver.org) +// with two exceptions. First, it requires the "v" prefix. Second, it recognizes +// vMAJOR and vMAJOR.MINOR (with no prerelease or build suffixes) +// as shorthands for vMAJOR.0.0 and vMAJOR.MINOR.0. +package semver + +// parsed returns the parsed form of a semantic version string. +type parsed struct { + major string + minor string + patch string + short string + prerelease string + build string + err string +} + +// IsValid reports whether v is a valid semantic version string. +func IsValid(v string) bool { + _, ok := parse(v) + return ok +} + +// Canonical returns the canonical formatting of the semantic version v. +// It fills in any missing .MINOR or .PATCH and discards build metadata. +// Two semantic versions compare equal only if their canonical formattings +// are identical strings. +// The canonical invalid semantic version is the empty string. +func Canonical(v string) string { + p, ok := parse(v) + if !ok { + return "" + } + if p.build != "" { + return v[:len(v)-len(p.build)] + } + if p.short != "" { + return v + p.short + } + return v +} + +// Major returns the major version prefix of the semantic version v. +// For example, Major("v2.1.0") == "v2". +// If v is an invalid semantic version string, Major returns the empty string. +func Major(v string) string { + pv, ok := parse(v) + if !ok { + return "" + } + return v[:1+len(pv.major)] +} + +// MajorMinor returns the major.minor version prefix of the semantic version v. +// For example, MajorMinor("v2.1.0") == "v2.1". +// If v is an invalid semantic version string, MajorMinor returns the empty string. +func MajorMinor(v string) string { + pv, ok := parse(v) + if !ok { + return "" + } + i := 1 + len(pv.major) + if j := i + 1 + len(pv.minor); j <= len(v) && v[i] == '.' && v[i+1:j] == pv.minor { + return v[:j] + } + return v[:i] + "." + pv.minor +} + +// Prerelease returns the prerelease suffix of the semantic version v. +// For example, Prerelease("v2.1.0-pre+meta") == "-pre". +// If v is an invalid semantic version string, Prerelease returns the empty string. +func Prerelease(v string) string { + pv, ok := parse(v) + if !ok { + return "" + } + return pv.prerelease +} + +// Build returns the build suffix of the semantic version v. +// For example, Build("v2.1.0+meta") == "+meta". +// If v is an invalid semantic version string, Build returns the empty string. +func Build(v string) string { + pv, ok := parse(v) + if !ok { + return "" + } + return pv.build +} + +// Compare returns an integer comparing two versions according to +// according to semantic version precedence. +// The result will be 0 if v == w, -1 if v < w, or +1 if v > w. +// +// An invalid semantic version string is considered less than a valid one. +// All invalid semantic version strings compare equal to each other. +func Compare(v, w string) int { + pv, ok1 := parse(v) + pw, ok2 := parse(w) + if !ok1 && !ok2 { + return 0 + } + if !ok1 { + return -1 + } + if !ok2 { + return +1 + } + if c := compareInt(pv.major, pw.major); c != 0 { + return c + } + if c := compareInt(pv.minor, pw.minor); c != 0 { + return c + } + if c := compareInt(pv.patch, pw.patch); c != 0 { + return c + } + return comparePrerelease(pv.prerelease, pw.prerelease) +} + +// Max canonicalizes its arguments and then returns the version string +// that compares greater. +func Max(v, w string) string { + v = Canonical(v) + w = Canonical(w) + if Compare(v, w) > 0 { + return v + } + return w +} + +func parse(v string) (p parsed, ok bool) { + if v == "" || v[0] != 'v' { + p.err = "missing v prefix" + return + } + p.major, v, ok = parseInt(v[1:]) + if !ok { + p.err = "bad major version" + return + } + if v == "" { + p.minor = "0" + p.patch = "0" + p.short = ".0.0" + return + } + if v[0] != '.' { + p.err = "bad minor prefix" + ok = false + return + } + p.minor, v, ok = parseInt(v[1:]) + if !ok { + p.err = "bad minor version" + return + } + if v == "" { + p.patch = "0" + p.short = ".0" + return + } + if v[0] != '.' { + p.err = "bad patch prefix" + ok = false + return + } + p.patch, v, ok = parseInt(v[1:]) + if !ok { + p.err = "bad patch version" + return + } + if len(v) > 0 && v[0] == '-' { + p.prerelease, v, ok = parsePrerelease(v) + if !ok { + p.err = "bad prerelease" + return + } + } + if len(v) > 0 && v[0] == '+' { + p.build, v, ok = parseBuild(v) + if !ok { + p.err = "bad build" + return + } + } + if v != "" { + p.err = "junk on end" + ok = false + return + } + ok = true + return +} + +func parseInt(v string) (t, rest string, ok bool) { + if v == "" { + return + } + if v[0] < '0' || '9' < v[0] { + return + } + i := 1 + for i < len(v) && '0' <= v[i] && v[i] <= '9' { + i++ + } + if v[0] == '0' && i != 1 { + return + } + return v[:i], v[i:], true +} + +func parsePrerelease(v string) (t, rest string, ok bool) { + // "A pre-release version MAY be denoted by appending a hyphen and + // a series of dot separated identifiers immediately following the patch version. + // Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. + // Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes." + if v == "" || v[0] != '-' { + return + } + i := 1 + start := 1 + for i < len(v) && v[i] != '+' { + if !isIdentChar(v[i]) && v[i] != '.' { + return + } + if v[i] == '.' { + if start == i || isBadNum(v[start:i]) { + return + } + start = i + 1 + } + i++ + } + if start == i || isBadNum(v[start:i]) { + return + } + return v[:i], v[i:], true +} + +func parseBuild(v string) (t, rest string, ok bool) { + if v == "" || v[0] != '+' { + return + } + i := 1 + start := 1 + for i < len(v) { + if !isIdentChar(v[i]) { + return + } + if v[i] == '.' { + if start == i { + return + } + start = i + 1 + } + i++ + } + if start == i { + return + } + return v[:i], v[i:], true +} + +func isIdentChar(c byte) bool { + return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '-' +} + +func isBadNum(v string) bool { + i := 0 + for i < len(v) && '0' <= v[i] && v[i] <= '9' { + i++ + } + return i == len(v) && i > 1 && v[0] == '0' +} + +func isNum(v string) bool { + i := 0 + for i < len(v) && '0' <= v[i] && v[i] <= '9' { + i++ + } + return i == len(v) +} + +func compareInt(x, y string) int { + if x == y { + return 0 + } + if len(x) < len(y) { + return -1 + } + if len(x) > len(y) { + return +1 + } + if x < y { + return -1 + } else { + return +1 + } +} + +func comparePrerelease(x, y string) int { + // "When major, minor, and patch are equal, a pre-release version has + // lower precedence than a normal version. + // Example: 1.0.0-alpha < 1.0.0. + // Precedence for two pre-release versions with the same major, minor, + // and patch version MUST be determined by comparing each dot separated + // identifier from left to right until a difference is found as follows: + // identifiers consisting of only digits are compared numerically and + // identifiers with letters or hyphens are compared lexically in ASCII + // sort order. Numeric identifiers always have lower precedence than + // non-numeric identifiers. A larger set of pre-release fields has a + // higher precedence than a smaller set, if all of the preceding + // identifiers are equal. + // Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < + // 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0." + if x == y { + return 0 + } + if x == "" { + return +1 + } + if y == "" { + return -1 + } + for x != "" && y != "" { + x = x[1:] // skip - or . + y = y[1:] // skip - or . + var dx, dy string + dx, x = nextIdent(x) + dy, y = nextIdent(y) + if dx != dy { + ix := isNum(dx) + iy := isNum(dy) + if ix != iy { + if ix { + return -1 + } else { + return +1 + } + } + if ix { + if len(dx) < len(dy) { + return -1 + } + if len(dx) > len(dy) { + return +1 + } + } + if dx < dy { + return -1 + } else { + return +1 + } + } + } + if x == "" { + return -1 + } else { + return +1 + } +} + +func nextIdent(x string) (dx, rest string) { + i := 0 + for i < len(x) && x[i] != '.' { + i++ + } + return x[:i], x[i:] +} diff --git a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go b/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go deleted file mode 100644 index 34de3272..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/gomod/gomod.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2011-2018 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gomod - -import ( - "encoding/json" - "os/exec" - "path/filepath" - "strings" -) - -func LooupModList(dir string) *ModuleList { - data := ListModuleJson(dir) - if data == nil { - return nil - } - ms := parseModuleJson(data) - ms.Dir = dir - return &ms -} - -func LookupModFile(dir string) string { - command := exec.Command("go", "env", "GOMOD") - command.Dir = dir - data, err := command.Output() - if err != nil { - return "" - } - return strings.TrimSpace(string(data)) -} - -func ListModuleJson(dir string) []byte { - command := exec.Command("go", "list", "-m", "-json", "all") - command.Dir = dir - data, err := command.Output() - if err != nil { - return nil - } - return data -} - -type ModuleList struct { - Dir string - Module Module - Require []*Module -} - -func makePath(path, dir string, addin string) string { - dir = filepath.ToSlash(dir) - pos := strings.Index(dir, "mod/"+path+"@") - if pos == -1 { - return path - } - return filepath.Join(dir[pos:], addin) -} - -type Package struct { - Dir string - ImportPath string - Name string - Module *Module -} - -func (m *ModuleList) LookupModule(pkgname string) (require *Module, path string, dir string) { - for _, r := range m.Require { - if strings.HasPrefix(pkgname, r.Path) { - addin := pkgname[len(r.Path):] - if r.Replace != nil { - path = makePath(r.Replace.Path, r.Dir, addin) - } else { - path = makePath(r.Path, r.Dir, addin) - } - return r, path, filepath.Join(r.Dir, addin) - } - } - c := exec.Command("go", "list", "-json", "-e", pkgname) - c.Dir = m.Dir - data, err := c.Output() - if err == nil { - var p Package - err = json.Unmarshal(data, &p) - if err == nil { - add := &Module{Path: p.ImportPath, Dir: p.Dir} - m.Require = append(m.Require, add) - return add, p.ImportPath, p.Dir - } - } - - return nil, "", "" -} - -type Module struct { - Path string - Version string - Time string - Dir string - Main bool - Replace *Module -} - -func parseModuleJson(data []byte) ModuleList { - var ms ModuleList - var index int - var tag int - for i, v := range data { - switch v { - case '{': - if tag == 0 { - index = i - } - tag++ - case '}': - tag-- - if tag == 0 { - var m Module - err := json.Unmarshal(data[index:i+1], &m) - if err == nil { - if m.Main { - ms.Module = m - } else { - ms.Require = append(ms.Require, &m) - } - } - } - } - } - return ms -} diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 60e2a93a..92b60b36 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -24,9 +24,9 @@ import ( "strings" "time" + "github.com/visualfc/fastmod" "github.com/visualfc/gotools/pkg/buildctx" "github.com/visualfc/gotools/pkg/command" - "github.com/visualfc/gotools/pkg/gomod" "github.com/visualfc/gotools/pkg/pkgutil" "github.com/visualfc/gotools/pkg/stdlib" "golang.org/x/tools/go/buildutil" @@ -273,15 +273,16 @@ type PkgConfig struct { func NewPkgWalker(context *build.Context) *PkgWalker { return &PkgWalker{ - Context: context, - fset: token.NewFileSet(), - parsedFileCache: map[string]*ast.File{}, - parsedFileMod: map[string]int64{}, - fileSourceData: map[string]*SourceData{}, - importingName: map[string]bool{}, - Imported: map[string]*types.Package{"unsafe": types.Unsafe}, - ImportedMod: map[string]int64{}, - gcimported: importer.Default(), + Context: context, + fset: token.NewFileSet(), + parsedFileCache: map[string]*ast.File{}, + parsedFileModTime: map[string]int64{}, + fileSourceData: map[string]*SourceData{}, + importingName: map[string]bool{}, + Imported: map[string]*types.Package{"unsafe": types.Unsafe}, + ImportedModTime: map[string]int64{}, + gcimported: importer.Default(), + modList: fastmod.NewModuleList(context), } } @@ -291,19 +292,20 @@ type SourceData struct { } type PkgWalker struct { - fset *token.FileSet - Context *build.Context - current *types.Package - importingName map[string]bool - parsedFileCache map[string]*ast.File - parsedFileMod map[string]int64 - fileSourceData map[string]*SourceData - Imported map[string]*types.Package // packages already imported - ImportedMod map[string]int64 - gcimported types.Importer - cursor *FileCursor - cmd *command.Command - mod *gomod.ModuleList + fset *token.FileSet + Context *build.Context + current *types.Package + importingName map[string]bool + parsedFileCache map[string]*ast.File + parsedFileModTime map[string]int64 + fileSourceData map[string]*SourceData + Imported map[string]*types.Package // packages already imported + ImportedModTime map[string]int64 + gcimported types.Importer + cursor *FileCursor + cmd *command.Command + mod *fastmod.Module + modList *fastmod.ModuleList } func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { @@ -367,8 +369,8 @@ func (w *PkgWalker) importPath(path string, mode build.ImportMode) (*build.Packa } //check mod if w.mod != nil { - module, _, dir := w.mod.LookupModule(path) - if module != nil { + _, dir := w.mod.Lookup(path) + if dir != "" { pkg, err := w.Context.ImportDir(dir, mode) if pkg != nil { pkg.ImportPath = path @@ -428,9 +430,9 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri // parser cursor mod if filepath.IsAbs(name) { - w.mod = gomod.LooupModList(name) + w.mod, _ = w.modList.LoadModule(name) if typesVerbose && w.mod != nil { - log.Println("parser mod", w.mod.Module) + log.Println("parser mod", w.mod.ModFile()) } } @@ -449,7 +451,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri pkg = w.Imported[name] lastMod := lastModTime(bp.Dir, GoFiles) if pkg != nil { - if t, ok := w.ImportedMod[name]; ok { + if t, ok := w.ImportedModTime[name]; ok { if t == lastMod { return pkg, nil } @@ -565,7 +567,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri w.importingName[checkName] = false w.Imported[name] = pkg - w.ImportedMod[name] = lastMod + w.ImportedModTime[name] = lastMod if len(xfiles) > 0 { xpkg, _ := typesConf.Check(checkName+"_test", w.fset, xfiles, conf.XInfo) @@ -615,7 +617,7 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, mtime = sd.mtime } if f, ok := w.parsedFileCache[filename]; ok { - if i, ok := w.parsedFileMod[filename]; ok { + if i, ok := w.parsedFileModTime[filename]; ok { if mtime != 0 && mtime == i { return f, nil } @@ -655,11 +657,11 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } } if mtime != 0 { - w.parsedFileMod[filename] = mtime + w.parsedFileModTime[filename] = mtime } else { info, err := os.Stat(filename) if err == nil { - w.parsedFileMod[filename] = info.ModTime().UnixNano() + w.parsedFileModTime[filename] = info.ModTime().UnixNano() } } w.parsedFileCache[filename] = f From ccc0a0514dcf6260603482cab2d07247727cd1dc Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 13 Oct 2018 14:39:13 +0800 Subject: [PATCH 035/133] fix fastmod empty lookup --- Godeps/Godeps.json | 20 +++++++++---------- vendor/github.com/visualfc/fastmod/fastmod.go | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 244875e7..bbaf33c3 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -3,44 +3,44 @@ "GoVersion": "go1.11", "GodepVersion": "v80", "Packages": [ - "." + "./..." ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "1bdda6b3db78fb5d08116933e4d2c95d4805b3d1" + "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "859d9af80c5eb8bc4ea06aa859ba444781b30f6e" + "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 62eb0d48..0075bb99 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -111,6 +111,9 @@ func (m *Module) Lookup(pkg string) (path string, dir string) { } } } + if path == "" { + return "", "" + } return path, filepath.Join(PkgMod, path) } From 49464a3b1b0f9e2654634ccefc628c19efbdd6bb Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 19 Oct 2018 09:58:55 +0800 Subject: [PATCH 036/133] update fastmod&types for lookup module --- Godeps/Godeps.json | 38 +++- vendor/github.com/visualfc/fastmod/README.md | 2 +- vendor/github.com/visualfc/fastmod/fastmod.go | 178 ++++++++++++++--- .../visualfc/gotools/types/types.go | 181 ++++++++++++------ 4 files changed, 303 insertions(+), 96 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index bbaf33c3..3d4feb76 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,39 +8,39 @@ "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" + "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" + "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" + "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "e40065827795bc12d17ed4f63ec50044c995e042" + "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "1120213f20bbd257515af85ca1b291b47e016a11" + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -53,6 +53,26 @@ { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod", + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/modfile", + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/module", + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/semver", + "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" } ] } diff --git a/vendor/github.com/visualfc/fastmod/README.md b/vendor/github.com/visualfc/fastmod/README.md index 3b67499b..3afe506d 100644 --- a/vendor/github.com/visualfc/fastmod/README.md +++ b/vendor/github.com/visualfc/fastmod/README.md @@ -9,4 +9,4 @@ Usages: if err != nil { return } - path, dir := mod.Lookup(pkg) \ No newline at end of file + path, dir, typ := mod.Lookup(pkg) \ No newline at end of file diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 0075bb99..096ef64a 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -9,20 +9,22 @@ package fastmod import ( "go/build" "io/ioutil" + "os" "os/exec" "path/filepath" "strings" "github.com/visualfc/fastmod/internal/modfile" + "github.com/visualfc/fastmod/internal/module" ) var ( - PkgMod string + PkgModPath string ) func UpdatePkgMod(ctx *build.Context) { if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { - PkgMod = filepath.Join(list[0], "pkg/mod") + PkgModPath = filepath.Join(list[0], "pkg/mod") } } @@ -59,24 +61,58 @@ type Mod struct { Replace *Version } +func (m *Mod) VersionPath() string { + v := m.Require + if m.Replace != nil { + v = m.Replace + } + if v.Version != "" { + return v.Path + "@" + v.Version + } + return v.Path +} + +func (m *Mod) EncodeVersionPath() string { + v := m.Require + if m.Replace != nil { + v = m.Replace + } + path, _ := module.EncodePath(v.Path) + if v.Version != "" { + return path + "@" + v.Version + } + return path +} + type Module struct { - f *modfile.File - path string - fmod string - fdir string - mods []*Mod + f *modfile.File + ftime int64 + path string + fmod string + fdir string + mods []*Mod } func (m *Module) init() { + rused := make(map[int]bool) for _, r := range m.f.Require { mod := &Mod{Require: &Version{r.Mod.Path, r.Mod.Version}} - for _, v := range m.f.Replace { - if r.Mod.Path == v.Old.Path && r.Mod.Version == r.Mod.Version { + for i, v := range m.f.Replace { + if r.Mod.Path == v.Old.Path && (v.Old.Version == "" || v.Old.Version == r.Mod.Version) { mod.Replace = &Version{v.New.Path, v.New.Version} + rused[i] = true + break } } m.mods = append(m.mods, mod) } + for i, v := range m.f.Replace { + if rused[i] { + continue + } + mod := &Mod{Require: &Version{v.Old.Path, v.Old.Version}, Replace: &Version{v.New.Path, v.New.Version}} + m.mods = append(m.mods, mod) + } } func (m *Module) Path() string { @@ -91,30 +127,41 @@ func (m *Module) ModDir() string { return m.fdir } -func (m *Module) Lookup(pkg string) (path string, dir string) { +type PkgType int + +const ( + PkgTypeNil PkgType = iota + PkgTypeGoroot // goroot pkg + PkgTypeGopath // gopath pkg + PkgTypeMod // mod pkg + PkgTypeLocal // mod pkg sub local + PkgTypeLocalMod // mod pkg sub local mod + PkgTypeDepMod // mod pkg dep gopath/pkg/mod +) + +func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { if strings.HasPrefix(pkg, m.path+"/") { - return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]) + return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]), PkgTypeLocal } - + var encpath string for _, r := range m.mods { if r.Require.Path == pkg { - if r.Replace != nil { - path = r.Replace.Path + "@" + r.Replace.Version - } else { - path = r.Require.Path + "@" + r.Require.Version - } + path = r.VersionPath() + encpath = r.EncodeVersionPath() + break } else if strings.HasPrefix(pkg, r.Require.Path+"/") { - if r.Replace != nil { - path = r.Replace.Path + "@" + r.Replace.Version + pkg[len(r.Require.Path):] - } else { - path = r.Require.Path + "@" + r.Require.Version + pkg[len(r.Require.Path):] - } + path = r.VersionPath() + pkg[len(r.Require.Path):] + encpath = r.VersionPath() + pkg[len(r.Require.Path):] + break } } if path == "" { - return "", "" + return "", "", PkgTypeNil + } + if strings.HasPrefix(path, "./") { + return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod } - return path, filepath.Join(PkgMod, path) + return pkg, filepath.Join(PkgModPath, encpath), PkgTypeDepMod } func (mc *ModuleList) LoadModule(dir string) (*Module, error) { @@ -122,8 +169,18 @@ func (mc *ModuleList) LoadModule(dir string) (*Module, error) { if fmod == "" { return nil, err } + return mc.LoadModuleFile(fmod) +} + +func (mc *ModuleList) LoadModuleFile(fmod string) (*Module, error) { + info, err := os.Stat(fmod) + if err != nil { + return nil, err + } if m, ok := mc.mods[fmod]; ok { - return m, nil + if m.ftime == info.ModTime().UnixNano() { + return m, nil + } } data, err := ioutil.ReadFile(fmod) if err != nil { @@ -133,8 +190,77 @@ func (mc *ModuleList) LoadModule(dir string) (*Module, error) { if err != nil { return nil, err } - m := &Module{f, f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} + m := &Module{f, info.ModTime().UnixNano(), f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} m.init() mc.mods[fmod] = m return m, nil } + +type Node struct { + *Module + Parent *Node + Children []*Node +} + +type Package struct { + mlist *ModuleList + root *Node + nodeMap map[string]*Node +} + +func (p *Package) ModuleList() *ModuleList { + return p.mlist +} + +func (p *Package) Node() *Node { + return p.root +} + +func (p *Package) load(node *Node) { + for _, v := range node.mods { + var fmod string + if strings.HasPrefix(v.VersionPath(), "./") { + fmod = filepath.Join(node.ModDir(), v.VersionPath(), "go.mod") + } else { + fmod = filepath.Join(filepath.Join(PkgModPath, v.EncodeVersionPath()), "go.mod") + } + m, _ := p.mlist.LoadModuleFile(fmod) + if m != nil { + child := &Node{m, node, nil} + node.Children = append(node.Children, child) + p.nodeMap[m.fdir] = child + p.load(child) + } + } +} + +func (p *Package) lookup(node *Node, pkg string) (path string, dir string, typ PkgType) { + path, dir, typ = node.Lookup(pkg) + if dir != "" { + return + } + for _, child := range node.Children { + path, dir, typ = p.lookup(child, pkg) + if dir != "" { + break + } + } + return +} + +func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { + return p.lookup(p.root, pkg) +} + +func LoadPackage(dir string, ctx *build.Context) (*Package, error) { + ml := NewModuleList(ctx) + m, err := ml.LoadModule(dir) + if m == nil { + return nil, err + } + node := &Node{m, nil, nil} + p := &Package{ml, node, make(map[string]*Node)} + p.nodeMap[m.fdir] = node + p.load(p.root) + return p, nil +} diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 92b60b36..e2a87e6d 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -15,7 +15,6 @@ import ( "go/token" "go/types" "io/ioutil" - "log" "os" "path/filepath" "regexp" @@ -259,16 +258,17 @@ func NewFileCursor(src interface{}, filename string, pos int) *FileCursor { } type PkgConfig struct { - IgnoreFuncBodies bool - AllowBinary bool - WithTestFiles bool - Cursor *FileCursor Pkg *types.Package XPkg *types.Package Info *types.Info XInfo *types.Info + Bpkg *build.Package + Cursor *FileCursor Files map[string]*ast.File XTestFiles map[string]*ast.File + IgnoreFuncBodies bool + AllowBinary bool + WithTestFiles bool } func NewPkgWalker(context *build.Context) *PkgWalker { @@ -282,7 +282,6 @@ func NewPkgWalker(context *build.Context) *PkgWalker { Imported: map[string]*types.Package{"unsafe": types.Unsafe}, ImportedModTime: map[string]int64{}, gcimported: importer.Default(), - modList: fastmod.NewModuleList(context), } } @@ -304,8 +303,7 @@ type PkgWalker struct { gcimported types.Importer cursor *FileCursor cmd *command.Command - mod *fastmod.Module - modList *fastmod.ModuleList + modPkg *fastmod.Package } func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { @@ -343,7 +341,22 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err p.Imported[name] = nil p.importingName = make(map[string]bool) - pkg, err = p.Import("", name, conf) + p.modPkg = nil + // check mod + var import_path string + if filepath.IsAbs(name) { + p.modPkg, _ = fastmod.LoadPackage(name, p.Context) + if p.modPkg != nil { + dir := filepath.ToSlash(p.modPkg.Node().ModDir()) + fname := filepath.ToSlash(name) + if dir == fname { + import_path = p.modPkg.Node().Path() + } else if strings.HasPrefix(fname, dir+"/") { + import_path = p.modPkg.Node().Path() + fname[len(dir):] + } + } + } + pkg, err = p.ImportHelper("", name, import_path, conf) return } @@ -360,20 +373,19 @@ func (w *PkgWalker) isBinaryPkg(pkg string) bool { return stdlib.IsStdPkg(pkg) } -func (w *PkgWalker) importPath(path string, mode build.ImportMode) (*build.Package, error) { +func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportMode) (*build.Package, error) { if filepath.IsAbs(path) { return w.Context.ImportDir(path, 0) } if stdlib.IsStdPkg(path) { return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) } - //check mod - if w.mod != nil { - _, dir := w.mod.Lookup(path) + if w.modPkg != nil { + _path, dir, _ := w.modPkg.Lookup(path) if dir != "" { pkg, err := w.Context.ImportDir(dir, mode) if pkg != nil { - pkg.ImportPath = path + pkg.ImportPath = _path } return pkg, err } @@ -418,29 +430,26 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri if parentDir != "" { if strings.HasPrefix(name, ".") { name = filepath.Join(parentDir, name) - } else if pkgutil.IsVendorExperiment() { - parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) - var err error - name, err = pkgutil.VendoredImportPath(parentPkg, name) - if err != nil { - return nil, err + } else { + if pkgutil.IsVendorExperiment() { + parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) + var err error + name, err = pkgutil.VendoredImportPath(parentPkg, name) + if err != nil { + return nil, err + } } } } - // parser cursor mod - if filepath.IsAbs(name) { - w.mod, _ = w.modList.LoadModule(name) - if typesVerbose && w.mod != nil { - log.Println("parser mod", w.mod.ModFile()) - } - } - - bp, err := w.importPath(name, 0) + bp, err := w.importPath(parentDir, name, 0) if bp == nil { return nil, err } + + conf.Bpkg = bp + GoFiles := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...) XTestGoFiles := append([]string{}, bp.XTestGoFiles...) @@ -755,7 +764,7 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor break } } - bp, err = w.importPath(findpath, build.FindOnly) + bp, err = w.importPath("", findpath, build.FindOnly) if err == nil { w.cmd.Println(w.fset.Position(is.Pos()).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) } else { @@ -1113,9 +1122,9 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } - if typesVerbose { - w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) - } + // if typesVerbose { + // w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) + // } if cursorPkg != nil && cursorPkg != pkg && kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { conf := &PkgConfig{ @@ -1330,10 +1339,11 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { var find_def_pkg string var uses_paths []string + if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { find_def_pkg = cursorPkg.Path() if typesFindSkipGoroot { - bp, err := w.importPath(find_def_pkg, 0) + bp, err := w.importPath(conf.Bpkg.Dir, find_def_pkg, 0) if err == nil && !bp.Goroot { uses_paths = append(uses_paths, find_def_pkg) } @@ -1343,44 +1353,95 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } cursorPkgPath := cursorObj.Pkg().Path() - if pkgutil.IsVendorExperiment() { + if w.modPkg == nil && pkgutil.IsVendorExperiment() { cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) } - - buildutil.ForEachPackage(w.Context, func(importPath string, err error) { - if err != nil { - return - } - if importPath == conf.Pkg.Path() { - return - } - bp, err := w.importPath(importPath, 0) - if err != nil { - return - } - find := false - if bp.ImportPath == cursorPkg.Path() { - find = true - } else { + // check on module dir + if w.modPkg != nil { + dir := w.modPkg.Node().ModDir() + filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if !info.IsDir() { + return nil + } + if path != dir && info.Name() == "vendor" { + return filepath.SkipDir + } + if conf.Bpkg.Dir == path { + return nil + } + bp, err := w.importPath(dir, path, 0) + if err != nil { + return nil + } + if !bp.IsCommand() { + importPath := filepath.Join(w.modPkg.Node().Path(), path[len(dir)+1:]) + if importPath == cursorPkgPath { + return nil + } + } + find := false for _, v := range bp.Imports { if v == cursorPkgPath { find = true break } } - } - if find { - for _, v := range uses_paths { - if v == bp.ImportPath { - return + if find { + importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) + for _, v := range uses_paths { + if v == importPath { + return nil + } } + uses_paths = append(uses_paths, importPath) } - if typesFindSkipGoroot && bp.Goroot { + return nil + }) + } + ctx := *w.Context + searchAll := true + if w.modPkg != nil { + ctx.GOPATH = "" + if typesFindSkipGoroot { + searchAll = false + } + } + if searchAll { + buildutil.ForEachPackage(&ctx, func(importPath string, err error) { + if err != nil { return } - uses_paths = append(uses_paths, bp.ImportPath) - } - }) + if importPath == conf.Pkg.Path() { + return + } + bp, err := w.importPath("", importPath, 0) + if err != nil { + return + } + find := false + if bp.ImportPath == cursorPkg.Path() { + find = true + } else { + for _, v := range bp.Imports { + if v == cursorPkgPath { + find = true + break + } + } + } + if find { + for _, v := range uses_paths { + if v == bp.ImportPath { + return + } + } + if typesFindSkipGoroot && bp.Goroot { + return + } + uses_paths = append(uses_paths, bp.ImportPath) + } + }) + } //w.Imported = make(map[string]*types.Package) for _, v := range uses_paths { From a5206a1092e9a120ea189a432dc26620bf393ba3 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 19 Oct 2018 10:01:22 +0800 Subject: [PATCH 037/133] x --- Godeps/Godeps.json | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3d4feb76..aca43324 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,9 +2,6 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", - "Packages": [ - "./..." - ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", @@ -53,26 +50,6 @@ { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/modfile", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/module", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/semver", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" } ] } From b79a083c30f0ab0899cd510bb71f666caac35bcb Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 23 Oct 2018 09:35:44 +0800 Subject: [PATCH 038/133] add typesinfo for liteide --- Godeps/Godeps.json | 10 +- client.go | 30 ++- formatters.go | 4 + gocode.go | 2 +- package_types.go | 14 ++ rpc.go | 31 +++ server.go | 89 +++++++- .../visualfc/gotools/types/types.go | 211 +++++++++--------- 8 files changed, 273 insertions(+), 118 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index aca43324..70996c6a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -21,23 +21,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "355b74272f2c73c17dd1ff5d02dc5ffea8675d32" + "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/client.go b/client.go index 3174a2d1..e9a8762c 100644 --- a/client.go +++ b/client.go @@ -42,6 +42,8 @@ func do_client() int { switch flag.Arg(0) { case "autocomplete": cmd_auto_complete(client) + case "liteide_typesinfo": + cmd_types_info(client) case "close": cmd_close(client) case "status": @@ -103,7 +105,7 @@ func try_to_connect(network, address string) (client *rpc.Client, err error) { return } -func prepare_file_filename_cursor() ([]byte, string, int) { +func prepare_file_filename_cursor(filter bool) ([]byte, string, int) { var file []byte var err error @@ -117,9 +119,6 @@ func prepare_file_filename_cursor() ([]byte, string, int) { panic(err.Error()) } - var skipped int - file, skipped = filter_out_shebang(file) - filename := *g_input cursor := -1 @@ -132,6 +131,11 @@ func prepare_file_filename_cursor() ([]byte, string, int) { offset = flag.Arg(2) } + var skipped int + if filter { + file, skipped = filter_out_shebang(file) + } + if offset != "" { if offset[0] == 'c' || offset[0] == 'C' { cursor, _ = strconv.Atoi(offset[1:]) @@ -142,6 +146,7 @@ func prepare_file_filename_cursor() ([]byte, string, int) { } cursor -= skipped + if filename != "" && !filepath.IsAbs(filename) { cwd, _ := os.Getwd() filename = filepath.Join(cwd, filename) @@ -159,11 +164,26 @@ func cmd_status(c *rpc.Client) { func cmd_auto_complete(c *rpc.Client) { context := pack_build_context(&build.Default) - file, filename, cursor := prepare_file_filename_cursor() + file, filename, cursor := prepare_file_filename_cursor(true) f := get_formatter(*g_format) f.write_candidates(client_auto_complete(c, file, filename, cursor, context)) } +func write_tyepsinfo(infos []string, num int) { + if infos == nil { + return + } + for _, c := range infos { + fmt.Printf("%s\n", c) + } +} + +func cmd_types_info(c *rpc.Client) { + context := pack_build_context(&build.Default) + file, filename, cursor := prepare_file_filename_cursor(true) + write_tyepsinfo(client_types_info(c, file, filename, cursor, context)) +} + func cmd_close(c *rpc.Client) { client_close(c, 0) } diff --git a/formatters.go b/formatters.go index 4a9738c9..d5645198 100644 --- a/formatters.go +++ b/formatters.go @@ -13,6 +13,10 @@ type formatter interface { write_candidates(candidates []candidate, num int) } +type formatter_ex interface { + formatter +} + //------------------------------------------------------------------------- // nice_formatter (just for testing, simple textual output) //------------------------------------------------------------------------- diff --git a/gocode.go b/gocode.go index 24de24ad..71e2a8f0 100644 --- a/gocode.go +++ b/gocode.go @@ -15,7 +15,7 @@ var ( g_format = flag.String("f", "nice", "output format (vim | emacs | nice | csv | csv-with-package | json)") g_input = flag.String("in", "", "use this file instead of stdin input") g_sock = create_sock_flag("sock", "socket type (unix | tcp)") - g_addr = flag.String("addr", "127.0.0.1:37373", "address for tcp socket") + g_addr = flag.String("addr", "127.0.0.1:37372", "address for tcp socket") g_debug = flag.Bool("debug", false, "enable server-side debug mode") g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling") g_daemon_name = flag.String("daemon", "gocode-daemon-x", "unix socket daemon prefix name") diff --git a/package_types.go b/package_types.go index 54b140f3..5a6c638f 100644 --- a/package_types.go +++ b/package_types.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "go/ast" "go/importer" "go/token" "go/types" @@ -19,6 +20,19 @@ type types_parser struct { func DefaultPkgConfig() *pkgwalk.PkgConfig { conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + //Types: make(map[ast.Expr]types.TypeAndValue), + //Scopes : make(map[ast.Node]*types.Scope) + //Implicits : make(map[ast.Node]types.Object) + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } return conf } diff --git a/rpc.go b/rpc.go index b1e0ea7a..709b626d 100644 --- a/rpc.go +++ b/rpc.go @@ -26,6 +26,7 @@ func (r *RPC) RPC_auto_complete(args *Args_auto_complete, reply *Reply_auto_comp reply.Arg0, reply.Arg1 = server_auto_complete(args.Arg0, args.Arg1, args.Arg2, args.Arg3) return nil } + func client_auto_complete(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, Arg3 go_build_context) (c []candidate, d int) { var args Args_auto_complete var reply Reply_auto_complete @@ -40,6 +41,36 @@ func client_auto_complete(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, A return reply.Arg0, reply.Arg1 } +type Args_types_info struct { + Arg0 []byte + Arg1 string + Arg2 int + Arg3 go_build_context +} +type Reply_types_info struct { + Arg0 []string + Arg1 int +} + +func (r *RPC) RPC_types_info(args *Args_types_info, reply *Reply_types_info) error { + reply.Arg0, reply.Arg1 = server_types_info(args.Arg0, args.Arg1, args.Arg2, args.Arg3) + return nil +} + +func client_types_info(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, Arg3 go_build_context) (c []string, d int) { + var args Args_types_info + var reply Reply_types_info + args.Arg0 = Arg0 + args.Arg1 = Arg1 + args.Arg2 = Arg2 + args.Arg3 = Arg3 + err := cli.Call("RPC.RPC_types_info", &args, &reply) + if err != nil { + panic(err) + } + return reply.Arg0, reply.Arg1 +} + // wrapper for: server_close type Args_close struct { diff --git a/server.go b/server.go index 390b0ca1..2a2d9617 100644 --- a/server.go +++ b/server.go @@ -11,6 +11,7 @@ import ( "path/filepath" "reflect" "runtime" + "strings" "time" pkgwalk "github.com/visualfc/gotools/types" @@ -133,6 +134,84 @@ var g_daemon *daemon // Corresponding client_* functions are autogenerated by goremote. //------------------------------------------------------------------------- +type TypesInfo struct { + ar []string +} + +func (p *TypesInfo) Write(data []byte) (n int, err error) { + p.ar = append(p.ar, strings.TrimSpace(string(data))) + return len(data), nil +} + +func server_types_info(file []byte, filename string, cursor int, context_packed go_build_context) (c []string, d int) { + context := unpack_build_context(&context_packed) + defer func() { + if err := recover(); err != nil { + print_backtrace(err) + c = []string{} + // drop cache + g_daemon.drop_cache() + } + }() + // TODO: Probably we don't care about comparing all the fields, checking GOROOT and GOPATH + // should be enough. + if !reflect.DeepEqual(g_daemon.context.Context, context.Context) { + g_daemon.context = context + g_daemon.drop_cache() + } + switch g_config.PackageLookupMode { + case "bzl": + // when package lookup mode is bzl, we set GOPATH to "" explicitly and + // BzlProjectRoot becomes valid (or empty) + var err error + g_daemon.context.GOPATH = "" + g_daemon.context.BzlProjectRoot, err = find_bzl_project_root(g_config.LibPath, filename) + if *g_debug && err != nil { + log.Printf("Bzl project root not found: %s", err) + } + case "gb": + // when package lookup mode is gb, we set GOPATH to "" explicitly and + // GBProjectRoot becomes valid (or empty) + var err error + g_daemon.context.GOPATH = "" + g_daemon.context.GBProjectRoot, err = find_gb_project_root(filename) + if *g_debug && err != nil { + log.Printf("Gb project root not found: %s", err) + } + case "go": + // get current package path for GO15VENDOREXPERIMENT hack + g_daemon.context.CurrentPackagePath = "" + dir, fname := filepath.Split(filename) + if dir == "." { + dir, _ = os.Getwd() + } + pkg, err := g_daemon.context.ImportDir(dir, build.FindOnly) + if err == nil { + if *g_debug { + log.Printf("Go project path: %s", pkg.ImportPath) + } + g_daemon.context.CurrentPackagePath = pkg.ImportPath + } else if *g_debug { + log.Printf("Go project path not found: %s", err) + } + + conf := pkgwalk.DefaultPkgConfig() + conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) + if file != nil { + g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + } + var stdout, stderr TypesInfo + g_daemon.autocomplete.walker.SetOutput(&stdout, &stderr) + g_daemon.autocomplete.walker.SetFindMode(&pkgwalk.FindMode{Info: true, Doc: true, Define: true}) + wpkg, _ := g_daemon.autocomplete.walker.Check(dir, conf) + if wpkg != nil { + g_daemon.autocomplete.walker.LookupCursor(wpkg, conf, conf.Cursor) + return stdout.ar, len(stdout.ar) + } + } + return +} + func server_auto_complete(file []byte, filename string, cursor int, context_packed go_build_context) (c []candidate, d int) { context := unpack_build_context(&context_packed) defer func() { @@ -174,7 +253,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack case "go": // get current package path for GO15VENDOREXPERIMENT hack g_daemon.context.CurrentPackagePath = "" - dir := filepath.Dir(filename) + dir, fname := filepath.Split(filename) if dir == "." { dir, _ = os.Getwd() } @@ -190,9 +269,11 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack //g_daemon.modList = gomod.LooupModList(dir) - conf := DefaultPkgConfig() - conf.WithTestFiles = true - conf.Cursor = pkgwalk.NewFileCursor(file, filename, cursor) + conf := pkgwalk.DefaultPkgConfig() + conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) + if file != nil { + g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + } g_daemon.autocomplete.walker.Check(dir, conf) } if *g_debug { diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index e2a87e6d..97b3d9ce 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -1,4 +1,4 @@ -// Copyright 2011-2015 visualfc . All rights reserved. +// Copyright 2011-2018 visualfc . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -14,6 +14,7 @@ import ( "go/printer" "go/token" "go/types" + "io" "io/ioutil" "os" "path/filepath" @@ -189,13 +190,20 @@ func runTypes(cmd *command.Command, args []string) error { src, err := ioutil.ReadAll(cmd.Stdin) if err == nil { cursorInfo.src = src - cursorInfo.mtime = time.Now().UnixNano() } } cursor = &cursorInfo } - w.cursor = cursor w.cmd = cmd + w.findMode = &FindMode{ + Info: typesFindInfo, + Define: typesFindDef, + Doc: typesFindDoc, + Usage: typesFindUse, + UsageAll: typesFindUseAll, + SkipGoroot: typesFindSkipGoroot, + } + for _, pkgName := range args { if pkgName == "." { pkgPath, err := os.Getwd() @@ -207,31 +215,13 @@ func runTypes(cmd *command.Command, args []string) error { if cursor.src != nil { w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src) } - - conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: true} - if cursor != nil { - cursor.pkgName = pkgName - conf.Cursor = cursor - conf.IgnoreFuncBodies = false - conf.Info = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - //Types: make(map[ast.Expr]types.TypeAndValue), - //Scopes : make(map[ast.Node]*types.Scope) - //Implicits : make(map[ast.Node]types.Object) - } - conf.XInfo = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } - } + conf := DefaultPkgConfig() + conf.Cursor = cursor pkg, err := w.Check(pkgName, conf) if pkg == nil { return fmt.Errorf("error import path %v", err) } - if cursor != nil && (typesFindInfo || typesFindDef || typesFindUse) { + if cursor != nil && w.findMode.IsValid() { return w.LookupCursor(pkg, conf, cursor) } } @@ -239,22 +229,34 @@ func runTypes(cmd *command.Command, args []string) error { } type FileCursor struct { - pkgName string fileName string fileDir string cursorPos int pos token.Pos src interface{} - mtime int64 xtest bool } func NewFileCursor(src interface{}, filename string, pos int) *FileCursor { - cur := &FileCursor{fileName: filename, cursorPos: pos, src: src} - if src != nil { - cur.mtime = time.Now().UnixNano() - } - return cur + return &FileCursor{fileName: filename, cursorPos: pos, src: src} +} + +type SourceData struct { + data interface{} + mtime int64 +} + +type FindMode struct { + Info bool + Doc bool + Define bool + Usage bool + UsageAll bool + SkipGoroot bool +} + +func (f *FindMode) IsValid() bool { + return f.Info || f.Define || f.Usage } type PkgConfig struct { @@ -271,28 +273,27 @@ type PkgConfig struct { WithTestFiles bool } -func NewPkgWalker(context *build.Context) *PkgWalker { - return &PkgWalker{ - Context: context, - fset: token.NewFileSet(), - parsedFileCache: map[string]*ast.File{}, - parsedFileModTime: map[string]int64{}, - fileSourceData: map[string]*SourceData{}, - importingName: map[string]bool{}, - Imported: map[string]*types.Package{"unsafe": types.Unsafe}, - ImportedModTime: map[string]int64{}, - gcimported: importer.Default(), +func DefaultPkgConfig() *PkgConfig { + conf := &PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + //Types: make(map[ast.Expr]types.TypeAndValue), + //Scopes : make(map[ast.Node]*types.Scope) + //Implicits : make(map[ast.Node]types.Object) } -} - -type SourceData struct { - data interface{} - mtime int64 + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } + return conf } type PkgWalker struct { fset *token.FileSet - Context *build.Context + context *build.Context current *types.Package importingName map[string]bool parsedFileCache map[string]*ast.File @@ -301,31 +302,39 @@ type PkgWalker struct { Imported map[string]*types.Package // packages already imported ImportedModTime map[string]int64 gcimported types.Importer - cursor *FileCursor cmd *command.Command modPkg *fastmod.Package + findMode *FindMode } -func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { - w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} +func NewPkgWalker(context *build.Context) *PkgWalker { + return &PkgWalker{ + context: context, + fset: token.NewFileSet(), + parsedFileCache: map[string]*ast.File{}, + parsedFileModTime: map[string]int64{}, + fileSourceData: map[string]*SourceData{}, + importingName: map[string]bool{}, + Imported: map[string]*types.Package{"unsafe": types.Unsafe}, + ImportedModTime: map[string]int64{}, + gcimported: importer.Default(), + findMode: &FindMode{}, + } } -func DefaultPkgConfig() *PkgConfig { - conf := &PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} - conf.Info = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - //Types: make(map[ast.Expr]types.TypeAndValue), - //Scopes : make(map[ast.Node]*types.Scope) - //Implicits : make(map[ast.Node]types.Object) - } - conf.XInfo = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } - return conf +func (w *PkgWalker) SetOutput(stdout io.Writer, stderr io.Writer) { + cmd := &command.Command{} + cmd.Stdout = stdout + cmd.Stderr = stderr + w.cmd = cmd +} + +func (w *PkgWalker) SetFindMode(mode *FindMode) { + w.findMode = mode +} + +func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { + w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err error) { @@ -335,17 +344,13 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err if conf == nil { conf = DefaultPkgConfig() } - if conf.Cursor != nil { - conf.Cursor.pkgName = name - } - p.Imported[name] = nil p.importingName = make(map[string]bool) p.modPkg = nil // check mod var import_path string if filepath.IsAbs(name) { - p.modPkg, _ = fastmod.LoadPackage(name, p.Context) + p.modPkg, _ = fastmod.LoadPackage(name, p.context) if p.modPkg != nil { dir := filepath.ToSlash(p.modPkg.Node().ModDir()) fname := filepath.ToSlash(name) @@ -375,15 +380,15 @@ func (w *PkgWalker) isBinaryPkg(pkg string) bool { func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportMode) (*build.Package, error) { if filepath.IsAbs(path) { - return w.Context.ImportDir(path, 0) + return w.context.ImportDir(path, 0) } if stdlib.IsStdPkg(path) { - return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) + return stdlib.ImportStdPkg(w.context, path, build.AllowBinary) } if w.modPkg != nil { _path, dir, _ := w.modPkg.Lookup(path) if dir != "" { - pkg, err := w.Context.ImportDir(dir, mode) + pkg, err := w.context.ImportDir(dir, mode) if pkg != nil { pkg.ImportPath = _path } @@ -391,12 +396,12 @@ func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportM } } if path == "syscall/js" { - ctx := *w.Context + ctx := *w.context ctx.BuildTags = append(ctx.BuildTags, "js") ctx.BuildTags = append(ctx.BuildTags, "wasm") return ctx.Import(path, "", mode) } - return w.Context.Import(path, "", mode) + return w.context.Import(path, "", mode) } func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig) (pkg *types.Package, err error) { @@ -432,7 +437,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri name = filepath.Join(parentDir, name) } else { if pkgutil.IsVendorExperiment() { - parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) + parentPkg := pkgutil.ImportDirEx(w.context, parentDir) var err error name, err = pkgutil.VendoredImportPath(parentPkg, name) if err != nil { @@ -498,12 +503,12 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri // } if name == "runtime" { - n := fmt.Sprintf("zgoos_%s.go", w.Context.GOOS) + n := fmt.Sprintf("zgoos_%s.go", w.context.GOOS) if !contains(GoFiles, n) { GoFiles = append(GoFiles, n) } - n = fmt.Sprintf("zgoarch_%s.go", w.Context.GOARCH) + n = fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH) if !contains(GoFiles, n) { GoFiles = append(GoFiles, n) } @@ -616,7 +621,7 @@ func (im *Importer) Import(name string) (pkg *types.Package, err error) { } func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { - return w.parseFileEx(dir, file, nil, 0, typesFindDoc) + return w.parseFileEx(dir, file, nil, 0, w.findMode.Doc) } func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, findDoc bool) (*ast.File, error) { @@ -639,16 +644,16 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, var f *ast.File var err error // generate missing context-dependent files. - if w.Context != nil && file == fmt.Sprintf("zgoos_%s.go", w.Context.GOOS) { - src := fmt.Sprintf("package runtime; const theGoos = `%s`", w.Context.GOOS) + if w.context != nil && file == fmt.Sprintf("zgoos_%s.go", w.context.GOOS) { + src := fmt.Sprintf("package runtime; const theGoos = `%s`", w.context.GOOS) f, err = parser.ParseFile(w.fset, filename, src, 0) if err != nil { fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) } } - if w.Context != nil && file == fmt.Sprintf("zgoarch_%s.go", w.Context.GOARCH) { - src := fmt.Sprintf("package runtime; const theGoarch = `%s`", w.Context.GOARCH) + if w.context != nil && file == fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH) { + src := fmt.Sprintf("package runtime; const theGoarch = `%s`", w.context.GOARCH) f, err = parser.ParseFile(w.fset, filename, src, 0) if err != nil { fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) @@ -692,10 +697,10 @@ func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *Fi } func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *FileCursor, nm *ast.Ident) error { - if typesFindDef { + if w.findMode.Define { w.cmd.Println(w.fset.Position(nm.Pos())) } - if typesFindInfo { + if w.findMode.Info { if cursor.xtest { w.cmd.Printf("package %s (%q)\n", pkg.Name()+"_test", pkg.Path()) } else { @@ -707,7 +712,7 @@ func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *File } } - if !typesFindUse { + if !w.findMode.Usage { return nil } var usages []int @@ -750,7 +755,7 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor } var bp *build.Package - if typesFindDef { + if w.findMode.Define { var findpath string = fpath //check imported and vendor for _, v := range w.Imported { @@ -772,7 +777,7 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor } } - if typesFindInfo { + if w.findMode.Info { if fname == fpath { w.cmd.Printf("import %s\n", fname) } else { @@ -780,11 +785,11 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor } } - if typesFindDoc && bp != nil && bp.Doc != "" { + if w.findMode.Doc && bp != nil && bp.Doc != "" { w.cmd.Println(bp.Doc) } - if !typesFindUse { + if !w.findMode.Usage { return nil } @@ -1049,7 +1054,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { kind = ObjImplicit } else { //TODO - return nil + return fmt.Errorf("nof find object %v:%v", cursor.fileName, cursor.pos) } if kind == ObjField { if cursorObj.(*types.Var).Anonymous() { @@ -1208,10 +1213,10 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { // if kind == ObjField { // fieldTypeObj = w.LookupStructFromField(fieldTypeInfo, cursorPkg, cursorObj, cursorPos) // } - if typesFindDef { + if w.findMode.Define { w.cmd.Println(w.fset.Position(cursorPos)) } - if typesFindInfo { + if w.findMode.Info { /*if kind == ObjField && fieldTypeObj != nil { typeName := fieldTypeObj.Name() if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg { @@ -1232,7 +1237,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } - if typesFindDoc && typesFindDef { + if w.findMode.Doc && w.findMode.Define { pos := w.fset.Position(cursorPos) file := w.parsedFileCache[pos.Filename] if file != nil { @@ -1251,7 +1256,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } - if !typesFindUse { + if !w.findMode.Usage { return nil } @@ -1304,7 +1309,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { w.cmd.Println(w.fset.Position(token.Pos(pos))) } //check look for current pkg.object on pkg_test - if typesFindUseAll || IsSamePkg(cursorPkg, conf.Pkg) { + if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) { var addInfo *types.Info if conf.Cursor.xtest { addInfo = conf.Info @@ -1329,7 +1334,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } - if !typesFindUseAll { + if !w.findMode.UsageAll { return nil } @@ -1342,7 +1347,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { find_def_pkg = cursorPkg.Path() - if typesFindSkipGoroot { + if w.findMode.SkipGoroot { bp, err := w.importPath(conf.Bpkg.Dir, find_def_pkg, 0) if err == nil && !bp.Goroot { uses_paths = append(uses_paths, find_def_pkg) @@ -1398,11 +1403,11 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return nil }) } - ctx := *w.Context + ctx := *w.context searchAll := true if w.modPkg != nil { ctx.GOPATH = "" - if typesFindSkipGoroot { + if w.findMode.SkipGoroot { searchAll = false } } @@ -1435,7 +1440,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return } } - if typesFindSkipGoroot && bp.Goroot { + if w.findMode.SkipGoroot && bp.Goroot { return } uses_paths = append(uses_paths, bp.ImportPath) From 5b337119b50dca635efc5480375eb8a55fbf89bf Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 23 Oct 2018 09:37:40 +0800 Subject: [PATCH 039/133] update daemon for liteide --- gocode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gocode.go b/gocode.go index 71e2a8f0..e1ee5d43 100644 --- a/gocode.go +++ b/gocode.go @@ -18,7 +18,7 @@ var ( g_addr = flag.String("addr", "127.0.0.1:37372", "address for tcp socket") g_debug = flag.Bool("debug", false, "enable server-side debug mode") g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling") - g_daemon_name = flag.String("daemon", "gocode-daemon-x", "unix socket daemon prefix name") + g_daemon_name = flag.String("daemon", "gocode-daemon-liteide", "unix socket daemon prefix name") ) func get_socket_filename() string { From 3a9a6588e8071cfe1d461cf7c9e7b2b569a4ad2d Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 23 Oct 2018 20:17:34 +0800 Subject: [PATCH 040/133] types: fix and remove old runtime generate code --- Godeps/Godeps.json | 21 ++++---- vendor/github.com/visualfc/fastmod/README.md | 5 +- .../visualfc/gotools/types/types.go | 53 +++---------------- 3 files changed, 20 insertions(+), 59 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 70996c6a..8dd3e37c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,42 +2,45 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", + "Packages": [ + "./..." + ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" + "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" + "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" + "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "1de3f8d6e3a749c274dd12998b434acd8eb18fda" + "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" + "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" + "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" + "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" + "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "52d5e4776d5eec267868e3d132839bf644d0293b" + "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/vendor/github.com/visualfc/fastmod/README.md b/vendor/github.com/visualfc/fastmod/README.md index 3afe506d..6817c373 100644 --- a/vendor/github.com/visualfc/fastmod/README.md +++ b/vendor/github.com/visualfc/fastmod/README.md @@ -4,9 +4,8 @@ Usages: - modList := fastmod.NewModuleList(&build.Default) - mod, err := modList.LoadModule(dir) + pkg, err := fastmod.LoadPackage(dir, &build.Default) if err != nil { return } - path, dir, typ := mod.Lookup(pkg) \ No newline at end of file + path, dir, typ := pkg.Lookup(pkg) \ No newline at end of file diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 97b3d9ce..d55830aa 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -493,27 +493,6 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri w.importingName[checkName] = true - // if err != nil { - // return nil, err - // //if _, nogo := err.(*build.NoGoError); nogo { - // // return - // //} - // //return - // //log.Fatalf("pkg %q, dir %q: ScanDir: %v", name, info.Dir, err) - // } - - if name == "runtime" { - n := fmt.Sprintf("zgoos_%s.go", w.context.GOOS) - if !contains(GoFiles, n) { - GoFiles = append(GoFiles, n) - } - - n = fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH) - if !contains(GoFiles, n) { - GoFiles = append(GoFiles, n) - } - } - if conf.Cursor != nil && conf.Cursor.fileName != "" { cursor := conf.Cursor f, _ := w.parseFile(bp.Dir, cursor.fileName) @@ -641,34 +620,14 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } } } - var f *ast.File - var err error - // generate missing context-dependent files. - if w.context != nil && file == fmt.Sprintf("zgoos_%s.go", w.context.GOOS) { - src := fmt.Sprintf("package runtime; const theGoos = `%s`", w.context.GOOS) - f, err = parser.ParseFile(w.fset, filename, src, 0) - if err != nil { - fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) - } - } - if w.context != nil && file == fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH) { - src := fmt.Sprintf("package runtime; const theGoarch = `%s`", w.context.GOARCH) - f, err = parser.ParseFile(w.fset, filename, src, 0) - if err != nil { - fmt.Fprintf(w.cmd.Stderr, "incorrect generated file: %s", err) - } + flag := parser.AllErrors + if findDoc { + flag |= parser.ParseComments } - - if f == nil { - flag := parser.AllErrors - if findDoc { - flag |= parser.ParseComments - } - f, err = parser.ParseFile(w.fset, filename, src, flag) - if err != nil { - return f, err - } + f, err := parser.ParseFile(w.fset, filename, src, flag) + if err != nil { + return f, err } if mtime != 0 { w.parsedFileModTime[filename] = mtime From cdd8205b1221031faad24a62319f7fb984063457 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 23 Oct 2018 22:09:23 +0800 Subject: [PATCH 041/133] x --- Godeps/Godeps.json | 10 +++++----- server.go | 4 ++-- vendor/github.com/visualfc/gotools/types/types.go | 7 +++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 8dd3e37c..4655421a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,23 +24,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" + "Rev": "67671383790c874878ba372d4d60a4d2462f298e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" + "Rev": "67671383790c874878ba372d4d60a4d2462f298e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" + "Rev": "67671383790c874878ba372d4d60a4d2462f298e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" + "Rev": "67671383790c874878ba372d4d60a4d2462f298e" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "e7994f57a1b7b598992fbe301bc283b44a5ad402" + "Rev": "67671383790c874878ba372d4d60a4d2462f298e" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/server.go b/server.go index 2a2d9617..fd5305ac 100644 --- a/server.go +++ b/server.go @@ -198,7 +198,7 @@ func server_types_info(file []byte, filename string, cursor int, context_packed conf := pkgwalk.DefaultPkgConfig() conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) } var stdout, stderr TypesInfo g_daemon.autocomplete.walker.SetOutput(&stdout, &stderr) @@ -272,7 +272,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack conf := pkgwalk.DefaultPkgConfig() conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) } g_daemon.autocomplete.walker.Check(dir, conf) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index d55830aa..712be86b 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -213,7 +213,7 @@ func runTypes(cmd *command.Command, args []string) error { pkgName = pkgPath } if cursor.src != nil { - w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src) + w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src, true) } conf := DefaultPkgConfig() conf.Cursor = cursor @@ -333,7 +333,10 @@ func (w *PkgWalker) SetFindMode(mode *FindMode) { w.findMode = mode } -func (w *PkgWalker) UpdateSourceData(filename string, data interface{}) { +func (w *PkgWalker) UpdateSourceData(filename string, data interface{}, cleanAllSourceCache bool) { + if cleanAllSourceCache { + w.fileSourceData = make(map[string]*SourceData) + } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } From 3cdd1dce8edfc5ad2815694f9bee9eeb9f342418 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 24 Oct 2018 13:33:03 +0800 Subject: [PATCH 042/133] fix types source cache --- Godeps/Godeps.json | 12 ++++++------ vendor/github.com/visualfc/gotools/types/types.go | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4655421a..59d8803f 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,23 +24,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "67671383790c874878ba372d4d60a4d2462f298e" + "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "67671383790c874878ba372d4d60a4d2462f298e" + "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "67671383790c874878ba372d4d60a4d2462f298e" + "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "67671383790c874878ba372d4d60a4d2462f298e" + "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "67671383790c874878ba372d4d60a4d2462f298e" + "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -53,6 +53,6 @@ { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" - } + }, ] } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 712be86b..034845aa 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -336,6 +336,7 @@ func (w *PkgWalker) SetFindMode(mode *FindMode) { func (w *PkgWalker) UpdateSourceData(filename string, data interface{}, cleanAllSourceCache bool) { if cleanAllSourceCache { w.fileSourceData = make(map[string]*SourceData) + delete(w.parsedFileModTime, filename) } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } From ac884d8395f1c5186064dd2bf70fea00ebf92940 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 8 Nov 2018 10:45:29 +0800 Subject: [PATCH 043/133] fix multi var decl rip_off_decl bug --- Godeps/Godeps.json | 18 ++--- autocompletecontext.go | 2 +- autocompletefile.go | 19 ++++- cursorcontext.go | 1 - decl.go | 1 - package.go | 16 ++-- ripper.go | 33 ++++++-- .../visualfc/gotools/types/types.go | 80 +++++++++---------- .../x/tools/go/internal/gcimporter/bexport.go | 2 +- .../go/internal/gcimporter/gcimporter.go | 69 +++++++++++----- .../tools/go/internal/gcimporter/isAlias18.go | 13 --- .../tools/go/internal/gcimporter/isAlias19.go | 13 --- 12 files changed, 153 insertions(+), 114 deletions(-) delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 59d8803f..bf066aee 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,35 +24,35 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" + "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" + "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" + "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" + "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "2946c4251ef249b1357d694f059d933bff7bbb5a" + "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" + "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" + "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "59602fdee893255faef9b2cd3aa8f880ea85265c" - }, + "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" + } ] } diff --git a/autocompletecontext.go b/autocompletecontext.go index f2b1d408..105e9e5f 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -359,7 +359,7 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int // Does full processing of the currently edited file (top-level declarations plus // active function). - c.current.process_data(filesemi) + c.current.process_data(filesemi, c) // Updates cache of other files and packages. See the function for details of // the process. At the end merges all the top-level declarations into the package diff --git a/autocompletefile.go b/autocompletefile.go index c68f7ca0..643fb7c5 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -64,8 +64,22 @@ func (f *auto_complete_file) offset(p token.Pos) int { } // this one is used for current file buffer exclusively -func (f *auto_complete_file) process_data(data []byte) { - cur, filedata, block := rip_off_decl(data, f.cursor) +func (f *auto_complete_file) process_data(data []byte, ctx *auto_complete_context) { + // topLevelTok fix rip_off_decl on multi var decl + // var (\n jsData = `{ }`\n file2 *File = func() *File { + var topLevelTok token.Token + if cf, ok := ctx.walker.ParsedFileCache[f.name]; ok { + pos := token.Pos(ctx.walker.FileSet.File(cf.Pos()).Base()) + token.Pos(f.cursor) + for _, decl := range cf.Decls { + if pos >= decl.Pos() && pos <= decl.End() { + if decl, ok := decl.(*ast.GenDecl); ok { + topLevelTok = decl.Tok + } + break + } + } + } + cur, filedata, block := rip_off_decl(data, f.cursor, topLevelTok) file, err := parser.ParseFile(f.fset, "", filedata, parser.AllErrors) if err != nil && *g_debug { log_parse_error("Error parsing input file (outer block)", err) @@ -85,6 +99,7 @@ func (f *auto_complete_file) process_data(data []byte) { for _, decl := range file.Decls { append_to_top_decls(f.decls, decl, f.scope) } + if block != nil { // process local function as top-level declaration decls, err := parse_decl_list(f.fset, block) diff --git a/cursorcontext.go b/cursorcontext.go index d3eef643..f943b11d 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -309,7 +309,6 @@ func (c *auto_complete_context) deduce_cursor_context(file []byte, cursor int) ( if len(iter.tokens) == 0 { return cursor_context{}, false } - // figure out what is just before the cursor switch tok := iter.token(); tok.tok { case token.STRING: diff --git a/decl.go b/decl.go index a515f501..9c8a980d 100644 --- a/decl.go +++ b/decl.go @@ -950,7 +950,6 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { return t, scope, true default: _ = reflect.TypeOf(v) - //fmt.Println(ty) } return nil, nil, false } diff --git a/package.go b/package.go index 9e8c478a..c768090e 100644 --- a/package.go +++ b/package.go @@ -10,6 +10,7 @@ import ( "os" "strings" + "github.com/visualfc/gotools/pkg/stdlib" "golang.org/x/tools/go/gcexportdata" ) @@ -104,20 +105,23 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { fname := m.find_file() stat, err := os.Stat(fname) + if err != nil { m.process_package_data(c, nil, true) return } - statmtime := stat.ModTime().UnixNano() if m.mtime != statmtime { m.mtime = statmtime - - data, err := file_reader.read_file(fname) - if err != nil { - return + if stdlib.IsStdPkg(import_path) { + data, err := file_reader.read_file(fname) + if err != nil { + return + } + m.process_package_data(c, data, false) + } else { + m.process_package_data(c, nil, true) } - m.process_package_data(c, data, false) } } diff --git a/ripper.go b/ripper.go index e1c2f75b..58d7ba1f 100644 --- a/ripper.go +++ b/ripper.go @@ -16,8 +16,9 @@ type tok_pos_pair struct { } type tok_collection struct { - tokens []tok_pos_pair - fset *token.FileSet + tokens []tok_pos_pair + fset *token.FileSet + toplevel token.Token } func (this *tok_collection) next(s *scanner.Scanner) bool { @@ -50,8 +51,8 @@ func (this *tok_collection) find_decl_beg(pos int) int { lowi = i } } - cur = lowest + var findvar bool for i := lowi - 1; i >= 0; i-- { t := this.tokens[i] switch t.tok { @@ -59,13 +60,33 @@ func (this *tok_collection) find_decl_beg(pos int) int { cur++ case token.LBRACE: cur-- + case token.VAR: + findvar = true } if t.tok == token.SEMICOLON && cur == lowest { lowpos = this.fset.Position(t.pos).Offset + //var (\n jsData = `{ }`\n file2 *File = func() *File { + if this.toplevel == token.VAR && !findvar { + next := lowest + for j := i - 1; j >= 0; j-- { + jt := this.tokens[j] + switch jt.tok { + case token.RBRACE: + next++ + case token.LBRACE: + next-- + case token.VAR: + findvar = true + } + if jt.tok == token.SEMICOLON && next == lowest && findvar { + lowpos = this.fset.Position(jt.pos).Offset + break + } + } + } break } } - return lowpos } @@ -119,7 +140,6 @@ func (this *tok_collection) rip_off_decl(file []byte, cursor int) (int, []byte, s.Init(this.fset.AddFile("", this.fset.Base(), len(file)), file, nil, scanner.ScanComments) for this.next(&s) { } - beg, end := this.find_outermost_scope(cursor) if beg == -1 || end == -1 { return cursor, file, nil @@ -135,7 +155,8 @@ func (this *tok_collection) rip_off_decl(file []byte, cursor int) (int, []byte, return cursor - beg, newfile, ripped } -func rip_off_decl(file []byte, cursor int) (int, []byte, []byte) { +func rip_off_decl(file []byte, cursor int, topLevelTok token.Token) (int, []byte, []byte) { var tc tok_collection + tc.toplevel = topLevelTok return tc.rip_off_decl(file, cursor) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 034845aa..e6be4d62 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -292,12 +292,12 @@ func DefaultPkgConfig() *PkgConfig { } type PkgWalker struct { - fset *token.FileSet - context *build.Context + FileSet *token.FileSet + Context *build.Context current *types.Package importingName map[string]bool - parsedFileCache map[string]*ast.File - parsedFileModTime map[string]int64 + ParsedFileCache map[string]*ast.File + ParsedFileModTime map[string]int64 fileSourceData map[string]*SourceData Imported map[string]*types.Package // packages already imported ImportedModTime map[string]int64 @@ -309,10 +309,10 @@ type PkgWalker struct { func NewPkgWalker(context *build.Context) *PkgWalker { return &PkgWalker{ - context: context, - fset: token.NewFileSet(), - parsedFileCache: map[string]*ast.File{}, - parsedFileModTime: map[string]int64{}, + Context: context, + FileSet: token.NewFileSet(), + ParsedFileCache: map[string]*ast.File{}, + ParsedFileModTime: map[string]int64{}, fileSourceData: map[string]*SourceData{}, importingName: map[string]bool{}, Imported: map[string]*types.Package{"unsafe": types.Unsafe}, @@ -336,7 +336,7 @@ func (w *PkgWalker) SetFindMode(mode *FindMode) { func (w *PkgWalker) UpdateSourceData(filename string, data interface{}, cleanAllSourceCache bool) { if cleanAllSourceCache { w.fileSourceData = make(map[string]*SourceData) - delete(w.parsedFileModTime, filename) + delete(w.ParsedFileModTime, filename) } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } @@ -354,7 +354,7 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err // check mod var import_path string if filepath.IsAbs(name) { - p.modPkg, _ = fastmod.LoadPackage(name, p.context) + p.modPkg, _ = fastmod.LoadPackage(name, p.Context) if p.modPkg != nil { dir := filepath.ToSlash(p.modPkg.Node().ModDir()) fname := filepath.ToSlash(name) @@ -384,15 +384,15 @@ func (w *PkgWalker) isBinaryPkg(pkg string) bool { func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportMode) (*build.Package, error) { if filepath.IsAbs(path) { - return w.context.ImportDir(path, 0) + return w.Context.ImportDir(path, 0) } if stdlib.IsStdPkg(path) { - return stdlib.ImportStdPkg(w.context, path, build.AllowBinary) + return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) } if w.modPkg != nil { _path, dir, _ := w.modPkg.Lookup(path) if dir != "" { - pkg, err := w.context.ImportDir(dir, mode) + pkg, err := w.Context.ImportDir(dir, mode) if pkg != nil { pkg.ImportPath = _path } @@ -400,12 +400,12 @@ func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportM } } if path == "syscall/js" { - ctx := *w.context + ctx := *w.Context ctx.BuildTags = append(ctx.BuildTags, "js") ctx.BuildTags = append(ctx.BuildTags, "wasm") return ctx.Import(path, "", mode) } - return w.context.Import(path, "", mode) + return w.Context.Import(path, "", mode) } func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig) (pkg *types.Package, err error) { @@ -441,7 +441,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri name = filepath.Join(parentDir, name) } else { if pkgutil.IsVendorExperiment() { - parentPkg := pkgutil.ImportDirEx(w.context, parentDir) + parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) var err error name, err = pkgutil.VendoredImportPath(parentPkg, name) if err != nil { @@ -501,7 +501,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri cursor := conf.Cursor f, _ := w.parseFile(bp.Dir, cursor.fileName) if f != nil { - cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) + cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir isTest := strings.HasSuffix(cursor.fileName, "_test.go") isXTest := false @@ -531,7 +531,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri var f *ast.File f, err = w.parseFile(bp.Dir, file) if cursor != nil && cursor.fileName == file { - cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) + cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) cursor.fileDir = bp.Dir cursor.xtest = xtest } @@ -559,7 +559,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri }, } - pkg, err = typesConf.Check(checkName, w.fset, files, conf.Info) + pkg, err = typesConf.Check(checkName, w.FileSet, files, conf.Info) conf.Pkg = pkg w.importingName[checkName] = false @@ -567,7 +567,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri w.ImportedModTime[name] = lastMod if len(xfiles) > 0 { - xpkg, _ := typesConf.Check(checkName+"_test", w.fset, xfiles, conf.XInfo) + xpkg, _ := typesConf.Check(checkName+"_test", w.FileSet, xfiles, conf.XInfo) w.Imported[checkName+"_test"] = xpkg conf.XPkg = xpkg } @@ -613,8 +613,8 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, src = sd.data mtime = sd.mtime } - if f, ok := w.parsedFileCache[filename]; ok { - if i, ok := w.parsedFileModTime[filename]; ok { + if f, ok := w.ParsedFileCache[filename]; ok { + if i, ok := w.ParsedFileModTime[filename]; ok { if mtime != 0 && mtime == i { return f, nil } @@ -629,19 +629,19 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, if findDoc { flag |= parser.ParseComments } - f, err := parser.ParseFile(w.fset, filename, src, flag) + f, err := parser.ParseFile(w.FileSet, filename, src, flag) if err != nil { return f, err } if mtime != 0 { - w.parsedFileModTime[filename] = mtime + w.ParsedFileModTime[filename] = mtime } else { info, err := os.Stat(filename) if err == nil { - w.parsedFileModTime[filename] = info.ModTime().UnixNano() + w.ParsedFileModTime[filename] = info.ModTime().UnixNano() } } - w.parsedFileCache[filename] = f + w.ParsedFileCache[filename] = f return f, nil } @@ -661,7 +661,7 @@ func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *Fi func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *FileCursor, nm *ast.Ident) error { if w.findMode.Define { - w.cmd.Println(w.fset.Position(nm.Pos())) + w.cmd.Println(w.FileSet.Position(nm.Pos())) } if w.findMode.Info { if cursor.xtest { @@ -693,7 +693,7 @@ func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *File } (sort.IntSlice(usages)).Sort() for _, pos := range usages { - w.cmd.Println(w.fset.Position(token.Pos(pos))) + w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } return nil } @@ -734,9 +734,9 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor } bp, err = w.importPath("", findpath, build.FindOnly) if err == nil { - w.cmd.Println(w.fset.Position(is.Pos()).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) + w.cmd.Println(w.FileSet.Position(is.Pos()).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) } else { - w.cmd.Println(w.fset.Position(is.Pos())) + w.cmd.Println(w.FileSet.Position(is.Pos())) } } @@ -768,7 +768,7 @@ func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor } (sort.IntSlice(usages)).Sort() for _, pos := range usages { - w.cmd.Println(w.fset.Position(token.Pos(pos))) + w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } return nil } @@ -1177,7 +1177,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { // fieldTypeObj = w.LookupStructFromField(fieldTypeInfo, cursorPkg, cursorObj, cursorPos) // } if w.findMode.Define { - w.cmd.Println(w.fset.Position(cursorPos)) + w.cmd.Println(w.FileSet.Position(cursorPos)) } if w.findMode.Info { /*if kind == ObjField && fieldTypeObj != nil { @@ -1201,13 +1201,13 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } if w.findMode.Doc && w.findMode.Define { - pos := w.fset.Position(cursorPos) - file := w.parsedFileCache[pos.Filename] + pos := w.FileSet.Position(cursorPos) + file := w.ParsedFileCache[pos.Filename] if file != nil { line := pos.Line var group *ast.CommentGroup for _, v := range file.Comments { - lastLine := w.fset.Position(v.End()).Line + lastLine := w.FileSet.Position(v.End()).Line if lastLine == line || lastLine == line-1 { group = v } else if lastLine > line { @@ -1269,7 +1269,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { (sort.IntSlice(usages)).Sort() for _, pos := range usages { - w.cmd.Println(w.fset.Position(token.Pos(pos))) + w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } //check look for current pkg.object on pkg_test if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) { @@ -1293,7 +1293,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } (sort.IntSlice(usages)).Sort() for _, pos := range usages { - w.cmd.Println(w.fset.Position(token.Pos(pos))) + w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } } } @@ -1366,7 +1366,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return nil }) } - ctx := *w.context + ctx := *w.Context searchAll := true if w.modPkg != nil { ctx.GOPATH = "" @@ -1448,7 +1448,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } (sort.IntSlice(usages)).Sort() for _, pos := range usages { - w.cmd.Println(w.fset.Position(token.Pos(pos))) + w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } } return nil @@ -1496,6 +1496,6 @@ func (w *PkgWalker) nodeString(node interface{}) string { return "" } var b bytes.Buffer - printer.Fprint(&b, w.fset, node) + printer.Fprint(&b, w.FileSet, node) return b.String() } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go index 6a9821ae..9f650491 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go @@ -209,7 +209,7 @@ func (p *exporter) obj(obj types.Object) { p.value(obj.Val()) case *types.TypeName: - if isAlias(obj) { + if obj.IsAlias() { p.tag(aliasTag) p.pos(obj) p.qualifiedName(obj) diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index 9125056f..31238f0d 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -128,42 +128,69 @@ func ImportData(packages map[string]*types.Package, filename, id string, data io // the corresponding package object to the packages map, and returns the object. // The packages map must contain all packages already imported. // -func Import(packages map[string]*types.Package, path, srcDir string) (pkg *types.Package, err error) { - filename, id := FindPkg(path, srcDir) - if filename == "" { +func Import(packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) { + var rc io.ReadCloser + var filename, id string + if lookup != nil { + // With custom lookup specified, assume that caller has + // converted path to a canonical import path for use in the map. if path == "unsafe" { return types.Unsafe, nil } - err = fmt.Errorf("can't find import: %q", id) - return - } + id = path - // no need to re-import if the package was imported completely before - if pkg = packages[id]; pkg != nil && pkg.Complete() { - return - } + // No need to re-import if the package was imported completely before. + if pkg = packages[id]; pkg != nil && pkg.Complete() { + return + } + f, err := lookup(path) + if err != nil { + return nil, err + } + rc = f + } else { + filename, id = FindPkg(path, srcDir) + if filename == "" { + if path == "unsafe" { + return types.Unsafe, nil + } + return nil, fmt.Errorf("can't find import: %q", id) + } - // open file - f, err := os.Open(filename) - if err != nil { - return - } - defer func() { - f.Close() + // no need to re-import if the package was imported completely before + if pkg = packages[id]; pkg != nil && pkg.Complete() { + return + } + + // open file + f, err := os.Open(filename) if err != nil { - // add file name to error - err = fmt.Errorf("reading export data: %s: %v", filename, err) + return nil, err } - }() + defer func() { + if err != nil { + // add file name to error + err = fmt.Errorf("%s: %v", filename, err) + } + }() + rc = f + } + defer rc.Close() var hdr string - buf := bufio.NewReader(f) + buf := bufio.NewReader(rc) if hdr, err = FindExportData(buf); err != nil { return } switch hdr { case "$$\n": + // Work-around if we don't have a filename; happens only if lookup != nil. + // Either way, the filename is only needed for importer error messages, so + // this is fine. + if filename == "" { + filename = path + } return ImportData(packages, filename, id, buf) case "$$B\n": diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go deleted file mode 100644 index 225ffeed..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias18.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package gcimporter - -import "go/types" - -func isAlias(obj *types.TypeName) bool { - return false // there are no type aliases before Go 1.9 -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go b/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go deleted file mode 100644 index c2025d84..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/isAlias19.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package gcimporter - -import "go/types" - -func isAlias(obj *types.TypeName) bool { - return obj.IsAlias() -} From 74d01a21cf6cace6d7454fef5cfcdadd13fb8622 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 8 Nov 2018 12:13:45 +0800 Subject: [PATCH 044/133] fix types info cache --- Godeps/Godeps.json | 10 +++++----- package.go | 13 ++++-------- package_types.go | 2 +- .../visualfc/gotools/types/types.go | 20 +++++++++---------- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index bf066aee..6deb6c4c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,23 +24,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" + "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" + "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" + "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" + "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "164a87edebcba11c5604c73d4ed2a411fbea10b5" + "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/package.go b/package.go index c768090e..c2fa9a62 100644 --- a/package.go +++ b/package.go @@ -10,7 +10,6 @@ import ( "os" "strings" - "github.com/visualfc/gotools/pkg/stdlib" "golang.org/x/tools/go/gcexportdata" ) @@ -113,15 +112,11 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { statmtime := stat.ModTime().UnixNano() if m.mtime != statmtime { m.mtime = statmtime - if stdlib.IsStdPkg(import_path) { - data, err := file_reader.read_file(fname) - if err != nil { - return - } - m.process_package_data(c, data, false) - } else { - m.process_package_data(c, nil, true) + data, err := file_reader.read_file(fname) + if err != nil { + return } + m.process_package_data(c, data, false) } } diff --git a/package_types.go b/package_types.go index 5a6c638f..13c9f31e 100644 --- a/package_types.go +++ b/package_types.go @@ -43,7 +43,7 @@ func (p *types_parser) initSource(import_path string, path string, dir string, p c.mutex.Lock() defer c.mutex.Unlock() conf := DefaultPkgConfig() - pkg, err := c.walker.ImportHelper(".", path, import_path, conf) + pkg, err := c.walker.ImportHelper(".", path, import_path, conf, false) if err != nil { log.Println(err) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index e6be4d62..5b3a9a45 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -365,7 +365,7 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err } } } - pkg, err = p.ImportHelper("", name, import_path, conf) + pkg, err = p.ImportHelper("", name, import_path, conf, true) return } @@ -408,8 +408,8 @@ func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportM return w.Context.Import(path, "", mode) } -func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig) (pkg *types.Package, err error) { - return w.ImportHelper(parentDir, name, "", conf) +func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig, must bool) (pkg *types.Package, err error) { + return w.ImportHelper(parentDir, name, "", conf, must) } func lastModTime(dir string, files []string) int64 { @@ -428,7 +428,7 @@ func lastModTime(dir string, files []string) int64 { return lastTime } -func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig) (pkg *types.Package, err error) { +func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig, must bool) (pkg *types.Package, err error) { defer func() { err := recover() if err != nil && typesVerbose { @@ -468,14 +468,13 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri pkg = w.Imported[name] lastMod := lastModTime(bp.Dir, GoFiles) - if pkg != nil { + if pkg != nil && !must { if t, ok := w.ImportedModTime[name]; ok { if t == lastMod { return pkg, nil } } } - if typesVerbose { w.cmd.Println("parser pkg", parentDir, name) } @@ -600,7 +599,8 @@ func (im *Importer) Import(name string) (pkg *types.Package, err error) { // return // } } - return im.w.Import(im.dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false}) + + return im.w.Import(im.dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false}, false) } func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { @@ -831,7 +831,7 @@ func (w *PkgWalker) LookupStructFromField(info *types.Info, cursorPkg *types.Pac }, } w.Imported[cursorPkg.Path()] = nil - pkg, _ := w.Import("", cursorPkg.Path(), conf) + pkg, _ := w.Import("", cursorPkg.Path(), conf, true) if pkg != nil { info = conf.Info } @@ -1103,7 +1103,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { Defs: make(map[*ast.Ident]types.Object), }, } - pkg, _ := w.Import("", cursorPkg.Path(), conf) + pkg, _ := w.Import("", cursorPkg.Path(), conf, true) if pkg != nil { if cursorIsInterfaceMethod { for k, v := range conf.Info.Defs { @@ -1426,7 +1426,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } w.Imported[v] = nil var usages []int - vpkg, _ := w.Import("", v, conf) + vpkg, _ := w.Import("", v, conf, true) if vpkg != nil && vpkg != pkg { if conf.Info != nil { for k, v := range conf.Info.Uses { From ea43b6c9df8431a9ee894e3c64250fb0acba4a32 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 10 Nov 2018 21:57:27 +0800 Subject: [PATCH 045/133] update types pkg check&update --- Godeps/Godeps.json | 16 +- package.go | 6 +- package_types.go | 39 ++- server.go | 14 +- .../visualfc/gotools/types/types.go | 287 ++++++++++-------- 5 files changed, 197 insertions(+), 165 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 6deb6c4c..a0c155fe 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,35 +24,35 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" + "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" + "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" + "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" + "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "31a55f8e2014c5bea48bda804a8a79d73c6ccb6d" + "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" + "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" + "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "f60e5f99f0816fc2d9ecb338008ea420248d2943" + "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" } ] } diff --git a/package.go b/package.go index c2fa9a62..43587d3b 100644 --- a/package.go +++ b/package.go @@ -92,11 +92,11 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { log.Println("error parser", import_path) return } - if t, ok := c.walker.ImportedModTime[import_path]; ok { - if m.mtime == t { + if chk, ok := c.walker.ImportedFilesCheck[import_path]; ok { + if m.mtime == chk.ModTime { return } - m.mtime = t + m.mtime = chk.ModTime } m.process_package_types(c, pkg) return diff --git a/package_types.go b/package_types.go index 13c9f31e..088dff8a 100644 --- a/package_types.go +++ b/package_types.go @@ -2,7 +2,6 @@ package main import ( "bytes" - "go/ast" "go/importer" "go/token" "go/types" @@ -18,23 +17,23 @@ type types_parser struct { pkg *types.Package } -func DefaultPkgConfig() *pkgwalk.PkgConfig { - conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} - conf.Info = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - //Types: make(map[ast.Expr]types.TypeAndValue), - //Scopes : make(map[ast.Node]*types.Scope) - //Implicits : make(map[ast.Node]types.Object) - } - conf.XInfo = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } - return conf -} +// func DefaultPkgConfig() *pkgwalk.PkgConfig { +// conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false} +// conf.Info = &types.Info{ +// Uses: make(map[*ast.Ident]types.Object), +// Defs: make(map[*ast.Ident]types.Object), +// Selections: make(map[*ast.SelectorExpr]*types.Selection), +// //Types: make(map[ast.Expr]types.TypeAndValue), +// //Scopes : make(map[ast.Node]*types.Scope) +// //Implicits : make(map[ast.Node]types.Object) +// } +// conf.XInfo = &types.Info{ +// Uses: make(map[*ast.Ident]types.Object), +// Defs: make(map[*ast.Ident]types.Object), +// Selections: make(map[*ast.SelectorExpr]*types.Selection), +// } +// return conf +// } func (p *types_parser) initSource(import_path string, path string, dir string, pfc *package_file_cache, c *auto_complete_context) { //conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: true, AllowBinary: false, WithTestFiles: true} @@ -42,8 +41,8 @@ func (p *types_parser) initSource(import_path string, path string, dir string, p // conf.XInfo = &types.Info{} c.mutex.Lock() defer c.mutex.Unlock() - conf := DefaultPkgConfig() - pkg, err := c.walker.ImportHelper(".", path, import_path, conf, false) + conf := pkgwalk.DefaultPkgConfig() + pkg, _, err := c.walker.ImportHelper(".", path, import_path, conf, nil) if err != nil { log.Println(err) } diff --git a/server.go b/server.go index fd5305ac..90f78751 100644 --- a/server.go +++ b/server.go @@ -196,16 +196,16 @@ func server_types_info(file []byte, filename string, cursor int, context_packed } conf := pkgwalk.DefaultPkgConfig() - conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) + cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file) } var stdout, stderr TypesInfo g_daemon.autocomplete.walker.SetOutput(&stdout, &stderr) g_daemon.autocomplete.walker.SetFindMode(&pkgwalk.FindMode{Info: true, Doc: true, Define: true}) - wpkg, _ := g_daemon.autocomplete.walker.Check(dir, conf) + wpkg, conf, _ := g_daemon.autocomplete.walker.Check(dir, conf, cursor) if wpkg != nil { - g_daemon.autocomplete.walker.LookupCursor(wpkg, conf, conf.Cursor) + g_daemon.autocomplete.walker.LookupCursor(wpkg, conf, cursor) return stdout.ar, len(stdout.ar) } } @@ -270,11 +270,11 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack //g_daemon.modList = gomod.LooupModList(dir) conf := pkgwalk.DefaultPkgConfig() - conf.Cursor = pkgwalk.NewFileCursor(file, fname, cursor) + cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file) } - g_daemon.autocomplete.walker.Check(dir, conf) + g_daemon.autocomplete.walker.Check(dir, conf, cursor) } if *g_debug { var buf bytes.Buffer diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 5b3a9a45..2d7e2973 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -6,6 +6,7 @@ package types import ( "bytes" + "crypto/md5" "fmt" "go/ast" "go/build" @@ -206,23 +207,23 @@ func runTypes(cmd *command.Command, args []string) error { for _, pkgName := range args { if pkgName == "." { - pkgPath, err := os.Getwd() + dir, err := os.Getwd() if err != nil { return err } - pkgName = pkgPath + pkgName = dir + cursor.fileDir = dir } if cursor.src != nil { - w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src, true) + w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src) } conf := DefaultPkgConfig() - conf.Cursor = cursor - pkg, err := w.Check(pkgName, conf) + pkg, outconf, err := w.Check(pkgName, conf, cursor) if pkg == nil { return fmt.Errorf("error import path %v", err) } if cursor != nil && w.findMode.IsValid() { - return w.LookupCursor(pkg, conf, cursor) + return w.LookupCursor(pkg, outconf, cursor) } } return nil @@ -233,16 +234,16 @@ type FileCursor struct { fileDir string cursorPos int pos token.Pos - src interface{} + src []byte xtest bool } -func NewFileCursor(src interface{}, filename string, pos int) *FileCursor { - return &FileCursor{fileName: filename, cursorPos: pos, src: src} +func NewFileCursor(src []byte, dir string, filename string, pos int) *FileCursor { + return &FileCursor{fileDir: dir, fileName: filename, cursorPos: pos, src: src} } type SourceData struct { - data interface{} + data []byte mtime int64 } @@ -265,7 +266,6 @@ type PkgConfig struct { Info *types.Info XInfo *types.Info Bpkg *build.Package - Cursor *FileCursor Files map[string]*ast.File XTestFiles map[string]*ast.File IgnoreFuncBodies bool @@ -291,34 +291,54 @@ func DefaultPkgConfig() *PkgConfig { return conf } +func NewPkgConfig(ignoreFuncBodies bool, withTestFiles bool) *PkgConfig { + conf := &PkgConfig{IgnoreFuncBodies: ignoreFuncBodies, AllowBinary: true, WithTestFiles: withTestFiles} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + //Types: make(map[ast.Expr]types.TypeAndValue), + //Scopes : make(map[ast.Node]*types.Scope) + //Implicits : make(map[ast.Node]types.Object) + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } + return conf +} + type PkgWalker struct { - FileSet *token.FileSet - Context *build.Context - current *types.Package - importingName map[string]bool - ParsedFileCache map[string]*ast.File - ParsedFileModTime map[string]int64 - fileSourceData map[string]*SourceData - Imported map[string]*types.Package // packages already imported - ImportedModTime map[string]int64 - gcimported types.Importer - cmd *command.Command - modPkg *fastmod.Package - findMode *FindMode + FileSet *token.FileSet + Context *build.Context + current *types.Package + importingName map[string]bool + ParsedFileCache map[string]*ast.File + ParsedFileModTime map[string]int64 + fileSourceData map[string]*SourceData + Imported map[string]*types.Package // packages already imported + ImportedConfig map[string]*PkgConfig + ImportedFilesCheck map[string]*FilesCheck + gcimported types.Importer + cmd *command.Command + modPkg *fastmod.Package + findMode *FindMode } func NewPkgWalker(context *build.Context) *PkgWalker { return &PkgWalker{ - Context: context, - FileSet: token.NewFileSet(), - ParsedFileCache: map[string]*ast.File{}, - ParsedFileModTime: map[string]int64{}, - fileSourceData: map[string]*SourceData{}, - importingName: map[string]bool{}, - Imported: map[string]*types.Package{"unsafe": types.Unsafe}, - ImportedModTime: map[string]int64{}, - gcimported: importer.Default(), - findMode: &FindMode{}, + Context: context, + FileSet: token.NewFileSet(), + ParsedFileCache: map[string]*ast.File{}, + ParsedFileModTime: map[string]int64{}, + fileSourceData: map[string]*SourceData{}, + importingName: map[string]bool{}, + Imported: map[string]*types.Package{"unsafe": types.Unsafe}, + ImportedConfig: map[string]*PkgConfig{}, + ImportedFilesCheck: map[string]*FilesCheck{}, + gcimported: importer.Default(), + findMode: &FindMode{}, } } @@ -333,22 +353,23 @@ func (w *PkgWalker) SetFindMode(mode *FindMode) { w.findMode = mode } -func (w *PkgWalker) UpdateSourceData(filename string, data interface{}, cleanAllSourceCache bool) { - if cleanAllSourceCache { - w.fileSourceData = make(map[string]*SourceData) - delete(w.ParsedFileModTime, filename) +func (w *PkgWalker) UpdateSourceData(filename string, data []byte) { + if sd, ok := w.fileSourceData[filename]; ok { + if bytes.Equal(sd.data, data) { + return + } } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } -func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err error) { +func (p *PkgWalker) Check(name string, conf *PkgConfig, cusror *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { if name == "." { name, _ = os.Getwd() } if conf == nil { conf = DefaultPkgConfig() } - p.Imported[name] = nil + //p.Imported[name] = nil p.importingName = make(map[string]bool) p.modPkg = nil // check mod @@ -365,7 +386,7 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig) (pkg *types.Package, err } } } - pkg, err = p.ImportHelper("", name, import_path, conf, true) + pkg, outconf, err = p.ImportHelper("", name, import_path, conf, cusror) return } @@ -408,12 +429,19 @@ func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportM return w.Context.Import(path, "", mode) } -func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig, must bool) (pkg *types.Package, err error) { - return w.ImportHelper(parentDir, name, "", conf, must) +func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig, cursor *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { + return w.ImportHelper(parentDir, name, "", conf, cursor) +} + +type FilesCheck struct { + HashSum [16]byte + ModTime int64 } -func lastModTime(dir string, files []string) int64 { - var lastTime int64 +func (w *PkgWalker) checkFiles(dir string, files []string) *FilesCheck { + chk := &FilesCheck{} + sort.Strings(files) + var temp string for _, file := range files { filename := filepath.Join(dir, file) info, err := os.Lstat(filename) @@ -421,14 +449,23 @@ func lastModTime(dir string, files []string) int64 { continue } t := info.ModTime().UnixNano() - if t > lastTime { - lastTime = t + if sd, ok := w.fileSourceData[filename]; ok { + if sd.mtime > t { + t = sd.mtime + } else { + delete(w.fileSourceData, filename) + } + } + temp += file + if chk.ModTime < t { + chk.ModTime = t } } - return lastTime + chk.HashSum = md5.Sum([]byte(temp)) + return chk } -func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig, must bool) (pkg *types.Package, err error) { +func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig, cursor *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { defer func() { err := recover() if err != nil && typesVerbose { @@ -445,7 +482,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri var err error name, err = pkgutil.VendoredImportPath(parentPkg, name) if err != nil { - return nil, err + return nil, nil, err } } } @@ -454,50 +491,18 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri bp, err := w.importPath(parentDir, name, 0) if bp == nil { - return nil, err + return nil, nil, err } - conf.Bpkg = bp - GoFiles := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...) - XTestGoFiles := append([]string{}, bp.XTestGoFiles...) - if conf.WithTestFiles { GoFiles = append(GoFiles, bp.TestGoFiles...) } + conf.Bpkg = bp + XTestGoFiles := append([]string{}, bp.XTestGoFiles...) - pkg = w.Imported[name] - lastMod := lastModTime(bp.Dir, GoFiles) - if pkg != nil && !must { - if t, ok := w.ImportedModTime[name]; ok { - if t == lastMod { - return pkg, nil - } - } - } - if typesVerbose { - w.cmd.Println("parser pkg", parentDir, name) - } - checkName := name - - if bp.ImportPath == "." { - checkName = bp.Name - } else { - checkName = bp.ImportPath - } - - if import_path != "" { - checkName = import_path - } - - if w.importingName[checkName] { - return nil, fmt.Errorf("cycle importing package %q", name) - } - - w.importingName[checkName] = true - - if conf.Cursor != nil && conf.Cursor.fileName != "" { - cursor := conf.Cursor + //check cursor file + if cursor != nil && cursor.fileName != "" { f, _ := w.parseFile(bp.Dir, cursor.fileName) if f != nil { cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) @@ -524,6 +529,48 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri } } + pkg = w.Imported[name] + chkFiles := w.checkFiles(bp.Dir, append(append([]string{}, GoFiles...), XTestGoFiles...)) + if pkg != nil { + if chk, ok := w.ImportedFilesCheck[name]; ok { + if chkFiles.ModTime == chk.ModTime && bytes.Equal(chkFiles.HashSum[:], chk.HashSum[:]) { + outconf := w.ImportedConfig[name] + if outconf != nil { + var errcheck bool + if !conf.IgnoreFuncBodies && outconf.IgnoreFuncBodies { + errcheck = true + } else if conf.WithTestFiles && !outconf.WithTestFiles { + errcheck = true + } + if !errcheck { + return pkg, outconf, nil + } + } + } + } + } + + if typesVerbose { + w.cmd.Println("parser pkg", parentDir, name) + } + checkName := name + + if bp.ImportPath == "." { + checkName = bp.Name + } else { + checkName = bp.ImportPath + } + + if import_path != "" { + checkName = import_path + } + + if w.importingName[checkName] { + return nil, nil, fmt.Errorf("cycle importing package %q", name) + } + + w.importingName[checkName] = true + parserFiles := func(filenames []string, cursor *FileCursor, xtest bool) (files []*ast.File, fileMap map[string]*ast.File) { fileMap = make(map[string]*ast.File) for _, file := range filenames { @@ -544,8 +591,8 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri } var files []*ast.File var xfiles []*ast.File - files, conf.Files = parserFiles(GoFiles, conf.Cursor, false) - xfiles, conf.XTestFiles = parserFiles(XTestGoFiles, conf.Cursor, true) + files, conf.Files = parserFiles(GoFiles, cursor, false) + xfiles, conf.XTestFiles = parserFiles(XTestGoFiles, cursor, true) typesConf := types.Config{ IgnoreFuncBodies: conf.IgnoreFuncBodies, @@ -563,7 +610,9 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri w.importingName[checkName] = false w.Imported[name] = pkg - w.ImportedModTime[name] = lastMod + w.ImportedConfig[name] = conf + w.ImportedFilesCheck[name] = chkFiles + outconf = conf if len(xfiles) > 0 { xpkg, _ := typesConf.Check(checkName+"_test", w.FileSet, xfiles, conf.XInfo) @@ -600,7 +649,8 @@ func (im *Importer) Import(name string) (pkg *types.Package, err error) { // } } - return im.w.Import(im.dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false}, false) + pkg, _, err = im.w.Import(im.dir, name, NewPkgConfig(true, false), nil) + return pkg, err } func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { @@ -646,6 +696,16 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *FileCursor) error { + f, _ := w.parseFile(cursor.fileDir, cursor.fileName) + if f != nil { + cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) + isTest := strings.HasSuffix(cursor.fileName, "_test.go") + isXTest := false + if isTest && strings.HasSuffix(f.Name.Name, "_test") { + isXTest = true + } + cursor.xtest = isXTest + } if nm := w.CheckIsName(cursor); nm != nil { return w.LookupName(pkg, conf, cursor, nm) } else if is := w.CheckIsImport(cursor); is != nil { @@ -822,18 +882,10 @@ func parserObjKind(obj types.Object) (ObjKind, error) { func (w *PkgWalker) LookupStructFromField(info *types.Info, cursorPkg *types.Package, cursorObj types.Object, cursorPos token.Pos) types.Object { if info == nil { - conf := &PkgConfig{ - IgnoreFuncBodies: true, - AllowBinary: true, - WithTestFiles: true, - Info: &types.Info{ - Defs: make(map[*ast.Ident]types.Object), - }, - } - w.Imported[cursorPkg.Path()] = nil - pkg, _ := w.Import("", cursorPkg.Path(), conf, true) - if pkg != nil { - info = conf.Info + conf := NewPkgConfig(true, true) + _, outconf, _ := w.Import("", cursorPkg.Path(), conf, nil) + if outconf != nil { + info = outconf.Info } } for _, obj := range info.Defs { @@ -1006,6 +1058,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } + var kind ObjKind if cursorObj != nil { var err error @@ -1038,7 +1091,6 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { cursorPkg = pkg cursorPos = cursorId.Pos() } - //var fieldTypeInfo *types.Info var fieldTypeObj types.Object // if cursorPkg == pkg { @@ -1095,15 +1147,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { // } if cursorPkg != nil && cursorPkg != pkg && kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { - conf := &PkgConfig{ - IgnoreFuncBodies: true, - AllowBinary: true, - WithTestFiles: true, - Info: &types.Info{ - Defs: make(map[*ast.Ident]types.Object), - }, - } - pkg, _ := w.Import("", cursorPkg.Path(), conf, true) + pkg, conf, _ := w.Import("", cursorPkg.Path(), NewPkgConfig(true, true), nil) if pkg != nil { if cursorIsInterfaceMethod { for k, v := range conf.Info.Defs { @@ -1274,7 +1318,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { //check look for current pkg.object on pkg_test if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) { var addInfo *types.Info - if conf.Cursor.xtest { + if cursor.xtest { addInfo = conf.Info } else { addInfo = conf.XInfo @@ -1412,21 +1456,10 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } //w.Imported = make(map[string]*types.Package) + for _, v := range uses_paths { - conf := &PkgConfig{ - IgnoreFuncBodies: false, - AllowBinary: true, - WithTestFiles: true, - Info: &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - }, - XInfo: &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - }, - } - w.Imported[v] = nil var usages []int - vpkg, _ := w.Import("", v, conf, true) + vpkg, conf, _ := w.Import("", v, NewPkgConfig(false, true), nil) if vpkg != nil && vpkg != pkg { if conf.Info != nil { for k, v := range conf.Info.Uses { From 52484cc7dfcd275c1bdeb2eaf408f2c94c5a35bd Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 21 Nov 2018 22:58:58 +0800 Subject: [PATCH 046/133] fix types mtime check --- Godeps/Godeps.json | 10 +++++----- client.go | 2 +- vendor/github.com/visualfc/gotools/types/types.go | 15 +++++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a0c155fe..2f6608bf 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,23 +24,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" + "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" + "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" + "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" + "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "1fc579a9c98cf0145a19a32b850f6773a40ad975" + "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/client.go b/client.go index e9a8762c..0974421e 100644 --- a/client.go +++ b/client.go @@ -180,7 +180,7 @@ func write_tyepsinfo(infos []string, num int) { func cmd_types_info(c *rpc.Client) { context := pack_build_context(&build.Default) - file, filename, cursor := prepare_file_filename_cursor(true) + file, filename, cursor := prepare_file_filename_cursor(false) write_tyepsinfo(client_types_info(c, file, filename, cursor, context)) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 2d7e2973..5a41ba79 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -665,12 +665,15 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } if f, ok := w.ParsedFileCache[filename]; ok { if i, ok := w.ParsedFileModTime[filename]; ok { - if mtime != 0 && mtime == i { - return f, nil - } - info, err := os.Stat(filename) - if err == nil && info.ModTime().UnixNano() == i { - return f, nil + if mtime != 0 { + if mtime == i { + return f, nil + } + } else { + info, err := os.Stat(filename) + if err == nil && info.ModTime().UnixNano() == i { + return f, nil + } } } } From 526da61827b5c3dcdada6d5c30261a3dbcd3306e Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 22 Nov 2018 23:05:03 +0800 Subject: [PATCH 047/133] types: fix lookup named method embedded --- Godeps/Godeps.json | 10 +-- .../visualfc/gotools/types/types.go | 67 +++++++++---------- 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 2f6608bf..9a231850 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,23 +24,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" + "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" + "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" + "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" + "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "0a38f58dfedc5263b6c872fb83fe1573315bc029" + "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 5a41ba79..3b85af27 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -934,9 +934,13 @@ func (w *PkgWalker) lookupNamedMethod(named *types.Named, name string) (types.Ob for i := 0; i < iface.NumMethods(); i++ { fn := iface.Method(i) if fn.Name() == name { + if fn.Pkg() != named.Obj().Pkg() { + goto Embedded + } return fn, named } } + Embedded: for i := 0; i < iface.NumEmbeddeds(); i++ { if obj, na := w.lookupNamedMethod(iface.Embedded(i), name); obj != nil { return obj, na @@ -1107,16 +1111,14 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature) if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { if named, ok := cursorSelection.Recv().(*types.Named); ok { - obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil { + obj, na := w.lookupNamedMethod(named, cursorObj.Name()) + if obj != nil && na != nil { cursorObj = obj + cursorPkg = na.Obj().Pkg() + cursorInterfaceTypeName = na.Obj().Name() + cursorInterfaceTypeNamed = na + cursorIsInterfaceMethod = true } - if typ != nil { - cursorPkg = typ.Obj().Pkg() - cursorInterfaceTypeName = typ.Obj().Name() - } - cursorIsInterfaceMethod = true - cursorInterfaceTypeNamed = named } } } else if kind == ObjField && cursorSelection != nil { @@ -1145,9 +1147,9 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } - // if typesVerbose { - // w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) - // } + if typesVerbose { + w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) + } if cursorPkg != nil && cursorPkg != pkg && kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { pkg, conf, _ := w.Import("", cursorPkg.Path(), NewPkgConfig(true, true), nil) @@ -1157,37 +1159,32 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if k != nil && v != nil && IsSameObject(v, cursorInterfaceTypeNamed.Obj()) { named := v.Type().(*types.Named) obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil { + if obj != nil && typ != nil { cursorObj = obj cursorPos = obj.Pos() - } - if obj != nil { - cursorObj = obj - } - if typ != nil { cursorPkg = typ.Obj().Pkg() cursorInterfaceTypeName = typ.Obj().Name() + break } - break } } - // for _, obj := range conf.Info.Defs { - // if obj == nil { - // continue - // } - // if fn, ok := obj.(*types.Func); ok { - // if fn.Name() == cursorObj.Name() { - // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { - // if named, ok := sig.Recv().Type().(*types.Named); ok { - // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { - // cursorPos = obj.Pos() - // break - // } - // } - // } - // } - // } - // } + // for _, obj := range conf.Info.Defs { + // if obj == nil { + // continue + // } + // if fn, ok := obj.(*types.Func); ok { + // if fn.Name() == cursorObj.Name() { + // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { + // if named, ok := sig.Recv().Type().(*types.Named); ok { + // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { + // cursorPos = obj.Pos() + // break + // } + // } + // } + // } + // } + // } } else if kind == ObjField && fieldTypeObj != nil { for _, obj := range conf.Info.Defs { if obj == nil { From 331d2eca1318acf53526279c1dcf90f799bc80b4 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 22 Nov 2018 23:11:35 +0800 Subject: [PATCH 048/133] x --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 0974421e..e9a8762c 100644 --- a/client.go +++ b/client.go @@ -180,7 +180,7 @@ func write_tyepsinfo(infos []string, num int) { func cmd_types_info(c *rpc.Client) { context := pack_build_context(&build.Default) - file, filename, cursor := prepare_file_filename_cursor(false) + file, filename, cursor := prepare_file_filename_cursor(true) write_tyepsinfo(client_types_info(c, file, filename, cursor, context)) } From 693e160062536ef3de533d87c85e2f55f9551ee2 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 21 Dec 2018 21:14:16 +0800 Subject: [PATCH 049/133] fix local var check (test.0055) --- decl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/decl.go b/decl.go index 9c8a980d..98b6b5da 100644 --- a/decl.go +++ b/decl.go @@ -765,7 +765,9 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if i, ok := d.typ.(*ast.Ident); ok { if i.Obj != nil && i.Obj.Decl != nil { if typ, ok := i.Obj.Decl.(*ast.TypeSpec); ok { - return infer_type(typ.Type, scope, -1) + if _, ok := typ.Type.(*ast.Ident); ok { + return infer_type(typ.Type, scope, -1) + } } } } From 7df595062509975370065021c9148a9df1296a06 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 23 Dec 2018 09:17:00 +0800 Subject: [PATCH 050/133] update vendor --- Godeps/Godeps.json | 19 ++++++++----------- .../x/tools/go/gcexportdata/gcexportdata.go | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9a231850..58dda8fe 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,9 +2,6 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", - "Packages": [ - "./..." - ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", @@ -24,35 +21,35 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" + "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" + "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" + "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" + "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "6e2745d979f0c1336eada366454d72450d9860d6" + "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" + "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" + "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "92d8274bd7b8a4c65f24bafe401a029e58392704" + "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" } ] } diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go index 4bb2367f..16075506 100644 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -16,7 +16,7 @@ // time before the Go 1.8 release and rebuild and redeploy their // developer tools, which will then be able to consume both Go 1.7 and // Go 1.8 export data files, so they will work before and after the -// Go update. (See discussion at https://github.com/golang/go/issues/15651.) +// Go update. (See discussion at https://golang.org/issue/15651.) // package gcexportdata From 28d238342f8b9c3ca6900a8f5e3d3bd01c7c2bf2 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 25 Jan 2019 11:19:39 +0800 Subject: [PATCH 051/133] update imports list by source --- Godeps/Godeps.json | 17 +- autocompletecontext.go | 36 +- .../github.com/visualfc/gotools/pkgs/pkgs.go | 390 ++++++++++++++++++ 3 files changed, 435 insertions(+), 8 deletions(-) create mode 100644 vendor/github.com/visualfc/gotools/pkgs/pkgs.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 58dda8fe..18efb513 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,6 +2,9 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", + "Packages": [ + "." + ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", @@ -21,23 +24,27 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + }, + { + "ImportPath": "github.com/visualfc/gotools/pkgs", + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "f7d3c5551dd748091507926bfe6b9e14b8d0bf24" + "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/autocompletecontext.go b/autocompletecontext.go index 105e9e5f..fc236a8f 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "go/ast" + "go/build" "go/parser" "go/token" "log" @@ -15,6 +16,7 @@ import ( "sync" "time" + "github.com/visualfc/gotools/pkgs" pkgwalk "github.com/visualfc/gotools/types" ) @@ -157,6 +159,7 @@ type auto_complete_context struct { declcache *decl_cache // top-level declarations cache fset *token.FileSet walker *pkgwalk.PkgWalker + pkgindex *pkgs.PathPkgsIndex mutex sync.Mutex } @@ -167,6 +170,13 @@ func new_auto_complete_context(ctx *package_lookup_context, pcache package_cache c.declcache = declcache c.fset = token.NewFileSet() c.walker = pkgwalk.NewPkgWalker(&ctx.Context) + c.pkgindex = nil + go func(c *auto_complete_context, ctx build.Context) { + var indexs pkgs.PathPkgsIndex + indexs.LoadIndex(ctx, pkgs.LoadAll) + indexs.Sort() + c.pkgindex = &indexs + }(c, ctx.Context) return c } @@ -293,9 +303,29 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - for _, pkgdir := range pkgdirs { - // convert srcpath to pkgpath and get candidates - get_import_candidates_dir(pkgdir, filepath.FromSlash(partial), b.ignorecase, currentPackagePath, resultSet) + if c.pkgindex != nil { + for _, index := range c.pkgindex.Indexs { + for _, pkg := range index.Pkgs { + if pkg.IsCommand() { + continue + } + if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { + continue + } + if pkg.Goroot && strings.HasPrefix(pkg.ImportPath, "golang.org/") { + continue + } + if strings.Contains(pkg.ImportPath, "/vendor/") { + continue + } + resultSet[pkg.ImportPath] = struct{}{} + } + } + } else { + for _, pkgdir := range pkgdirs { + // convert srcpath to pkgpath and get candidates + get_import_candidates_dir(pkgdir, filepath.FromSlash(partial), b.ignorecase, currentPackagePath, resultSet) + } } for k := range resultSet { b.candidates = append(b.candidates, candidate{Name: k, Class: decl_import}) diff --git a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go new file mode 100644 index 00000000..c58dda76 --- /dev/null +++ b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go @@ -0,0 +1,390 @@ +// Copyright 2011-2015 visualfc . All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkgs + +import ( + "encoding/json" + "fmt" + "go/build" + "os" + "path/filepath" + "runtime" + "sort" + "strings" + "sync" + + "github.com/visualfc/gotools/pkg/command" +) + +var Command = &command.Command{ + Run: runPkgs, + UsageLine: "pkgs [-list|-json] [-std]", + Short: "print go package", + Long: `print go package.`, +} + +var ( + pkgsList bool + pkgsJson bool + pkgsSimple bool + pkgsFind string + pkgsStd bool + pkgsPkgOnly bool + pkgsSkipGoroot bool +) + +func init() { + Command.Flag.BoolVar(&pkgsList, "list", false, "list all package") + Command.Flag.BoolVar(&pkgsJson, "json", false, "json format") + Command.Flag.BoolVar(&pkgsSimple, "simple", false, "simple format") + Command.Flag.BoolVar(&pkgsStd, "std", false, "std library") + Command.Flag.BoolVar(&pkgsPkgOnly, "pkg", false, "pkg only") + Command.Flag.BoolVar(&pkgsSkipGoroot, "skip_goroot", false, "skip goroot") + Command.Flag.StringVar(&pkgsFind, "find", "", "find package by name") +} + +func runPkgs(cmd *command.Command, args []string) error { + runtime.GOMAXPROCS(runtime.NumCPU()) + if len(args) != 0 { + cmd.Usage() + return os.ErrInvalid + } + //pkgIndexOnce.Do(loadPkgsList) + var flag LoadFlag + if pkgsStd { + flag = LoadGoroot + } else if pkgsSkipGoroot { + flag = LoadSkipGoroot + } else { + flag = LoadAll + } + var pp PathPkgsIndex + pp.LoadIndex(build.Default, flag) + pp.Sort() + export := func(pkg *build.Package) { + if pkgsJson { + var p GoPackage + p.copyBuild(pkg) + b, err := json.MarshalIndent(&p, "", "\t") + if err == nil { + cmd.Stdout.Write(b) + cmd.Stdout.Write([]byte{'\n'}) + } + } else if pkgsSimple { + cmd.Println(pkg.Name + "::" + pkg.ImportPath + "::" + pkg.Dir) + } else { + cmd.Println(pkg.ImportPath) + } + } + if pkgsList { + for _, pi := range pp.Indexs { + for _, pkg := range pi.Pkgs { + if pkgsPkgOnly && pkg.IsCommand() { + continue + } + export(pkg) + } + } + } else if pkgsFind != "" { + for _, pi := range pp.Indexs { + for _, pkg := range pi.Pkgs { + if pkgsPkgOnly && pkg.IsCommand() { + continue + } + if pkg.Name == pkgsFind { + export(pkg) + break + } + } + } + } + return nil +} + +// A Package describes a single package found in a directory. +type GoPackage struct { + // Note: These fields are part of the go command's public API. + // See list.go. It is okay to add fields, but not to change or + // remove existing ones. Keep in sync with list.go + Dir string `json:",omitempty"` // directory containing package sources + ImportPath string `json:",omitempty"` // import path of package in dir + Name string `json:",omitempty"` // package name + Doc string `json:",omitempty"` // package documentation string + Target string `json:",omitempty"` // install path + Goroot bool `json:",omitempty"` // is this package found in the Go root? + Standard bool `json:",omitempty"` // is this package part of the standard Go library? + Stale bool `json:",omitempty"` // would 'go install' do anything for this package? + Root string `json:",omitempty"` // Go root or Go path dir containing this package + ConflictDir string `json:",omitempty"` // Dir is hidden by this other directory + + // Source files + GoFiles []string `json:",omitempty"` // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) + CgoFiles []string `json:",omitempty"` // .go sources files that import "C" + IgnoredGoFiles []string `json:",omitempty"` // .go sources ignored due to build constraints + CFiles []string `json:",omitempty"` // .c source files + CXXFiles []string `json:",omitempty"` // .cc, .cpp and .cxx source files + MFiles []string `json:",omitempty"` // .m source files + HFiles []string `json:",omitempty"` // .h, .hh, .hpp and .hxx source files + SFiles []string `json:",omitempty"` // .s source files + SwigFiles []string `json:",omitempty"` // .swig files + SwigCXXFiles []string `json:",omitempty"` // .swigcxx files + SysoFiles []string `json:",omitempty"` // .syso system object files added to package + + // Cgo directives + CgoCFLAGS []string `json:",omitempty"` // cgo: flags for C compiler + CgoCPPFLAGS []string `json:",omitempty"` // cgo: flags for C preprocessor + CgoCXXFLAGS []string `json:",omitempty"` // cgo: flags for C++ compiler + CgoLDFLAGS []string `json:",omitempty"` // cgo: flags for linker + CgoPkgConfig []string `json:",omitempty"` // cgo: pkg-config names + + // Dependency information + Imports []string `json:",omitempty"` // import paths used by this package + Deps []string `json:",omitempty"` // all (recursively) imported dependencies + + // Error information + Incomplete bool `json:",omitempty"` // was there an error loading this package or dependencies? + + // Test information + TestGoFiles []string `json:",omitempty"` // _test.go files in package + TestImports []string `json:",omitempty"` // imports from TestGoFiles + XTestGoFiles []string `json:",omitempty"` // _test.go files outside package + XTestImports []string `json:",omitempty"` // imports from XTestGoFiles + + // Unexported fields are not part of the public API. + build *build.Package + pkgdir string // overrides build.PkgDir + // imports []*goapi.Package + // deps []*goapi.Package + gofiles []string // GoFiles+CgoFiles+TestGoFiles+XTestGoFiles files, absolute paths + sfiles []string + allgofiles []string // gofiles + IgnoredGoFiles, absolute paths + target string // installed file for this package (may be executable) + fake bool // synthesized package + forceBuild bool // this package must be rebuilt + forceLibrary bool // this package is a library (even if named "main") + cmdline bool // defined by files listed on command line + local bool // imported via local path (./ or ../) + localPrefix string // interpret ./ and ../ imports relative to this prefix + exeName string // desired name for temporary executable + coverMode string // preprocess Go source files with the coverage tool in this mode + coverVars map[string]*CoverVar // variables created by coverage analysis + omitDWARF bool // tell linker not to write DWARF information +} + +// CoverVar holds the name of the generated coverage variables targeting the named file. +type CoverVar struct { + File string // local file name + Var string // name of count struct +} + +func (p *GoPackage) copyBuild(pp *build.Package) { + p.build = pp + + p.Dir = pp.Dir + p.ImportPath = pp.ImportPath + p.Name = pp.Name + p.Doc = pp.Doc + p.Root = pp.Root + p.ConflictDir = pp.ConflictDir + // TODO? Target + p.Goroot = pp.Goroot + p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".") + p.GoFiles = pp.GoFiles + p.CgoFiles = pp.CgoFiles + p.IgnoredGoFiles = pp.IgnoredGoFiles + p.CFiles = pp.CFiles + p.CXXFiles = pp.CXXFiles + p.MFiles = pp.MFiles + p.HFiles = pp.HFiles + p.SFiles = pp.SFiles + p.SwigFiles = pp.SwigFiles + p.SwigCXXFiles = pp.SwigCXXFiles + p.SysoFiles = pp.SysoFiles + p.CgoCFLAGS = pp.CgoCFLAGS + p.CgoCPPFLAGS = pp.CgoCPPFLAGS + p.CgoCXXFLAGS = pp.CgoCXXFLAGS + p.CgoLDFLAGS = pp.CgoLDFLAGS + p.CgoPkgConfig = pp.CgoPkgConfig + p.Imports = pp.Imports + p.TestGoFiles = pp.TestGoFiles + p.TestImports = pp.TestImports + p.XTestGoFiles = pp.XTestGoFiles + p.XTestImports = pp.XTestImports +} + +type PathPkgsIndex struct { + Indexs []*PkgsIndex +} + +type LoadFlag int + +const ( + LoadGoroot LoadFlag = iota + LoadSkipGoroot + LoadAll +) + +func (p *PathPkgsIndex) LoadIndex(context build.Context, flag LoadFlag) { + var wg sync.WaitGroup + if flag == LoadGoroot { + context.GOPATH = "" + } + var srcDirs []string + goroot := context.GOROOT + gopath := context.GOPATH + context.GOPATH = "" + + if flag != LoadSkipGoroot { + //go1.4 go/src/ + //go1.3 go/src/pkg; go/src/cmd + _, err := os.Stat(filepath.Join(goroot, "src/pkg/runtime")) + if err == nil { + for _, v := range context.SrcDirs() { + if strings.HasSuffix(v, "pkg") { + srcDirs = append(srcDirs, v[:len(v)-3]+"cmd") + } + srcDirs = append(srcDirs, v) + } + } else { + srcDirs = append(srcDirs, filepath.Join(goroot, "src")) + } + } + + context.GOPATH = gopath + context.GOROOT = "" + for _, v := range context.SrcDirs() { + srcDirs = append(srcDirs, v) + } + context.GOROOT = goroot + for _, path := range srcDirs { + pi := &PkgsIndex{} + p.Indexs = append(p.Indexs, pi) + pkgsGate.enter() + f, err := os.Open(path) + if err != nil { + pkgsGate.leave() + fmt.Fprint(os.Stderr, err) + continue + } + children, err := f.Readdir(-1) + f.Close() + pkgsGate.leave() + if err != nil { + fmt.Fprint(os.Stderr, err) + continue + } + for _, child := range children { + if child.IsDir() { + wg.Add(1) + go func(path, name string) { + defer wg.Done() + pi.loadPkgsPath(&wg, path, name) + }(path, child.Name()) + } + } + } + wg.Wait() +} + +func (p *PathPkgsIndex) Sort() { + for _, v := range p.Indexs { + v.sort() + } +} + +type PkgsIndex struct { + sync.Mutex + Pkgs []*build.Package +} + +func (p *PkgsIndex) sort() { + sort.Sort(PkgSlice(p.Pkgs)) +} + +type PkgSlice []*build.Package + +func (p PkgSlice) Len() int { + return len([]*build.Package(p)) +} + +func (p PkgSlice) Less(i, j int) bool { + if p[i].IsCommand() && !p[j].IsCommand() { + return true + } else if !p[i].IsCommand() && p[j].IsCommand() { + return false + } + return p[i].ImportPath < p[j].ImportPath +} + +func (p PkgSlice) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +// pkgsgate protects the OS & filesystem from too much concurrency. +// Too much disk I/O -> too many threads -> swapping and bad scheduling. +// gate is a semaphore for limiting concurrency. +type gate chan struct{} + +func (g gate) enter() { g <- struct{}{} } +func (g gate) leave() { <-g } + +var pkgsGate = make(gate, 8) + +func (p *PkgsIndex) loadPkgsPath(wg *sync.WaitGroup, root, pkgrelpath string) { + importpath := filepath.ToSlash(pkgrelpath) + dir := filepath.Join(root, importpath) + + pkgsGate.enter() + defer pkgsGate.leave() + pkgDir, err := os.Open(dir) + if err != nil { + return + } + children, err := pkgDir.Readdir(-1) + pkgDir.Close() + if err != nil { + return + } + // hasGo tracks whether a directory actually appears to be a + // Go source code directory. If $GOPATH == $HOME, and + // $HOME/src has lots of other large non-Go projects in it, + // then the calls to importPathToName below can be expensive. + hasGo := false + for _, child := range children { + name := child.Name() + if name == "" { + continue + } + if c := name[0]; c == '.' || ('0' <= c && c <= '9') { + continue + } + if strings.HasSuffix(name, ".go") { + hasGo = true + } + if child.IsDir() { + if strings.HasPrefix(name, ".") || strings.HasPrefix(name, "_") || name == "testdata" { + continue + } + wg.Add(1) + go func(root, name string) { + defer wg.Done() + p.loadPkgsPath(wg, root, name) + }(root, filepath.Join(importpath, name)) + } + } + if hasGo { + buildPkg, err := build.ImportDir(dir, 0) + if err == nil { + if buildPkg.ImportPath == "." { + buildPkg.ImportPath = filepath.ToSlash(pkgrelpath) + buildPkg.Root = root + buildPkg.Goroot = true + } + p.Lock() + p.Pkgs = append(p.Pkgs, buildPkg) + p.Unlock() + } + } +} From 80afea56153fb215f71f8d7c43593e5ea0960fef Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 25 Jan 2019 20:43:00 +0800 Subject: [PATCH 052/133] update vendor --- autocompletecontext.go | 21 +++++++++++++-------- utils.go | 4 +++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index fc236a8f..a63dfd4c 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "go/ast" - "go/build" "go/parser" "go/token" "log" @@ -171,12 +170,12 @@ func new_auto_complete_context(ctx *package_lookup_context, pcache package_cache c.fset = token.NewFileSet() c.walker = pkgwalk.NewPkgWalker(&ctx.Context) c.pkgindex = nil - go func(c *auto_complete_context, ctx build.Context) { - var indexs pkgs.PathPkgsIndex - indexs.LoadIndex(ctx, pkgs.LoadAll) - indexs.Sort() - c.pkgindex = &indexs - }(c, ctx.Context) + //go func(c *auto_complete_context, ctx build.Context) { + var indexs pkgs.PathPkgsIndex + indexs.LoadIndex(ctx.Context, pkgs.LoadAll) + indexs.Sort() + c.pkgindex = &indexs + //}(c, ctx.Context) return c } @@ -312,10 +311,16 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { continue } - if pkg.Goroot && strings.HasPrefix(pkg.ImportPath, "golang.org/") { + if pkg.Goroot && + (strings.HasPrefix(pkg.ImportPath, "vendor/") || + strings.HasPrefix(pkg.ImportPath, "cmd/")) { continue } if strings.Contains(pkg.ImportPath, "/vendor/") { + //log.Println(pkg.ImportPath, currentPackagePath) + if ipath, ok := vendorlessImportPath(pkg.ImportPath, currentPackagePath); ok { + resultSet[ipath] = struct{}{} + } continue } resultSet[pkg.ImportPath] = struct{}{} diff --git a/utils.go b/utils.go index 8b153c5f..a799681c 100644 --- a/utils.go +++ b/utils.go @@ -161,7 +161,9 @@ func vendorlessImportPath(ipath string, currentPackagePath string) (string, bool } // this import path does not belong to the current package if currentPackagePath != "" && !strings.Contains(currentPackagePath, split[0]) { - return "", false + if split[0] != currentPackagePath+"/" { + return "", false + } } // Devendorize for use in import statement. if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 { From c2c2a56a8a7294c5331ea68e6c35fece2f87d909 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 25 Jan 2019 21:49:25 +0800 Subject: [PATCH 053/133] update imports intenal check --- autocompletecontext.go | 9 ++++++++- utils.go | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index a63dfd4c..10c96525 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -313,7 +313,14 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf } if pkg.Goroot && (strings.HasPrefix(pkg.ImportPath, "vendor/") || - strings.HasPrefix(pkg.ImportPath, "cmd/")) { + strings.HasPrefix(pkg.ImportPath, "cmd/") || + strings.Contains(pkg.ImportPath, "internal/")) { + continue + } + if strings.Contains(pkg.ImportPath, "/internal") { + if ipath, ok := internalImportPath(pkg.ImportPath, currentPackagePath); ok { + resultSet[ipath] = struct{}{} + } continue } if strings.Contains(pkg.ImportPath, "/vendor/") { diff --git a/utils.go b/utils.go index a799681c..4a8412b7 100644 --- a/utils.go +++ b/utils.go @@ -175,6 +175,21 @@ func vendorlessImportPath(ipath string, currentPackagePath string) (string, bool return ipath, true } +func internalImportPath(ipath string, currentPackagePath string) (string, bool) { + split := strings.Split(ipath, "/internal") + // no vendor in path + // if len(split) == 1 { + // return "", false + // } + // this import path does not belong to the current package + if currentPackagePath != "" && !strings.Contains(currentPackagePath, split[0]) { + if split[0] != currentPackagePath+"/" { + return "", false + } + } + return ipath, true +} + //------------------------------------------------------------------------- // print_backtrace // From 9227b5aee11b8686987e81b77f35cd2b3c0a76e4 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 25 Jan 2019 22:30:34 +0800 Subject: [PATCH 054/133] update vendor --- Godeps/Godeps.json | 23 +++++------ autocompletecontext.go | 4 +- vendor/github.com/visualfc/fastmod/fastmod.go | 38 +++++++++---------- .../visualfc/gotools/types/types.go | 28 +++++++------- 4 files changed, 44 insertions(+), 49 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 18efb513..48d05902 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,49 +2,46 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", - "Packages": [ - "." - ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" + "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" + "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" + "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "cd7891997d762b9f00bf3c0a947d86f971a63049" + "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "303a56ce4062eded55243cdd4be2951e284166f4" + "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/autocompletecontext.go b/autocompletecontext.go index 10c96525..840ca21d 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -302,7 +302,9 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - if c.pkgindex != nil { + if c.walker.ModPkg != nil { + c.walker.ModPkg.ModList + } else if c.pkgindex != nil { for _, index := range c.pkgindex.Indexs { for _, pkg := range index.Pkgs { if pkg.IsCommand() { diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 096ef64a..9a810766 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -43,7 +43,7 @@ func LookupModFile(dir string) (string, error) { } type ModuleList struct { - mods map[string]*Module + Modules map[string]*Module } func NewModuleList(ctx *build.Context) *ModuleList { @@ -90,7 +90,7 @@ type Module struct { path string fmod string fdir string - mods []*Mod + Mods []*Mod } func (m *Module) init() { @@ -104,14 +104,14 @@ func (m *Module) init() { break } } - m.mods = append(m.mods, mod) + m.Mods = append(m.Mods, mod) } for i, v := range m.f.Replace { if rused[i] { continue } mod := &Mod{Require: &Version{v.Old.Path, v.Old.Version}, Replace: &Version{v.New.Path, v.New.Version}} - m.mods = append(m.mods, mod) + m.Mods = append(m.Mods, mod) } } @@ -144,7 +144,7 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]), PkgTypeLocal } var encpath string - for _, r := range m.mods { + for _, r := range m.Mods { if r.Require.Path == pkg { path = r.VersionPath() encpath = r.EncodeVersionPath() @@ -177,7 +177,7 @@ func (mc *ModuleList) LoadModuleFile(fmod string) (*Module, error) { if err != nil { return nil, err } - if m, ok := mc.mods[fmod]; ok { + if m, ok := mc.Modules[fmod]; ok { if m.ftime == info.ModTime().UnixNano() { return m, nil } @@ -192,7 +192,7 @@ func (mc *ModuleList) LoadModuleFile(fmod string) (*Module, error) { } m := &Module{f, info.ModTime().UnixNano(), f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} m.init() - mc.mods[fmod] = m + mc.Modules[fmod] = m return m, nil } @@ -203,32 +203,28 @@ type Node struct { } type Package struct { - mlist *ModuleList - root *Node - nodeMap map[string]*Node -} - -func (p *Package) ModuleList() *ModuleList { - return p.mlist + ModList *ModuleList + Root *Node + NodeMap map[string]*Node } func (p *Package) Node() *Node { - return p.root + return p.Root } func (p *Package) load(node *Node) { - for _, v := range node.mods { + for _, v := range node.Mods { var fmod string if strings.HasPrefix(v.VersionPath(), "./") { fmod = filepath.Join(node.ModDir(), v.VersionPath(), "go.mod") } else { fmod = filepath.Join(filepath.Join(PkgModPath, v.EncodeVersionPath()), "go.mod") } - m, _ := p.mlist.LoadModuleFile(fmod) + m, _ := p.ModList.LoadModuleFile(fmod) if m != nil { child := &Node{m, node, nil} node.Children = append(node.Children, child) - p.nodeMap[m.fdir] = child + p.NodeMap[m.fdir] = child p.load(child) } } @@ -249,7 +245,7 @@ func (p *Package) lookup(node *Node, pkg string) (path string, dir string, typ P } func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { - return p.lookup(p.root, pkg) + return p.lookup(p.Root, pkg) } func LoadPackage(dir string, ctx *build.Context) (*Package, error) { @@ -260,7 +256,7 @@ func LoadPackage(dir string, ctx *build.Context) (*Package, error) { } node := &Node{m, nil, nil} p := &Package{ml, node, make(map[string]*Node)} - p.nodeMap[m.fdir] = node - p.load(p.root) + p.NodeMap[m.fdir] = node + p.load(p.Root) return p, nil } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 3b85af27..1a6879cc 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -322,7 +322,7 @@ type PkgWalker struct { ImportedFilesCheck map[string]*FilesCheck gcimported types.Importer cmd *command.Command - modPkg *fastmod.Package + ModPkg *fastmod.Package findMode *FindMode } @@ -371,18 +371,18 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig, cusror *FileCursor) (pkg } //p.Imported[name] = nil p.importingName = make(map[string]bool) - p.modPkg = nil + p.ModPkg = nil // check mod var import_path string if filepath.IsAbs(name) { - p.modPkg, _ = fastmod.LoadPackage(name, p.Context) - if p.modPkg != nil { - dir := filepath.ToSlash(p.modPkg.Node().ModDir()) + p.ModPkg, _ = fastmod.LoadPackage(name, p.Context) + if p.ModPkg != nil { + dir := filepath.ToSlash(p.ModPkg.Node().ModDir()) fname := filepath.ToSlash(name) if dir == fname { - import_path = p.modPkg.Node().Path() + import_path = p.ModPkg.Node().Path() } else if strings.HasPrefix(fname, dir+"/") { - import_path = p.modPkg.Node().Path() + fname[len(dir):] + import_path = p.ModPkg.Node().Path() + fname[len(dir):] } } } @@ -410,8 +410,8 @@ func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportM if stdlib.IsStdPkg(path) { return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) } - if w.modPkg != nil { - _path, dir, _ := w.modPkg.Lookup(path) + if w.ModPkg != nil { + _path, dir, _ := w.ModPkg.Lookup(path) if dir != "" { pkg, err := w.Context.ImportDir(dir, mode) if pkg != nil { @@ -1365,12 +1365,12 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } cursorPkgPath := cursorObj.Pkg().Path() - if w.modPkg == nil && pkgutil.IsVendorExperiment() { + if w.ModPkg == nil && pkgutil.IsVendorExperiment() { cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) } // check on module dir - if w.modPkg != nil { - dir := w.modPkg.Node().ModDir() + if w.ModPkg != nil { + dir := w.ModPkg.Node().ModDir() filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { if !info.IsDir() { return nil @@ -1386,7 +1386,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return nil } if !bp.IsCommand() { - importPath := filepath.Join(w.modPkg.Node().Path(), path[len(dir)+1:]) + importPath := filepath.Join(w.ModPkg.Node().Path(), path[len(dir)+1:]) if importPath == cursorPkgPath { return nil } @@ -1412,7 +1412,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } ctx := *w.Context searchAll := true - if w.modPkg != nil { + if w.ModPkg != nil { ctx.GOPATH = "" if w.findMode.SkipGoroot { searchAll = false From 348863240e5fdab15c1e01dda947e3b3640b3356 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 25 Jan 2019 22:41:04 +0800 Subject: [PATCH 055/133] imports check for mod --- autocompletecontext.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 840ca21d..7c3eb2c0 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -302,8 +302,12 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - if c.walker.ModPkg != nil { - c.walker.ModPkg.ModList + if c.walker.ModPkg != nil && c.walker.ModPkg.ModList != nil { + for _, module := range c.walker.ModPkg.ModList.Modules { + for _, mod := range module.Mods { + resultSet[mod.Require.Path] = struct{}{} + } + } } else if c.pkgindex != nil { for _, index := range c.pkgindex.Indexs { for _, pkg := range index.Pkgs { From 1d79edbf5820f94b6341aa4e86b0c136db76fe22 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 26 Jan 2019 20:22:58 +0800 Subject: [PATCH 056/133] imports for mod add local path --- Godeps/Godeps.json | 23 +-- autocompletecontext.go | 36 ++++- vendor/github.com/visualfc/fastmod/fastmod.go | 33 +++- .../github.com/visualfc/fastmod/pkgindex.go | 149 ++++++++++++++++++ 4 files changed, 226 insertions(+), 15 deletions(-) create mode 100644 vendor/github.com/visualfc/fastmod/pkgindex.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 48d05902..4b820f2f 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2,46 +2,49 @@ "ImportPath": "github.com/visualfc/gocode", "GoVersion": "go1.11", "GodepVersion": "v80", + "Packages": [ + "./..." + ], "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" + "Rev": "91067574a33e4342774a6422df23276809a2baf2" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" + "Rev": "91067574a33e4342774a6422df23276809a2baf2" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" + "Rev": "91067574a33e4342774a6422df23276809a2baf2" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "e4bb2da2b95ce0b373e33bcd09196bdd20c2458e" + "Rev": "91067574a33e4342774a6422df23276809a2baf2" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "6e1707af3adde1b69bc3bc8789dccb0c84e27a4d" + "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/autocompletecontext.go b/autocompletecontext.go index 7c3eb2c0..c68613a7 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -302,11 +302,39 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - if c.walker.ModPkg != nil && c.walker.ModPkg.ModList != nil { - for _, module := range c.walker.ModPkg.ModList.Modules { - for _, mod := range module.Mods { - resultSet[mod.Require.Path] = struct{}{} + if c.walker.ModPkg != nil { + //goroot + for _, index := range c.pkgindex.Indexs { + for _, pkg := range index.Pkgs { + if pkg.IsCommand() { + continue + } + if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { + continue + } + if !pkg.Goroot { + continue + } + if strings.HasPrefix(pkg.ImportPath, "vendor/") || + strings.HasPrefix(pkg.ImportPath, "cmd/") || + strings.Contains(pkg.ImportPath, "internal/") { + continue + } + resultSet[pkg.ImportPath] = struct{}{} + } + } + //mod deps + deps := c.walker.ModPkg.DepImportList() + //local path + locals := c.walker.ModPkg.LocalImportList() + for _, dep := range deps { + resultSet[dep] = struct{}{} + } + for _, local := range locals { + if strings.Contains(local, "/vendor/") { + continue } + resultSet[local] = struct{}{} } } else if c.pkgindex != nil { for _, index := range c.pkgindex.Indexs { diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 9a810766..9b2b9082 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -11,6 +11,7 @@ import ( "io/ioutil" "os" "os/exec" + "path" "path/filepath" "strings" @@ -203,6 +204,7 @@ type Node struct { } type Package struct { + ctx *build.Context ModList *ModuleList Root *Node NodeMap map[string]*Node @@ -248,6 +250,35 @@ func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { return p.lookup(p.Root, pkg) } +func (p *Package) DepImportList() []string { + if p.ModList == nil { + return nil + } + var ar []string + for _, m := range p.ModList.Modules { + for _, mod := range m.Mods { + ar = append(ar, mod.Require.Path) + } + } + return ar +} + +func (p *Package) LocalImportList() []string { + var pkgs PathPkgsIndex + pkgs.LoadIndex(*p.ctx, p.Root.fdir) + pkgs.Sort() + var ar []string + for _, index := range pkgs.Indexs { + for _, pkg := range index.Pkgs { + if pkg.IsCommand() { + continue + } + ar = append(ar, path.Join(p.Root.path, pkg.ImportPath)) + } + } + return ar +} + func LoadPackage(dir string, ctx *build.Context) (*Package, error) { ml := NewModuleList(ctx) m, err := ml.LoadModule(dir) @@ -255,7 +286,7 @@ func LoadPackage(dir string, ctx *build.Context) (*Package, error) { return nil, err } node := &Node{m, nil, nil} - p := &Package{ml, node, make(map[string]*Node)} + p := &Package{ctx, ml, node, make(map[string]*Node)} p.NodeMap[m.fdir] = node p.load(p.Root) return p, nil diff --git a/vendor/github.com/visualfc/fastmod/pkgindex.go b/vendor/github.com/visualfc/fastmod/pkgindex.go new file mode 100644 index 00000000..465a0c93 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/pkgindex.go @@ -0,0 +1,149 @@ +package fastmod + +import ( + "fmt" + "go/build" + "os" + "path/filepath" + "sort" + "strings" + "sync" +) + +type PathPkgsIndex struct { + Indexs []*PkgsIndex +} + +func (p *PathPkgsIndex) LoadIndex(context build.Context, srcDirs ...string) { + var wg sync.WaitGroup + + for _, path := range srcDirs { + pi := &PkgsIndex{} + p.Indexs = append(p.Indexs, pi) + pkgsGate.enter() + f, err := os.Open(path) + if err != nil { + pkgsGate.leave() + fmt.Fprint(os.Stderr, err) + continue + } + children, err := f.Readdir(-1) + f.Close() + pkgsGate.leave() + if err != nil { + fmt.Fprint(os.Stderr, err) + continue + } + for _, child := range children { + if child.IsDir() { + wg.Add(1) + go func(path, name string) { + defer wg.Done() + pi.loadPkgsPath(&wg, path, name) + }(path, child.Name()) + } + } + } + wg.Wait() +} + +func (p *PathPkgsIndex) Sort() { + for _, v := range p.Indexs { + v.sort() + } +} + +type PkgsIndex struct { + sync.Mutex + Pkgs []*build.Package +} + +func (p *PkgsIndex) sort() { + sort.Sort(PkgSlice(p.Pkgs)) +} + +type PkgSlice []*build.Package + +func (p PkgSlice) Len() int { + return len([]*build.Package(p)) +} + +func (p PkgSlice) Less(i, j int) bool { + if p[i].IsCommand() && !p[j].IsCommand() { + return true + } else if !p[i].IsCommand() && p[j].IsCommand() { + return false + } + return p[i].ImportPath < p[j].ImportPath +} + +func (p PkgSlice) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +// pkgsgate protects the OS & filesystem from too much concurrency. +// Too much disk I/O -> too many threads -> swapping and bad scheduling. +// gate is a semaphore for limiting concurrency. +type gate chan struct{} + +func (g gate) enter() { g <- struct{}{} } +func (g gate) leave() { <-g } + +var pkgsGate = make(gate, 8) + +func (p *PkgsIndex) loadPkgsPath(wg *sync.WaitGroup, root, pkgrelpath string) { + importpath := filepath.ToSlash(pkgrelpath) + dir := filepath.Join(root, importpath) + + pkgsGate.enter() + defer pkgsGate.leave() + pkgDir, err := os.Open(dir) + if err != nil { + return + } + children, err := pkgDir.Readdir(-1) + pkgDir.Close() + if err != nil { + return + } + // hasGo tracks whether a directory actually appears to be a + // Go source code directory. If $GOPATH == $HOME, and + // $HOME/src has lots of other large non-Go projects in it, + // then the calls to importPathToName below can be expensive. + hasGo := false + for _, child := range children { + name := child.Name() + if name == "" { + continue + } + if c := name[0]; c == '.' || ('0' <= c && c <= '9') { + continue + } + if strings.HasSuffix(name, ".go") { + hasGo = true + } + if child.IsDir() { + if strings.HasPrefix(name, ".") || strings.HasPrefix(name, "_") || name == "testdata" { + continue + } + wg.Add(1) + go func(root, name string) { + defer wg.Done() + p.loadPkgsPath(wg, root, name) + }(root, filepath.Join(importpath, name)) + } + } + if hasGo { + buildPkg, err := build.ImportDir(dir, 0) + if err == nil { + if buildPkg.ImportPath == "." { + buildPkg.ImportPath = filepath.ToSlash(pkgrelpath) + buildPkg.Root = root + buildPkg.Goroot = true + } + p.Lock() + p.Pkgs = append(p.Pkgs, buildPkg) + p.Unlock() + } + } +} From 3b52cc9fcba9399ad592594ad975a33c6ddb79bd Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 26 Jan 2019 20:30:46 +0800 Subject: [PATCH 057/133] x --- autocompletecontext.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index c68613a7..2f1814ae 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -315,8 +315,8 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if !pkg.Goroot { continue } - if strings.HasPrefix(pkg.ImportPath, "vendor/") || - strings.HasPrefix(pkg.ImportPath, "cmd/") || + if strings.HasPrefix(pkg.ImportPath, "cmd/") || + strings.Contains(pkg.ImportPath, "vendor/") || strings.Contains(pkg.ImportPath, "internal/") { continue } @@ -328,6 +328,9 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf //local path locals := c.walker.ModPkg.LocalImportList() for _, dep := range deps { + if strings.Contains(dep, "/vendor/") { + continue + } resultSet[dep] = struct{}{} } for _, local := range locals { From da45fb044df42f21c7cf38010a967653db11c22c Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 27 Jan 2019 15:35:17 +0800 Subject: [PATCH 058/133] update imports filter --- autocompletecontext.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 2f1814ae..c0e06223 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -309,9 +309,6 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if pkg.IsCommand() { continue } - if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { - continue - } if !pkg.Goroot { continue } @@ -320,6 +317,9 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf strings.Contains(pkg.ImportPath, "internal/") { continue } + if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { + continue + } resultSet[pkg.ImportPath] = struct{}{} } } @@ -328,12 +328,18 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf //local path locals := c.walker.ModPkg.LocalImportList() for _, dep := range deps { + if !has_prefix(dep, partial, b.ignorecase) { + continue + } if strings.Contains(dep, "/vendor/") { continue } resultSet[dep] = struct{}{} } for _, local := range locals { + if !has_prefix(local, partial, b.ignorecase) { + continue + } if strings.Contains(local, "/vendor/") { continue } From 8a5616e52e2390c328c6981ef838f48d6a8d0e5d Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 27 Jan 2019 16:57:00 +0800 Subject: [PATCH 059/133] imports complete support parser mod sub pkg --- Godeps/Godeps.json | 20 ++--- autocompletecontext.go | 10 ++- vendor/github.com/visualfc/fastmod/fastmod.go | 83 ++++++++++++++----- .../github.com/visualfc/fastmod/pkgindex.go | 2 +- .../github.com/visualfc/gotools/pkgs/pkgs.go | 1 - 5 files changed, 80 insertions(+), 36 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4b820f2f..cdb04d32 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,43 +8,43 @@ "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "91067574a33e4342774a6422df23276809a2baf2" + "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "91067574a33e4342774a6422df23276809a2baf2" + "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "91067574a33e4342774a6422df23276809a2baf2" + "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "91067574a33e4342774a6422df23276809a2baf2" + "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "99f0957674060b71f40d7c61bdd5a1a62e46e071" + "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/autocompletecontext.go b/autocompletecontext.go index c0e06223..c57786ac 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -324,14 +324,15 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf } } //mod deps - deps := c.walker.ModPkg.DepImportList() + deps := c.walker.ModPkg.DepImportList(true, true) //local path - locals := c.walker.ModPkg.LocalImportList() + locals := c.walker.ModPkg.LocalImportList(true) for _, dep := range deps { if !has_prefix(dep, partial, b.ignorecase) { continue } - if strings.Contains(dep, "/vendor/") { + if strings.Contains(dep, "/vendor/") || + strings.Contains(dep, "/internal/") { continue } resultSet[dep] = struct{}{} @@ -340,7 +341,8 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if !has_prefix(local, partial, b.ignorecase) { continue } - if strings.Contains(local, "/vendor/") { + if strings.Contains(local, "/vendor/") || + strings.Contains(local, "/internal/") { continue } resultSet[local] = struct{}{} diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 9b2b9082..3241e081 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -44,12 +44,13 @@ func LookupModFile(dir string) (string, error) { } type ModuleList struct { - Modules map[string]*Module + pkgModPath string + Modules map[string]*Module } func NewModuleList(ctx *build.Context) *ModuleList { - UpdatePkgMod(ctx) - return &ModuleList{make(map[string]*Module)} + pkgModPath := GetPkgModPath(ctx) + return &ModuleList{pkgModPath, make(map[string]*Module)} } type Version struct { @@ -78,6 +79,9 @@ func (m *Mod) EncodeVersionPath() string { if m.Replace != nil { v = m.Replace } + if strings.HasPrefix(v.Path, "./") { + return v.Path + } path, _ := module.EncodePath(v.Path) if v.Version != "" { return path + "@" + v.Version @@ -86,12 +90,13 @@ func (m *Mod) EncodeVersionPath() string { } type Module struct { - f *modfile.File - ftime int64 - path string - fmod string - fdir string - Mods []*Mod + pkgModPath string + f *modfile.File + ftime int64 + path string + fmod string + fdir string + Mods []*Mod } func (m *Module) init() { @@ -191,7 +196,7 @@ func (mc *ModuleList) LoadModuleFile(fmod string) (*Module, error) { if err != nil { return nil, err } - m := &Module{f, info.ModTime().UnixNano(), f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} + m := &Module{mc.pkgModPath, f, info.ModTime().UnixNano(), f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} m.init() mc.Modules[fmod] = m return m, nil @@ -204,10 +209,11 @@ type Node struct { } type Package struct { - ctx *build.Context - ModList *ModuleList - Root *Node - NodeMap map[string]*Node + ctx *build.Context + pkgModPath string + ModList *ModuleList + Root *Node + NodeMap map[string]*Node } func (p *Package) Node() *Node { @@ -220,7 +226,7 @@ func (p *Package) load(node *Node) { if strings.HasPrefix(v.VersionPath(), "./") { fmod = filepath.Join(node.ModDir(), v.VersionPath(), "go.mod") } else { - fmod = filepath.Join(filepath.Join(PkgModPath, v.EncodeVersionPath()), "go.mod") + fmod = filepath.Join(filepath.Join(p.pkgModPath, v.EncodeVersionPath()), "go.mod") } m, _ := p.ModList.LoadModuleFile(fmod) if m != nil { @@ -250,27 +256,56 @@ func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { return p.lookup(p.Root, pkg) } -func (p *Package) DepImportList() []string { +func (p *Package) DepImportList(skipcmd bool, chkmodsub bool) []string { if p.ModList == nil { return nil } var ar []string + pathMap := make(map[string]bool) for _, m := range p.ModList.Modules { for _, mod := range m.Mods { - ar = append(ar, mod.Require.Path) + cpath, dir, typ := p.Lookup(mod.Require.Path) + ar = append(ar, cpath) + if !chkmodsub { + continue + } + if pathMap[mod.Require.Path] { + continue + } + pathMap[mod.Require.Path] = true + var relpath string + switch typ { + case PkgTypeLocalMod: + relpath = dir + case PkgTypeDepMod: + relpath = filepath.Join(p.pkgModPath, dir) + default: + continue + } + var pkgs PathPkgsIndex + pkgs.LoadIndex(*p.ctx, relpath) + pkgs.Sort() + for _, index := range pkgs.Indexs { + for _, pkg := range index.Pkgs { + if skipcmd && pkg.IsCommand() { + continue + } + ar = append(ar, path.Join(mod.Require.Path, pkg.ImportPath)) + } + } } } return ar } -func (p *Package) LocalImportList() []string { +func (p *Package) LocalImportList(skipcmd bool) []string { var pkgs PathPkgsIndex pkgs.LoadIndex(*p.ctx, p.Root.fdir) pkgs.Sort() var ar []string for _, index := range pkgs.Indexs { for _, pkg := range index.Pkgs { - if pkg.IsCommand() { + if skipcmd && pkg.IsCommand() { continue } ar = append(ar, path.Join(p.Root.path, pkg.ImportPath)) @@ -279,6 +314,13 @@ func (p *Package) LocalImportList() []string { return ar } +func GetPkgModPath(ctx *build.Context) string { + if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { + return filepath.Join(list[0], "pkg/mod") + } + return "" +} + func LoadPackage(dir string, ctx *build.Context) (*Package, error) { ml := NewModuleList(ctx) m, err := ml.LoadModule(dir) @@ -286,7 +328,8 @@ func LoadPackage(dir string, ctx *build.Context) (*Package, error) { return nil, err } node := &Node{m, nil, nil} - p := &Package{ctx, ml, node, make(map[string]*Node)} + pkgmpath := GetPkgModPath(ctx) + p := &Package{ctx, pkgmpath, ml, node, make(map[string]*Node)} p.NodeMap[m.fdir] = node p.load(p.Root) return p, nil diff --git a/vendor/github.com/visualfc/fastmod/pkgindex.go b/vendor/github.com/visualfc/fastmod/pkgindex.go index 465a0c93..163ac51d 100644 --- a/vendor/github.com/visualfc/fastmod/pkgindex.go +++ b/vendor/github.com/visualfc/fastmod/pkgindex.go @@ -24,7 +24,7 @@ func (p *PathPkgsIndex) LoadIndex(context build.Context, srcDirs ...string) { f, err := os.Open(path) if err != nil { pkgsGate.leave() - fmt.Fprint(os.Stderr, err) + //fmt.Fprintln(os.Stderr, err) continue } children, err := f.Readdir(-1) diff --git a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go index c58dda76..b06d9df0 100644 --- a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go +++ b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go @@ -265,7 +265,6 @@ func (p *PathPkgsIndex) LoadIndex(context build.Context, flag LoadFlag) { f, err := os.Open(path) if err != nil { pkgsGate.leave() - fmt.Fprint(os.Stderr, err) continue } children, err := f.Readdir(-1) From e96ed7c6cc8504757434fb3d7b38dd0268971e8c Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 27 Jan 2019 17:08:56 +0800 Subject: [PATCH 060/133] x --- autocompletecontext.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index c57786ac..7f71e7b7 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -332,7 +332,8 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf continue } if strings.Contains(dep, "/vendor/") || - strings.Contains(dep, "/internal/") { + strings.Contains(dep, "/internal/") || + strings.HasSuffix(dep, "/internal") { continue } resultSet[dep] = struct{}{} @@ -341,8 +342,7 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if !has_prefix(local, partial, b.ignorecase) { continue } - if strings.Contains(local, "/vendor/") || - strings.Contains(local, "/internal/") { + if strings.Contains(local, "/vendor/") { continue } resultSet[local] = struct{}{} @@ -369,7 +369,6 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf continue } if strings.Contains(pkg.ImportPath, "/vendor/") { - //log.Println(pkg.ImportPath, currentPackagePath) if ipath, ok := vendorlessImportPath(pkg.ImportPath, currentPackagePath); ok { resultSet[ipath] = struct{}{} } From 63ac8b5b3d51eca64c6f6dd9280c19b38fc23cf9 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 27 Jan 2019 17:17:32 +0800 Subject: [PATCH 061/133] imports skip goroot internal --- autocompletecontext.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 7f71e7b7..65b548fa 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -314,7 +314,7 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf } if strings.HasPrefix(pkg.ImportPath, "cmd/") || strings.Contains(pkg.ImportPath, "vendor/") || - strings.Contains(pkg.ImportPath, "internal/") { + strings.Contains(pkg.ImportPath, "internal") { continue } if !has_prefix(pkg.ImportPath, partial, b.ignorecase) { @@ -359,7 +359,7 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if pkg.Goroot && (strings.HasPrefix(pkg.ImportPath, "vendor/") || strings.HasPrefix(pkg.ImportPath, "cmd/") || - strings.Contains(pkg.ImportPath, "internal/")) { + strings.Contains(pkg.ImportPath, "internal")) { continue } if strings.Contains(pkg.ImportPath, "/internal") { From c96df66c006dfc03de054e93dda6a0f439978f55 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 30 Jan 2019 10:20:37 +0800 Subject: [PATCH 062/133] support types_info lookup in error code --- Godeps/Godeps.json | 18 +- client.go | 15 +- rpc.go | 8 +- server.go | 3 +- .../visualfc/gotools/types/types.go | 182 ++++++++++++++++-- 5 files changed, 194 insertions(+), 32 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cdb04d32..4adbffe4 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,39 +24,39 @@ }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "88aa2bd4f884586230d1d7cac1886e34c1219b3b" + "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" }, { "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" + "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" }, { "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" + "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" }, { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "d00ac6d27372a4273825635281f2dc360d4be563" + "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" } ] } diff --git a/client.go b/client.go index e9a8762c..bc6f5c87 100644 --- a/client.go +++ b/client.go @@ -105,7 +105,7 @@ func try_to_connect(network, address string) (client *rpc.Client, err error) { return } -func prepare_file_filename_cursor(filter bool) ([]byte, string, int) { +func prepare_file_filename_cursor(filter bool) ([]byte, string, int, string) { var file []byte var err error @@ -123,12 +123,17 @@ func prepare_file_filename_cursor(filter bool) ([]byte, string, int) { cursor := -1 offset := "" + addin := "" switch flag.NArg() { case 2: offset = flag.Arg(1) case 3: filename = flag.Arg(1) // Override default filename offset = flag.Arg(2) + case 4: + filename = flag.Arg(1) // Override default filename + offset = flag.Arg(2) + addin = flag.Arg(3) } var skipped int @@ -151,7 +156,7 @@ func prepare_file_filename_cursor(filter bool) ([]byte, string, int) { cwd, _ := os.Getwd() filename = filepath.Join(cwd, filename) } - return file, filename, cursor + return file, filename, cursor, addin } //------------------------------------------------------------------------- @@ -164,7 +169,7 @@ func cmd_status(c *rpc.Client) { func cmd_auto_complete(c *rpc.Client) { context := pack_build_context(&build.Default) - file, filename, cursor := prepare_file_filename_cursor(true) + file, filename, cursor, _ := prepare_file_filename_cursor(true) f := get_formatter(*g_format) f.write_candidates(client_auto_complete(c, file, filename, cursor, context)) } @@ -180,8 +185,8 @@ func write_tyepsinfo(infos []string, num int) { func cmd_types_info(c *rpc.Client) { context := pack_build_context(&build.Default) - file, filename, cursor := prepare_file_filename_cursor(true) - write_tyepsinfo(client_types_info(c, file, filename, cursor, context)) + file, filename, cursor, addin := prepare_file_filename_cursor(true) + write_tyepsinfo(client_types_info(c, file, filename, cursor, addin, context)) } func cmd_close(c *rpc.Client) { diff --git a/rpc.go b/rpc.go index 709b626d..4e9f75d8 100644 --- a/rpc.go +++ b/rpc.go @@ -45,7 +45,8 @@ type Args_types_info struct { Arg0 []byte Arg1 string Arg2 int - Arg3 go_build_context + Arg3 string + Arg4 go_build_context } type Reply_types_info struct { Arg0 []string @@ -53,17 +54,18 @@ type Reply_types_info struct { } func (r *RPC) RPC_types_info(args *Args_types_info, reply *Reply_types_info) error { - reply.Arg0, reply.Arg1 = server_types_info(args.Arg0, args.Arg1, args.Arg2, args.Arg3) + reply.Arg0, reply.Arg1 = server_types_info(args.Arg0, args.Arg1, args.Arg2, args.Arg3, args.Arg4) return nil } -func client_types_info(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, Arg3 go_build_context) (c []string, d int) { +func client_types_info(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, Arg3 string, Arg4 go_build_context) (c []string, d int) { var args Args_types_info var reply Reply_types_info args.Arg0 = Arg0 args.Arg1 = Arg1 args.Arg2 = Arg2 args.Arg3 = Arg3 + args.Arg4 = Arg4 err := cli.Call("RPC.RPC_types_info", &args, &reply) if err != nil { panic(err) diff --git a/server.go b/server.go index 90f78751..2485370f 100644 --- a/server.go +++ b/server.go @@ -143,7 +143,7 @@ func (p *TypesInfo) Write(data []byte) (n int, err error) { return len(data), nil } -func server_types_info(file []byte, filename string, cursor int, context_packed go_build_context) (c []string, d int) { +func server_types_info(file []byte, filename string, cursor int, addin string, context_packed go_build_context) (c []string, d int) { context := unpack_build_context(&context_packed) defer func() { if err := recover(); err != nil { @@ -197,6 +197,7 @@ func server_types_info(file []byte, filename string, cursor int, context_packed conf := pkgwalk.DefaultPkgConfig() cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) + cursor.SetText(addin) if file != nil { g_daemon.autocomplete.walker.UpdateSourceData(filename, file) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 1a6879cc..e80b472f 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -44,6 +44,7 @@ var ( typesVerbose bool typesAllowBinary bool typesFilePos string + typesCursorText string typesFileStdin bool typesFindUse bool typesFindDef bool @@ -60,6 +61,7 @@ func init() { Command.Flag.BoolVar(&typesVerbose, "v", false, "verbose debugging") Command.Flag.BoolVar(&typesAllowBinary, "b", false, "import can be satisfied by a compiled package object without corresponding sources.") Command.Flag.StringVar(&typesFilePos, "pos", "", "file position \"file.go:pos\"") + Command.Flag.StringVar(&typesCursorText, "text", "", "file cursor text info") Command.Flag.BoolVar(&typesFileStdin, "stdin", false, "input file use stdin") Command.Flag.BoolVar(&typesFindInfo, "info", false, "find cursor info") Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define") @@ -177,23 +179,22 @@ func runTypes(cmd *command.Command, args []string) error { context.BuildTags = append(typesTagList, context.BuildTags...) w := NewPkgWalker(context) - var cursor *FileCursor + cursor := &FileCursor{} + cursor.text = typesCursorText if typesFilePos != "" { - var cursorInfo FileCursor pos := strings.Index(typesFilePos, ":") if pos != -1 { - cursorInfo.fileName = typesFilePos[:pos] + cursor.fileName = typesFilePos[:pos] if i, err := strconv.Atoi(typesFilePos[pos+1:]); err == nil { - cursorInfo.cursorPos = i + cursor.cursorPos = i } } if typesFileStdin { src, err := ioutil.ReadAll(cmd.Stdin) if err == nil { - cursorInfo.src = src + cursor.src = src } } - cursor = &cursorInfo } w.cmd = cmd w.findMode = &FindMode{ @@ -236,12 +237,17 @@ type FileCursor struct { pos token.Pos src []byte xtest bool + text string } func NewFileCursor(src []byte, dir string, filename string, pos int) *FileCursor { return &FileCursor{fileDir: dir, fileName: filename, cursorPos: pos, src: src} } +func (f *FileCursor) SetText(text string) { + f.text = text +} + type SourceData struct { data []byte mtime int64 @@ -279,14 +285,17 @@ func DefaultPkgConfig() *PkgConfig { Uses: make(map[*ast.Ident]types.Object), Defs: make(map[*ast.Ident]types.Object), Selections: make(map[*ast.SelectorExpr]*types.Selection), - //Types: make(map[ast.Expr]types.TypeAndValue), - //Scopes : make(map[ast.Node]*types.Scope) - //Implicits : make(map[ast.Node]types.Object) + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), } conf.XInfo = &types.Info{ Uses: make(map[*ast.Ident]types.Object), Defs: make(map[*ast.Ident]types.Object), Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), } return conf } @@ -297,14 +306,17 @@ func NewPkgConfig(ignoreFuncBodies bool, withTestFiles bool) *PkgConfig { Uses: make(map[*ast.Ident]types.Object), Defs: make(map[*ast.Ident]types.Object), Selections: make(map[*ast.SelectorExpr]*types.Selection), - //Types: make(map[ast.Expr]types.TypeAndValue), - //Scopes : make(map[ast.Node]*types.Scope) - //Implicits : make(map[ast.Node]types.Object) + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), } conf.XInfo = &types.Info{ Uses: make(map[*ast.Ident]types.Object), Defs: make(map[*ast.Ident]types.Object), Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), } return conf } @@ -683,7 +695,7 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, flag |= parser.ParseComments } f, err := parser.ParseFile(w.FileSet, filename, src, flag) - if err != nil { + if f == nil { return f, err } if mtime != 0 { @@ -695,7 +707,7 @@ func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, } } w.ParsedFileCache[filename] = f - return f, nil + return f, err } func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *FileCursor) error { @@ -929,6 +941,27 @@ func (w *PkgWalker) lookupNamedField(named *types.Named, name string) *types.Nam return nil } +func (w *PkgWalker) lookupNamedFieldVar(named *types.Named, name string) (*types.Var, *types.Named) { + if istruct, ok := named.Underlying().(*types.Struct); ok { + for i := 0; i < istruct.NumFields(); i++ { + field := istruct.Field(i) + if field.Anonymous() { + fieldType := orgType(field.Type()) + if typ, ok := fieldType.(*types.Named); ok { + if obj, na := w.lookupNamedFieldVar(typ, name); na != nil { + return obj, na + } + } + } else { + if field.Name() == name { + return field, named + } + } + } + } + return nil, nil +} + func (w *PkgWalker) lookupNamedMethod(named *types.Named, name string) (types.Object, *types.Named) { if iface, ok := named.Underlying().(*types.Interface); ok { for i := 0; i < iface.NumMethods(); i++ { @@ -1019,6 +1052,116 @@ func orgType(typ types.Type) types.Type { return typ } +func findScope(s *types.Scope, pos token.Pos) *types.Scope { + for i := 0; i < s.NumChildren(); i++ { + child := s.Child(i) + if child.Contains(pos) { + return findScope(child, pos) + } + } + return s +} + +func (w *PkgWalker) lookupNamed(obj types.Object, cname string) types.Object { + typ := orgType(obj.Type()) + if typ != nil { + if name, ok := typ.(*types.Named); ok { + obj, na := w.lookupNamedFieldVar(name, cname) + if na != nil { + return obj + } else { + obj, na := w.lookupNamedMethod(name, cname) + if na != nil { + return obj + } + } + } + } + return nil +} + +// pkg=fmt text=Println +func (w *PkgWalker) lookupPackage(pkg *types.Package, text string) types.Object { + if pkg != nil && pkg.Scope() != nil { + ids := strings.Split(text, ".") + obj := pkg.Scope().Lookup(ids[0]) + cursorObj := obj + if obj != nil { + var n int = 1 + for n < len(ids) { + obj = w.lookupNamed(obj, ids[n]) + if obj == nil { + break + } + cursorObj = obj + n++ + } + } + return cursorObj + } + return nil +} + +func (w *PkgWalker) LookupByText(pkgInfo *types.Info, text string) types.Object { + var cursorObj types.Object + ids := strings.Split(text, ".") + if len(ids) >= 2 { + //check pkg.Name + for _, obj := range pkgInfo.Uses { + if obj.Pkg() != nil { + if obj.Pkg().Name()+"."+obj.Name() == text { + cursorObj = obj + break + } + } + } + if cursorObj == nil { + //check local obj.name.name + for _, obj := range pkgInfo.Defs { + if obj != nil && obj.Name() == ids[0] { + var n int = 1 + for n < len(ids) { + obj = w.lookupNamed(obj, ids[n]) + if obj == nil { + break + } + cursorObj = obj + n++ + } + } + } + } + if cursorObj == nil { + for _, obj := range pkgInfo.Implicits { + if obj != nil && obj.Name() == ids[0] { + if pkg, ok := obj.(*types.PkgName); ok { + cursorObj = w.lookupPackage(pkg.Imported(), strings.Join(ids[1:], ".")) + } + } + } + } + } + //check local obj + if cursorObj == nil { + for _, obj := range pkgInfo.Defs { + if obj != nil && obj.Name() == text { + cursorObj = obj + break + } + } + } + //check implicitly declared objects + if cursorObj == nil { + for _, obj := range pkgInfo.Implicits { + if obj != nil && obj.Name() == text { + cursorObj = obj + break + } + } + } + return cursorObj +} + func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { var cursorObj types.Object var cursorSelection *types.Selection @@ -1065,6 +1208,17 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } + if cursorObj == nil { + for id, obj := range pkgInfo.Implicits { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + break + } + } + } + if cursorObj == nil && cursor.text != "" { + cursorObj = w.LookupByText(pkgInfo, cursor.text) + } var kind ObjKind if cursorObj != nil { From 4e0736b4668d0e66bde40d4ea6425e380cae83bc Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 31 Jan 2019 18:53:10 +0800 Subject: [PATCH 063/133] fix mod --- Godeps/Godeps.json | 20 +++++++++---------- vendor/github.com/visualfc/fastmod/fastmod.go | 18 ++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4adbffe4..ae237efb 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,43 +8,43 @@ "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" + "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" + "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" + "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "7a67d613cba5e431a9e348ad6b5c0732ec34cca9" + "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "38c686da3196280b10b78d69dc44e9fb29f982bc" + "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" }, { "ImportPath": "golang.org/x/tools/go/buildutil", diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 3241e081..dd8b7f63 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -19,15 +19,15 @@ import ( "github.com/visualfc/fastmod/internal/module" ) -var ( - PkgModPath string -) +// var ( +// PkgModPath string +// ) -func UpdatePkgMod(ctx *build.Context) { - if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { - PkgModPath = filepath.Join(list[0], "pkg/mod") - } -} +// func UpdatePkgMod(ctx *build.Context) { +// if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { +// PkgModPath = filepath.Join(list[0], "pkg/mod") +// } +// } func fixVersion(path, vers string) (string, error) { return vers, nil @@ -167,7 +167,7 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { if strings.HasPrefix(path, "./") { return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod } - return pkg, filepath.Join(PkgModPath, encpath), PkgTypeDepMod + return pkg, filepath.Join(m.pkgModPath, encpath), PkgTypeDepMod } func (mc *ModuleList) LoadModule(dir string) (*Module, error) { From fab173807d9bdbe39300f5e637186f196ed73387 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 19 Mar 2019 12:08:11 +0800 Subject: [PATCH 064/133] force update source data --- server.go | 4 ++-- .../github.com/visualfc/gotools/types/types.go | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/server.go b/server.go index 2485370f..55ae6b8c 100644 --- a/server.go +++ b/server.go @@ -199,7 +199,7 @@ func server_types_info(file []byte, filename string, cursor int, addin string, c cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) cursor.SetText(addin) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) } var stdout, stderr TypesInfo g_daemon.autocomplete.walker.SetOutput(&stdout, &stderr) @@ -273,7 +273,7 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack conf := pkgwalk.DefaultPkgConfig() cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file) + g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) } g_daemon.autocomplete.walker.Check(dir, conf, cursor) } diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index e80b472f..5e9a6a05 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -216,7 +216,7 @@ func runTypes(cmd *command.Command, args []string) error { cursor.fileDir = dir } if cursor.src != nil { - w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src) + w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src, false) } conf := DefaultPkgConfig() pkg, outconf, err := w.Check(pkgName, conf, cursor) @@ -365,12 +365,16 @@ func (w *PkgWalker) SetFindMode(mode *FindMode) { w.findMode = mode } -func (w *PkgWalker) UpdateSourceData(filename string, data []byte) { - if sd, ok := w.fileSourceData[filename]; ok { - if bytes.Equal(sd.data, data) { - return - } +func (w *PkgWalker) UpdateSourceData(filename string, data []byte, cleanAllSourceCache bool) { + if cleanAllSourceCache { + w.fileSourceData = make(map[string]*SourceData) + delete(w.ParsedFileModTime, filename) } + // if sd, ok := w.fileSourceData[filename]; ok { + // if bytes.Equal(sd.data, data) { + // return + // } + // } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } From 5b9ec491605b9fa67a3e92aad89851e36494045e Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 13 Jul 2019 18:00:10 +0800 Subject: [PATCH 065/133] update fastmod --- Godeps/Godeps.json | 40 ++++++++++++++----- vendor/github.com/visualfc/fastmod/fastmod.go | 2 +- .../visualfc/gotools/types/types.go | 10 ++--- 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ae237efb..c6c845f2 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,43 +8,43 @@ "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" + "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" + "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" + "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "c069a47540ebc83f11b595c7f8884ebc333f9589" + "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "2afd807fd0eb90b1972818e7089e6d477da9d0e3" + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -57,6 +57,26 @@ { "ImportPath": "golang.org/x/tools/go/internal/gcimporter", "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod", + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/modfile", + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/module", + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + }, + { + "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/semver", + "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" } ] } diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index dd8b7f63..980b1b8f 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -164,7 +164,7 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { if path == "" { return "", "", PkgTypeNil } - if strings.HasPrefix(path, "./") { + if strings.HasPrefix(path, "./") || strings.HasPrefix(path, "../") { return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod } return pkg, filepath.Join(m.pkgModPath, encpath), PkgTypeDepMod diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 5e9a6a05..ba815c0a 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -370,11 +370,11 @@ func (w *PkgWalker) UpdateSourceData(filename string, data []byte, cleanAllSourc w.fileSourceData = make(map[string]*SourceData) delete(w.ParsedFileModTime, filename) } - // if sd, ok := w.fileSourceData[filename]; ok { - // if bytes.Equal(sd.data, data) { - // return - // } - // } + if sd, ok := w.fileSourceData[filename]; ok { + if bytes.Equal(sd.data, data) { + return + } + } w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} } From c36d2589fb238f5be6224010bd25b1432d66ef20 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 14 Jul 2019 13:09:21 +0800 Subject: [PATCH 066/133] fix GOMOD check --- Godeps/Godeps.json | 30 +++++++++---------- vendor/github.com/visualfc/fastmod/fastmod.go | 5 +++- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c6c845f2..d9233aec 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,43 +8,43 @@ "Deps": [ { "ImportPath": "github.com/visualfc/fastmod", - "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" + "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" }, { "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" + "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" }, { "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" + "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" }, { "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "a64c9cb9126ce483bb4db496a685fdc89f32fd1f" + "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" }, { "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "golang.org/x/tools/go/buildutil", @@ -60,23 +60,23 @@ }, { "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/modfile", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/module", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" }, { "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/semver", - "Rev": "d6e45235b85ac81a107c82b318832bd47b93d0ff" + "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" } ] } diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 980b1b8f..9e5ce18d 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -172,7 +172,10 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { func (mc *ModuleList) LoadModule(dir string) (*Module, error) { fmod, err := LookupModFile(dir) - if fmod == "" { + if err != nil { + return nil, err + } + if !strings.HasSuffix(fmod, ".mod") { return nil, err } return mc.LoadModuleFile(fmod) From 23c031a3dbc90442f7a2598e95fb2f6337731e39 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 14 Jul 2019 17:15:00 +0800 Subject: [PATCH 067/133] update go mod --- Godeps/Godeps.json | 82 -- Godeps/Readme | 5 - go.mod | 8 + go.sum | 36 + .../x/tools/go/buildutil/allpackages.go | 2 +- .../x/tools/go/gcexportdata/gcexportdata.go | 2 +- .../x/tools/go/internal/gcimporter/bexport.go | 4 +- .../x/tools/go/internal/gcimporter/bimport.go | 98 +-- .../go/internal/gcimporter/gcimporter.go | 2 +- .../x/tools/go/internal/gcimporter/iexport.go | 723 ++++++++++++++++++ .../x/tools/go/internal/gcimporter/iimport.go | 14 +- vendor/modules.txt | 16 + 12 files changed, 852 insertions(+), 140 deletions(-) delete mode 100644 Godeps/Godeps.json delete mode 100644 Godeps/Readme create mode 100644 go.mod create mode 100644 go.sum create mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go create mode 100644 vendor/modules.txt diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index d9233aec..00000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "ImportPath": "github.com/visualfc/gocode", - "GoVersion": "go1.11", - "GodepVersion": "v80", - "Packages": [ - "./..." - ], - "Deps": [ - { - "ImportPath": "github.com/visualfc/fastmod", - "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" - }, - { - "ImportPath": "github.com/visualfc/fastmod/internal/modfile", - "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" - }, - { - "ImportPath": "github.com/visualfc/fastmod/internal/module", - "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" - }, - { - "ImportPath": "github.com/visualfc/fastmod/internal/semver", - "Rev": "3600cbe34ad55676ef2ce00f1916071200249352" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkg/buildctx", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkg/command", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkg/pkgutil", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkg/stdlib", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/pkgs", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/types", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "golang.org/x/tools/go/buildutil", - "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" - }, - { - "ImportPath": "golang.org/x/tools/go/gcexportdata", - "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" - }, - { - "ImportPath": "golang.org/x/tools/go/internal/gcimporter", - "Rev": "d66bd3c5d5a61998d3e35797d266491d11b5e487" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/golang.org/x/tools/go/buildutil", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/modfile", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/module", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - }, - { - "ImportPath": "github.com/visualfc/gotools/vendor/github.com/visualfc/fastmod/internal/semver", - "Rev": "03de1e535737757ff31d7cc647dd95ab4164c211" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53d..00000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..23ff96d7 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/visualfc/gocode + +go 1.12 + +require ( + github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add + golang.org/x/tools v0.0.0-20190710184609-286818132824 +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..eac46c85 --- /dev/null +++ b/go.sum @@ -0,0 +1,36 @@ +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= +github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/go-delve/delve v1.2.1-0.20190713012804-df65be43aeb1/go.mod h1:DR/S+I+xQmTINVqEzooWl5FmZe6PYn9g6Mr99xEjhi0= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/visualfc/fastmod v0.0.0-20190131104758-c069a47540eb h1:SsMc1pWQd9VeSFNtMJi5Y4DIhAt50JgA5e+a/1JvrNM= +github.com/visualfc/fastmod v0.0.0-20190131104758-c069a47540eb/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= +github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2F817yeZsSFMfnpXUYHJsuU5+W6AT8= +github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= +github.com/visualfc/gotools v0.0.0-20190218124934-6d12497f1bd5 h1:2HHOotezuYHn1MPMA8CwQtlHNCXDP4byVAChu8tPeoQ= +github.com/visualfc/gotools v0.0.0-20190218124934-6d12497f1bd5/go.mod h1:L4JCuK2/abY1jUXNDGB3gS9uWSQut22gKWkTe1R8b70= +github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= +github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= +go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= +golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= +golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY= +golang.org/x/tools v0.0.0-20190710184609-286818132824/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= diff --git a/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/golang.org/x/tools/go/buildutil/allpackages.go index 3d29cf3b..c0cb03e7 100644 --- a/vendor/golang.org/x/tools/go/buildutil/allpackages.go +++ b/vendor/golang.org/x/tools/go/buildutil/allpackages.go @@ -7,7 +7,7 @@ // // All I/O is done via the build.Context file system interface, which must // be concurrency-safe. -package buildutil +package buildutil // import "golang.org/x/tools/go/buildutil" import ( "go/build" diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go index 16075506..98b3987b 100644 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -18,7 +18,7 @@ // Go 1.8 export data files, so they will work before and after the // Go update. (See discussion at https://golang.org/issue/15651.) // -package gcexportdata +package gcexportdata // import "golang.org/x/tools/go/gcexportdata" import ( "bufio" diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go index 9f650491..a807d0aa 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go @@ -127,10 +127,10 @@ func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) // --- generic export data --- // populate type map with predeclared "known" types - for index, typ := range predeclared { + for index, typ := range predeclared() { p.typIndex[typ] = index } - if len(p.typIndex) != len(predeclared) { + if len(p.typIndex) != len(predeclared()) { return nil, internalError("duplicate entries in type map?") } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go index b31eacfc..e3c31078 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go @@ -126,7 +126,7 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data [] // --- generic export data --- // populate typList with predeclared "known" types - p.typList = append(p.typList, predeclared...) + p.typList = append(p.typList, predeclared()...) // read package data pkg = p.pkg() @@ -976,50 +976,58 @@ const ( aliasTag ) -var predeclared = []types.Type{ - // basic types - types.Typ[types.Bool], - types.Typ[types.Int], - types.Typ[types.Int8], - types.Typ[types.Int16], - types.Typ[types.Int32], - types.Typ[types.Int64], - types.Typ[types.Uint], - types.Typ[types.Uint8], - types.Typ[types.Uint16], - types.Typ[types.Uint32], - types.Typ[types.Uint64], - types.Typ[types.Uintptr], - types.Typ[types.Float32], - types.Typ[types.Float64], - types.Typ[types.Complex64], - types.Typ[types.Complex128], - types.Typ[types.String], - - // basic type aliases - types.Universe.Lookup("byte").Type(), - types.Universe.Lookup("rune").Type(), - - // error - types.Universe.Lookup("error").Type(), - - // untyped types - types.Typ[types.UntypedBool], - types.Typ[types.UntypedInt], - types.Typ[types.UntypedRune], - types.Typ[types.UntypedFloat], - types.Typ[types.UntypedComplex], - types.Typ[types.UntypedString], - types.Typ[types.UntypedNil], - - // package unsafe - types.Typ[types.UnsafePointer], - - // invalid type - types.Typ[types.Invalid], // only appears in packages with errors - - // used internally by gc; never used by this package or in .a files - anyType{}, +var predecl []types.Type // initialized lazily + +func predeclared() []types.Type { + if predecl == nil { + // initialize lazily to be sure that all + // elements have been initialized before + predecl = []types.Type{ // basic types + types.Typ[types.Bool], + types.Typ[types.Int], + types.Typ[types.Int8], + types.Typ[types.Int16], + types.Typ[types.Int32], + types.Typ[types.Int64], + types.Typ[types.Uint], + types.Typ[types.Uint8], + types.Typ[types.Uint16], + types.Typ[types.Uint32], + types.Typ[types.Uint64], + types.Typ[types.Uintptr], + types.Typ[types.Float32], + types.Typ[types.Float64], + types.Typ[types.Complex64], + types.Typ[types.Complex128], + types.Typ[types.String], + + // basic type aliases + types.Universe.Lookup("byte").Type(), + types.Universe.Lookup("rune").Type(), + + // error + types.Universe.Lookup("error").Type(), + + // untyped types + types.Typ[types.UntypedBool], + types.Typ[types.UntypedInt], + types.Typ[types.UntypedRune], + types.Typ[types.UntypedFloat], + types.Typ[types.UntypedComplex], + types.Typ[types.UntypedString], + types.Typ[types.UntypedNil], + + // package unsafe + types.Typ[types.UnsafePointer], + + // invalid type + types.Typ[types.Invalid], // only appears in packages with errors + + // used internally by gc; never used by this package or in .a files + anyType{}, + } + } + return predecl } type anyType struct{} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index 31238f0d..9cf18660 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -9,7 +9,7 @@ // Package gcimporter provides various functions for reading // gc-generated object files that can be used to implement the // Importer interface defined by the Go 1.5 standard library package. -package gcimporter +package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" import ( "bufio" diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go new file mode 100644 index 00000000..be671c79 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go @@ -0,0 +1,723 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Indexed binary package export. +// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; +// see that file for specification of the format. + +// +build go1.11 + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "go/ast" + "go/constant" + "go/token" + "go/types" + "io" + "math/big" + "reflect" + "sort" +) + +// Current indexed export format version. Increase with each format change. +// 0: Go1.11 encoding +const iexportVersion = 0 + +// IExportData returns the binary export data for pkg. +// If no file set is provided, position info will be missing. +func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { + defer func() { + if e := recover(); e != nil { + if ierr, ok := e.(internalError); ok { + err = ierr + return + } + // Not an internal error; panic again. + panic(e) + } + }() + + p := iexporter{ + out: bytes.NewBuffer(nil), + fset: fset, + allPkgs: map[*types.Package]bool{}, + stringIndex: map[string]uint64{}, + declIndex: map[types.Object]uint64{}, + typIndex: map[types.Type]uint64{}, + } + + for i, pt := range predeclared() { + p.typIndex[pt] = uint64(i) + } + if len(p.typIndex) > predeclReserved { + panic(internalErrorf("too many predeclared types: %d > %d", len(p.typIndex), predeclReserved)) + } + + // Initialize work queue with exported declarations. + scope := pkg.Scope() + for _, name := range scope.Names() { + if ast.IsExported(name) { + p.pushDecl(scope.Lookup(name)) + } + } + + // Loop until no more work. + for !p.declTodo.empty() { + p.doDecl(p.declTodo.popHead()) + } + + // Append indices to data0 section. + dataLen := uint64(p.data0.Len()) + w := p.newWriter() + w.writeIndex(p.declIndex, pkg) + w.flush() + + // Assemble header. + var hdr intWriter + hdr.WriteByte('i') + hdr.uint64(iexportVersion) + hdr.uint64(uint64(p.strings.Len())) + hdr.uint64(dataLen) + + // Flush output. + io.Copy(p.out, &hdr) + io.Copy(p.out, &p.strings) + io.Copy(p.out, &p.data0) + + return p.out.Bytes(), nil +} + +// writeIndex writes out an object index. mainIndex indicates whether +// we're writing out the main index, which is also read by +// non-compiler tools and includes a complete package description +// (i.e., name and height). +func (w *exportWriter) writeIndex(index map[types.Object]uint64, localpkg *types.Package) { + // Build a map from packages to objects from that package. + pkgObjs := map[*types.Package][]types.Object{} + + // For the main index, make sure to include every package that + // we reference, even if we're not exporting (or reexporting) + // any symbols from it. + pkgObjs[localpkg] = nil + for pkg := range w.p.allPkgs { + pkgObjs[pkg] = nil + } + + for obj := range index { + pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj) + } + + var pkgs []*types.Package + for pkg, objs := range pkgObjs { + pkgs = append(pkgs, pkg) + + sort.Slice(objs, func(i, j int) bool { + return objs[i].Name() < objs[j].Name() + }) + } + + sort.Slice(pkgs, func(i, j int) bool { + return pkgs[i].Path() < pkgs[j].Path() + }) + + w.uint64(uint64(len(pkgs))) + for _, pkg := range pkgs { + w.string(pkg.Path()) + w.string(pkg.Name()) + w.uint64(uint64(0)) // package height is not needed for go/types + + objs := pkgObjs[pkg] + w.uint64(uint64(len(objs))) + for _, obj := range objs { + w.string(obj.Name()) + w.uint64(index[obj]) + } + } +} + +type iexporter struct { + fset *token.FileSet + out *bytes.Buffer + + // allPkgs tracks all packages that have been referenced by + // the export data, so we can ensure to include them in the + // main index. + allPkgs map[*types.Package]bool + + declTodo objQueue + + strings intWriter + stringIndex map[string]uint64 + + data0 intWriter + declIndex map[types.Object]uint64 + typIndex map[types.Type]uint64 +} + +// stringOff returns the offset of s within the string section. +// If not already present, it's added to the end. +func (p *iexporter) stringOff(s string) uint64 { + off, ok := p.stringIndex[s] + if !ok { + off = uint64(p.strings.Len()) + p.stringIndex[s] = off + + p.strings.uint64(uint64(len(s))) + p.strings.WriteString(s) + } + return off +} + +// pushDecl adds n to the declaration work queue, if not already present. +func (p *iexporter) pushDecl(obj types.Object) { + // Package unsafe is known to the compiler and predeclared. + assert(obj.Pkg() != types.Unsafe) + + if _, ok := p.declIndex[obj]; ok { + return + } + + p.declIndex[obj] = ^uint64(0) // mark n present in work queue + p.declTodo.pushTail(obj) +} + +// exportWriter handles writing out individual data section chunks. +type exportWriter struct { + p *iexporter + + data intWriter + currPkg *types.Package + prevFile string + prevLine int64 +} + +func (p *iexporter) doDecl(obj types.Object) { + w := p.newWriter() + w.setPkg(obj.Pkg(), false) + + switch obj := obj.(type) { + case *types.Var: + w.tag('V') + w.pos(obj.Pos()) + w.typ(obj.Type(), obj.Pkg()) + + case *types.Func: + sig, _ := obj.Type().(*types.Signature) + if sig.Recv() != nil { + panic(internalErrorf("unexpected method: %v", sig)) + } + w.tag('F') + w.pos(obj.Pos()) + w.signature(sig) + + case *types.Const: + w.tag('C') + w.pos(obj.Pos()) + w.value(obj.Type(), obj.Val()) + + case *types.TypeName: + if obj.IsAlias() { + w.tag('A') + w.pos(obj.Pos()) + w.typ(obj.Type(), obj.Pkg()) + break + } + + // Defined type. + w.tag('T') + w.pos(obj.Pos()) + + underlying := obj.Type().Underlying() + w.typ(underlying, obj.Pkg()) + + t := obj.Type() + if types.IsInterface(t) { + break + } + + named, ok := t.(*types.Named) + if !ok { + panic(internalErrorf("%s is not a defined type", t)) + } + + n := named.NumMethods() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + m := named.Method(i) + w.pos(m.Pos()) + w.string(m.Name()) + sig, _ := m.Type().(*types.Signature) + w.param(sig.Recv()) + w.signature(sig) + } + + default: + panic(internalErrorf("unexpected object: %v", obj)) + } + + p.declIndex[obj] = w.flush() +} + +func (w *exportWriter) tag(tag byte) { + w.data.WriteByte(tag) +} + +func (w *exportWriter) pos(pos token.Pos) { + p := w.p.fset.Position(pos) + file := p.Filename + line := int64(p.Line) + + // When file is the same as the last position (common case), + // we can save a few bytes by delta encoding just the line + // number. + // + // Note: Because data objects may be read out of order (or not + // at all), we can only apply delta encoding within a single + // object. This is handled implicitly by tracking prevFile and + // prevLine as fields of exportWriter. + + if file == w.prevFile { + delta := line - w.prevLine + w.int64(delta) + if delta == deltaNewFile { + w.int64(-1) + } + } else { + w.int64(deltaNewFile) + w.int64(line) // line >= 0 + w.string(file) + w.prevFile = file + } + w.prevLine = line +} + +func (w *exportWriter) pkg(pkg *types.Package) { + // Ensure any referenced packages are declared in the main index. + w.p.allPkgs[pkg] = true + + w.string(pkg.Path()) +} + +func (w *exportWriter) qualifiedIdent(obj types.Object) { + // Ensure any referenced declarations are written out too. + w.p.pushDecl(obj) + + w.string(obj.Name()) + w.pkg(obj.Pkg()) +} + +func (w *exportWriter) typ(t types.Type, pkg *types.Package) { + w.data.uint64(w.p.typOff(t, pkg)) +} + +func (p *iexporter) newWriter() *exportWriter { + return &exportWriter{p: p} +} + +func (w *exportWriter) flush() uint64 { + off := uint64(w.p.data0.Len()) + io.Copy(&w.p.data0, &w.data) + return off +} + +func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 { + off, ok := p.typIndex[t] + if !ok { + w := p.newWriter() + w.doTyp(t, pkg) + off = predeclReserved + w.flush() + p.typIndex[t] = off + } + return off +} + +func (w *exportWriter) startType(k itag) { + w.data.uint64(uint64(k)) +} + +func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { + switch t := t.(type) { + case *types.Named: + w.startType(definedType) + w.qualifiedIdent(t.Obj()) + + case *types.Pointer: + w.startType(pointerType) + w.typ(t.Elem(), pkg) + + case *types.Slice: + w.startType(sliceType) + w.typ(t.Elem(), pkg) + + case *types.Array: + w.startType(arrayType) + w.uint64(uint64(t.Len())) + w.typ(t.Elem(), pkg) + + case *types.Chan: + w.startType(chanType) + // 1 RecvOnly; 2 SendOnly; 3 SendRecv + var dir uint64 + switch t.Dir() { + case types.RecvOnly: + dir = 1 + case types.SendOnly: + dir = 2 + case types.SendRecv: + dir = 3 + } + w.uint64(dir) + w.typ(t.Elem(), pkg) + + case *types.Map: + w.startType(mapType) + w.typ(t.Key(), pkg) + w.typ(t.Elem(), pkg) + + case *types.Signature: + w.startType(signatureType) + w.setPkg(pkg, true) + w.signature(t) + + case *types.Struct: + w.startType(structType) + w.setPkg(pkg, true) + + n := t.NumFields() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + f := t.Field(i) + w.pos(f.Pos()) + w.string(f.Name()) + w.typ(f.Type(), pkg) + w.bool(f.Embedded()) + w.string(t.Tag(i)) // note (or tag) + } + + case *types.Interface: + w.startType(interfaceType) + w.setPkg(pkg, true) + + n := t.NumEmbeddeds() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + f := t.Embedded(i) + w.pos(f.Obj().Pos()) + w.typ(f.Obj().Type(), f.Obj().Pkg()) + } + + n = t.NumExplicitMethods() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + m := t.ExplicitMethod(i) + w.pos(m.Pos()) + w.string(m.Name()) + sig, _ := m.Type().(*types.Signature) + w.signature(sig) + } + + default: + panic(internalErrorf("unexpected type: %v, %v", t, reflect.TypeOf(t))) + } +} + +func (w *exportWriter) setPkg(pkg *types.Package, write bool) { + if write { + w.pkg(pkg) + } + + w.currPkg = pkg +} + +func (w *exportWriter) signature(sig *types.Signature) { + w.paramList(sig.Params()) + w.paramList(sig.Results()) + if sig.Params().Len() > 0 { + w.bool(sig.Variadic()) + } +} + +func (w *exportWriter) paramList(tup *types.Tuple) { + n := tup.Len() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + w.param(tup.At(i)) + } +} + +func (w *exportWriter) param(obj types.Object) { + w.pos(obj.Pos()) + w.localIdent(obj) + w.typ(obj.Type(), obj.Pkg()) +} + +func (w *exportWriter) value(typ types.Type, v constant.Value) { + w.typ(typ, nil) + + switch v.Kind() { + case constant.Bool: + w.bool(constant.BoolVal(v)) + case constant.Int: + var i big.Int + if i64, exact := constant.Int64Val(v); exact { + i.SetInt64(i64) + } else if ui64, exact := constant.Uint64Val(v); exact { + i.SetUint64(ui64) + } else { + i.SetString(v.ExactString(), 10) + } + w.mpint(&i, typ) + case constant.Float: + f := constantToFloat(v) + w.mpfloat(f, typ) + case constant.Complex: + w.mpfloat(constantToFloat(constant.Real(v)), typ) + w.mpfloat(constantToFloat(constant.Imag(v)), typ) + case constant.String: + w.string(constant.StringVal(v)) + case constant.Unknown: + // package contains type errors + default: + panic(internalErrorf("unexpected value %v (%T)", v, v)) + } +} + +// constantToFloat converts a constant.Value with kind constant.Float to a +// big.Float. +func constantToFloat(x constant.Value) *big.Float { + assert(x.Kind() == constant.Float) + // Use the same floating-point precision (512) as cmd/compile + // (see Mpprec in cmd/compile/internal/gc/mpfloat.go). + const mpprec = 512 + var f big.Float + f.SetPrec(mpprec) + if v, exact := constant.Float64Val(x); exact { + // float64 + f.SetFloat64(v) + } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { + // TODO(gri): add big.Rat accessor to constant.Value. + n := valueToRat(num) + d := valueToRat(denom) + f.SetRat(n.Quo(n, d)) + } else { + // Value too large to represent as a fraction => inaccessible. + // TODO(gri): add big.Float accessor to constant.Value. + _, ok := f.SetString(x.ExactString()) + assert(ok) + } + return &f +} + +// mpint exports a multi-precision integer. +// +// For unsigned types, small values are written out as a single +// byte. Larger values are written out as a length-prefixed big-endian +// byte string, where the length prefix is encoded as its complement. +// For example, bytes 0, 1, and 2 directly represent the integer +// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-, +// 2-, and 3-byte big-endian string follow. +// +// Encoding for signed types use the same general approach as for +// unsigned types, except small values use zig-zag encoding and the +// bottom bit of length prefix byte for large values is reserved as a +// sign bit. +// +// The exact boundary between small and large encodings varies +// according to the maximum number of bytes needed to encode a value +// of type typ. As a special case, 8-bit types are always encoded as a +// single byte. +// +// TODO(mdempsky): Is this level of complexity really worthwhile? +func (w *exportWriter) mpint(x *big.Int, typ types.Type) { + basic, ok := typ.Underlying().(*types.Basic) + if !ok { + panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying())) + } + + signed, maxBytes := intSize(basic) + + negative := x.Sign() < 0 + if !signed && negative { + panic(internalErrorf("negative unsigned integer; type %v, value %v", typ, x)) + } + + b := x.Bytes() + if len(b) > 0 && b[0] == 0 { + panic(internalErrorf("leading zeros")) + } + if uint(len(b)) > maxBytes { + panic(internalErrorf("bad mpint length: %d > %d (type %v, value %v)", len(b), maxBytes, typ, x)) + } + + maxSmall := 256 - maxBytes + if signed { + maxSmall = 256 - 2*maxBytes + } + if maxBytes == 1 { + maxSmall = 256 + } + + // Check if x can use small value encoding. + if len(b) <= 1 { + var ux uint + if len(b) == 1 { + ux = uint(b[0]) + } + if signed { + ux <<= 1 + if negative { + ux-- + } + } + if ux < maxSmall { + w.data.WriteByte(byte(ux)) + return + } + } + + n := 256 - uint(len(b)) + if signed { + n = 256 - 2*uint(len(b)) + if negative { + n |= 1 + } + } + if n < maxSmall || n >= 256 { + panic(internalErrorf("encoding mistake: %d, %v, %v => %d", len(b), signed, negative, n)) + } + + w.data.WriteByte(byte(n)) + w.data.Write(b) +} + +// mpfloat exports a multi-precision floating point number. +// +// The number's value is decomposed into mantissa × 2**exponent, where +// mantissa is an integer. The value is written out as mantissa (as a +// multi-precision integer) and then the exponent, except exponent is +// omitted if mantissa is zero. +func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) { + if f.IsInf() { + panic("infinite constant") + } + + // Break into f = mant × 2**exp, with 0.5 <= mant < 1. + var mant big.Float + exp := int64(f.MantExp(&mant)) + + // Scale so that mant is an integer. + prec := mant.MinPrec() + mant.SetMantExp(&mant, int(prec)) + exp -= int64(prec) + + manti, acc := mant.Int(nil) + if acc != big.Exact { + panic(internalErrorf("mantissa scaling failed for %f (%s)", f, acc)) + } + w.mpint(manti, typ) + if manti.Sign() != 0 { + w.int64(exp) + } +} + +func (w *exportWriter) bool(b bool) bool { + var x uint64 + if b { + x = 1 + } + w.uint64(x) + return b +} + +func (w *exportWriter) int64(x int64) { w.data.int64(x) } +func (w *exportWriter) uint64(x uint64) { w.data.uint64(x) } +func (w *exportWriter) string(s string) { w.uint64(w.p.stringOff(s)) } + +func (w *exportWriter) localIdent(obj types.Object) { + // Anonymous parameters. + if obj == nil { + w.string("") + return + } + + name := obj.Name() + if name == "_" { + w.string("_") + return + } + + w.string(name) +} + +type intWriter struct { + bytes.Buffer +} + +func (w *intWriter) int64(x int64) { + var buf [binary.MaxVarintLen64]byte + n := binary.PutVarint(buf[:], x) + w.Write(buf[:n]) +} + +func (w *intWriter) uint64(x uint64) { + var buf [binary.MaxVarintLen64]byte + n := binary.PutUvarint(buf[:], x) + w.Write(buf[:n]) +} + +func assert(cond bool) { + if !cond { + panic("internal error: assertion failed") + } +} + +// The below is copied from go/src/cmd/compile/internal/gc/syntax.go. + +// objQueue is a FIFO queue of types.Object. The zero value of objQueue is +// a ready-to-use empty queue. +type objQueue struct { + ring []types.Object + head, tail int +} + +// empty returns true if q contains no Nodes. +func (q *objQueue) empty() bool { + return q.head == q.tail +} + +// pushTail appends n to the tail of the queue. +func (q *objQueue) pushTail(obj types.Object) { + if len(q.ring) == 0 { + q.ring = make([]types.Object, 16) + } else if q.head+len(q.ring) == q.tail { + // Grow the ring. + nring := make([]types.Object, len(q.ring)*2) + // Copy the old elements. + part := q.ring[q.head%len(q.ring):] + if q.tail-q.head <= len(part) { + part = part[:q.tail-q.head] + copy(nring, part) + } else { + pos := copy(nring, part) + copy(nring[pos:], q.ring[:q.tail%len(q.ring)]) + } + q.ring, q.head, q.tail = nring, 0, q.tail-q.head + } + + q.ring[q.tail%len(q.ring)] = obj + q.tail++ +} + +// popHead pops a node from the head of the queue. It panics if q is empty. +func (q *objQueue) popHead() types.Object { + if q.empty() { + panic("dequeue empty") + } + obj := q.ring[q.head%len(q.ring)] + q.head++ + return obj +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go index 0fd22bb0..3cb7ae5b 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go @@ -109,7 +109,7 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] }, } - for i, pt := range predeclared { + for i, pt := range predeclared() { p.typCache[uint64(i)] = pt } @@ -142,8 +142,12 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] p.pkgIndex[pkg] = nameIndex pkgList[i] = pkg } - - localpkg := pkgList[0] + var localpkg *types.Package + for _, pkg := range pkgList { + if pkg.Path() == path { + localpkg = pkg + } + } names := make([]string, 0, len(p.pkgIndex[localpkg])) for name := range p.pkgIndex[localpkg] { @@ -330,6 +334,10 @@ func (r *importReader) value() (typ types.Type, val constant.Value) { val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) default: + if b.Kind() == types.Invalid { + val = constant.MakeUnknown() + return + } errorf("unexpected type %v", typ) // panics panic("unreachable") } diff --git a/vendor/modules.txt b/vendor/modules.txt new file mode 100644 index 00000000..72a599fc --- /dev/null +++ b/vendor/modules.txt @@ -0,0 +1,16 @@ +# github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 +github.com/visualfc/fastmod +github.com/visualfc/fastmod/internal/modfile +github.com/visualfc/fastmod/internal/module +github.com/visualfc/fastmod/internal/semver +# github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add +github.com/visualfc/gotools/pkgs +github.com/visualfc/gotools/types +github.com/visualfc/gotools/pkg/command +github.com/visualfc/gotools/pkg/buildctx +github.com/visualfc/gotools/pkg/pkgutil +github.com/visualfc/gotools/pkg/stdlib +# golang.org/x/tools v0.0.0-20190710184609-286818132824 +golang.org/x/tools/go/gcexportdata +golang.org/x/tools/go/buildutil +golang.org/x/tools/go/internal/gcimporter From 5e8ed360a1818864fa3f5391be1d5adbaadce7f0 Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 15 Jul 2019 13:14:49 +0800 Subject: [PATCH 068/133] fix mod priority vendor check --- go.mod | 2 +- go.sum | 6 ++---- vendor/github.com/visualfc/gotools/types/types.go | 7 +++++-- vendor/modules.txt | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 23ff96d7..3946f33c 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.12 require ( - github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add + github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 golang.org/x/tools v0.0.0-20190710184609-286818132824 ) diff --git a/go.sum b/go.sum index eac46c85..673e95d7 100644 --- a/go.sum +++ b/go.sum @@ -13,14 +13,12 @@ github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/ github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/visualfc/fastmod v0.0.0-20190131104758-c069a47540eb h1:SsMc1pWQd9VeSFNtMJi5Y4DIhAt50JgA5e+a/1JvrNM= -github.com/visualfc/fastmod v0.0.0-20190131104758-c069a47540eb/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2F817yeZsSFMfnpXUYHJsuU5+W6AT8= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= -github.com/visualfc/gotools v0.0.0-20190218124934-6d12497f1bd5 h1:2HHOotezuYHn1MPMA8CwQtlHNCXDP4byVAChu8tPeoQ= -github.com/visualfc/gotools v0.0.0-20190218124934-6d12497f1bd5/go.mod h1:L4JCuK2/abY1jUXNDGB3gS9uWSQut22gKWkTe1R8b70= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= +github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= +github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index ba815c0a..f9de2b3d 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -493,7 +493,7 @@ func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path stri if strings.HasPrefix(name, ".") { name = filepath.Join(parentDir, name) } else { - if pkgutil.IsVendorExperiment() { + if w.ModPkg == nil && pkgutil.IsVendorExperiment() { parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) var err error name, err = pkgutil.VendoredImportPath(parentPkg, name) @@ -1544,7 +1544,10 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return nil } if !bp.IsCommand() { - importPath := filepath.Join(w.ModPkg.Node().Path(), path[len(dir)+1:]) + importPath := w.ModPkg.Node().Path() + if path != dir { + importPath = filepath.Join(importPath, path[len(dir)+1:]) + } if importPath == cursorPkgPath { return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 72a599fc..ab06e971 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -3,7 +3,7 @@ github.com/visualfc/fastmod github.com/visualfc/fastmod/internal/modfile github.com/visualfc/fastmod/internal/module github.com/visualfc/fastmod/internal/semver -# github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add +# github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 github.com/visualfc/gotools/pkgs github.com/visualfc/gotools/types github.com/visualfc/gotools/pkg/command From 15064618fb336ec6dba57d21c2ae575419442933 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 6 Oct 2019 13:56:42 +0800 Subject: [PATCH 069/133] fix gocode update_cache recover --- package.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.go b/package.go index 43587d3b..dcafc792 100644 --- a/package.go +++ b/package.go @@ -82,6 +82,11 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.mtime == -1 { return } + defer func() { + if err := recover(); err != nil { + log.Println("update_cache recover error:", err) + } + }() import_path := m.import_name if m.vendor_name != "" { From 0db6a6a51c97d7af38e6c2575d5e699a5bd12c48 Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 6 Jan 2020 22:17:58 +0800 Subject: [PATCH 070/133] fastmod fix match full version, mypkg/v2 --- go.mod | 2 +- go.sum | 5 +++++ vendor/github.com/visualfc/fastmod/fastmod.go | 16 +++++++++++----- .../github.com/visualfc/gotools/types/types.go | 14 +++++++++++++- vendor/modules.txt | 4 ++-- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 3946f33c..60e9b48d 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.12 require ( - github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 + github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae golang.org/x/tools v0.0.0-20190710184609-286818132824 ) diff --git a/go.sum b/go.sum index 673e95d7..8e11a93f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/creack/pty v1.1.10-0.20191209115840-8ab47f72e854/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/go-delve/delve v1.2.1-0.20190713012804-df65be43aeb1/go.mod h1:DR/S+I+xQmTINVqEzooWl5FmZe6PYn9g6Mr99xEjhi0= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -15,10 +16,14 @@ github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJa github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2F817yeZsSFMfnpXUYHJsuU5+W6AT8= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= +github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f h1:XXkmqMVWchE7AizXintmZ8bZr3Sy8RaLk+wSjTbWOkk= +github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= +github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae h1:+gFYnw038UDXdENB9zpp24o4ndEKAHgXCyxPZa/ClzQ= +github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae/go.mod h1:6EzUzmR//1Tc63pj2BE+38T23PQDW64AEyMQoncXOcI= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 9e5ce18d..ad2048d7 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -150,15 +150,21 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]), PkgTypeLocal } var encpath string + // match full version, github.com/my/mypkg/v2 for _, r := range m.Mods { if r.Require.Path == pkg { path = r.VersionPath() encpath = r.EncodeVersionPath() - break - } else if strings.HasPrefix(pkg, r.Require.Path+"/") { - path = r.VersionPath() + pkg[len(r.Require.Path):] - encpath = r.VersionPath() + pkg[len(r.Require.Path):] - break + } + } + // match sub dir, github.com/my/mypkg/sub + if path == "" { + for _, r := range m.Mods { + if strings.HasPrefix(pkg, r.Require.Path+"/") { + path = r.VersionPath() + pkg[len(r.Require.Path):] + encpath = r.EncodeVersionPath() + pkg[len(r.Require.Path):] + break + } } } if path == "" { diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index f9de2b3d..5ddbadf1 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -1234,8 +1234,20 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } else if cursorId != nil { kind = ObjImplicit } else { + for id, _ := range pkgInfo.Types { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + switch v := id.(type) { + case *ast.BasicLit: + if w.findMode.Info { + w.cmd.Println(fmt.Sprintf("basic type %v (%v)", v.Kind, v.Value)) + return nil + } + return fmt.Errorf("not support basic type: %v (%v)", v.Kind, v.Value) + } + } + } //TODO - return fmt.Errorf("nof find object %v:%v", cursor.fileName, cursor.pos) + return fmt.Errorf("not find object %v:%v", cursor.fileName, cursor.pos) } if kind == ObjField { if cursorObj.(*types.Var).Anonymous() { diff --git a/vendor/modules.txt b/vendor/modules.txt index ab06e971..140bff5e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,9 +1,9 @@ -# github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 +# github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f github.com/visualfc/fastmod github.com/visualfc/fastmod/internal/modfile github.com/visualfc/fastmod/internal/module github.com/visualfc/fastmod/internal/semver -# github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 +# github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae github.com/visualfc/gotools/pkgs github.com/visualfc/gotools/types github.com/visualfc/gotools/pkg/command From 7557a6a6ab66b162aca93f8f34d66f4af863d753 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 7 Jan 2020 09:13:12 +0800 Subject: [PATCH 071/133] fix _,s1,s2 = ... bug, check new_decl_full func skip _ --- autocompletecontext.go | 1 - autocompletefile.go | 2 +- declcache.go | 2 +- package.go | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 65b548fa..4f50f57f 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -525,7 +525,6 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int c.get_candidates_from_decl(cc, class, b) } } - if len(b.candidates) == 0 { return nil, 0 } diff --git a/autocompletefile.go b/autocompletefile.go index 643fb7c5..d1b58868 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -158,7 +158,7 @@ func (f *auto_complete_file) process_decl(decl ast.Decl) { d := new_decl_full(name.Name, class, ast_decl_flags(data.decl), typ, v, vi, prevscope) if d == nil { - return + continue } f.scope.add_named_decl(d) diff --git a/declcache.go b/declcache.go index a3edf1ee..36c0b60e 100644 --- a/declcache.go +++ b/declcache.go @@ -125,7 +125,7 @@ func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) { d := new_decl_full(name.Name, class, ast_decl_flags(data.decl), typ, v, vi, scope) if d == nil { - return + continue } methodof := method_of(decl) diff --git a/package.go b/package.go index dcafc792..c8acca23 100644 --- a/package.go +++ b/package.go @@ -284,7 +284,7 @@ func add_ast_decl_to_package(pkg *decl, decl ast.Decl, scope *scope) { d := new_decl_full(name.Name, class, decl_foreign|ast_decl_flags(data.decl), typ, v, vi, scope) if d == nil { - return + continue } if !name.IsExported() && d.class != decl_type { From f7c4f435e4055209afde55a0cd4b69df1860ff9f Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 7 Jan 2020 22:16:06 +0800 Subject: [PATCH 072/133] update dep --- go.mod | 2 +- go.sum | 4 ++++ vendor/github.com/visualfc/fastmod/fastmod.go | 11 +++++++---- vendor/github.com/visualfc/fastmod/go.mod | 3 +++ vendor/modules.txt | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 vendor/github.com/visualfc/fastmod/go.mod diff --git a/go.mod b/go.mod index 60e9b48d..628851f1 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.12 require ( - github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae + github.com/visualfc/gotools v1.0.0 golang.org/x/tools v0.0.0-20190710184609-286818132824 ) diff --git a/go.sum b/go.sum index 8e11a93f..3ad018bb 100644 --- a/go.sum +++ b/go.sum @@ -18,12 +18,16 @@ github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2 github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f h1:XXkmqMVWchE7AizXintmZ8bZr3Sy8RaLk+wSjTbWOkk= github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= +github.com/visualfc/fastmod v1.0.0 h1:3UcYFM+mzdk5AeKF7itO7D7rEv9Vkk0f2HOZi6KCMh8= +github.com/visualfc/fastmod v1.0.0/go.mod h1:MjR7AyXKzcr5S9uEeJPI4xID37/q88a8FSBS/2H8AFc= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae h1:+gFYnw038UDXdENB9zpp24o4ndEKAHgXCyxPZa/ClzQ= github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae/go.mod h1:6EzUzmR//1Tc63pj2BE+38T23PQDW64AEyMQoncXOcI= +github.com/visualfc/gotools v1.0.0 h1:08O9KKHoW68uvacgpHOxJWL/lPiMtISUsaBH5yd7++w= +github.com/visualfc/gotools v1.0.0/go.mod h1:imEdbI+QLcpnRkK4UUnFFjwUZF7Dl4cjqknTIJ4Zms0= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index ad2048d7..bf0ce6fe 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -237,10 +237,13 @@ func (p *Package) load(node *Node) { } else { fmod = filepath.Join(filepath.Join(p.pkgModPath, v.EncodeVersionPath()), "go.mod") } - m, _ := p.ModList.LoadModuleFile(fmod) - if m != nil { - child := &Node{m, node, nil} - node.Children = append(node.Children, child) + m, err := p.ModList.LoadModuleFile(fmod) + if err != nil { + continue + } + child := &Node{m, node, nil} + node.Children = append(node.Children, child) + if _, ok := p.NodeMap[m.fdir]; !ok { p.NodeMap[m.fdir] = child p.load(child) } diff --git a/vendor/github.com/visualfc/fastmod/go.mod b/vendor/github.com/visualfc/fastmod/go.mod new file mode 100644 index 00000000..5a131119 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/go.mod @@ -0,0 +1,3 @@ +module github.com/visualfc/fastmod + +go 1.12 diff --git a/vendor/modules.txt b/vendor/modules.txt index 140bff5e..088b0c18 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,9 +1,9 @@ -# github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f +# github.com/visualfc/fastmod v1.0.0 github.com/visualfc/fastmod github.com/visualfc/fastmod/internal/modfile github.com/visualfc/fastmod/internal/module github.com/visualfc/fastmod/internal/semver -# github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae +# github.com/visualfc/gotools v1.0.0 github.com/visualfc/gotools/pkgs github.com/visualfc/gotools/types github.com/visualfc/gotools/pkg/command From 672450d2e2c19563cd04dbdb3988203b9453e91d Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 16 Mar 2020 23:16:05 +0800 Subject: [PATCH 073/133] fix ast.FuncDecl.Body.Rbrace bug in Go1.14 --- autocompletefile.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autocompletefile.go b/autocompletefile.go index d1b58868..f7c2bf1d 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -127,6 +127,10 @@ func (f *auto_complete_file) process_data(data []byte, ctx *auto_complete_contex func (f *auto_complete_file) process_decl_locals(decl ast.Decl) { switch t := decl.(type) { case *ast.FuncDecl: + // hack fix rbrace bug in Go 1.14 + if t.Body.Rbrace < t.Body.Lbrace { + t.Body.Rbrace = t.Body.End() - 1 + } if f.cursor_in(t.Body) { s := f.scope f.scope = new_scope(f.scope) From 5fec8b856a382231936a2751938547a91789281d Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 16 Mar 2020 23:18:13 +0800 Subject: [PATCH 074/133] fix testing/all.bash gocode path --- _testing/all.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_testing/all.bash b/_testing/all.bash index 02596a95..d3b7a0ae 100755 --- a/_testing/all.bash +++ b/_testing/all.bash @@ -1,5 +1,6 @@ #!/usr/bin/env bash -gocode close +go build ../. +./gocode close sleep 0.5 echo "--------------------------------------------------------------------" echo "Autocompletion tests..." @@ -7,4 +8,5 @@ echo "--------------------------------------------------------------------" export XDG_CONFIG_HOME="$(mktemp -d)" ./run.rb sleep 0.5 -gocode close +./gocode close +rm ./gocode From 02804b0e74d8c627e2650352fdd9288fcdcba161 Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 16 Mar 2020 23:20:08 +0800 Subject: [PATCH 075/133] fix testing reflect for Go 1.13 1.14 --- _testing/test.0011/out.expected | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_testing/test.0011/out.expected b/_testing/test.0011/out.expected index 7de665e1..8a9d1b4c 100644 --- a/_testing/test.0011/out.expected +++ b/_testing/test.0011/out.expected @@ -1,4 +1,4 @@ -Found 59 candidates: +Found 61 candidates: func Addr() reflect.Value func Bool() bool func Bytes() []byte @@ -23,10 +23,12 @@ Found 59 candidates: func InterfaceData() [2]uintptr func IsNil() bool func IsValid() bool + func IsZero() bool func Kind() reflect.Kind func Len() int func MapIndex(key reflect.Value) reflect.Value func MapKeys() []reflect.Value + func MapRange() *reflect.MapIter func Method(i int) reflect.Value func MethodByName(name string) reflect.Value func NumField() int @@ -46,7 +48,7 @@ Found 59 candidates: func SetFloat(x float64) func SetInt(x int64) func SetLen(n int) - func SetMapIndex(key reflect.Value, val reflect.Value) + func SetMapIndex(key reflect.Value, elem reflect.Value) func SetPointer(x unsafe.Pointer) func SetString(x string) func SetUint(x uint64) From f71a73f82b9c7846d95a62249f06c0c87b6c3485 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 14 Apr 2020 18:59:05 +0800 Subject: [PATCH 076/133] add internal/gcexportdata internal/gcimporter,copy from golang.org/x/tools --- internal/gcexportdata/example_test.go | 126 ++ internal/gcexportdata/gcexportdata.go | 109 ++ internal/gcexportdata/gcexportdata_test.go | 41 + internal/gcexportdata/importer.go | 73 ++ internal/gcexportdata/main.go | 99 ++ internal/gcimporter/bexport.go | 852 +++++++++++++ internal/gcimporter/bexport_test.go | 419 +++++++ internal/gcimporter/bimport.go | 1036 ++++++++++++++++ internal/gcimporter/exportdata.go | 93 ++ internal/gcimporter/gcimporter.go | 1078 +++++++++++++++++ internal/gcimporter/gcimporter11_test.go | 129 ++ internal/gcimporter/gcimporter_test.go | 517 ++++++++ internal/gcimporter/iexport.go | 723 +++++++++++ internal/gcimporter/iexport_test.go | 308 +++++ internal/gcimporter/iimport.go | 606 +++++++++ internal/gcimporter/israce_test.go | 11 + internal/gcimporter/newInterface10.go | 21 + internal/gcimporter/newInterface11.go | 13 + internal/gcimporter/testdata/a.go | 14 + internal/gcimporter/testdata/b.go | 11 + internal/gcimporter/testdata/exports.go | 89 ++ internal/gcimporter/testdata/issue15920.go | 11 + internal/gcimporter/testdata/issue20046.go | 9 + internal/gcimporter/testdata/issue25301.go | 17 + internal/gcimporter/testdata/p.go | 13 + internal/gcimporter/testdata/versions/test.go | 30 + package.go | 2 +- package_types.go | 2 +- 28 files changed, 6450 insertions(+), 2 deletions(-) create mode 100644 internal/gcexportdata/example_test.go create mode 100644 internal/gcexportdata/gcexportdata.go create mode 100644 internal/gcexportdata/gcexportdata_test.go create mode 100644 internal/gcexportdata/importer.go create mode 100644 internal/gcexportdata/main.go create mode 100644 internal/gcimporter/bexport.go create mode 100644 internal/gcimporter/bexport_test.go create mode 100644 internal/gcimporter/bimport.go create mode 100644 internal/gcimporter/exportdata.go create mode 100644 internal/gcimporter/gcimporter.go create mode 100644 internal/gcimporter/gcimporter11_test.go create mode 100644 internal/gcimporter/gcimporter_test.go create mode 100644 internal/gcimporter/iexport.go create mode 100644 internal/gcimporter/iexport_test.go create mode 100644 internal/gcimporter/iimport.go create mode 100644 internal/gcimporter/israce_test.go create mode 100644 internal/gcimporter/newInterface10.go create mode 100644 internal/gcimporter/newInterface11.go create mode 100644 internal/gcimporter/testdata/a.go create mode 100644 internal/gcimporter/testdata/b.go create mode 100644 internal/gcimporter/testdata/exports.go create mode 100644 internal/gcimporter/testdata/issue15920.go create mode 100644 internal/gcimporter/testdata/issue20046.go create mode 100644 internal/gcimporter/testdata/issue25301.go create mode 100644 internal/gcimporter/testdata/p.go create mode 100644 internal/gcimporter/testdata/versions/test.go diff --git a/internal/gcexportdata/example_test.go b/internal/gcexportdata/example_test.go new file mode 100644 index 00000000..a50bc40b --- /dev/null +++ b/internal/gcexportdata/example_test.go @@ -0,0 +1,126 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.7 +// +build gc + +package gcexportdata_test + +import ( + "fmt" + "go/ast" + "go/parser" + "go/token" + "go/types" + "log" + "os" + "path/filepath" + + "golang.org/x/tools/go/gcexportdata" +) + +// ExampleRead uses gcexportdata.Read to load type information for the +// "fmt" package from the fmt.a file produced by the gc compiler. +func ExampleRead() { + // Find the export data file. + filename, path := gcexportdata.Find("fmt", "") + if filename == "" { + log.Fatalf("can't find export data for fmt") + } + fmt.Printf("Package path: %s\n", path) + fmt.Printf("Export data: %s\n", filepath.Base(filename)) + + // Open and read the file. + f, err := os.Open(filename) + if err != nil { + log.Fatal(err) + } + defer f.Close() + r, err := gcexportdata.NewReader(f) + if err != nil { + log.Fatalf("reading export data %s: %v", filename, err) + } + + // Decode the export data. + fset := token.NewFileSet() + imports := make(map[string]*types.Package) + pkg, err := gcexportdata.Read(r, fset, imports, path) + if err != nil { + log.Fatal(err) + } + + // Print package information. + members := pkg.Scope().Names() + if members[0] == ".inittask" { + // An improvement to init handling in 1.13 added ".inittask". Remove so go >= 1.13 and go < 1.13 both pass. + members = members[1:] + } + fmt.Printf("Package members: %s...\n", members[:5]) + println := pkg.Scope().Lookup("Println") + posn := fset.Position(println.Pos()) + posn.Line = 123 // make example deterministic + fmt.Printf("Println type: %s\n", println.Type()) + fmt.Printf("Println location: %s\n", slashify(posn)) + + // Output: + // + // Package path: fmt + // Export data: fmt.a + // Package members: [Errorf Formatter Fprint Fprintf Fprintln]... + // Println type: func(a ...interface{}) (n int, err error) + // Println location: $GOROOT/src/fmt/print.go:123:1 +} + +// ExampleNewImporter demonstrates usage of NewImporter to provide type +// information for dependencies when type-checking Go source code. +func ExampleNewImporter() { + const src = `package myrpc + +// choosing a package that doesn't change across releases +import "net/rpc" + +const serverError rpc.ServerError = "" +` + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, "myrpc.go", src, 0) + if err != nil { + log.Fatal(err) + } + + packages := make(map[string]*types.Package) + imp := gcexportdata.NewImporter(fset, packages) + conf := types.Config{Importer: imp} + pkg, err := conf.Check("myrpc", fset, []*ast.File{f}, nil) + if err != nil { + log.Fatal(err) + } + + // object from imported package + pi := packages["net/rpc"].Scope().Lookup("ServerError") + fmt.Printf("type %s.%s %s // %s\n", + pi.Pkg().Path(), + pi.Name(), + pi.Type().Underlying(), + slashify(fset.Position(pi.Pos())), + ) + + // object in source package + twopi := pkg.Scope().Lookup("serverError") + fmt.Printf("const %s %s = %s // %s\n", + twopi.Name(), + twopi.Type(), + twopi.(*types.Const).Val(), + slashify(fset.Position(twopi.Pos())), + ) + + // Output: + // + // type net/rpc.ServerError string // $GOROOT/src/net/rpc/client.go:20:1 + // const serverError net/rpc.ServerError = "" // myrpc.go:6:7 +} + +func slashify(posn token.Position) token.Position { + posn.Filename = filepath.ToSlash(posn.Filename) // for MS Windows portability + return posn +} diff --git a/internal/gcexportdata/gcexportdata.go b/internal/gcexportdata/gcexportdata.go new file mode 100644 index 00000000..027b4d75 --- /dev/null +++ b/internal/gcexportdata/gcexportdata.go @@ -0,0 +1,109 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package gcexportdata provides functions for locating, reading, and +// writing export data files containing type information produced by the +// gc compiler. This package supports go1.7 export data format and all +// later versions. +// +// Although it might seem convenient for this package to live alongside +// go/types in the standard library, this would cause version skew +// problems for developer tools that use it, since they must be able to +// consume the outputs of the gc compiler both before and after a Go +// update such as from Go 1.7 to Go 1.8. Because this package lives in +// golang.org/x/tools, sites can update their version of this repo some +// time before the Go 1.8 release and rebuild and redeploy their +// developer tools, which will then be able to consume both Go 1.7 and +// Go 1.8 export data files, so they will work before and after the +// Go update. (See discussion at https://golang.org/issue/15651.) +// +package gcexportdata // import "golang.org/x/tools/go/gcexportdata" + +import ( + "bufio" + "bytes" + "fmt" + "go/token" + "go/types" + "io" + "io/ioutil" + + "github.com/visualfc/gocode/internal/gcimporter" +) + +// Find returns the name of an object (.o) or archive (.a) file +// containing type information for the specified import path, +// using the workspace layout conventions of go/build. +// If no file was found, an empty filename is returned. +// +// A relative srcDir is interpreted relative to the current working directory. +// +// Find also returns the package's resolved (canonical) import path, +// reflecting the effects of srcDir and vendoring on importPath. +func Find(importPath, srcDir string) (filename, path string) { + return gcimporter.FindPkg(importPath, srcDir) +} + +// NewReader returns a reader for the export data section of an object +// (.o) or archive (.a) file read from r. The new reader may provide +// additional trailing data beyond the end of the export data. +func NewReader(r io.Reader) (io.Reader, error) { + buf := bufio.NewReader(r) + _, err := gcimporter.FindExportData(buf) + // If we ever switch to a zip-like archive format with the ToC + // at the end, we can return the correct portion of export data, + // but for now we must return the entire rest of the file. + return buf, err +} + +// Read reads export data from in, decodes it, and returns type +// information for the package. +// The package name is specified by path. +// File position information is added to fset. +// +// Read may inspect and add to the imports map to ensure that references +// within the export data to other packages are consistent. The caller +// must ensure that imports[path] does not exist, or exists but is +// incomplete (see types.Package.Complete), and Read inserts the +// resulting package into this map entry. +// +// On return, the state of the reader is undefined. +func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) { + data, err := ioutil.ReadAll(in) + if err != nil { + return nil, fmt.Errorf("reading export data for %q: %v", path, err) + } + + if bytes.HasPrefix(data, []byte("!")) { + return nil, fmt.Errorf("can't read export data for %q directly from an archive file (call gcexportdata.NewReader first to extract export data)", path) + } + + // The App Engine Go runtime v1.6 uses the old export data format. + // TODO(adonovan): delete once v1.7 has been around for a while. + if bytes.HasPrefix(data, []byte("package ")) { + return gcimporter.ImportData(imports, path, path, bytes.NewReader(data)) + } + + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path) + return pkg, err + } + + _, pkg, err := gcimporter.BImportData(fset, imports, data, path) + return pkg, err +} + +// Write writes encoded type information for the specified package to out. +// The FileSet provides file position information for named objects. +func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { + b, err := gcimporter.BExportData(fset, pkg) + if err != nil { + return err + } + _, err = out.Write(b) + return err +} diff --git a/internal/gcexportdata/gcexportdata_test.go b/internal/gcexportdata/gcexportdata_test.go new file mode 100644 index 00000000..69133db9 --- /dev/null +++ b/internal/gcexportdata/gcexportdata_test.go @@ -0,0 +1,41 @@ +package gcexportdata_test + +import ( + "go/token" + "go/types" + "log" + "os" + "testing" + + "golang.org/x/tools/go/gcexportdata" +) + +// Test to ensure that gcexportdata can read files produced by App +// Engine Go runtime v1.6. +func TestAppEngine16(t *testing.T) { + // Open and read the file. + f, err := os.Open("testdata/errors-ae16.a") + if err != nil { + t.Fatal(err) + } + defer f.Close() + r, err := gcexportdata.NewReader(f) + if err != nil { + log.Fatalf("reading export data: %v", err) + } + + // Decode the export data. + fset := token.NewFileSet() + imports := make(map[string]*types.Package) + pkg, err := gcexportdata.Read(r, fset, imports, "errors") + if err != nil { + log.Fatal(err) + } + + // Print package information. + got := pkg.Scope().Lookup("New").Type().String() + want := "func(text string) error" + if got != want { + t.Errorf("New.Type = %s, want %s", got, want) + } +} diff --git a/internal/gcexportdata/importer.go b/internal/gcexportdata/importer.go new file mode 100644 index 00000000..efe221e7 --- /dev/null +++ b/internal/gcexportdata/importer.go @@ -0,0 +1,73 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gcexportdata + +import ( + "fmt" + "go/token" + "go/types" + "os" +) + +// NewImporter returns a new instance of the types.Importer interface +// that reads type information from export data files written by gc. +// The Importer also satisfies types.ImporterFrom. +// +// Export data files are located using "go build" workspace conventions +// and the build.Default context. +// +// Use this importer instead of go/importer.For("gc", ...) to avoid the +// version-skew problems described in the documentation of this package, +// or to control the FileSet or access the imports map populated during +// package loading. +// +func NewImporter(fset *token.FileSet, imports map[string]*types.Package) types.ImporterFrom { + return importer{fset, imports} +} + +type importer struct { + fset *token.FileSet + imports map[string]*types.Package +} + +func (imp importer) Import(importPath string) (*types.Package, error) { + return imp.ImportFrom(importPath, "", 0) +} + +func (imp importer) ImportFrom(importPath, srcDir string, mode types.ImportMode) (_ *types.Package, err error) { + filename, path := Find(importPath, srcDir) + if filename == "" { + if importPath == "unsafe" { + // Even for unsafe, call Find first in case + // the package was vendored. + return types.Unsafe, nil + } + return nil, fmt.Errorf("can't find import: %s", importPath) + } + + if pkg, ok := imp.imports[path]; ok && pkg.Complete() { + return pkg, nil // cache hit + } + + // open file + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer func() { + f.Close() + if err != nil { + // add file name to error + err = fmt.Errorf("reading export data: %s: %v", filename, err) + } + }() + + r, err := NewReader(f) + if err != nil { + return nil, err + } + + return Read(r, imp.fset, imp.imports, path) +} diff --git a/internal/gcexportdata/main.go b/internal/gcexportdata/main.go new file mode 100644 index 00000000..2713dce6 --- /dev/null +++ b/internal/gcexportdata/main.go @@ -0,0 +1,99 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// The gcexportdata command is a diagnostic tool that displays the +// contents of gc export data files. +package main + +import ( + "flag" + "fmt" + "go/token" + "go/types" + "log" + "os" + + "golang.org/x/tools/go/gcexportdata" + "golang.org/x/tools/go/types/typeutil" +) + +var packageFlag = flag.String("package", "", "alternative package to print") + +func main() { + log.SetPrefix("gcexportdata: ") + log.SetFlags(0) + flag.Usage = func() { + fmt.Fprintln(os.Stderr, "usage: gcexportdata [-package path] file.a") + } + flag.Parse() + if flag.NArg() != 1 { + flag.Usage() + os.Exit(2) + } + filename := flag.Args()[0] + + f, err := os.Open(filename) + if err != nil { + log.Fatal(err) + } + + r, err := gcexportdata.NewReader(f) + if err != nil { + log.Fatalf("%s: %s", filename, err) + } + + // Decode the package. + const primary = "" + imports := make(map[string]*types.Package) + fset := token.NewFileSet() + pkg, err := gcexportdata.Read(r, fset, imports, primary) + if err != nil { + log.Fatalf("%s: %s", filename, err) + } + + // Optionally select an indirectly mentioned package. + if *packageFlag != "" { + pkg = imports[*packageFlag] + if pkg == nil { + fmt.Fprintf(os.Stderr, "export data file %s does not mention %s; has:\n", + filename, *packageFlag) + for p := range imports { + if p != primary { + fmt.Fprintf(os.Stderr, "\t%s\n", p) + } + } + os.Exit(1) + } + } + + // Print all package-level declarations, including non-exported ones. + fmt.Printf("package %s\n", pkg.Name()) + for _, imp := range pkg.Imports() { + fmt.Printf("import %q\n", imp.Path()) + } + qual := func(p *types.Package) string { + if pkg == p { + return "" + } + return p.Name() + } + scope := pkg.Scope() + for _, name := range scope.Names() { + obj := scope.Lookup(name) + fmt.Printf("%s: %s\n", + fset.Position(obj.Pos()), + types.ObjectString(obj, qual)) + + // For types, print each method. + if _, ok := obj.(*types.TypeName); ok { + for _, method := range typeutil.IntuitiveMethodSet(obj.Type(), nil) { + fmt.Printf("%s: %s\n", + fset.Position(method.Obj().Pos()), + types.SelectionString(method, qual)) + } + } + } +} diff --git a/internal/gcimporter/bexport.go b/internal/gcimporter/bexport.go new file mode 100644 index 00000000..a807d0aa --- /dev/null +++ b/internal/gcimporter/bexport.go @@ -0,0 +1,852 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Binary package export. +// This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go; +// see that file for specification of the format. + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "fmt" + "go/ast" + "go/constant" + "go/token" + "go/types" + "math" + "math/big" + "sort" + "strings" +) + +// If debugFormat is set, each integer and string value is preceded by a marker +// and position information in the encoding. This mechanism permits an importer +// to recognize immediately when it is out of sync. The importer recognizes this +// mode automatically (i.e., it can import export data produced with debugging +// support even if debugFormat is not set at the time of import). This mode will +// lead to massively larger export data (by a factor of 2 to 3) and should only +// be enabled during development and debugging. +// +// NOTE: This flag is the first flag to enable if importing dies because of +// (suspected) format errors, and whenever a change is made to the format. +const debugFormat = false // default: false + +// If trace is set, debugging output is printed to std out. +const trace = false // default: false + +// Current export format version. Increase with each format change. +// Note: The latest binary (non-indexed) export format is at version 6. +// This exporter is still at level 4, but it doesn't matter since +// the binary importer can handle older versions just fine. +// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE +// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE +// 4: type name objects support type aliases, uses aliasTag +// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used) +// 2: removed unused bool in ODCL export (compiler only) +// 1: header format change (more regular), export package for _ struct fields +// 0: Go1.7 encoding +const exportVersion = 4 + +// trackAllTypes enables cycle tracking for all types, not just named +// types. The existing compiler invariants assume that unnamed types +// that are not completely set up are not used, or else there are spurious +// errors. +// If disabled, only named types are tracked, possibly leading to slightly +// less efficient encoding in rare cases. It also prevents the export of +// some corner-case type declarations (but those are not handled correctly +// with with the textual export format either). +// TODO(gri) enable and remove once issues caused by it are fixed +const trackAllTypes = false + +type exporter struct { + fset *token.FileSet + out bytes.Buffer + + // object -> index maps, indexed in order of serialization + strIndex map[string]int + pkgIndex map[*types.Package]int + typIndex map[types.Type]int + + // position encoding + posInfoFormat bool + prevFile string + prevLine int + + // debugging support + written int // bytes written + indent int // for trace +} + +// internalError represents an error generated inside this package. +type internalError string + +func (e internalError) Error() string { return "gcimporter: " + string(e) } + +func internalErrorf(format string, args ...interface{}) error { + return internalError(fmt.Sprintf(format, args...)) +} + +// BExportData returns binary export data for pkg. +// If no file set is provided, position info will be missing. +func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { + defer func() { + if e := recover(); e != nil { + if ierr, ok := e.(internalError); ok { + err = ierr + return + } + // Not an internal error; panic again. + panic(e) + } + }() + + p := exporter{ + fset: fset, + strIndex: map[string]int{"": 0}, // empty string is mapped to 0 + pkgIndex: make(map[*types.Package]int), + typIndex: make(map[types.Type]int), + posInfoFormat: true, // TODO(gri) might become a flag, eventually + } + + // write version info + // The version string must start with "version %d" where %d is the version + // number. Additional debugging information may follow after a blank; that + // text is ignored by the importer. + p.rawStringln(fmt.Sprintf("version %d", exportVersion)) + var debug string + if debugFormat { + debug = "debug" + } + p.rawStringln(debug) // cannot use p.bool since it's affected by debugFormat; also want to see this clearly + p.bool(trackAllTypes) + p.bool(p.posInfoFormat) + + // --- generic export data --- + + // populate type map with predeclared "known" types + for index, typ := range predeclared() { + p.typIndex[typ] = index + } + if len(p.typIndex) != len(predeclared()) { + return nil, internalError("duplicate entries in type map?") + } + + // write package data + p.pkg(pkg, true) + if trace { + p.tracef("\n") + } + + // write objects + objcount := 0 + scope := pkg.Scope() + for _, name := range scope.Names() { + if !ast.IsExported(name) { + continue + } + if trace { + p.tracef("\n") + } + p.obj(scope.Lookup(name)) + objcount++ + } + + // indicate end of list + if trace { + p.tracef("\n") + } + p.tag(endTag) + + // for self-verification only (redundant) + p.int(objcount) + + if trace { + p.tracef("\n") + } + + // --- end of export data --- + + return p.out.Bytes(), nil +} + +func (p *exporter) pkg(pkg *types.Package, emptypath bool) { + if pkg == nil { + panic(internalError("unexpected nil pkg")) + } + + // if we saw the package before, write its index (>= 0) + if i, ok := p.pkgIndex[pkg]; ok { + p.index('P', i) + return + } + + // otherwise, remember the package, write the package tag (< 0) and package data + if trace { + p.tracef("P%d = { ", len(p.pkgIndex)) + defer p.tracef("} ") + } + p.pkgIndex[pkg] = len(p.pkgIndex) + + p.tag(packageTag) + p.string(pkg.Name()) + if emptypath { + p.string("") + } else { + p.string(pkg.Path()) + } +} + +func (p *exporter) obj(obj types.Object) { + switch obj := obj.(type) { + case *types.Const: + p.tag(constTag) + p.pos(obj) + p.qualifiedName(obj) + p.typ(obj.Type()) + p.value(obj.Val()) + + case *types.TypeName: + if obj.IsAlias() { + p.tag(aliasTag) + p.pos(obj) + p.qualifiedName(obj) + } else { + p.tag(typeTag) + } + p.typ(obj.Type()) + + case *types.Var: + p.tag(varTag) + p.pos(obj) + p.qualifiedName(obj) + p.typ(obj.Type()) + + case *types.Func: + p.tag(funcTag) + p.pos(obj) + p.qualifiedName(obj) + sig := obj.Type().(*types.Signature) + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) + + default: + panic(internalErrorf("unexpected object %v (%T)", obj, obj)) + } +} + +func (p *exporter) pos(obj types.Object) { + if !p.posInfoFormat { + return + } + + file, line := p.fileLine(obj) + if file == p.prevFile { + // common case: write line delta + // delta == 0 means different file or no line change + delta := line - p.prevLine + p.int(delta) + if delta == 0 { + p.int(-1) // -1 means no file change + } + } else { + // different file + p.int(0) + // Encode filename as length of common prefix with previous + // filename, followed by (possibly empty) suffix. Filenames + // frequently share path prefixes, so this can save a lot + // of space and make export data size less dependent on file + // path length. The suffix is unlikely to be empty because + // file names tend to end in ".go". + n := commonPrefixLen(p.prevFile, file) + p.int(n) // n >= 0 + p.string(file[n:]) // write suffix only + p.prevFile = file + p.int(line) + } + p.prevLine = line +} + +func (p *exporter) fileLine(obj types.Object) (file string, line int) { + if p.fset != nil { + pos := p.fset.Position(obj.Pos()) + file = pos.Filename + line = pos.Line + } + return +} + +func commonPrefixLen(a, b string) int { + if len(a) > len(b) { + a, b = b, a + } + // len(a) <= len(b) + i := 0 + for i < len(a) && a[i] == b[i] { + i++ + } + return i +} + +func (p *exporter) qualifiedName(obj types.Object) { + p.string(obj.Name()) + p.pkg(obj.Pkg(), false) +} + +func (p *exporter) typ(t types.Type) { + if t == nil { + panic(internalError("nil type")) + } + + // Possible optimization: Anonymous pointer types *T where + // T is a named type are common. We could canonicalize all + // such types *T to a single type PT = *T. This would lead + // to at most one *T entry in typIndex, and all future *T's + // would be encoded as the respective index directly. Would + // save 1 byte (pointerTag) per *T and reduce the typIndex + // size (at the cost of a canonicalization map). We can do + // this later, without encoding format change. + + // if we saw the type before, write its index (>= 0) + if i, ok := p.typIndex[t]; ok { + p.index('T', i) + return + } + + // otherwise, remember the type, write the type tag (< 0) and type data + if trackAllTypes { + if trace { + p.tracef("T%d = {>\n", len(p.typIndex)) + defer p.tracef("<\n} ") + } + p.typIndex[t] = len(p.typIndex) + } + + switch t := t.(type) { + case *types.Named: + if !trackAllTypes { + // if we don't track all types, track named types now + p.typIndex[t] = len(p.typIndex) + } + + p.tag(namedTag) + p.pos(t.Obj()) + p.qualifiedName(t.Obj()) + p.typ(t.Underlying()) + if !types.IsInterface(t) { + p.assocMethods(t) + } + + case *types.Array: + p.tag(arrayTag) + p.int64(t.Len()) + p.typ(t.Elem()) + + case *types.Slice: + p.tag(sliceTag) + p.typ(t.Elem()) + + case *dddSlice: + p.tag(dddTag) + p.typ(t.elem) + + case *types.Struct: + p.tag(structTag) + p.fieldList(t) + + case *types.Pointer: + p.tag(pointerTag) + p.typ(t.Elem()) + + case *types.Signature: + p.tag(signatureTag) + p.paramList(t.Params(), t.Variadic()) + p.paramList(t.Results(), false) + + case *types.Interface: + p.tag(interfaceTag) + p.iface(t) + + case *types.Map: + p.tag(mapTag) + p.typ(t.Key()) + p.typ(t.Elem()) + + case *types.Chan: + p.tag(chanTag) + p.int(int(3 - t.Dir())) // hack + p.typ(t.Elem()) + + default: + panic(internalErrorf("unexpected type %T: %s", t, t)) + } +} + +func (p *exporter) assocMethods(named *types.Named) { + // Sort methods (for determinism). + var methods []*types.Func + for i := 0; i < named.NumMethods(); i++ { + methods = append(methods, named.Method(i)) + } + sort.Sort(methodsByName(methods)) + + p.int(len(methods)) + + if trace && methods != nil { + p.tracef("associated methods {>\n") + } + + for i, m := range methods { + if trace && i > 0 { + p.tracef("\n") + } + + p.pos(m) + name := m.Name() + p.string(name) + if !exported(name) { + p.pkg(m.Pkg(), false) + } + + sig := m.Type().(*types.Signature) + p.paramList(types.NewTuple(sig.Recv()), false) + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) + p.int(0) // dummy value for go:nointerface pragma - ignored by importer + } + + if trace && methods != nil { + p.tracef("<\n} ") + } +} + +type methodsByName []*types.Func + +func (x methodsByName) Len() int { return len(x) } +func (x methodsByName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } +func (x methodsByName) Less(i, j int) bool { return x[i].Name() < x[j].Name() } + +func (p *exporter) fieldList(t *types.Struct) { + if trace && t.NumFields() > 0 { + p.tracef("fields {>\n") + defer p.tracef("<\n} ") + } + + p.int(t.NumFields()) + for i := 0; i < t.NumFields(); i++ { + if trace && i > 0 { + p.tracef("\n") + } + p.field(t.Field(i)) + p.string(t.Tag(i)) + } +} + +func (p *exporter) field(f *types.Var) { + if !f.IsField() { + panic(internalError("field expected")) + } + + p.pos(f) + p.fieldName(f) + p.typ(f.Type()) +} + +func (p *exporter) iface(t *types.Interface) { + // TODO(gri): enable importer to load embedded interfaces, + // then emit Embeddeds and ExplicitMethods separately here. + p.int(0) + + n := t.NumMethods() + if trace && n > 0 { + p.tracef("methods {>\n") + defer p.tracef("<\n} ") + } + p.int(n) + for i := 0; i < n; i++ { + if trace && i > 0 { + p.tracef("\n") + } + p.method(t.Method(i)) + } +} + +func (p *exporter) method(m *types.Func) { + sig := m.Type().(*types.Signature) + if sig.Recv() == nil { + panic(internalError("method expected")) + } + + p.pos(m) + p.string(m.Name()) + if m.Name() != "_" && !ast.IsExported(m.Name()) { + p.pkg(m.Pkg(), false) + } + + // interface method; no need to encode receiver. + p.paramList(sig.Params(), sig.Variadic()) + p.paramList(sig.Results(), false) +} + +func (p *exporter) fieldName(f *types.Var) { + name := f.Name() + + if f.Anonymous() { + // anonymous field - we distinguish between 3 cases: + // 1) field name matches base type name and is exported + // 2) field name matches base type name and is not exported + // 3) field name doesn't match base type name (alias name) + bname := basetypeName(f.Type()) + if name == bname { + if ast.IsExported(name) { + name = "" // 1) we don't need to know the field name or package + } else { + name = "?" // 2) use unexported name "?" to force package export + } + } else { + // 3) indicate alias and export name as is + // (this requires an extra "@" but this is a rare case) + p.string("@") + } + } + + p.string(name) + if name != "" && !ast.IsExported(name) { + p.pkg(f.Pkg(), false) + } +} + +func basetypeName(typ types.Type) string { + switch typ := deref(typ).(type) { + case *types.Basic: + return typ.Name() + case *types.Named: + return typ.Obj().Name() + default: + return "" // unnamed type + } +} + +func (p *exporter) paramList(params *types.Tuple, variadic bool) { + // use negative length to indicate unnamed parameters + // (look at the first parameter only since either all + // names are present or all are absent) + n := params.Len() + if n > 0 && params.At(0).Name() == "" { + n = -n + } + p.int(n) + for i := 0; i < params.Len(); i++ { + q := params.At(i) + t := q.Type() + if variadic && i == params.Len()-1 { + t = &dddSlice{t.(*types.Slice).Elem()} + } + p.typ(t) + if n > 0 { + name := q.Name() + p.string(name) + if name != "_" { + p.pkg(q.Pkg(), false) + } + } + p.string("") // no compiler-specific info + } +} + +func (p *exporter) value(x constant.Value) { + if trace { + p.tracef("= ") + } + + switch x.Kind() { + case constant.Bool: + tag := falseTag + if constant.BoolVal(x) { + tag = trueTag + } + p.tag(tag) + + case constant.Int: + if v, exact := constant.Int64Val(x); exact { + // common case: x fits into an int64 - use compact encoding + p.tag(int64Tag) + p.int64(v) + return + } + // uncommon case: large x - use float encoding + // (powers of 2 will be encoded efficiently with exponent) + p.tag(floatTag) + p.float(constant.ToFloat(x)) + + case constant.Float: + p.tag(floatTag) + p.float(x) + + case constant.Complex: + p.tag(complexTag) + p.float(constant.Real(x)) + p.float(constant.Imag(x)) + + case constant.String: + p.tag(stringTag) + p.string(constant.StringVal(x)) + + case constant.Unknown: + // package contains type errors + p.tag(unknownTag) + + default: + panic(internalErrorf("unexpected value %v (%T)", x, x)) + } +} + +func (p *exporter) float(x constant.Value) { + if x.Kind() != constant.Float { + panic(internalErrorf("unexpected constant %v, want float", x)) + } + // extract sign (there is no -0) + sign := constant.Sign(x) + if sign == 0 { + // x == 0 + p.int(0) + return + } + // x != 0 + + var f big.Float + if v, exact := constant.Float64Val(x); exact { + // float64 + f.SetFloat64(v) + } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { + // TODO(gri): add big.Rat accessor to constant.Value. + r := valueToRat(num) + f.SetRat(r.Quo(r, valueToRat(denom))) + } else { + // Value too large to represent as a fraction => inaccessible. + // TODO(gri): add big.Float accessor to constant.Value. + f.SetFloat64(math.MaxFloat64) // FIXME + } + + // extract exponent such that 0.5 <= m < 1.0 + var m big.Float + exp := f.MantExp(&m) + + // extract mantissa as *big.Int + // - set exponent large enough so mant satisfies mant.IsInt() + // - get *big.Int from mant + m.SetMantExp(&m, int(m.MinPrec())) + mant, acc := m.Int(nil) + if acc != big.Exact { + panic(internalError("internal error")) + } + + p.int(sign) + p.int(exp) + p.string(string(mant.Bytes())) +} + +func valueToRat(x constant.Value) *big.Rat { + // Convert little-endian to big-endian. + // I can't believe this is necessary. + bytes := constant.Bytes(x) + for i := 0; i < len(bytes)/2; i++ { + bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i] + } + return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes)) +} + +func (p *exporter) bool(b bool) bool { + if trace { + p.tracef("[") + defer p.tracef("= %v] ", b) + } + + x := 0 + if b { + x = 1 + } + p.int(x) + return b +} + +// ---------------------------------------------------------------------------- +// Low-level encoders + +func (p *exporter) index(marker byte, index int) { + if index < 0 { + panic(internalError("invalid index < 0")) + } + if debugFormat { + p.marker('t') + } + if trace { + p.tracef("%c%d ", marker, index) + } + p.rawInt64(int64(index)) +} + +func (p *exporter) tag(tag int) { + if tag >= 0 { + panic(internalError("invalid tag >= 0")) + } + if debugFormat { + p.marker('t') + } + if trace { + p.tracef("%s ", tagString[-tag]) + } + p.rawInt64(int64(tag)) +} + +func (p *exporter) int(x int) { + p.int64(int64(x)) +} + +func (p *exporter) int64(x int64) { + if debugFormat { + p.marker('i') + } + if trace { + p.tracef("%d ", x) + } + p.rawInt64(x) +} + +func (p *exporter) string(s string) { + if debugFormat { + p.marker('s') + } + if trace { + p.tracef("%q ", s) + } + // if we saw the string before, write its index (>= 0) + // (the empty string is mapped to 0) + if i, ok := p.strIndex[s]; ok { + p.rawInt64(int64(i)) + return + } + // otherwise, remember string and write its negative length and bytes + p.strIndex[s] = len(p.strIndex) + p.rawInt64(-int64(len(s))) + for i := 0; i < len(s); i++ { + p.rawByte(s[i]) + } +} + +// marker emits a marker byte and position information which makes +// it easy for a reader to detect if it is "out of sync". Used for +// debugFormat format only. +func (p *exporter) marker(m byte) { + p.rawByte(m) + // Enable this for help tracking down the location + // of an incorrect marker when running in debugFormat. + if false && trace { + p.tracef("#%d ", p.written) + } + p.rawInt64(int64(p.written)) +} + +// rawInt64 should only be used by low-level encoders. +func (p *exporter) rawInt64(x int64) { + var tmp [binary.MaxVarintLen64]byte + n := binary.PutVarint(tmp[:], x) + for i := 0; i < n; i++ { + p.rawByte(tmp[i]) + } +} + +// rawStringln should only be used to emit the initial version string. +func (p *exporter) rawStringln(s string) { + for i := 0; i < len(s); i++ { + p.rawByte(s[i]) + } + p.rawByte('\n') +} + +// rawByte is the bottleneck interface to write to p.out. +// rawByte escapes b as follows (any encoding does that +// hides '$'): +// +// '$' => '|' 'S' +// '|' => '|' '|' +// +// Necessary so other tools can find the end of the +// export data by searching for "$$". +// rawByte should only be used by low-level encoders. +func (p *exporter) rawByte(b byte) { + switch b { + case '$': + // write '$' as '|' 'S' + b = 'S' + fallthrough + case '|': + // write '|' as '|' '|' + p.out.WriteByte('|') + p.written++ + } + p.out.WriteByte(b) + p.written++ +} + +// tracef is like fmt.Printf but it rewrites the format string +// to take care of indentation. +func (p *exporter) tracef(format string, args ...interface{}) { + if strings.ContainsAny(format, "<>\n") { + var buf bytes.Buffer + for i := 0; i < len(format); i++ { + // no need to deal with runes + ch := format[i] + switch ch { + case '>': + p.indent++ + continue + case '<': + p.indent-- + continue + } + buf.WriteByte(ch) + if ch == '\n' { + for j := p.indent; j > 0; j-- { + buf.WriteString(". ") + } + } + } + format = buf.String() + } + fmt.Printf(format, args...) +} + +// Debugging support. +// (tagString is only used when tracing is enabled) +var tagString = [...]string{ + // Packages + -packageTag: "package", + + // Types + -namedTag: "named type", + -arrayTag: "array", + -sliceTag: "slice", + -dddTag: "ddd", + -structTag: "struct", + -pointerTag: "pointer", + -signatureTag: "signature", + -interfaceTag: "interface", + -mapTag: "map", + -chanTag: "chan", + + // Values + -falseTag: "false", + -trueTag: "true", + -int64Tag: "int64", + -floatTag: "float", + -fractionTag: "fraction", + -complexTag: "complex", + -stringTag: "string", + -unknownTag: "unknown", + + // Type aliases + -aliasTag: "alias", +} diff --git a/internal/gcimporter/bexport_test.go b/internal/gcimporter/bexport_test.go new file mode 100644 index 00000000..89870b1a --- /dev/null +++ b/internal/gcimporter/bexport_test.go @@ -0,0 +1,419 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gcimporter_test + +import ( + "fmt" + "go/ast" + "go/build" + "go/constant" + "go/parser" + "go/token" + "go/types" + "reflect" + "runtime" + "strings" + "testing" + + "golang.org/x/tools/go/buildutil" + "golang.org/x/tools/go/internal/gcimporter" + "golang.org/x/tools/go/loader" +) + +var isRace = false + +func TestBExportData_stdlib(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo standard library is inaccessible") + } + if runtime.GOOS == "android" { + t.Skipf("incomplete std lib on %s", runtime.GOOS) + } + if isRace { + t.Skipf("stdlib tests take too long in race mode and flake on builders") + } + + // Load, parse and type-check the program. + ctxt := build.Default // copy + ctxt.GOPATH = "" // disable GOPATH + conf := loader.Config{ + Build: &ctxt, + AllowErrors: true, + } + for _, path := range buildutil.AllPackages(conf.Build) { + conf.Import(path) + } + + // Create a package containing type and value errors to ensure + // they are properly encoded/decoded. + f, err := conf.ParseFile("haserrors/haserrors.go", `package haserrors +const UnknownValue = "" + 0 +type UnknownType undefined +`) + if err != nil { + t.Fatal(err) + } + conf.CreateFromFiles("haserrors", f) + + prog, err := conf.Load() + if err != nil { + t.Fatalf("Load failed: %v", err) + } + + numPkgs := len(prog.AllPackages) + if want := 248; numPkgs < want { + t.Errorf("Loaded only %d packages, want at least %d", numPkgs, want) + } + + for pkg, info := range prog.AllPackages { + if info.Files == nil { + continue // empty directory + } + exportdata, err := gcimporter.BExportData(conf.Fset, pkg) + if err != nil { + t.Fatal(err) + } + + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + n, pkg2, err := gcimporter.BImportData(fset2, imports, exportdata, pkg.Path()) + if err != nil { + t.Errorf("BImportData(%s): %v", pkg.Path(), err) + continue + } + if n != len(exportdata) { + t.Errorf("BImportData(%s) decoded %d bytes, want %d", + pkg.Path(), n, len(exportdata)) + } + + // Compare the packages' corresponding members. + for _, name := range pkg.Scope().Names() { + if !ast.IsExported(name) { + continue + } + obj1 := pkg.Scope().Lookup(name) + obj2 := pkg2.Scope().Lookup(name) + if obj2 == nil { + t.Errorf("%s.%s not found, want %s", pkg.Path(), name, obj1) + continue + } + + fl1 := fileLine(conf.Fset, obj1) + fl2 := fileLine(fset2, obj2) + if fl1 != fl2 { + t.Errorf("%s.%s: got posn %s, want %s", + pkg.Path(), name, fl2, fl1) + } + + if err := equalObj(obj1, obj2); err != nil { + t.Errorf("%s.%s: %s\ngot: %s\nwant: %s", + pkg.Path(), name, err, obj2, obj1) + } + } + } +} + +func fileLine(fset *token.FileSet, obj types.Object) string { + posn := fset.Position(obj.Pos()) + return fmt.Sprintf("%s:%d", posn.Filename, posn.Line) +} + +// equalObj reports how x and y differ. They are assumed to belong to +// different universes so cannot be compared directly. +func equalObj(x, y types.Object) error { + if reflect.TypeOf(x) != reflect.TypeOf(y) { + return fmt.Errorf("%T vs %T", x, y) + } + xt := x.Type() + yt := y.Type() + switch x.(type) { + case *types.Var, *types.Func: + // ok + case *types.Const: + xval := x.(*types.Const).Val() + yval := y.(*types.Const).Val() + // Use string comparison for floating-point values since rounding is permitted. + if constant.Compare(xval, token.NEQ, yval) && + !(xval.Kind() == constant.Float && xval.String() == yval.String()) { + return fmt.Errorf("unequal constants %s vs %s", xval, yval) + } + case *types.TypeName: + xt = xt.Underlying() + yt = yt.Underlying() + default: + return fmt.Errorf("unexpected %T", x) + } + return equalType(xt, yt) +} + +func equalType(x, y types.Type) error { + if reflect.TypeOf(x) != reflect.TypeOf(y) { + return fmt.Errorf("unequal kinds: %T vs %T", x, y) + } + switch x := x.(type) { + case *types.Interface: + y := y.(*types.Interface) + // TODO(gri): enable separate emission of Embedded interfaces + // and ExplicitMethods then use this logic. + // if x.NumEmbeddeds() != y.NumEmbeddeds() { + // return fmt.Errorf("unequal number of embedded interfaces: %d vs %d", + // x.NumEmbeddeds(), y.NumEmbeddeds()) + // } + // for i := 0; i < x.NumEmbeddeds(); i++ { + // xi := x.Embedded(i) + // yi := y.Embedded(i) + // if xi.String() != yi.String() { + // return fmt.Errorf("mismatched %th embedded interface: %s vs %s", + // i, xi, yi) + // } + // } + // if x.NumExplicitMethods() != y.NumExplicitMethods() { + // return fmt.Errorf("unequal methods: %d vs %d", + // x.NumExplicitMethods(), y.NumExplicitMethods()) + // } + // for i := 0; i < x.NumExplicitMethods(); i++ { + // xm := x.ExplicitMethod(i) + // ym := y.ExplicitMethod(i) + // if xm.Name() != ym.Name() { + // return fmt.Errorf("mismatched %th method: %s vs %s", i, xm, ym) + // } + // if err := equalType(xm.Type(), ym.Type()); err != nil { + // return fmt.Errorf("mismatched %s method: %s", xm.Name(), err) + // } + // } + if x.NumMethods() != y.NumMethods() { + return fmt.Errorf("unequal methods: %d vs %d", + x.NumMethods(), y.NumMethods()) + } + for i := 0; i < x.NumMethods(); i++ { + xm := x.Method(i) + ym := y.Method(i) + if xm.Name() != ym.Name() { + return fmt.Errorf("mismatched %dth method: %s vs %s", i, xm, ym) + } + if err := equalType(xm.Type(), ym.Type()); err != nil { + return fmt.Errorf("mismatched %s method: %s", xm.Name(), err) + } + } + case *types.Array: + y := y.(*types.Array) + if x.Len() != y.Len() { + return fmt.Errorf("unequal array lengths: %d vs %d", x.Len(), y.Len()) + } + if err := equalType(x.Elem(), y.Elem()); err != nil { + return fmt.Errorf("array elements: %s", err) + } + case *types.Basic: + y := y.(*types.Basic) + if x.Kind() != y.Kind() { + return fmt.Errorf("unequal basic types: %s vs %s", x, y) + } + case *types.Chan: + y := y.(*types.Chan) + if x.Dir() != y.Dir() { + return fmt.Errorf("unequal channel directions: %d vs %d", x.Dir(), y.Dir()) + } + if err := equalType(x.Elem(), y.Elem()); err != nil { + return fmt.Errorf("channel elements: %s", err) + } + case *types.Map: + y := y.(*types.Map) + if err := equalType(x.Key(), y.Key()); err != nil { + return fmt.Errorf("map keys: %s", err) + } + if err := equalType(x.Elem(), y.Elem()); err != nil { + return fmt.Errorf("map values: %s", err) + } + case *types.Named: + y := y.(*types.Named) + if x.String() != y.String() { + return fmt.Errorf("unequal named types: %s vs %s", x, y) + } + case *types.Pointer: + y := y.(*types.Pointer) + if err := equalType(x.Elem(), y.Elem()); err != nil { + return fmt.Errorf("pointer elements: %s", err) + } + case *types.Signature: + y := y.(*types.Signature) + if err := equalType(x.Params(), y.Params()); err != nil { + return fmt.Errorf("parameters: %s", err) + } + if err := equalType(x.Results(), y.Results()); err != nil { + return fmt.Errorf("results: %s", err) + } + if x.Variadic() != y.Variadic() { + return fmt.Errorf("unequal varidicity: %t vs %t", + x.Variadic(), y.Variadic()) + } + if (x.Recv() != nil) != (y.Recv() != nil) { + return fmt.Errorf("unequal receivers: %s vs %s", x.Recv(), y.Recv()) + } + if x.Recv() != nil { + // TODO(adonovan): fix: this assertion fires for interface methods. + // The type of the receiver of an interface method is a named type + // if the Package was loaded from export data, or an unnamed (interface) + // type if the Package was produced by type-checking ASTs. + // if err := equalType(x.Recv().Type(), y.Recv().Type()); err != nil { + // return fmt.Errorf("receiver: %s", err) + // } + } + case *types.Slice: + y := y.(*types.Slice) + if err := equalType(x.Elem(), y.Elem()); err != nil { + return fmt.Errorf("slice elements: %s", err) + } + case *types.Struct: + y := y.(*types.Struct) + if x.NumFields() != y.NumFields() { + return fmt.Errorf("unequal struct fields: %d vs %d", + x.NumFields(), y.NumFields()) + } + for i := 0; i < x.NumFields(); i++ { + xf := x.Field(i) + yf := y.Field(i) + if xf.Name() != yf.Name() { + return fmt.Errorf("mismatched fields: %s vs %s", xf, yf) + } + if err := equalType(xf.Type(), yf.Type()); err != nil { + return fmt.Errorf("struct field %s: %s", xf.Name(), err) + } + if x.Tag(i) != y.Tag(i) { + return fmt.Errorf("struct field %s has unequal tags: %q vs %q", + xf.Name(), x.Tag(i), y.Tag(i)) + } + } + case *types.Tuple: + y := y.(*types.Tuple) + if x.Len() != y.Len() { + return fmt.Errorf("unequal tuple lengths: %d vs %d", x.Len(), y.Len()) + } + for i := 0; i < x.Len(); i++ { + if err := equalType(x.At(i).Type(), y.At(i).Type()); err != nil { + return fmt.Errorf("tuple element %d: %s", i, err) + } + } + } + return nil +} + +// TestVeryLongFile tests the position of an import object declared in +// a very long input file. Line numbers greater than maxlines are +// reported as line 1, not garbage or token.NoPos. +func TestVeryLongFile(t *testing.T) { + // parse and typecheck + longFile := "package foo" + strings.Repeat("\n", 123456) + "var X int" + fset1 := token.NewFileSet() + f, err := parser.ParseFile(fset1, "foo.go", longFile, 0) + if err != nil { + t.Fatal(err) + } + var conf types.Config + pkg, err := conf.Check("foo", fset1, []*ast.File{f}, nil) + if err != nil { + t.Fatal(err) + } + + // export + exportdata, err := gcimporter.BExportData(fset1, pkg) + if err != nil { + t.Fatal(err) + } + + // import + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + _, pkg2, err := gcimporter.BImportData(fset2, imports, exportdata, pkg.Path()) + if err != nil { + t.Fatalf("BImportData(%s): %v", pkg.Path(), err) + } + + // compare + posn1 := fset1.Position(pkg.Scope().Lookup("X").Pos()) + posn2 := fset2.Position(pkg2.Scope().Lookup("X").Pos()) + if want := "foo.go:1:1"; posn2.String() != want { + t.Errorf("X position = %s, want %s (orig was %s)", + posn2, want, posn1) + } +} + +const src = ` +package p + +type ( + T0 = int32 + T1 = struct{} + T2 = struct{ T1 } + Invalid = foo // foo is undeclared +) +` + +func checkPkg(t *testing.T, pkg *types.Package, label string) { + T1 := types.NewStruct(nil, nil) + T2 := types.NewStruct([]*types.Var{types.NewField(0, pkg, "T1", T1, true)}, nil) + + for _, test := range []struct { + name string + typ types.Type + }{ + {"T0", types.Typ[types.Int32]}, + {"T1", T1}, + {"T2", T2}, + {"Invalid", types.Typ[types.Invalid]}, + } { + obj := pkg.Scope().Lookup(test.name) + if obj == nil { + t.Errorf("%s: %s not found", label, test.name) + continue + } + tname, _ := obj.(*types.TypeName) + if tname == nil { + t.Errorf("%s: %v not a type name", label, obj) + continue + } + if !tname.IsAlias() { + t.Errorf("%s: %v: not marked as alias", label, tname) + continue + } + if got := tname.Type(); !types.Identical(got, test.typ) { + t.Errorf("%s: %v: got %v; want %v", label, tname, got, test.typ) + } + } +} + +func TestTypeAliases(t *testing.T) { + // parse and typecheck + fset1 := token.NewFileSet() + f, err := parser.ParseFile(fset1, "p.go", src, 0) + if err != nil { + t.Fatal(err) + } + var conf types.Config + pkg1, err := conf.Check("p", fset1, []*ast.File{f}, nil) + if err == nil { + // foo in undeclared in src; we should see an error + t.Fatal("invalid source type-checked without error") + } + if pkg1 == nil { + // despite incorrect src we should see a (partially) type-checked package + t.Fatal("nil package returned") + } + checkPkg(t, pkg1, "export") + + // export + exportdata, err := gcimporter.BExportData(fset1, pkg1) + if err != nil { + t.Fatal(err) + } + + // import + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + _, pkg2, err := gcimporter.BImportData(fset2, imports, exportdata, pkg1.Path()) + if err != nil { + t.Fatalf("BImportData(%s): %v", pkg1.Path(), err) + } + checkPkg(t, pkg2, "import") +} diff --git a/internal/gcimporter/bimport.go b/internal/gcimporter/bimport.go new file mode 100644 index 00000000..e3c31078 --- /dev/null +++ b/internal/gcimporter/bimport.go @@ -0,0 +1,1036 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go. + +package gcimporter + +import ( + "encoding/binary" + "fmt" + "go/constant" + "go/token" + "go/types" + "sort" + "strconv" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +type importer struct { + imports map[string]*types.Package + data []byte + importpath string + buf []byte // for reading strings + version int // export format version + + // object lists + strList []string // in order of appearance + pathList []string // in order of appearance + pkgList []*types.Package // in order of appearance + typList []types.Type // in order of appearance + interfaceList []*types.Interface // for delayed completion only + trackAllTypes bool + + // position encoding + posInfoFormat bool + prevFile string + prevLine int + fake fakeFileSet + + // debugging support + debugFormat bool + read int // bytes read +} + +// BImportData imports a package from the serialized package data +// and returns the number of bytes consumed and a reference to the package. +// If the export data version is not recognized or the format is otherwise +// compromised, an error is returned. +func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { + // catch panics and return them as errors + const currentVersion = 6 + version := -1 // unknown version + defer func() { + if e := recover(); e != nil { + // Return a (possibly nil or incomplete) package unchanged (see #16088). + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } + } + }() + + p := importer{ + imports: imports, + data: data, + importpath: path, + version: version, + strList: []string{""}, // empty string is mapped to 0 + pathList: []string{""}, // empty string is mapped to 0 + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, + } + + // read version info + var versionstr string + if b := p.rawByte(); b == 'c' || b == 'd' { + // Go1.7 encoding; first byte encodes low-level + // encoding format (compact vs debug). + // For backward-compatibility only (avoid problems with + // old installed packages). Newly compiled packages use + // the extensible format string. + // TODO(gri) Remove this support eventually; after Go1.8. + if b == 'd' { + p.debugFormat = true + } + p.trackAllTypes = p.rawByte() == 'a' + p.posInfoFormat = p.int() != 0 + versionstr = p.string() + if versionstr == "v1" { + version = 0 + } + } else { + // Go1.8 extensible encoding + // read version string and extract version number (ignore anything after the version number) + versionstr = p.rawStringln(b) + if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { + if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { + version = v + } + } + } + p.version = version + + // read version specific flags - extend as necessary + switch p.version { + // case currentVersion: + // ... + // fallthrough + case currentVersion, 5, 4, 3, 2, 1: + p.debugFormat = p.rawStringln(p.rawByte()) == "debug" + p.trackAllTypes = p.int() != 0 + p.posInfoFormat = p.int() != 0 + case 0: + // Go1.7 encoding format - nothing to do here + default: + errorf("unknown bexport format version %d (%q)", p.version, versionstr) + } + + // --- generic export data --- + + // populate typList with predeclared "known" types + p.typList = append(p.typList, predeclared()...) + + // read package data + pkg = p.pkg() + + // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go) + objcount := 0 + for { + tag := p.tagOrIndex() + if tag == endTag { + break + } + p.obj(tag) + objcount++ + } + + // self-verification + if count := p.int(); count != objcount { + errorf("got %d objects; want %d", objcount, count) + } + + // ignore compiler-specific import data + + // complete interfaces + // TODO(gri) re-investigate if we still need to do this in a delayed fashion + for _, typ := range p.interfaceList { + typ.Complete() + } + + // record all referenced packages as imports + list := append(([]*types.Package)(nil), p.pkgList[1:]...) + sort.Sort(byPath(list)) + pkg.SetImports(list) + + // package was imported completely and without errors + pkg.MarkComplete() + + return p.read, pkg, nil +} + +func errorf(format string, args ...interface{}) { + panic(fmt.Sprintf(format, args...)) +} + +func (p *importer) pkg() *types.Package { + // if the package was seen before, i is its index (>= 0) + i := p.tagOrIndex() + if i >= 0 { + return p.pkgList[i] + } + + // otherwise, i is the package tag (< 0) + if i != packageTag { + errorf("unexpected package tag %d version %d", i, p.version) + } + + // read package data + name := p.string() + var path string + if p.version >= 5 { + path = p.path() + } else { + path = p.string() + } + if p.version >= 6 { + p.int() // package height; unused by go/types + } + + // we should never see an empty package name + if name == "" { + errorf("empty package name in import") + } + + // an empty path denotes the package we are currently importing; + // it must be the first package we see + if (path == "") != (len(p.pkgList) == 0) { + errorf("package path %q for pkg index %d", path, len(p.pkgList)) + } + + // if the package was imported before, use that one; otherwise create a new one + if path == "" { + path = p.importpath + } + pkg := p.imports[path] + if pkg == nil { + pkg = types.NewPackage(path, name) + p.imports[path] = pkg + } else if pkg.Name() != name { + errorf("conflicting names %s and %s for package %q", pkg.Name(), name, path) + } + p.pkgList = append(p.pkgList, pkg) + + return pkg +} + +// objTag returns the tag value for each object kind. +func objTag(obj types.Object) int { + switch obj.(type) { + case *types.Const: + return constTag + case *types.TypeName: + return typeTag + case *types.Var: + return varTag + case *types.Func: + return funcTag + default: + errorf("unexpected object: %v (%T)", obj, obj) // panics + panic("unreachable") + } +} + +func sameObj(a, b types.Object) bool { + // Because unnamed types are not canonicalized, we cannot simply compare types for + // (pointer) identity. + // Ideally we'd check equality of constant values as well, but this is good enough. + return objTag(a) == objTag(b) && types.Identical(a.Type(), b.Type()) +} + +func (p *importer) declare(obj types.Object) { + pkg := obj.Pkg() + if alt := pkg.Scope().Insert(obj); alt != nil { + // This can only trigger if we import a (non-type) object a second time. + // Excluding type aliases, this cannot happen because 1) we only import a package + // once; and b) we ignore compiler-specific export data which may contain + // functions whose inlined function bodies refer to other functions that + // were already imported. + // However, type aliases require reexporting the original type, so we need + // to allow it (see also the comment in cmd/compile/internal/gc/bimport.go, + // method importer.obj, switch case importing functions). + // TODO(gri) review/update this comment once the gc compiler handles type aliases. + if !sameObj(obj, alt) { + errorf("inconsistent import:\n\t%v\npreviously imported as:\n\t%v\n", obj, alt) + } + } +} + +func (p *importer) obj(tag int) { + switch tag { + case constTag: + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + val := p.value() + p.declare(types.NewConst(pos, pkg, name, typ, val)) + + case aliasTag: + // TODO(gri) verify type alias hookup is correct + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + p.declare(types.NewTypeName(pos, pkg, name, typ)) + + case typeTag: + p.typ(nil, nil) + + case varTag: + pos := p.pos() + pkg, name := p.qualifiedName() + typ := p.typ(nil, nil) + p.declare(types.NewVar(pos, pkg, name, typ)) + + case funcTag: + pos := p.pos() + pkg, name := p.qualifiedName() + params, isddd := p.paramList() + result, _ := p.paramList() + sig := types.NewSignature(nil, params, result, isddd) + p.declare(types.NewFunc(pos, pkg, name, sig)) + + default: + errorf("unexpected object tag %d", tag) + } +} + +const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go + +func (p *importer) pos() token.Pos { + if !p.posInfoFormat { + return token.NoPos + } + + file := p.prevFile + line := p.prevLine + delta := p.int() + line += delta + if p.version >= 5 { + if delta == deltaNewFile { + if n := p.int(); n >= 0 { + // file changed + file = p.path() + line = n + } + } + } else { + if delta == 0 { + if n := p.int(); n >= 0 { + // file changed + file = p.prevFile[:n] + p.string() + line = p.int() + } + } + } + p.prevFile = file + p.prevLine = line + + return p.fake.pos(file, line) +} + +// Synthesize a token.Pos +type fakeFileSet struct { + fset *token.FileSet + files map[string]*token.File +} + +func (s *fakeFileSet) pos(file string, line int) token.Pos { + // Since we don't know the set of needed file positions, we + // reserve maxlines positions per file. + const maxlines = 64 * 1024 + f := s.files[file] + if f == nil { + f = s.fset.AddFile(file, -1, maxlines) + s.files[file] = f + // Allocate the fake linebreak indices on first use. + // TODO(adonovan): opt: save ~512KB using a more complex scheme? + fakeLinesOnce.Do(func() { + fakeLines = make([]int, maxlines) + for i := range fakeLines { + fakeLines[i] = i + } + }) + f.SetLines(fakeLines) + } + + if line > maxlines { + line = 1 + } + + // Treat the file as if it contained only newlines + // and column=1: use the line number as the offset. + return f.Pos(line - 1) +} + +var ( + fakeLines []int + fakeLinesOnce sync.Once +) + +func (p *importer) qualifiedName() (pkg *types.Package, name string) { + name = p.string() + pkg = p.pkg() + return +} + +func (p *importer) record(t types.Type) { + p.typList = append(p.typList, t) +} + +// A dddSlice is a types.Type representing ...T parameters. +// It only appears for parameter types and does not escape +// the importer. +type dddSlice struct { + elem types.Type +} + +func (t *dddSlice) Underlying() types.Type { return t } +func (t *dddSlice) String() string { return "..." + t.elem.String() } + +// parent is the package which declared the type; parent == nil means +// the package currently imported. The parent package is needed for +// exported struct fields and interface methods which don't contain +// explicit package information in the export data. +// +// A non-nil tname is used as the "owner" of the result type; i.e., +// the result type is the underlying type of tname. tname is used +// to give interface methods a named receiver type where possible. +func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type { + // if the type was seen before, i is its index (>= 0) + i := p.tagOrIndex() + if i >= 0 { + return p.typList[i] + } + + // otherwise, i is the type tag (< 0) + switch i { + case namedTag: + // read type object + pos := p.pos() + parent, name := p.qualifiedName() + scope := parent.Scope() + obj := scope.Lookup(name) + + // if the object doesn't exist yet, create and insert it + if obj == nil { + obj = types.NewTypeName(pos, parent, name, nil) + scope.Insert(obj) + } + + if _, ok := obj.(*types.TypeName); !ok { + errorf("pkg = %s, name = %s => %s", parent, name, obj) + } + + // associate new named type with obj if it doesn't exist yet + t0 := types.NewNamed(obj.(*types.TypeName), nil, nil) + + // but record the existing type, if any + tname := obj.Type().(*types.Named) // tname is either t0 or the existing type + p.record(tname) + + // read underlying type + t0.SetUnderlying(p.typ(parent, t0)) + + // interfaces don't have associated methods + if types.IsInterface(t0) { + return tname + } + + // read associated methods + for i := p.int(); i > 0; i-- { + // TODO(gri) replace this with something closer to fieldName + pos := p.pos() + name := p.string() + if !exported(name) { + p.pkg() + } + + recv, _ := p.paramList() // TODO(gri) do we need a full param list for the receiver? + params, isddd := p.paramList() + result, _ := p.paramList() + p.int() // go:nointerface pragma - discarded + + sig := types.NewSignature(recv.At(0), params, result, isddd) + t0.AddMethod(types.NewFunc(pos, parent, name, sig)) + } + + return tname + + case arrayTag: + t := new(types.Array) + if p.trackAllTypes { + p.record(t) + } + + n := p.int64() + *t = *types.NewArray(p.typ(parent, nil), n) + return t + + case sliceTag: + t := new(types.Slice) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewSlice(p.typ(parent, nil)) + return t + + case dddTag: + t := new(dddSlice) + if p.trackAllTypes { + p.record(t) + } + + t.elem = p.typ(parent, nil) + return t + + case structTag: + t := new(types.Struct) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewStruct(p.fieldList(parent)) + return t + + case pointerTag: + t := new(types.Pointer) + if p.trackAllTypes { + p.record(t) + } + + *t = *types.NewPointer(p.typ(parent, nil)) + return t + + case signatureTag: + t := new(types.Signature) + if p.trackAllTypes { + p.record(t) + } + + params, isddd := p.paramList() + result, _ := p.paramList() + *t = *types.NewSignature(nil, params, result, isddd) + return t + + case interfaceTag: + // Create a dummy entry in the type list. This is safe because we + // cannot expect the interface type to appear in a cycle, as any + // such cycle must contain a named type which would have been + // first defined earlier. + // TODO(gri) Is this still true now that we have type aliases? + // See issue #23225. + n := len(p.typList) + if p.trackAllTypes { + p.record(nil) + } + + var embeddeds []types.Type + for n := p.int(); n > 0; n-- { + p.pos() + embeddeds = append(embeddeds, p.typ(parent, nil)) + } + + t := newInterface(p.methodList(parent, tname), embeddeds) + p.interfaceList = append(p.interfaceList, t) + if p.trackAllTypes { + p.typList[n] = t + } + return t + + case mapTag: + t := new(types.Map) + if p.trackAllTypes { + p.record(t) + } + + key := p.typ(parent, nil) + val := p.typ(parent, nil) + *t = *types.NewMap(key, val) + return t + + case chanTag: + t := new(types.Chan) + if p.trackAllTypes { + p.record(t) + } + + dir := chanDir(p.int()) + val := p.typ(parent, nil) + *t = *types.NewChan(dir, val) + return t + + default: + errorf("unexpected type tag %d", i) // panics + panic("unreachable") + } +} + +func chanDir(d int) types.ChanDir { + // tag values must match the constants in cmd/compile/internal/gc/go.go + switch d { + case 1 /* Crecv */ : + return types.RecvOnly + case 2 /* Csend */ : + return types.SendOnly + case 3 /* Cboth */ : + return types.SendRecv + default: + errorf("unexpected channel dir %d", d) + return 0 + } +} + +func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) { + if n := p.int(); n > 0 { + fields = make([]*types.Var, n) + tags = make([]string, n) + for i := range fields { + fields[i], tags[i] = p.field(parent) + } + } + return +} + +func (p *importer) field(parent *types.Package) (*types.Var, string) { + pos := p.pos() + pkg, name, alias := p.fieldName(parent) + typ := p.typ(parent, nil) + tag := p.string() + + anonymous := false + if name == "" { + // anonymous field - typ must be T or *T and T must be a type name + switch typ := deref(typ).(type) { + case *types.Basic: // basic types are named types + pkg = nil // // objects defined in Universe scope have no package + name = typ.Name() + case *types.Named: + name = typ.Obj().Name() + default: + errorf("named base type expected") + } + anonymous = true + } else if alias { + // anonymous field: we have an explicit name because it's an alias + anonymous = true + } + + return types.NewField(pos, pkg, name, typ, anonymous), tag +} + +func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) { + if n := p.int(); n > 0 { + methods = make([]*types.Func, n) + for i := range methods { + methods[i] = p.method(parent, baseType) + } + } + return +} + +func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func { + pos := p.pos() + pkg, name, _ := p.fieldName(parent) + // If we don't have a baseType, use a nil receiver. + // A receiver using the actual interface type (which + // we don't know yet) will be filled in when we call + // types.Interface.Complete. + var recv *types.Var + if baseType != nil { + recv = types.NewVar(token.NoPos, parent, "", baseType) + } + params, isddd := p.paramList() + result, _ := p.paramList() + sig := types.NewSignature(recv, params, result, isddd) + return types.NewFunc(pos, pkg, name, sig) +} + +func (p *importer) fieldName(parent *types.Package) (pkg *types.Package, name string, alias bool) { + name = p.string() + pkg = parent + if pkg == nil { + // use the imported package instead + pkg = p.pkgList[0] + } + if p.version == 0 && name == "_" { + // version 0 didn't export a package for _ fields + return + } + switch name { + case "": + // 1) field name matches base type name and is exported: nothing to do + case "?": + // 2) field name matches base type name and is not exported: need package + name = "" + pkg = p.pkg() + case "@": + // 3) field name doesn't match type name (alias) + name = p.string() + alias = true + fallthrough + default: + if !exported(name) { + pkg = p.pkg() + } + } + return +} + +func (p *importer) paramList() (*types.Tuple, bool) { + n := p.int() + if n == 0 { + return nil, false + } + // negative length indicates unnamed parameters + named := true + if n < 0 { + n = -n + named = false + } + // n > 0 + params := make([]*types.Var, n) + isddd := false + for i := range params { + params[i], isddd = p.param(named) + } + return types.NewTuple(params...), isddd +} + +func (p *importer) param(named bool) (*types.Var, bool) { + t := p.typ(nil, nil) + td, isddd := t.(*dddSlice) + if isddd { + t = types.NewSlice(td.elem) + } + + var pkg *types.Package + var name string + if named { + name = p.string() + if name == "" { + errorf("expected named parameter") + } + if name != "_" { + pkg = p.pkg() + } + if i := strings.Index(name, "·"); i > 0 { + name = name[:i] // cut off gc-specific parameter numbering + } + } + + // read and discard compiler-specific info + p.string() + + return types.NewVar(token.NoPos, pkg, name, t), isddd +} + +func exported(name string) bool { + ch, _ := utf8.DecodeRuneInString(name) + return unicode.IsUpper(ch) +} + +func (p *importer) value() constant.Value { + switch tag := p.tagOrIndex(); tag { + case falseTag: + return constant.MakeBool(false) + case trueTag: + return constant.MakeBool(true) + case int64Tag: + return constant.MakeInt64(p.int64()) + case floatTag: + return p.float() + case complexTag: + re := p.float() + im := p.float() + return constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + case stringTag: + return constant.MakeString(p.string()) + case unknownTag: + return constant.MakeUnknown() + default: + errorf("unexpected value tag %d", tag) // panics + panic("unreachable") + } +} + +func (p *importer) float() constant.Value { + sign := p.int() + if sign == 0 { + return constant.MakeInt64(0) + } + + exp := p.int() + mant := []byte(p.string()) // big endian + + // remove leading 0's if any + for len(mant) > 0 && mant[0] == 0 { + mant = mant[1:] + } + + // convert to little endian + // TODO(gri) go/constant should have a more direct conversion function + // (e.g., once it supports a big.Float based implementation) + for i, j := 0, len(mant)-1; i < j; i, j = i+1, j-1 { + mant[i], mant[j] = mant[j], mant[i] + } + + // adjust exponent (constant.MakeFromBytes creates an integer value, + // but mant represents the mantissa bits such that 0.5 <= mant < 1.0) + exp -= len(mant) << 3 + if len(mant) > 0 { + for msd := mant[len(mant)-1]; msd&0x80 == 0; msd <<= 1 { + exp++ + } + } + + x := constant.MakeFromBytes(mant) + switch { + case exp < 0: + d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) + x = constant.BinaryOp(x, token.QUO, d) + case exp > 0: + x = constant.Shift(x, token.SHL, uint(exp)) + } + + if sign < 0 { + x = constant.UnaryOp(token.SUB, x, 0) + } + return x +} + +// ---------------------------------------------------------------------------- +// Low-level decoders + +func (p *importer) tagOrIndex() int { + if p.debugFormat { + p.marker('t') + } + + return int(p.rawInt64()) +} + +func (p *importer) int() int { + x := p.int64() + if int64(int(x)) != x { + errorf("exported integer too large") + } + return int(x) +} + +func (p *importer) int64() int64 { + if p.debugFormat { + p.marker('i') + } + + return p.rawInt64() +} + +func (p *importer) path() string { + if p.debugFormat { + p.marker('p') + } + // if the path was seen before, i is its index (>= 0) + // (the empty string is at index 0) + i := p.rawInt64() + if i >= 0 { + return p.pathList[i] + } + // otherwise, i is the negative path length (< 0) + a := make([]string, -i) + for n := range a { + a[n] = p.string() + } + s := strings.Join(a, "/") + p.pathList = append(p.pathList, s) + return s +} + +func (p *importer) string() string { + if p.debugFormat { + p.marker('s') + } + // if the string was seen before, i is its index (>= 0) + // (the empty string is at index 0) + i := p.rawInt64() + if i >= 0 { + return p.strList[i] + } + // otherwise, i is the negative string length (< 0) + if n := int(-i); n <= cap(p.buf) { + p.buf = p.buf[:n] + } else { + p.buf = make([]byte, n) + } + for i := range p.buf { + p.buf[i] = p.rawByte() + } + s := string(p.buf) + p.strList = append(p.strList, s) + return s +} + +func (p *importer) marker(want byte) { + if got := p.rawByte(); got != want { + errorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read) + } + + pos := p.read + if n := int(p.rawInt64()); n != pos { + errorf("incorrect position: got %d; want %d", n, pos) + } +} + +// rawInt64 should only be used by low-level decoders. +func (p *importer) rawInt64() int64 { + i, err := binary.ReadVarint(p) + if err != nil { + errorf("read error: %v", err) + } + return i +} + +// rawStringln should only be used to read the initial version string. +func (p *importer) rawStringln(b byte) string { + p.buf = p.buf[:0] + for b != '\n' { + p.buf = append(p.buf, b) + b = p.rawByte() + } + return string(p.buf) +} + +// needed for binary.ReadVarint in rawInt64 +func (p *importer) ReadByte() (byte, error) { + return p.rawByte(), nil +} + +// byte is the bottleneck interface for reading p.data. +// It unescapes '|' 'S' to '$' and '|' '|' to '|'. +// rawByte should only be used by low-level decoders. +func (p *importer) rawByte() byte { + b := p.data[0] + r := 1 + if b == '|' { + b = p.data[1] + r = 2 + switch b { + case 'S': + b = '$' + case '|': + // nothing to do + default: + errorf("unexpected escape sequence in export data") + } + } + p.data = p.data[r:] + p.read += r + return b + +} + +// ---------------------------------------------------------------------------- +// Export format + +// Tags. Must be < 0. +const ( + // Objects + packageTag = -(iota + 1) + constTag + typeTag + varTag + funcTag + endTag + + // Types + namedTag + arrayTag + sliceTag + dddTag + structTag + pointerTag + signatureTag + interfaceTag + mapTag + chanTag + + // Values + falseTag + trueTag + int64Tag + floatTag + fractionTag // not used by gc + complexTag + stringTag + nilTag // only used by gc (appears in exported inlined function bodies) + unknownTag // not used by gc (only appears in packages with errors) + + // Type aliases + aliasTag +) + +var predecl []types.Type // initialized lazily + +func predeclared() []types.Type { + if predecl == nil { + // initialize lazily to be sure that all + // elements have been initialized before + predecl = []types.Type{ // basic types + types.Typ[types.Bool], + types.Typ[types.Int], + types.Typ[types.Int8], + types.Typ[types.Int16], + types.Typ[types.Int32], + types.Typ[types.Int64], + types.Typ[types.Uint], + types.Typ[types.Uint8], + types.Typ[types.Uint16], + types.Typ[types.Uint32], + types.Typ[types.Uint64], + types.Typ[types.Uintptr], + types.Typ[types.Float32], + types.Typ[types.Float64], + types.Typ[types.Complex64], + types.Typ[types.Complex128], + types.Typ[types.String], + + // basic type aliases + types.Universe.Lookup("byte").Type(), + types.Universe.Lookup("rune").Type(), + + // error + types.Universe.Lookup("error").Type(), + + // untyped types + types.Typ[types.UntypedBool], + types.Typ[types.UntypedInt], + types.Typ[types.UntypedRune], + types.Typ[types.UntypedFloat], + types.Typ[types.UntypedComplex], + types.Typ[types.UntypedString], + types.Typ[types.UntypedNil], + + // package unsafe + types.Typ[types.UnsafePointer], + + // invalid type + types.Typ[types.Invalid], // only appears in packages with errors + + // used internally by gc; never used by this package or in .a files + anyType{}, + } + } + return predecl +} + +type anyType struct{} + +func (t anyType) Underlying() types.Type { return t } +func (t anyType) String() string { return "any" } diff --git a/internal/gcimporter/exportdata.go b/internal/gcimporter/exportdata.go new file mode 100644 index 00000000..f33dc561 --- /dev/null +++ b/internal/gcimporter/exportdata.go @@ -0,0 +1,93 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go. + +// This file implements FindExportData. + +package gcimporter + +import ( + "bufio" + "fmt" + "io" + "strconv" + "strings" +) + +func readGopackHeader(r *bufio.Reader) (name string, size int, err error) { + // See $GOROOT/include/ar.h. + hdr := make([]byte, 16+12+6+6+8+10+2) + _, err = io.ReadFull(r, hdr) + if err != nil { + return + } + // leave for debugging + if false { + fmt.Printf("header: %s", hdr) + } + s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10])) + size, err = strconv.Atoi(s) + if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' { + err = fmt.Errorf("invalid archive header") + return + } + name = strings.TrimSpace(string(hdr[:16])) + return +} + +// FindExportData positions the reader r at the beginning of the +// export data section of an underlying GC-created object/archive +// file by reading from it. The reader must be positioned at the +// start of the file before calling this function. The hdr result +// is the string before the export data, either "$$" or "$$B". +// +func FindExportData(r *bufio.Reader) (hdr string, err error) { + // Read first line to make sure this is an object file. + line, err := r.ReadSlice('\n') + if err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + + if string(line) == "!\n" { + // Archive file. Scan to __.PKGDEF. + var name string + if name, _, err = readGopackHeader(r); err != nil { + return + } + + // First entry should be __.PKGDEF. + if name != "__.PKGDEF" { + err = fmt.Errorf("go archive is missing __.PKGDEF") + return + } + + // Read first line of __.PKGDEF data, so that line + // is once again the first line of the input. + if line, err = r.ReadSlice('\n'); err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + } + + // Now at __.PKGDEF in archive or still at beginning of file. + // Either way, line should begin with "go object ". + if !strings.HasPrefix(string(line), "go object ") { + err = fmt.Errorf("not a Go object file") + return + } + + // Skip over object header to export data. + // Begins after first line starting with $$. + for line[0] != '$' { + if line, err = r.ReadSlice('\n'); err != nil { + err = fmt.Errorf("can't find export data (%v)", err) + return + } + } + hdr = string(line) + + return +} diff --git a/internal/gcimporter/gcimporter.go b/internal/gcimporter/gcimporter.go new file mode 100644 index 00000000..9cf18660 --- /dev/null +++ b/internal/gcimporter/gcimporter.go @@ -0,0 +1,1078 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, +// but it also contains the original source-based importer code for Go1.6. +// Once we stop supporting 1.6, we can remove that code. + +// Package gcimporter provides various functions for reading +// gc-generated object files that can be used to implement the +// Importer interface defined by the Go 1.5 standard library package. +package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" + +import ( + "bufio" + "errors" + "fmt" + "go/build" + "go/constant" + "go/token" + "go/types" + "io" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strconv" + "strings" + "text/scanner" +) + +// debugging/development support +const debug = false + +var pkgExts = [...]string{".a", ".o"} + +// FindPkg returns the filename and unique package id for an import +// path based on package information provided by build.Import (using +// the build.Default build.Context). A relative srcDir is interpreted +// relative to the current working directory. +// If no file was found, an empty filename is returned. +// +func FindPkg(path, srcDir string) (filename, id string) { + if path == "" { + return + } + + var noext string + switch { + default: + // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x" + // Don't require the source files to be present. + if abs, err := filepath.Abs(srcDir); err == nil { // see issue 14282 + srcDir = abs + } + bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary) + if bp.PkgObj == "" { + id = path // make sure we have an id to print in error message + return + } + noext = strings.TrimSuffix(bp.PkgObj, ".a") + id = bp.ImportPath + + case build.IsLocalImport(path): + // "./x" -> "/this/directory/x.ext", "/this/directory/x" + noext = filepath.Join(srcDir, path) + id = noext + + case filepath.IsAbs(path): + // for completeness only - go/build.Import + // does not support absolute imports + // "/x" -> "/x.ext", "/x" + noext = path + id = path + } + + if false { // for debugging + if path != id { + fmt.Printf("%s -> %s\n", path, id) + } + } + + // try extensions + for _, ext := range pkgExts { + filename = noext + ext + if f, err := os.Stat(filename); err == nil && !f.IsDir() { + return + } + } + + filename = "" // not found + return +} + +// ImportData imports a package by reading the gc-generated export data, +// adds the corresponding package object to the packages map indexed by id, +// and returns the object. +// +// The packages map must contains all packages already imported. The data +// reader position must be the beginning of the export data section. The +// filename is only used in error messages. +// +// If packages[id] contains the completely imported package, that package +// can be used directly, and there is no need to call this function (but +// there is also no harm but for extra time used). +// +func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) { + // support for parser error handling + defer func() { + switch r := recover().(type) { + case nil: + // nothing to do + case importError: + err = r + default: + panic(r) // internal error + } + }() + + var p parser + p.init(filename, id, data, packages) + pkg = p.parseExport() + + return +} + +// Import imports a gc-generated package given its import path and srcDir, adds +// the corresponding package object to the packages map, and returns the object. +// The packages map must contain all packages already imported. +// +func Import(packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) { + var rc io.ReadCloser + var filename, id string + if lookup != nil { + // With custom lookup specified, assume that caller has + // converted path to a canonical import path for use in the map. + if path == "unsafe" { + return types.Unsafe, nil + } + id = path + + // No need to re-import if the package was imported completely before. + if pkg = packages[id]; pkg != nil && pkg.Complete() { + return + } + f, err := lookup(path) + if err != nil { + return nil, err + } + rc = f + } else { + filename, id = FindPkg(path, srcDir) + if filename == "" { + if path == "unsafe" { + return types.Unsafe, nil + } + return nil, fmt.Errorf("can't find import: %q", id) + } + + // no need to re-import if the package was imported completely before + if pkg = packages[id]; pkg != nil && pkg.Complete() { + return + } + + // open file + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer func() { + if err != nil { + // add file name to error + err = fmt.Errorf("%s: %v", filename, err) + } + }() + rc = f + } + defer rc.Close() + + var hdr string + buf := bufio.NewReader(rc) + if hdr, err = FindExportData(buf); err != nil { + return + } + + switch hdr { + case "$$\n": + // Work-around if we don't have a filename; happens only if lookup != nil. + // Either way, the filename is only needed for importer error messages, so + // this is fine. + if filename == "" { + filename = path + } + return ImportData(packages, filename, id, buf) + + case "$$B\n": + var data []byte + data, err = ioutil.ReadAll(buf) + if err != nil { + break + } + + // TODO(gri): allow clients of go/importer to provide a FileSet. + // Or, define a new standard go/types/gcexportdata package. + fset := token.NewFileSet() + + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err = IImportData(fset, packages, data[1:], id) + } else { + _, pkg, err = BImportData(fset, packages, data, id) + } + + default: + err = fmt.Errorf("unknown export data header: %q", hdr) + } + + return +} + +// ---------------------------------------------------------------------------- +// Parser + +// TODO(gri) Imported objects don't have position information. +// Ideally use the debug table line info; alternatively +// create some fake position (or the position of the +// import). That way error messages referring to imported +// objects can print meaningful information. + +// parser parses the exports inside a gc compiler-produced +// object/archive file and populates its scope with the results. +type parser struct { + scanner scanner.Scanner + tok rune // current token + lit string // literal string; only valid for Ident, Int, String tokens + id string // package id of imported package + sharedPkgs map[string]*types.Package // package id -> package object (across importer) + localPkgs map[string]*types.Package // package id -> package object (just this package) +} + +func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) { + p.scanner.Init(src) + p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) } + p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments + p.scanner.Whitespace = 1<<'\t' | 1<<' ' + p.scanner.Filename = filename // for good error messages + p.next() + p.id = id + p.sharedPkgs = packages + if debug { + // check consistency of packages map + for _, pkg := range packages { + if pkg.Name() == "" { + fmt.Printf("no package name for %s\n", pkg.Path()) + } + } + } +} + +func (p *parser) next() { + p.tok = p.scanner.Scan() + switch p.tok { + case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·': + p.lit = p.scanner.TokenText() + default: + p.lit = "" + } + if debug { + fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit) + } +} + +func declTypeName(pkg *types.Package, name string) *types.TypeName { + scope := pkg.Scope() + if obj := scope.Lookup(name); obj != nil { + return obj.(*types.TypeName) + } + obj := types.NewTypeName(token.NoPos, pkg, name, nil) + // a named type may be referred to before the underlying type + // is known - set it up + types.NewNamed(obj, nil, nil) + scope.Insert(obj) + return obj +} + +// ---------------------------------------------------------------------------- +// Error handling + +// Internal errors are boxed as importErrors. +type importError struct { + pos scanner.Position + err error +} + +func (e importError) Error() string { + return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err) +} + +func (p *parser) error(err interface{}) { + if s, ok := err.(string); ok { + err = errors.New(s) + } + // panic with a runtime.Error if err is not an error + panic(importError{p.scanner.Pos(), err.(error)}) +} + +func (p *parser) errorf(format string, args ...interface{}) { + p.error(fmt.Sprintf(format, args...)) +} + +func (p *parser) expect(tok rune) string { + lit := p.lit + if p.tok != tok { + p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit) + } + p.next() + return lit +} + +func (p *parser) expectSpecial(tok string) { + sep := 'x' // not white space + i := 0 + for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' { + sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token + p.next() + i++ + } + if i < len(tok) { + p.errorf("expected %q, got %q", tok, tok[0:i]) + } +} + +func (p *parser) expectKeyword(keyword string) { + lit := p.expect(scanner.Ident) + if lit != keyword { + p.errorf("expected keyword %s, got %q", keyword, lit) + } +} + +// ---------------------------------------------------------------------------- +// Qualified and unqualified names + +// PackageId = string_lit . +// +func (p *parser) parsePackageId() string { + id, err := strconv.Unquote(p.expect(scanner.String)) + if err != nil { + p.error(err) + } + // id == "" stands for the imported package id + // (only known at time of package installation) + if id == "" { + id = p.id + } + return id +} + +// PackageName = ident . +// +func (p *parser) parsePackageName() string { + return p.expect(scanner.Ident) +} + +// dotIdentifier = ( ident | '·' ) { ident | int | '·' } . +func (p *parser) parseDotIdent() string { + ident := "" + if p.tok != scanner.Int { + sep := 'x' // not white space + for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' { + ident += p.lit + sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token + p.next() + } + } + if ident == "" { + p.expect(scanner.Ident) // use expect() for error handling + } + return ident +} + +// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) . +// +func (p *parser) parseQualifiedName() (id, name string) { + p.expect('@') + id = p.parsePackageId() + p.expect('.') + // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields. + if p.tok == '?' { + p.next() + } else { + name = p.parseDotIdent() + } + return +} + +// getPkg returns the package for a given id. If the package is +// not found, create the package and add it to the p.localPkgs +// and p.sharedPkgs maps. name is the (expected) name of the +// package. If name == "", the package name is expected to be +// set later via an import clause in the export data. +// +// id identifies a package, usually by a canonical package path like +// "encoding/json" but possibly by a non-canonical import path like +// "./json". +// +func (p *parser) getPkg(id, name string) *types.Package { + // package unsafe is not in the packages maps - handle explicitly + if id == "unsafe" { + return types.Unsafe + } + + pkg := p.localPkgs[id] + if pkg == nil { + // first import of id from this package + pkg = p.sharedPkgs[id] + if pkg == nil { + // first import of id by this importer; + // add (possibly unnamed) pkg to shared packages + pkg = types.NewPackage(id, name) + p.sharedPkgs[id] = pkg + } + // add (possibly unnamed) pkg to local packages + if p.localPkgs == nil { + p.localPkgs = make(map[string]*types.Package) + } + p.localPkgs[id] = pkg + } else if name != "" { + // package exists already and we have an expected package name; + // make sure names match or set package name if necessary + if pname := pkg.Name(); pname == "" { + pkg.SetName(name) + } else if pname != name { + p.errorf("%s package name mismatch: %s (given) vs %s (expected)", id, pname, name) + } + } + return pkg +} + +// parseExportedName is like parseQualifiedName, but +// the package id is resolved to an imported *types.Package. +// +func (p *parser) parseExportedName() (pkg *types.Package, name string) { + id, name := p.parseQualifiedName() + pkg = p.getPkg(id, "") + return +} + +// ---------------------------------------------------------------------------- +// Types + +// BasicType = identifier . +// +func (p *parser) parseBasicType() types.Type { + id := p.expect(scanner.Ident) + obj := types.Universe.Lookup(id) + if obj, ok := obj.(*types.TypeName); ok { + return obj.Type() + } + p.errorf("not a basic type: %s", id) + return nil +} + +// ArrayType = "[" int_lit "]" Type . +// +func (p *parser) parseArrayType(parent *types.Package) types.Type { + // "[" already consumed and lookahead known not to be "]" + lit := p.expect(scanner.Int) + p.expect(']') + elem := p.parseType(parent) + n, err := strconv.ParseInt(lit, 10, 64) + if err != nil { + p.error(err) + } + return types.NewArray(elem, n) +} + +// MapType = "map" "[" Type "]" Type . +// +func (p *parser) parseMapType(parent *types.Package) types.Type { + p.expectKeyword("map") + p.expect('[') + key := p.parseType(parent) + p.expect(']') + elem := p.parseType(parent) + return types.NewMap(key, elem) +} + +// Name = identifier | "?" | QualifiedName . +// +// For unqualified and anonymous names, the returned package is the parent +// package unless parent == nil, in which case the returned package is the +// package being imported. (The parent package is not nil if the the name +// is an unqualified struct field or interface method name belonging to a +// type declared in another package.) +// +// For qualified names, the returned package is nil (and not created if +// it doesn't exist yet) unless materializePkg is set (which creates an +// unnamed package with valid package path). In the latter case, a +// subsequent import clause is expected to provide a name for the package. +// +func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) { + pkg = parent + if pkg == nil { + pkg = p.sharedPkgs[p.id] + } + switch p.tok { + case scanner.Ident: + name = p.lit + p.next() + case '?': + // anonymous + p.next() + case '@': + // exported name prefixed with package path + pkg = nil + var id string + id, name = p.parseQualifiedName() + if materializePkg { + pkg = p.getPkg(id, "") + } + default: + p.error("name expected") + } + return +} + +func deref(typ types.Type) types.Type { + if p, _ := typ.(*types.Pointer); p != nil { + return p.Elem() + } + return typ +} + +// Field = Name Type [ string_lit ] . +// +func (p *parser) parseField(parent *types.Package) (*types.Var, string) { + pkg, name := p.parseName(parent, true) + + if name == "_" { + // Blank fields should be package-qualified because they + // are unexported identifiers, but gc does not qualify them. + // Assuming that the ident belongs to the current package + // causes types to change during re-exporting, leading + // to spurious "can't assign A to B" errors from go/types. + // As a workaround, pretend all blank fields belong + // to the same unique dummy package. + const blankpkg = "<_>" + pkg = p.getPkg(blankpkg, blankpkg) + } + + typ := p.parseType(parent) + anonymous := false + if name == "" { + // anonymous field - typ must be T or *T and T must be a type name + switch typ := deref(typ).(type) { + case *types.Basic: // basic types are named types + pkg = nil // objects defined in Universe scope have no package + name = typ.Name() + case *types.Named: + name = typ.Obj().Name() + default: + p.errorf("anonymous field expected") + } + anonymous = true + } + tag := "" + if p.tok == scanner.String { + s := p.expect(scanner.String) + var err error + tag, err = strconv.Unquote(s) + if err != nil { + p.errorf("invalid struct tag %s: %s", s, err) + } + } + return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag +} + +// StructType = "struct" "{" [ FieldList ] "}" . +// FieldList = Field { ";" Field } . +// +func (p *parser) parseStructType(parent *types.Package) types.Type { + var fields []*types.Var + var tags []string + + p.expectKeyword("struct") + p.expect('{') + for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { + if i > 0 { + p.expect(';') + } + fld, tag := p.parseField(parent) + if tag != "" && tags == nil { + tags = make([]string, i) + } + if tags != nil { + tags = append(tags, tag) + } + fields = append(fields, fld) + } + p.expect('}') + + return types.NewStruct(fields, tags) +} + +// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] . +// +func (p *parser) parseParameter() (par *types.Var, isVariadic bool) { + _, name := p.parseName(nil, false) + // remove gc-specific parameter numbering + if i := strings.Index(name, "·"); i >= 0 { + name = name[:i] + } + if p.tok == '.' { + p.expectSpecial("...") + isVariadic = true + } + typ := p.parseType(nil) + if isVariadic { + typ = types.NewSlice(typ) + } + // ignore argument tag (e.g. "noescape") + if p.tok == scanner.String { + p.next() + } + // TODO(gri) should we provide a package? + par = types.NewVar(token.NoPos, nil, name, typ) + return +} + +// Parameters = "(" [ ParameterList ] ")" . +// ParameterList = { Parameter "," } Parameter . +// +func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) { + p.expect('(') + for p.tok != ')' && p.tok != scanner.EOF { + if len(list) > 0 { + p.expect(',') + } + par, variadic := p.parseParameter() + list = append(list, par) + if variadic { + if isVariadic { + p.error("... not on final argument") + } + isVariadic = true + } + } + p.expect(')') + + return +} + +// Signature = Parameters [ Result ] . +// Result = Type | Parameters . +// +func (p *parser) parseSignature(recv *types.Var) *types.Signature { + params, isVariadic := p.parseParameters() + + // optional result type + var results []*types.Var + if p.tok == '(' { + var variadic bool + results, variadic = p.parseParameters() + if variadic { + p.error("... not permitted on result type") + } + } + + return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic) +} + +// InterfaceType = "interface" "{" [ MethodList ] "}" . +// MethodList = Method { ";" Method } . +// Method = Name Signature . +// +// The methods of embedded interfaces are always "inlined" +// by the compiler and thus embedded interfaces are never +// visible in the export data. +// +func (p *parser) parseInterfaceType(parent *types.Package) types.Type { + var methods []*types.Func + + p.expectKeyword("interface") + p.expect('{') + for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { + if i > 0 { + p.expect(';') + } + pkg, name := p.parseName(parent, true) + sig := p.parseSignature(nil) + methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig)) + } + p.expect('}') + + // Complete requires the type's embedded interfaces to be fully defined, + // but we do not define any + return types.NewInterface(methods, nil).Complete() +} + +// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type . +// +func (p *parser) parseChanType(parent *types.Package) types.Type { + dir := types.SendRecv + if p.tok == scanner.Ident { + p.expectKeyword("chan") + if p.tok == '<' { + p.expectSpecial("<-") + dir = types.SendOnly + } + } else { + p.expectSpecial("<-") + p.expectKeyword("chan") + dir = types.RecvOnly + } + elem := p.parseType(parent) + return types.NewChan(dir, elem) +} + +// Type = +// BasicType | TypeName | ArrayType | SliceType | StructType | +// PointerType | FuncType | InterfaceType | MapType | ChanType | +// "(" Type ")" . +// +// BasicType = ident . +// TypeName = ExportedName . +// SliceType = "[" "]" Type . +// PointerType = "*" Type . +// FuncType = "func" Signature . +// +func (p *parser) parseType(parent *types.Package) types.Type { + switch p.tok { + case scanner.Ident: + switch p.lit { + default: + return p.parseBasicType() + case "struct": + return p.parseStructType(parent) + case "func": + // FuncType + p.next() + return p.parseSignature(nil) + case "interface": + return p.parseInterfaceType(parent) + case "map": + return p.parseMapType(parent) + case "chan": + return p.parseChanType(parent) + } + case '@': + // TypeName + pkg, name := p.parseExportedName() + return declTypeName(pkg, name).Type() + case '[': + p.next() // look ahead + if p.tok == ']' { + // SliceType + p.next() + return types.NewSlice(p.parseType(parent)) + } + return p.parseArrayType(parent) + case '*': + // PointerType + p.next() + return types.NewPointer(p.parseType(parent)) + case '<': + return p.parseChanType(parent) + case '(': + // "(" Type ")" + p.next() + typ := p.parseType(parent) + p.expect(')') + return typ + } + p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit) + return nil +} + +// ---------------------------------------------------------------------------- +// Declarations + +// ImportDecl = "import" PackageName PackageId . +// +func (p *parser) parseImportDecl() { + p.expectKeyword("import") + name := p.parsePackageName() + p.getPkg(p.parsePackageId(), name) +} + +// int_lit = [ "+" | "-" ] { "0" ... "9" } . +// +func (p *parser) parseInt() string { + s := "" + switch p.tok { + case '-': + s = "-" + p.next() + case '+': + p.next() + } + return s + p.expect(scanner.Int) +} + +// number = int_lit [ "p" int_lit ] . +// +func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { + // mantissa + mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) + if mant == nil { + panic("invalid mantissa") + } + + if p.lit == "p" { + // exponent (base 2) + p.next() + exp, err := strconv.ParseInt(p.parseInt(), 10, 0) + if err != nil { + p.error(err) + } + if exp < 0 { + denom := constant.MakeInt64(1) + denom = constant.Shift(denom, token.SHL, uint(-exp)) + typ = types.Typ[types.UntypedFloat] + val = constant.BinaryOp(mant, token.QUO, denom) + return + } + if exp > 0 { + mant = constant.Shift(mant, token.SHL, uint(exp)) + } + typ = types.Typ[types.UntypedFloat] + val = mant + return + } + + typ = types.Typ[types.UntypedInt] + val = mant + return +} + +// ConstDecl = "const" ExportedName [ Type ] "=" Literal . +// Literal = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit . +// bool_lit = "true" | "false" . +// complex_lit = "(" float_lit "+" float_lit "i" ")" . +// rune_lit = "(" int_lit "+" int_lit ")" . +// string_lit = `"` { unicode_char } `"` . +// +func (p *parser) parseConstDecl() { + p.expectKeyword("const") + pkg, name := p.parseExportedName() + + var typ0 types.Type + if p.tok != '=' { + // constant types are never structured - no need for parent type + typ0 = p.parseType(nil) + } + + p.expect('=') + var typ types.Type + var val constant.Value + switch p.tok { + case scanner.Ident: + // bool_lit + if p.lit != "true" && p.lit != "false" { + p.error("expected true or false") + } + typ = types.Typ[types.UntypedBool] + val = constant.MakeBool(p.lit == "true") + p.next() + + case '-', scanner.Int: + // int_lit + typ, val = p.parseNumber() + + case '(': + // complex_lit or rune_lit + p.next() + if p.tok == scanner.Char { + p.next() + p.expect('+') + typ = types.Typ[types.UntypedRune] + _, val = p.parseNumber() + p.expect(')') + break + } + _, re := p.parseNumber() + p.expect('+') + _, im := p.parseNumber() + p.expectKeyword("i") + p.expect(')') + typ = types.Typ[types.UntypedComplex] + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + + case scanner.Char: + // rune_lit + typ = types.Typ[types.UntypedRune] + val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) + p.next() + + case scanner.String: + // string_lit + typ = types.Typ[types.UntypedString] + val = constant.MakeFromLiteral(p.lit, token.STRING, 0) + p.next() + + default: + p.errorf("expected literal got %s", scanner.TokenString(p.tok)) + } + + if typ0 == nil { + typ0 = typ + } + + pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val)) +} + +// TypeDecl = "type" ExportedName Type . +// +func (p *parser) parseTypeDecl() { + p.expectKeyword("type") + pkg, name := p.parseExportedName() + obj := declTypeName(pkg, name) + + // The type object may have been imported before and thus already + // have a type associated with it. We still need to parse the type + // structure, but throw it away if the object already has a type. + // This ensures that all imports refer to the same type object for + // a given type declaration. + typ := p.parseType(pkg) + + if name := obj.Type().(*types.Named); name.Underlying() == nil { + name.SetUnderlying(typ) + } +} + +// VarDecl = "var" ExportedName Type . +// +func (p *parser) parseVarDecl() { + p.expectKeyword("var") + pkg, name := p.parseExportedName() + typ := p.parseType(pkg) + pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ)) +} + +// Func = Signature [ Body ] . +// Body = "{" ... "}" . +// +func (p *parser) parseFunc(recv *types.Var) *types.Signature { + sig := p.parseSignature(recv) + if p.tok == '{' { + p.next() + for i := 1; i > 0; p.next() { + switch p.tok { + case '{': + i++ + case '}': + i-- + } + } + } + return sig +} + +// MethodDecl = "func" Receiver Name Func . +// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" . +// +func (p *parser) parseMethodDecl() { + // "func" already consumed + p.expect('(') + recv, _ := p.parseParameter() // receiver + p.expect(')') + + // determine receiver base type object + base := deref(recv.Type()).(*types.Named) + + // parse method name, signature, and possibly inlined body + _, name := p.parseName(nil, false) + sig := p.parseFunc(recv) + + // methods always belong to the same package as the base type object + pkg := base.Obj().Pkg() + + // add method to type unless type was imported before + // and method exists already + // TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small. + base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig)) +} + +// FuncDecl = "func" ExportedName Func . +// +func (p *parser) parseFuncDecl() { + // "func" already consumed + pkg, name := p.parseExportedName() + typ := p.parseFunc(nil) + pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ)) +} + +// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" . +// +func (p *parser) parseDecl() { + if p.tok == scanner.Ident { + switch p.lit { + case "import": + p.parseImportDecl() + case "const": + p.parseConstDecl() + case "type": + p.parseTypeDecl() + case "var": + p.parseVarDecl() + case "func": + p.next() // look ahead + if p.tok == '(' { + p.parseMethodDecl() + } else { + p.parseFuncDecl() + } + } + } + p.expect('\n') +} + +// ---------------------------------------------------------------------------- +// Export + +// Export = "PackageClause { Decl } "$$" . +// PackageClause = "package" PackageName [ "safe" ] "\n" . +// +func (p *parser) parseExport() *types.Package { + p.expectKeyword("package") + name := p.parsePackageName() + if p.tok == scanner.Ident && p.lit == "safe" { + // package was compiled with -u option - ignore + p.next() + } + p.expect('\n') + + pkg := p.getPkg(p.id, name) + + for p.tok != '$' && p.tok != scanner.EOF { + p.parseDecl() + } + + if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' { + // don't call next()/expect() since reading past the + // export data may cause scanner errors (e.g. NUL chars) + p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch) + } + + if n := p.scanner.ErrorCount; n != 0 { + p.errorf("expected no scanner errors, got %d", n) + } + + // Record all locally referenced packages as imports. + var imports []*types.Package + for id, pkg2 := range p.localPkgs { + if pkg2.Name() == "" { + p.errorf("%s package has no name", id) + } + if id == p.id { + continue // avoid self-edge + } + imports = append(imports, pkg2) + } + sort.Sort(byPath(imports)) + pkg.SetImports(imports) + + // package was imported completely and without errors + pkg.MarkComplete() + + return pkg +} + +type byPath []*types.Package + +func (a byPath) Len() int { return len(a) } +func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() } diff --git a/internal/gcimporter/gcimporter11_test.go b/internal/gcimporter/gcimporter11_test.go new file mode 100644 index 00000000..18186817 --- /dev/null +++ b/internal/gcimporter/gcimporter11_test.go @@ -0,0 +1,129 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gcimporter + +import ( + "go/types" + "runtime" + "strings" + "testing" +) + +var importedObjectTests = []struct { + name string + want string +}{ + // non-interfaces + {"crypto.Hash", "type Hash uint"}, + {"go/ast.ObjKind", "type ObjKind int"}, + {"go/types.Qualifier", "type Qualifier func(*Package) string"}, + {"go/types.Comparable", "func Comparable(T Type) bool"}, + {"math.Pi", "const Pi untyped float"}, + {"math.Sin", "func Sin(x float64) float64"}, + {"go/ast.NotNilFilter", "func NotNilFilter(_ string, v reflect.Value) bool"}, + {"go/internal/gcimporter.BImportData", "func BImportData(fset *go/token.FileSet, imports map[string]*go/types.Package, data []byte, path string) (_ int, pkg *go/types.Package, err error)"}, + + // interfaces + {"context.Context", "type Context interface{Deadline() (deadline time.Time, ok bool); Done() <-chan struct{}; Err() error; Value(key interface{}) interface{}}"}, + {"crypto.Decrypter", "type Decrypter interface{Decrypt(rand io.Reader, msg []byte, opts DecrypterOpts) (plaintext []byte, err error); Public() PublicKey}"}, + {"encoding.BinaryMarshaler", "type BinaryMarshaler interface{MarshalBinary() (data []byte, err error)}"}, + {"io.Reader", "type Reader interface{Read(p []byte) (n int, err error)}"}, + {"io.ReadWriter", "type ReadWriter interface{Reader; Writer}"}, + {"go/ast.Node", "type Node interface{End() go/token.Pos; Pos() go/token.Pos}"}, + {"go/types.Type", "type Type interface{String() string; Underlying() Type}"}, +} + +func TestImportedTypes(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + for _, test := range importedObjectTests { + s := strings.Split(test.name, ".") + if len(s) != 2 { + t.Fatal("inconsistent test data") + } + importPath := s[0] + objName := s[1] + + pkg, err := Import(make(map[string]*types.Package), importPath, ".", nil) + if err != nil { + t.Error(err) + continue + } + + obj := pkg.Scope().Lookup(objName) + if obj == nil { + t.Errorf("%s: object not found", test.name) + continue + } + + got := types.ObjectString(obj, types.RelativeTo(pkg)) + if got != test.want { + t.Errorf("%s: got %q; want %q", test.name, got, test.want) + } + + if named, _ := obj.Type().(*types.Named); named != nil { + verifyInterfaceMethodRecvs(t, named, 0) + } + } +} + +// verifyInterfaceMethodRecvs verifies that method receiver types +// are named if the methods belong to a named interface type. +func verifyInterfaceMethodRecvs(t *testing.T, named *types.Named, level int) { + // avoid endless recursion in case of an embedding bug that lead to a cycle + if level > 10 { + t.Errorf("%s: embeds itself", named) + return + } + + iface, _ := named.Underlying().(*types.Interface) + if iface == nil { + return // not an interface + } + + // check explicitly declared methods + for i := 0; i < iface.NumExplicitMethods(); i++ { + m := iface.ExplicitMethod(i) + recv := m.Type().(*types.Signature).Recv() + if recv == nil { + t.Errorf("%s: missing receiver type", m) + continue + } + if recv.Type() != named { + t.Errorf("%s: got recv type %s; want %s", m, recv.Type(), named) + } + } + + // check embedded interfaces (if they are named, too) + for i := 0; i < iface.NumEmbeddeds(); i++ { + // embedding of interfaces cannot have cycles; recursion will terminate + if etype, _ := iface.EmbeddedType(i).(*types.Named); etype != nil { + verifyInterfaceMethodRecvs(t, etype, level+1) + } + } +} +func TestIssue25301(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + compileAndImportPkg(t, "issue25301") +} diff --git a/internal/gcimporter/gcimporter_test.go b/internal/gcimporter/gcimporter_test.go new file mode 100644 index 00000000..14622d34 --- /dev/null +++ b/internal/gcimporter/gcimporter_test.go @@ -0,0 +1,517 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter_test.go, +// adjusted to make it build with code from (std lib) internal/testenv copied. + +package gcimporter + +import ( + "bytes" + "fmt" + "go/types" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "runtime" + "strings" + "testing" + "time" +) + +// ---------------------------------------------------------------------------- +// The following three functions (Builder, HasGoBuild, MustHaveGoBuild) were +// copied from $GOROOT/src/internal/testenv since that package is not available +// in x/tools. + +// Builder reports the name of the builder running this test +// (for example, "linux-amd64" or "windows-386-gce"). +// If the test is not running on the build infrastructure, +// Builder returns the empty string. +func Builder() string { + return os.Getenv("GO_BUILDER_NAME") +} + +// HasGoBuild reports whether the current system can build programs with ``go build'' +// and then run them with os.StartProcess or exec.Command. +func HasGoBuild() bool { + switch runtime.GOOS { + case "android", "nacl": + return false + case "darwin": + if strings.HasPrefix(runtime.GOARCH, "arm") { + return false + } + } + return true +} + +// MustHaveGoBuild checks that the current system can build programs with ``go build'' +// and then run them with os.StartProcess or exec.Command. +// If not, MustHaveGoBuild calls t.Skip with an explanation. +func MustHaveGoBuild(t *testing.T) { + if !HasGoBuild() { + t.Skipf("skipping test: 'go build' not available on %s/%s", runtime.GOOS, runtime.GOARCH) + } +} + +// ---------------------------------------------------------------------------- + +// skipSpecialPlatforms causes the test to be skipped for platforms where +// builders (build.golang.org) don't have access to compiled packages for +// import. +func skipSpecialPlatforms(t *testing.T) { + switch platform := runtime.GOOS + "-" + runtime.GOARCH; platform { + case "nacl-amd64p32", + "nacl-386", + "nacl-arm", + "darwin-arm", + "darwin-arm64": + t.Skipf("no compiled packages available for import on %s", platform) + } +} + +// compile runs the compiler on filename, with dirname as the working directory, +// and writes the output file to outdirname. +func compile(t *testing.T, dirname, filename, outdirname string) string { + /* testenv. */ MustHaveGoBuild(t) + // filename must end with ".go" + if !strings.HasSuffix(filename, ".go") { + t.Fatalf("filename doesn't end in .go: %s", filename) + } + basename := filepath.Base(filename) + outname := filepath.Join(outdirname, basename[:len(basename)-2]+"o") + cmd := exec.Command("go", "tool", "compile", "-o", outname, filename) + cmd.Dir = dirname + out, err := cmd.CombinedOutput() + if err != nil { + t.Logf("%s", out) + t.Fatalf("go tool compile %s failed: %s", filename, err) + } + return outname +} + +func testPath(t *testing.T, path, srcDir string) *types.Package { + t0 := time.Now() + pkg, err := Import(make(map[string]*types.Package), path, srcDir, nil) + if err != nil { + t.Errorf("testPath(%s): %s", path, err) + return nil + } + t.Logf("testPath(%s): %v", path, time.Since(t0)) + return pkg +} + +const maxTime = 30 * time.Second + +func testDir(t *testing.T, dir string, endTime time.Time) (nimports int) { + dirname := filepath.Join(runtime.GOROOT(), "pkg", runtime.GOOS+"_"+runtime.GOARCH, dir) + list, err := ioutil.ReadDir(dirname) + if err != nil { + t.Fatalf("testDir(%s): %s", dirname, err) + } + for _, f := range list { + if time.Now().After(endTime) { + t.Log("testing time used up") + return + } + switch { + case !f.IsDir(): + // try extensions + for _, ext := range pkgExts { + if strings.HasSuffix(f.Name(), ext) { + name := f.Name()[0 : len(f.Name())-len(ext)] // remove extension + if testPath(t, filepath.Join(dir, name), dir) != nil { + nimports++ + } + } + } + case f.IsDir(): + nimports += testDir(t, filepath.Join(dir, f.Name()), endTime) + } + } + return +} + +func mktmpdir(t *testing.T) string { + tmpdir, err := ioutil.TempDir("", "gcimporter_test") + if err != nil { + t.Fatal("mktmpdir:", err) + } + if err := os.Mkdir(filepath.Join(tmpdir, "testdata"), 0700); err != nil { + os.RemoveAll(tmpdir) + t.Fatal("mktmpdir:", err) + } + return tmpdir +} + +const testfile = "exports.go" + +func TestImportTestdata(t *testing.T) { + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + tmpdir := mktmpdir(t) + defer os.RemoveAll(tmpdir) + + compile(t, "testdata", testfile, filepath.Join(tmpdir, "testdata")) + + // filename should end with ".go" + filename := testfile[:len(testfile)-3] + if pkg := testPath(t, "./testdata/"+filename, tmpdir); pkg != nil { + // The package's Imports list must include all packages + // explicitly imported by testfile, plus all packages + // referenced indirectly via exported objects in testfile. + // With the textual export format (when run against Go1.6), + // the list may also include additional packages that are + // not strictly required for import processing alone (they + // are exported to err "on the safe side"). + // For now, we just test the presence of a few packages + // that we know are there for sure. + got := fmt.Sprint(pkg.Imports()) + for _, want := range []string{"go/ast", "go/token"} { + if !strings.Contains(got, want) { + t.Errorf(`Package("exports").Imports() = %s, does not contain %s`, got, want) + } + } + } +} + +func TestVersionHandling(t *testing.T) { + skipSpecialPlatforms(t) // we really only need to exclude nacl platforms, but this is fine + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + const dir = "./testdata/versions" + list, err := ioutil.ReadDir(dir) + if err != nil { + t.Fatal(err) + } + + tmpdir := mktmpdir(t) + defer os.RemoveAll(tmpdir) + corruptdir := filepath.Join(tmpdir, "testdata", "versions") + if err := os.Mkdir(corruptdir, 0700); err != nil { + t.Fatal(err) + } + + for _, f := range list { + name := f.Name() + if !strings.HasSuffix(name, ".a") { + continue // not a package file + } + if strings.Contains(name, "corrupted") { + continue // don't process a leftover corrupted file + } + pkgpath := "./" + name[:len(name)-2] + + if testing.Verbose() { + t.Logf("importing %s", name) + } + + // test that export data can be imported + _, err := Import(make(map[string]*types.Package), pkgpath, dir, nil) + if err != nil { + // ok to fail if it fails with a newer version error for select files + if strings.Contains(err.Error(), "newer version") { + switch name { + case "test_go1.11_999b.a", "test_go1.11_999i.a": + continue + } + // fall through + } + t.Errorf("import %q failed: %v", pkgpath, err) + continue + } + + // create file with corrupted export data + // 1) read file + data, err := ioutil.ReadFile(filepath.Join(dir, name)) + if err != nil { + t.Fatal(err) + } + // 2) find export data + i := bytes.Index(data, []byte("\n$$B\n")) + 5 + j := bytes.Index(data[i:], []byte("\n$$\n")) + i + if i < 0 || j < 0 || i > j { + t.Fatalf("export data section not found (i = %d, j = %d)", i, j) + } + // 3) corrupt the data (increment every 7th byte) + for k := j - 13; k >= i; k -= 7 { + data[k]++ + } + // 4) write the file + pkgpath += "_corrupted" + filename := filepath.Join(corruptdir, pkgpath) + ".a" + ioutil.WriteFile(filename, data, 0666) + + // test that importing the corrupted file results in an error + _, err = Import(make(map[string]*types.Package), pkgpath, corruptdir, nil) + if err == nil { + t.Errorf("import corrupted %q succeeded", pkgpath) + } else if msg := err.Error(); !strings.Contains(msg, "version skew") { + t.Errorf("import %q error incorrect (%s)", pkgpath, msg) + } + } +} + +func TestImportStdLib(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + dt := maxTime + if testing.Short() && /* testenv. */ Builder() == "" { + dt = 10 * time.Millisecond + } + nimports := testDir(t, "", time.Now().Add(dt)) // installed packages + t.Logf("tested %d imports", nimports) +} + +func TestIssue5815(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + pkg := importPkg(t, "strings", ".") + + scope := pkg.Scope() + for _, name := range scope.Names() { + obj := scope.Lookup(name) + if obj.Pkg() == nil { + t.Errorf("no pkg for %s", obj) + } + if tname, _ := obj.(*types.TypeName); tname != nil { + named := tname.Type().(*types.Named) + for i := 0; i < named.NumMethods(); i++ { + m := named.Method(i) + if m.Pkg() == nil { + t.Errorf("no pkg for %s", m) + } + } + } + } +} + +// Smoke test to ensure that imported methods get the correct package. +func TestCorrectMethodPackage(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + imports := make(map[string]*types.Package) + _, err := Import(imports, "net/http", ".", nil) + if err != nil { + t.Fatal(err) + } + + mutex := imports["sync"].Scope().Lookup("Mutex").(*types.TypeName).Type() + mset := types.NewMethodSet(types.NewPointer(mutex)) // methods of *sync.Mutex + sel := mset.Lookup(nil, "Lock") + lock := sel.Obj().(*types.Func) + if got, want := lock.Pkg().Path(), "sync"; got != want { + t.Errorf("got package path %q; want %q", got, want) + } +} + +func TestIssue13566(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + tmpdir := mktmpdir(t) + defer os.RemoveAll(tmpdir) + testoutdir := filepath.Join(tmpdir, "testdata") + + // b.go needs to be compiled from the output directory so that the compiler can + // find the compiled package a. We pass the full path to compile() so that we + // don't have to copy the file to that directory. + bpath, err := filepath.Abs(filepath.Join("testdata", "b.go")) + if err != nil { + t.Fatal(err) + } + compile(t, "testdata", "a.go", testoutdir) + compile(t, testoutdir, bpath, testoutdir) + + // import must succeed (test for issue at hand) + pkg := importPkg(t, "./testdata/b", tmpdir) + + // make sure all indirectly imported packages have names + for _, imp := range pkg.Imports() { + if imp.Name() == "" { + t.Errorf("no name for %s package", imp.Path()) + } + } +} + +func TestIssue13898(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // import go/internal/gcimporter which imports go/types partially + imports := make(map[string]*types.Package) + _, err := Import(imports, "go/internal/gcimporter", ".", nil) + if err != nil { + t.Fatal(err) + } + + // look for go/types package + var goTypesPkg *types.Package + for path, pkg := range imports { + if path == "go/types" { + goTypesPkg = pkg + break + } + } + if goTypesPkg == nil { + t.Fatal("go/types not found") + } + + // look for go/types.Object type + obj := lookupObj(t, goTypesPkg.Scope(), "Object") + typ, ok := obj.Type().(*types.Named) + if !ok { + t.Fatalf("go/types.Object type is %v; wanted named type", typ) + } + + // lookup go/types.Object.Pkg method + m, index, indirect := types.LookupFieldOrMethod(typ, false, nil, "Pkg") + if m == nil { + t.Fatalf("go/types.Object.Pkg not found (index = %v, indirect = %v)", index, indirect) + } + + // the method must belong to go/types + if m.Pkg().Path() != "go/types" { + t.Fatalf("found %v; want go/types", m.Pkg()) + } +} + +func TestIssue15517(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + tmpdir := mktmpdir(t) + defer os.RemoveAll(tmpdir) + + compile(t, "testdata", "p.go", filepath.Join(tmpdir, "testdata")) + + // Multiple imports of p must succeed without redeclaration errors. + // We use an import path that's not cleaned up so that the eventual + // file path for the package is different from the package path; this + // will expose the error if it is present. + // + // (Issue: Both the textual and the binary importer used the file path + // of the package to be imported as key into the shared packages map. + // However, the binary importer then used the package path to identify + // the imported package to mark it as complete; effectively marking the + // wrong package as complete. By using an "unclean" package path, the + // file and package path are different, exposing the problem if present. + // The same issue occurs with vendoring.) + imports := make(map[string]*types.Package) + for i := 0; i < 3; i++ { + if _, err := Import(imports, "./././testdata/p", tmpdir, nil); err != nil { + t.Fatal(err) + } + } +} + +func TestIssue15920(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + compileAndImportPkg(t, "issue15920") +} + +func TestIssue20046(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + // "./issue20046".V.M must exist + pkg := compileAndImportPkg(t, "issue20046") + obj := lookupObj(t, pkg.Scope(), "V") + if m, index, indirect := types.LookupFieldOrMethod(obj.Type(), false, nil, "M"); m == nil { + t.Fatalf("V.M not found (index = %v, indirect = %v)", index, indirect) + } +} + +func importPkg(t *testing.T, path, srcDir string) *types.Package { + pkg, err := Import(make(map[string]*types.Package), path, srcDir, nil) + if err != nil { + t.Fatal(err) + } + return pkg +} + +func compileAndImportPkg(t *testing.T, name string) *types.Package { + tmpdir := mktmpdir(t) + defer os.RemoveAll(tmpdir) + compile(t, "testdata", name+".go", filepath.Join(tmpdir, "testdata")) + return importPkg(t, "./testdata/"+name, tmpdir) +} + +func lookupObj(t *testing.T, scope *types.Scope, name string) types.Object { + if obj := scope.Lookup(name); obj != nil { + return obj + } + t.Fatalf("%s not found", name) + return nil +} diff --git a/internal/gcimporter/iexport.go b/internal/gcimporter/iexport.go new file mode 100644 index 00000000..be671c79 --- /dev/null +++ b/internal/gcimporter/iexport.go @@ -0,0 +1,723 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Indexed binary package export. +// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; +// see that file for specification of the format. + +// +build go1.11 + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "go/ast" + "go/constant" + "go/token" + "go/types" + "io" + "math/big" + "reflect" + "sort" +) + +// Current indexed export format version. Increase with each format change. +// 0: Go1.11 encoding +const iexportVersion = 0 + +// IExportData returns the binary export data for pkg. +// If no file set is provided, position info will be missing. +func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { + defer func() { + if e := recover(); e != nil { + if ierr, ok := e.(internalError); ok { + err = ierr + return + } + // Not an internal error; panic again. + panic(e) + } + }() + + p := iexporter{ + out: bytes.NewBuffer(nil), + fset: fset, + allPkgs: map[*types.Package]bool{}, + stringIndex: map[string]uint64{}, + declIndex: map[types.Object]uint64{}, + typIndex: map[types.Type]uint64{}, + } + + for i, pt := range predeclared() { + p.typIndex[pt] = uint64(i) + } + if len(p.typIndex) > predeclReserved { + panic(internalErrorf("too many predeclared types: %d > %d", len(p.typIndex), predeclReserved)) + } + + // Initialize work queue with exported declarations. + scope := pkg.Scope() + for _, name := range scope.Names() { + if ast.IsExported(name) { + p.pushDecl(scope.Lookup(name)) + } + } + + // Loop until no more work. + for !p.declTodo.empty() { + p.doDecl(p.declTodo.popHead()) + } + + // Append indices to data0 section. + dataLen := uint64(p.data0.Len()) + w := p.newWriter() + w.writeIndex(p.declIndex, pkg) + w.flush() + + // Assemble header. + var hdr intWriter + hdr.WriteByte('i') + hdr.uint64(iexportVersion) + hdr.uint64(uint64(p.strings.Len())) + hdr.uint64(dataLen) + + // Flush output. + io.Copy(p.out, &hdr) + io.Copy(p.out, &p.strings) + io.Copy(p.out, &p.data0) + + return p.out.Bytes(), nil +} + +// writeIndex writes out an object index. mainIndex indicates whether +// we're writing out the main index, which is also read by +// non-compiler tools and includes a complete package description +// (i.e., name and height). +func (w *exportWriter) writeIndex(index map[types.Object]uint64, localpkg *types.Package) { + // Build a map from packages to objects from that package. + pkgObjs := map[*types.Package][]types.Object{} + + // For the main index, make sure to include every package that + // we reference, even if we're not exporting (or reexporting) + // any symbols from it. + pkgObjs[localpkg] = nil + for pkg := range w.p.allPkgs { + pkgObjs[pkg] = nil + } + + for obj := range index { + pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj) + } + + var pkgs []*types.Package + for pkg, objs := range pkgObjs { + pkgs = append(pkgs, pkg) + + sort.Slice(objs, func(i, j int) bool { + return objs[i].Name() < objs[j].Name() + }) + } + + sort.Slice(pkgs, func(i, j int) bool { + return pkgs[i].Path() < pkgs[j].Path() + }) + + w.uint64(uint64(len(pkgs))) + for _, pkg := range pkgs { + w.string(pkg.Path()) + w.string(pkg.Name()) + w.uint64(uint64(0)) // package height is not needed for go/types + + objs := pkgObjs[pkg] + w.uint64(uint64(len(objs))) + for _, obj := range objs { + w.string(obj.Name()) + w.uint64(index[obj]) + } + } +} + +type iexporter struct { + fset *token.FileSet + out *bytes.Buffer + + // allPkgs tracks all packages that have been referenced by + // the export data, so we can ensure to include them in the + // main index. + allPkgs map[*types.Package]bool + + declTodo objQueue + + strings intWriter + stringIndex map[string]uint64 + + data0 intWriter + declIndex map[types.Object]uint64 + typIndex map[types.Type]uint64 +} + +// stringOff returns the offset of s within the string section. +// If not already present, it's added to the end. +func (p *iexporter) stringOff(s string) uint64 { + off, ok := p.stringIndex[s] + if !ok { + off = uint64(p.strings.Len()) + p.stringIndex[s] = off + + p.strings.uint64(uint64(len(s))) + p.strings.WriteString(s) + } + return off +} + +// pushDecl adds n to the declaration work queue, if not already present. +func (p *iexporter) pushDecl(obj types.Object) { + // Package unsafe is known to the compiler and predeclared. + assert(obj.Pkg() != types.Unsafe) + + if _, ok := p.declIndex[obj]; ok { + return + } + + p.declIndex[obj] = ^uint64(0) // mark n present in work queue + p.declTodo.pushTail(obj) +} + +// exportWriter handles writing out individual data section chunks. +type exportWriter struct { + p *iexporter + + data intWriter + currPkg *types.Package + prevFile string + prevLine int64 +} + +func (p *iexporter) doDecl(obj types.Object) { + w := p.newWriter() + w.setPkg(obj.Pkg(), false) + + switch obj := obj.(type) { + case *types.Var: + w.tag('V') + w.pos(obj.Pos()) + w.typ(obj.Type(), obj.Pkg()) + + case *types.Func: + sig, _ := obj.Type().(*types.Signature) + if sig.Recv() != nil { + panic(internalErrorf("unexpected method: %v", sig)) + } + w.tag('F') + w.pos(obj.Pos()) + w.signature(sig) + + case *types.Const: + w.tag('C') + w.pos(obj.Pos()) + w.value(obj.Type(), obj.Val()) + + case *types.TypeName: + if obj.IsAlias() { + w.tag('A') + w.pos(obj.Pos()) + w.typ(obj.Type(), obj.Pkg()) + break + } + + // Defined type. + w.tag('T') + w.pos(obj.Pos()) + + underlying := obj.Type().Underlying() + w.typ(underlying, obj.Pkg()) + + t := obj.Type() + if types.IsInterface(t) { + break + } + + named, ok := t.(*types.Named) + if !ok { + panic(internalErrorf("%s is not a defined type", t)) + } + + n := named.NumMethods() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + m := named.Method(i) + w.pos(m.Pos()) + w.string(m.Name()) + sig, _ := m.Type().(*types.Signature) + w.param(sig.Recv()) + w.signature(sig) + } + + default: + panic(internalErrorf("unexpected object: %v", obj)) + } + + p.declIndex[obj] = w.flush() +} + +func (w *exportWriter) tag(tag byte) { + w.data.WriteByte(tag) +} + +func (w *exportWriter) pos(pos token.Pos) { + p := w.p.fset.Position(pos) + file := p.Filename + line := int64(p.Line) + + // When file is the same as the last position (common case), + // we can save a few bytes by delta encoding just the line + // number. + // + // Note: Because data objects may be read out of order (or not + // at all), we can only apply delta encoding within a single + // object. This is handled implicitly by tracking prevFile and + // prevLine as fields of exportWriter. + + if file == w.prevFile { + delta := line - w.prevLine + w.int64(delta) + if delta == deltaNewFile { + w.int64(-1) + } + } else { + w.int64(deltaNewFile) + w.int64(line) // line >= 0 + w.string(file) + w.prevFile = file + } + w.prevLine = line +} + +func (w *exportWriter) pkg(pkg *types.Package) { + // Ensure any referenced packages are declared in the main index. + w.p.allPkgs[pkg] = true + + w.string(pkg.Path()) +} + +func (w *exportWriter) qualifiedIdent(obj types.Object) { + // Ensure any referenced declarations are written out too. + w.p.pushDecl(obj) + + w.string(obj.Name()) + w.pkg(obj.Pkg()) +} + +func (w *exportWriter) typ(t types.Type, pkg *types.Package) { + w.data.uint64(w.p.typOff(t, pkg)) +} + +func (p *iexporter) newWriter() *exportWriter { + return &exportWriter{p: p} +} + +func (w *exportWriter) flush() uint64 { + off := uint64(w.p.data0.Len()) + io.Copy(&w.p.data0, &w.data) + return off +} + +func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 { + off, ok := p.typIndex[t] + if !ok { + w := p.newWriter() + w.doTyp(t, pkg) + off = predeclReserved + w.flush() + p.typIndex[t] = off + } + return off +} + +func (w *exportWriter) startType(k itag) { + w.data.uint64(uint64(k)) +} + +func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { + switch t := t.(type) { + case *types.Named: + w.startType(definedType) + w.qualifiedIdent(t.Obj()) + + case *types.Pointer: + w.startType(pointerType) + w.typ(t.Elem(), pkg) + + case *types.Slice: + w.startType(sliceType) + w.typ(t.Elem(), pkg) + + case *types.Array: + w.startType(arrayType) + w.uint64(uint64(t.Len())) + w.typ(t.Elem(), pkg) + + case *types.Chan: + w.startType(chanType) + // 1 RecvOnly; 2 SendOnly; 3 SendRecv + var dir uint64 + switch t.Dir() { + case types.RecvOnly: + dir = 1 + case types.SendOnly: + dir = 2 + case types.SendRecv: + dir = 3 + } + w.uint64(dir) + w.typ(t.Elem(), pkg) + + case *types.Map: + w.startType(mapType) + w.typ(t.Key(), pkg) + w.typ(t.Elem(), pkg) + + case *types.Signature: + w.startType(signatureType) + w.setPkg(pkg, true) + w.signature(t) + + case *types.Struct: + w.startType(structType) + w.setPkg(pkg, true) + + n := t.NumFields() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + f := t.Field(i) + w.pos(f.Pos()) + w.string(f.Name()) + w.typ(f.Type(), pkg) + w.bool(f.Embedded()) + w.string(t.Tag(i)) // note (or tag) + } + + case *types.Interface: + w.startType(interfaceType) + w.setPkg(pkg, true) + + n := t.NumEmbeddeds() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + f := t.Embedded(i) + w.pos(f.Obj().Pos()) + w.typ(f.Obj().Type(), f.Obj().Pkg()) + } + + n = t.NumExplicitMethods() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + m := t.ExplicitMethod(i) + w.pos(m.Pos()) + w.string(m.Name()) + sig, _ := m.Type().(*types.Signature) + w.signature(sig) + } + + default: + panic(internalErrorf("unexpected type: %v, %v", t, reflect.TypeOf(t))) + } +} + +func (w *exportWriter) setPkg(pkg *types.Package, write bool) { + if write { + w.pkg(pkg) + } + + w.currPkg = pkg +} + +func (w *exportWriter) signature(sig *types.Signature) { + w.paramList(sig.Params()) + w.paramList(sig.Results()) + if sig.Params().Len() > 0 { + w.bool(sig.Variadic()) + } +} + +func (w *exportWriter) paramList(tup *types.Tuple) { + n := tup.Len() + w.uint64(uint64(n)) + for i := 0; i < n; i++ { + w.param(tup.At(i)) + } +} + +func (w *exportWriter) param(obj types.Object) { + w.pos(obj.Pos()) + w.localIdent(obj) + w.typ(obj.Type(), obj.Pkg()) +} + +func (w *exportWriter) value(typ types.Type, v constant.Value) { + w.typ(typ, nil) + + switch v.Kind() { + case constant.Bool: + w.bool(constant.BoolVal(v)) + case constant.Int: + var i big.Int + if i64, exact := constant.Int64Val(v); exact { + i.SetInt64(i64) + } else if ui64, exact := constant.Uint64Val(v); exact { + i.SetUint64(ui64) + } else { + i.SetString(v.ExactString(), 10) + } + w.mpint(&i, typ) + case constant.Float: + f := constantToFloat(v) + w.mpfloat(f, typ) + case constant.Complex: + w.mpfloat(constantToFloat(constant.Real(v)), typ) + w.mpfloat(constantToFloat(constant.Imag(v)), typ) + case constant.String: + w.string(constant.StringVal(v)) + case constant.Unknown: + // package contains type errors + default: + panic(internalErrorf("unexpected value %v (%T)", v, v)) + } +} + +// constantToFloat converts a constant.Value with kind constant.Float to a +// big.Float. +func constantToFloat(x constant.Value) *big.Float { + assert(x.Kind() == constant.Float) + // Use the same floating-point precision (512) as cmd/compile + // (see Mpprec in cmd/compile/internal/gc/mpfloat.go). + const mpprec = 512 + var f big.Float + f.SetPrec(mpprec) + if v, exact := constant.Float64Val(x); exact { + // float64 + f.SetFloat64(v) + } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { + // TODO(gri): add big.Rat accessor to constant.Value. + n := valueToRat(num) + d := valueToRat(denom) + f.SetRat(n.Quo(n, d)) + } else { + // Value too large to represent as a fraction => inaccessible. + // TODO(gri): add big.Float accessor to constant.Value. + _, ok := f.SetString(x.ExactString()) + assert(ok) + } + return &f +} + +// mpint exports a multi-precision integer. +// +// For unsigned types, small values are written out as a single +// byte. Larger values are written out as a length-prefixed big-endian +// byte string, where the length prefix is encoded as its complement. +// For example, bytes 0, 1, and 2 directly represent the integer +// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-, +// 2-, and 3-byte big-endian string follow. +// +// Encoding for signed types use the same general approach as for +// unsigned types, except small values use zig-zag encoding and the +// bottom bit of length prefix byte for large values is reserved as a +// sign bit. +// +// The exact boundary between small and large encodings varies +// according to the maximum number of bytes needed to encode a value +// of type typ. As a special case, 8-bit types are always encoded as a +// single byte. +// +// TODO(mdempsky): Is this level of complexity really worthwhile? +func (w *exportWriter) mpint(x *big.Int, typ types.Type) { + basic, ok := typ.Underlying().(*types.Basic) + if !ok { + panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying())) + } + + signed, maxBytes := intSize(basic) + + negative := x.Sign() < 0 + if !signed && negative { + panic(internalErrorf("negative unsigned integer; type %v, value %v", typ, x)) + } + + b := x.Bytes() + if len(b) > 0 && b[0] == 0 { + panic(internalErrorf("leading zeros")) + } + if uint(len(b)) > maxBytes { + panic(internalErrorf("bad mpint length: %d > %d (type %v, value %v)", len(b), maxBytes, typ, x)) + } + + maxSmall := 256 - maxBytes + if signed { + maxSmall = 256 - 2*maxBytes + } + if maxBytes == 1 { + maxSmall = 256 + } + + // Check if x can use small value encoding. + if len(b) <= 1 { + var ux uint + if len(b) == 1 { + ux = uint(b[0]) + } + if signed { + ux <<= 1 + if negative { + ux-- + } + } + if ux < maxSmall { + w.data.WriteByte(byte(ux)) + return + } + } + + n := 256 - uint(len(b)) + if signed { + n = 256 - 2*uint(len(b)) + if negative { + n |= 1 + } + } + if n < maxSmall || n >= 256 { + panic(internalErrorf("encoding mistake: %d, %v, %v => %d", len(b), signed, negative, n)) + } + + w.data.WriteByte(byte(n)) + w.data.Write(b) +} + +// mpfloat exports a multi-precision floating point number. +// +// The number's value is decomposed into mantissa × 2**exponent, where +// mantissa is an integer. The value is written out as mantissa (as a +// multi-precision integer) and then the exponent, except exponent is +// omitted if mantissa is zero. +func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) { + if f.IsInf() { + panic("infinite constant") + } + + // Break into f = mant × 2**exp, with 0.5 <= mant < 1. + var mant big.Float + exp := int64(f.MantExp(&mant)) + + // Scale so that mant is an integer. + prec := mant.MinPrec() + mant.SetMantExp(&mant, int(prec)) + exp -= int64(prec) + + manti, acc := mant.Int(nil) + if acc != big.Exact { + panic(internalErrorf("mantissa scaling failed for %f (%s)", f, acc)) + } + w.mpint(manti, typ) + if manti.Sign() != 0 { + w.int64(exp) + } +} + +func (w *exportWriter) bool(b bool) bool { + var x uint64 + if b { + x = 1 + } + w.uint64(x) + return b +} + +func (w *exportWriter) int64(x int64) { w.data.int64(x) } +func (w *exportWriter) uint64(x uint64) { w.data.uint64(x) } +func (w *exportWriter) string(s string) { w.uint64(w.p.stringOff(s)) } + +func (w *exportWriter) localIdent(obj types.Object) { + // Anonymous parameters. + if obj == nil { + w.string("") + return + } + + name := obj.Name() + if name == "_" { + w.string("_") + return + } + + w.string(name) +} + +type intWriter struct { + bytes.Buffer +} + +func (w *intWriter) int64(x int64) { + var buf [binary.MaxVarintLen64]byte + n := binary.PutVarint(buf[:], x) + w.Write(buf[:n]) +} + +func (w *intWriter) uint64(x uint64) { + var buf [binary.MaxVarintLen64]byte + n := binary.PutUvarint(buf[:], x) + w.Write(buf[:n]) +} + +func assert(cond bool) { + if !cond { + panic("internal error: assertion failed") + } +} + +// The below is copied from go/src/cmd/compile/internal/gc/syntax.go. + +// objQueue is a FIFO queue of types.Object. The zero value of objQueue is +// a ready-to-use empty queue. +type objQueue struct { + ring []types.Object + head, tail int +} + +// empty returns true if q contains no Nodes. +func (q *objQueue) empty() bool { + return q.head == q.tail +} + +// pushTail appends n to the tail of the queue. +func (q *objQueue) pushTail(obj types.Object) { + if len(q.ring) == 0 { + q.ring = make([]types.Object, 16) + } else if q.head+len(q.ring) == q.tail { + // Grow the ring. + nring := make([]types.Object, len(q.ring)*2) + // Copy the old elements. + part := q.ring[q.head%len(q.ring):] + if q.tail-q.head <= len(part) { + part = part[:q.tail-q.head] + copy(nring, part) + } else { + pos := copy(nring, part) + copy(nring[pos:], q.ring[:q.tail%len(q.ring)]) + } + q.ring, q.head, q.tail = nring, 0, q.tail-q.head + } + + q.ring[q.tail%len(q.ring)] = obj + q.tail++ +} + +// popHead pops a node from the head of the queue. It panics if q is empty. +func (q *objQueue) popHead() types.Object { + if q.empty() { + panic("dequeue empty") + } + obj := q.ring[q.head%len(q.ring)] + q.head++ + return obj +} diff --git a/internal/gcimporter/iexport_test.go b/internal/gcimporter/iexport_test.go new file mode 100644 index 00000000..3c918108 --- /dev/null +++ b/internal/gcimporter/iexport_test.go @@ -0,0 +1,308 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This is a copy of bexport_test.go for iexport.go. + +// +build go1.11 + +package gcimporter_test + +import ( + "fmt" + "go/ast" + "go/build" + "go/constant" + "go/parser" + "go/token" + "go/types" + "math/big" + "reflect" + "runtime" + "sort" + "strings" + "testing" + + "golang.org/x/tools/go/buildutil" + "golang.org/x/tools/go/internal/gcimporter" + "golang.org/x/tools/go/loader" +) + +func TestIExportData_stdlib(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo standard library is inaccessible") + } + if runtime.GOOS == "android" { + t.Skipf("incomplete std lib on %s", runtime.GOOS) + } + if isRace { + t.Skipf("stdlib tests take too long in race mode and flake on builders") + } + + // Load, parse and type-check the program. + ctxt := build.Default // copy + ctxt.GOPATH = "" // disable GOPATH + conf := loader.Config{ + Build: &ctxt, + AllowErrors: true, + } + for _, path := range buildutil.AllPackages(conf.Build) { + conf.Import(path) + } + + // Create a package containing type and value errors to ensure + // they are properly encoded/decoded. + f, err := conf.ParseFile("haserrors/haserrors.go", `package haserrors +const UnknownValue = "" + 0 +type UnknownType undefined +`) + if err != nil { + t.Fatal(err) + } + conf.CreateFromFiles("haserrors", f) + + prog, err := conf.Load() + if err != nil { + t.Fatalf("Load failed: %v", err) + } + + numPkgs := len(prog.AllPackages) + if want := 248; numPkgs < want { + t.Errorf("Loaded only %d packages, want at least %d", numPkgs, want) + } + + var sorted []*types.Package + for pkg := range prog.AllPackages { + sorted = append(sorted, pkg) + } + sort.Slice(sorted, func(i, j int) bool { + return sorted[i].Path() < sorted[j].Path() + }) + + for _, pkg := range sorted { + info := prog.AllPackages[pkg] + if info.Files == nil { + continue // empty directory + } + exportdata, err := gcimporter.IExportData(conf.Fset, pkg) + if err != nil { + t.Fatal(err) + } + if exportdata[0] == 'i' { + exportdata = exportdata[1:] // trim the 'i' in the header + } else { + t.Fatalf("unexpected first character of export data: %v", exportdata[0]) + } + + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + n, pkg2, err := gcimporter.IImportData(fset2, imports, exportdata, pkg.Path()) + if err != nil { + t.Errorf("IImportData(%s): %v", pkg.Path(), err) + continue + } + if n != len(exportdata) { + t.Errorf("IImportData(%s) decoded %d bytes, want %d", + pkg.Path(), n, len(exportdata)) + } + + // Compare the packages' corresponding members. + for _, name := range pkg.Scope().Names() { + if !ast.IsExported(name) { + continue + } + obj1 := pkg.Scope().Lookup(name) + obj2 := pkg2.Scope().Lookup(name) + if obj2 == nil { + t.Fatalf("%s.%s not found, want %s", pkg.Path(), name, obj1) + continue + } + + fl1 := fileLine(conf.Fset, obj1) + fl2 := fileLine(fset2, obj2) + if fl1 != fl2 { + t.Errorf("%s.%s: got posn %s, want %s", + pkg.Path(), name, fl2, fl1) + } + + if err := cmpObj(obj1, obj2); err != nil { + t.Errorf("%s.%s: %s\ngot: %s\nwant: %s", + pkg.Path(), name, err, obj2, obj1) + } + } + } +} + +// TestVeryLongFile tests the position of an import object declared in +// a very long input file. Line numbers greater than maxlines are +// reported as line 1, not garbage or token.NoPos. +func TestIExportData_long(t *testing.T) { + // parse and typecheck + longFile := "package foo" + strings.Repeat("\n", 123456) + "var X int" + fset1 := token.NewFileSet() + f, err := parser.ParseFile(fset1, "foo.go", longFile, 0) + if err != nil { + t.Fatal(err) + } + var conf types.Config + pkg, err := conf.Check("foo", fset1, []*ast.File{f}, nil) + if err != nil { + t.Fatal(err) + } + + // export + exportdata, err := gcimporter.IExportData(fset1, pkg) + if err != nil { + t.Fatal(err) + } + if exportdata[0] == 'i' { + exportdata = exportdata[1:] // trim the 'i' in the header + } else { + t.Fatalf("unexpected first character of export data: %v", exportdata[0]) + } + + // import + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + _, pkg2, err := gcimporter.IImportData(fset2, imports, exportdata, pkg.Path()) + if err != nil { + t.Fatalf("IImportData(%s): %v", pkg.Path(), err) + } + + // compare + posn1 := fset1.Position(pkg.Scope().Lookup("X").Pos()) + posn2 := fset2.Position(pkg2.Scope().Lookup("X").Pos()) + if want := "foo.go:1:1"; posn2.String() != want { + t.Errorf("X position = %s, want %s (orig was %s)", + posn2, want, posn1) + } +} + +func TestIExportData_typealiases(t *testing.T) { + // parse and typecheck + fset1 := token.NewFileSet() + f, err := parser.ParseFile(fset1, "p.go", src, 0) + if err != nil { + t.Fatal(err) + } + var conf types.Config + pkg1, err := conf.Check("p", fset1, []*ast.File{f}, nil) + if err == nil { + // foo in undeclared in src; we should see an error + t.Fatal("invalid source type-checked without error") + } + if pkg1 == nil { + // despite incorrect src we should see a (partially) type-checked package + t.Fatal("nil package returned") + } + checkPkg(t, pkg1, "export") + + // export + exportdata, err := gcimporter.IExportData(fset1, pkg1) + if err != nil { + t.Fatal(err) + } + if exportdata[0] == 'i' { + exportdata = exportdata[1:] // trim the 'i' in the header + } else { + t.Fatalf("unexpected first character of export data: %v", exportdata[0]) + } + + // import + imports := make(map[string]*types.Package) + fset2 := token.NewFileSet() + _, pkg2, err := gcimporter.IImportData(fset2, imports, exportdata, pkg1.Path()) + if err != nil { + t.Fatalf("IImportData(%s): %v", pkg1.Path(), err) + } + checkPkg(t, pkg2, "import") +} + +// cmpObj reports how x and y differ. They are assumed to belong to different +// universes so cannot be compared directly. It is an adapted version of +// equalObj in bexport_test.go. +func cmpObj(x, y types.Object) error { + if reflect.TypeOf(x) != reflect.TypeOf(y) { + return fmt.Errorf("%T vs %T", x, y) + } + xt := x.Type() + yt := y.Type() + switch x.(type) { + case *types.Var, *types.Func: + // ok + case *types.Const: + xval := x.(*types.Const).Val() + yval := y.(*types.Const).Val() + equal := constant.Compare(xval, token.EQL, yval) + if !equal { + // try approx. comparison + xkind := xval.Kind() + ykind := yval.Kind() + if xkind == constant.Complex || ykind == constant.Complex { + equal = same(constant.Real(xval), constant.Real(yval)) && + same(constant.Imag(xval), constant.Imag(yval)) + } else if xkind == constant.Float || ykind == constant.Float { + equal = same(xval, yval) + } else if xkind == constant.Unknown && ykind == constant.Unknown { + equal = true + } + } + if !equal { + return fmt.Errorf("unequal constants %s vs %s", xval, yval) + } + case *types.TypeName: + xt = xt.Underlying() + yt = yt.Underlying() + default: + return fmt.Errorf("unexpected %T", x) + } + return equalType(xt, yt) +} + +// Use the same floating-point precision (512) as cmd/compile +// (see Mpprec in cmd/compile/internal/gc/mpfloat.go). +const mpprec = 512 + +// same compares non-complex numeric values and reports if they are approximately equal. +func same(x, y constant.Value) bool { + xf := constantToFloat(x) + yf := constantToFloat(y) + d := new(big.Float).Sub(xf, yf) + d.Abs(d) + eps := big.NewFloat(1.0 / (1 << (mpprec - 1))) // allow for 1 bit of error + return d.Cmp(eps) < 0 +} + +// copy of the function with the same name in iexport.go. +func constantToFloat(x constant.Value) *big.Float { + var f big.Float + f.SetPrec(mpprec) + if v, exact := constant.Float64Val(x); exact { + // float64 + f.SetFloat64(v) + } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { + // TODO(gri): add big.Rat accessor to constant.Value. + n := valueToRat(num) + d := valueToRat(denom) + f.SetRat(n.Quo(n, d)) + } else { + // Value too large to represent as a fraction => inaccessible. + // TODO(gri): add big.Float accessor to constant.Value. + _, ok := f.SetString(x.ExactString()) + if !ok { + panic("should not reach here") + } + } + return &f +} + +// copy of the function with the same name in iexport.go. +func valueToRat(x constant.Value) *big.Rat { + // Convert little-endian to big-endian. + // I can't believe this is necessary. + bytes := constant.Bytes(x) + for i := 0; i < len(bytes)/2; i++ { + bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i] + } + return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes)) +} diff --git a/internal/gcimporter/iimport.go b/internal/gcimporter/iimport.go new file mode 100644 index 00000000..3cb7ae5b --- /dev/null +++ b/internal/gcimporter/iimport.go @@ -0,0 +1,606 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Indexed package import. +// See cmd/compile/internal/gc/iexport.go for the export data format. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "fmt" + "go/constant" + "go/token" + "go/types" + "io" + "sort" +) + +type intReader struct { + *bytes.Reader + path string +} + +func (r *intReader) int64() int64 { + i, err := binary.ReadVarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +func (r *intReader) uint64() uint64 { + i, err := binary.ReadUvarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +const predeclReserved = 32 + +type itag uint64 + +const ( + // Types + definedType itag = iota + pointerType + sliceType + arrayType + chanType + mapType + signatureType + structType + interfaceType +) + +// IImportData imports a package from the serialized package data +// and returns the number of bytes consumed and a reference to the package. +// If the export data version is not recognized or the format is otherwise +// compromised, an error is returned. +func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { + const currentVersion = 0 + version := -1 + defer func() { + if e := recover(); e != nil { + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } + } + }() + + r := &intReader{bytes.NewReader(data), path} + + version = int(r.uint64()) + switch version { + case currentVersion: + default: + errorf("unknown iexport format version %d", version) + } + + sLen := int64(r.uint64()) + dLen := int64(r.uint64()) + + whence, _ := r.Seek(0, io.SeekCurrent) + stringData := data[whence : whence+sLen] + declData := data[whence+sLen : whence+sLen+dLen] + r.Seek(sLen+dLen, io.SeekCurrent) + + p := iimporter{ + ipath: path, + + stringData: stringData, + stringCache: make(map[uint64]string), + pkgCache: make(map[uint64]*types.Package), + + declData: declData, + pkgIndex: make(map[*types.Package]map[string]uint64), + typCache: make(map[uint64]types.Type), + + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, + } + + for i, pt := range predeclared() { + p.typCache[uint64(i)] = pt + } + + pkgList := make([]*types.Package, r.uint64()) + for i := range pkgList { + pkgPathOff := r.uint64() + pkgPath := p.stringAt(pkgPathOff) + pkgName := p.stringAt(r.uint64()) + _ = r.uint64() // package height; unused by go/types + + if pkgPath == "" { + pkgPath = path + } + pkg := imports[pkgPath] + if pkg == nil { + pkg = types.NewPackage(pkgPath, pkgName) + imports[pkgPath] = pkg + } else if pkg.Name() != pkgName { + errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path) + } + + p.pkgCache[pkgPathOff] = pkg + + nameIndex := make(map[string]uint64) + for nSyms := r.uint64(); nSyms > 0; nSyms-- { + name := p.stringAt(r.uint64()) + nameIndex[name] = r.uint64() + } + + p.pkgIndex[pkg] = nameIndex + pkgList[i] = pkg + } + var localpkg *types.Package + for _, pkg := range pkgList { + if pkg.Path() == path { + localpkg = pkg + } + } + + names := make([]string, 0, len(p.pkgIndex[localpkg])) + for name := range p.pkgIndex[localpkg] { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + p.doDecl(localpkg, name) + } + + for _, typ := range p.interfaceList { + typ.Complete() + } + + // record all referenced packages as imports + list := append(([]*types.Package)(nil), pkgList[1:]...) + sort.Sort(byPath(list)) + localpkg.SetImports(list) + + // package was imported completely and without errors + localpkg.MarkComplete() + + consumed, _ := r.Seek(0, io.SeekCurrent) + return int(consumed), localpkg, nil +} + +type iimporter struct { + ipath string + + stringData []byte + stringCache map[uint64]string + pkgCache map[uint64]*types.Package + + declData []byte + pkgIndex map[*types.Package]map[string]uint64 + typCache map[uint64]types.Type + + fake fakeFileSet + interfaceList []*types.Interface +} + +func (p *iimporter) doDecl(pkg *types.Package, name string) { + // See if we've already imported this declaration. + if obj := pkg.Scope().Lookup(name); obj != nil { + return + } + + off, ok := p.pkgIndex[pkg][name] + if !ok { + errorf("%v.%v not in index", pkg, name) + } + + r := &importReader{p: p, currPkg: pkg} + r.declReader.Reset(p.declData[off:]) + + r.obj(name) +} + +func (p *iimporter) stringAt(off uint64) string { + if s, ok := p.stringCache[off]; ok { + return s + } + + slen, n := binary.Uvarint(p.stringData[off:]) + if n <= 0 { + errorf("varint failed") + } + spos := off + uint64(n) + s := string(p.stringData[spos : spos+slen]) + p.stringCache[off] = s + return s +} + +func (p *iimporter) pkgAt(off uint64) *types.Package { + if pkg, ok := p.pkgCache[off]; ok { + return pkg + } + path := p.stringAt(off) + errorf("missing package %q in %q", path, p.ipath) + return nil +} + +func (p *iimporter) typAt(off uint64, base *types.Named) types.Type { + if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) { + return t + } + + if off < predeclReserved { + errorf("predeclared type missing from cache: %v", off) + } + + r := &importReader{p: p} + r.declReader.Reset(p.declData[off-predeclReserved:]) + t := r.doType(base) + + if base == nil || !isInterface(t) { + p.typCache[off] = t + } + return t +} + +type importReader struct { + p *iimporter + declReader bytes.Reader + currPkg *types.Package + prevFile string + prevLine int64 +} + +func (r *importReader) obj(name string) { + tag := r.byte() + pos := r.pos() + + switch tag { + case 'A': + typ := r.typ() + + r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) + + case 'C': + typ, val := r.value() + + r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) + + case 'F': + sig := r.signature(nil) + + r.declare(types.NewFunc(pos, r.currPkg, name, sig)) + + case 'T': + // Types can be recursive. We need to setup a stub + // declaration before recursing. + obj := types.NewTypeName(pos, r.currPkg, name, nil) + named := types.NewNamed(obj, nil, nil) + r.declare(obj) + + underlying := r.p.typAt(r.uint64(), named).Underlying() + named.SetUnderlying(underlying) + + if !isInterface(underlying) { + for n := r.uint64(); n > 0; n-- { + mpos := r.pos() + mname := r.ident() + recv := r.param() + msig := r.signature(recv) + + named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig)) + } + } + + case 'V': + typ := r.typ() + + r.declare(types.NewVar(pos, r.currPkg, name, typ)) + + default: + errorf("unexpected tag: %v", tag) + } +} + +func (r *importReader) declare(obj types.Object) { + obj.Pkg().Scope().Insert(obj) +} + +func (r *importReader) value() (typ types.Type, val constant.Value) { + typ = r.typ() + + switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType { + case types.IsBoolean: + val = constant.MakeBool(r.bool()) + + case types.IsString: + val = constant.MakeString(r.string()) + + case types.IsInteger: + val = r.mpint(b) + + case types.IsFloat: + val = r.mpfloat(b) + + case types.IsComplex: + re := r.mpfloat(b) + im := r.mpfloat(b) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + + default: + if b.Kind() == types.Invalid { + val = constant.MakeUnknown() + return + } + errorf("unexpected type %v", typ) // panics + panic("unreachable") + } + + return +} + +func intSize(b *types.Basic) (signed bool, maxBytes uint) { + if (b.Info() & types.IsUntyped) != 0 { + return true, 64 + } + + switch b.Kind() { + case types.Float32, types.Complex64: + return true, 3 + case types.Float64, types.Complex128: + return true, 7 + } + + signed = (b.Info() & types.IsUnsigned) == 0 + switch b.Kind() { + case types.Int8, types.Uint8: + maxBytes = 1 + case types.Int16, types.Uint16: + maxBytes = 2 + case types.Int32, types.Uint32: + maxBytes = 4 + default: + maxBytes = 8 + } + + return +} + +func (r *importReader) mpint(b *types.Basic) constant.Value { + signed, maxBytes := intSize(b) + + maxSmall := 256 - maxBytes + if signed { + maxSmall = 256 - 2*maxBytes + } + if maxBytes == 1 { + maxSmall = 256 + } + + n, _ := r.declReader.ReadByte() + if uint(n) < maxSmall { + v := int64(n) + if signed { + v >>= 1 + if n&1 != 0 { + v = ^v + } + } + return constant.MakeInt64(v) + } + + v := -n + if signed { + v = -(n &^ 1) >> 1 + } + if v < 1 || uint(v) > maxBytes { + errorf("weird decoding: %v, %v => %v", n, signed, v) + } + + buf := make([]byte, v) + io.ReadFull(&r.declReader, buf) + + // convert to little endian + // TODO(gri) go/constant should have a more direct conversion function + // (e.g., once it supports a big.Float based implementation) + for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { + buf[i], buf[j] = buf[j], buf[i] + } + + x := constant.MakeFromBytes(buf) + if signed && n&1 != 0 { + x = constant.UnaryOp(token.SUB, x, 0) + } + return x +} + +func (r *importReader) mpfloat(b *types.Basic) constant.Value { + x := r.mpint(b) + if constant.Sign(x) == 0 { + return x + } + + exp := r.int64() + switch { + case exp > 0: + x = constant.Shift(x, token.SHL, uint(exp)) + case exp < 0: + d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) + x = constant.BinaryOp(x, token.QUO, d) + } + return x +} + +func (r *importReader) ident() string { + return r.string() +} + +func (r *importReader) qualifiedIdent() (*types.Package, string) { + name := r.string() + pkg := r.pkg() + return pkg, name +} + +func (r *importReader) pos() token.Pos { + delta := r.int64() + if delta != deltaNewFile { + r.prevLine += delta + } else if l := r.int64(); l == -1 { + r.prevLine += deltaNewFile + } else { + r.prevFile = r.string() + r.prevLine = l + } + + if r.prevFile == "" && r.prevLine == 0 { + return token.NoPos + } + + return r.p.fake.pos(r.prevFile, int(r.prevLine)) +} + +func (r *importReader) typ() types.Type { + return r.p.typAt(r.uint64(), nil) +} + +func isInterface(t types.Type) bool { + _, ok := t.(*types.Interface) + return ok +} + +func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) } +func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } + +func (r *importReader) doType(base *types.Named) types.Type { + switch k := r.kind(); k { + default: + errorf("unexpected kind tag in %q: %v", r.p.ipath, k) + return nil + + case definedType: + pkg, name := r.qualifiedIdent() + r.p.doDecl(pkg, name) + return pkg.Scope().Lookup(name).(*types.TypeName).Type() + case pointerType: + return types.NewPointer(r.typ()) + case sliceType: + return types.NewSlice(r.typ()) + case arrayType: + n := r.uint64() + return types.NewArray(r.typ(), int64(n)) + case chanType: + dir := chanDir(int(r.uint64())) + return types.NewChan(dir, r.typ()) + case mapType: + return types.NewMap(r.typ(), r.typ()) + case signatureType: + r.currPkg = r.pkg() + return r.signature(nil) + + case structType: + r.currPkg = r.pkg() + + fields := make([]*types.Var, r.uint64()) + tags := make([]string, len(fields)) + for i := range fields { + fpos := r.pos() + fname := r.ident() + ftyp := r.typ() + emb := r.bool() + tag := r.string() + + fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb) + tags[i] = tag + } + return types.NewStruct(fields, tags) + + case interfaceType: + r.currPkg = r.pkg() + + embeddeds := make([]types.Type, r.uint64()) + for i := range embeddeds { + _ = r.pos() + embeddeds[i] = r.typ() + } + + methods := make([]*types.Func, r.uint64()) + for i := range methods { + mpos := r.pos() + mname := r.ident() + + // TODO(mdempsky): Matches bimport.go, but I + // don't agree with this. + var recv *types.Var + if base != nil { + recv = types.NewVar(token.NoPos, r.currPkg, "", base) + } + + msig := r.signature(recv) + methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig) + } + + typ := newInterface(methods, embeddeds) + r.p.interfaceList = append(r.p.interfaceList, typ) + return typ + } +} + +func (r *importReader) kind() itag { + return itag(r.uint64()) +} + +func (r *importReader) signature(recv *types.Var) *types.Signature { + params := r.paramList() + results := r.paramList() + variadic := params.Len() > 0 && r.bool() + return types.NewSignature(recv, params, results, variadic) +} + +func (r *importReader) paramList() *types.Tuple { + xs := make([]*types.Var, r.uint64()) + for i := range xs { + xs[i] = r.param() + } + return types.NewTuple(xs...) +} + +func (r *importReader) param() *types.Var { + pos := r.pos() + name := r.ident() + typ := r.typ() + return types.NewParam(pos, r.currPkg, name, typ) +} + +func (r *importReader) bool() bool { + return r.uint64() != 0 +} + +func (r *importReader) int64() int64 { + n, err := binary.ReadVarint(&r.declReader) + if err != nil { + errorf("readVarint: %v", err) + } + return n +} + +func (r *importReader) uint64() uint64 { + n, err := binary.ReadUvarint(&r.declReader) + if err != nil { + errorf("readUvarint: %v", err) + } + return n +} + +func (r *importReader) byte() byte { + x, err := r.declReader.ReadByte() + if err != nil { + errorf("declReader.ReadByte: %v", err) + } + return x +} diff --git a/internal/gcimporter/israce_test.go b/internal/gcimporter/israce_test.go new file mode 100644 index 00000000..af8e52b2 --- /dev/null +++ b/internal/gcimporter/israce_test.go @@ -0,0 +1,11 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build race + +package gcimporter_test + +func init() { + isRace = true +} diff --git a/internal/gcimporter/newInterface10.go b/internal/gcimporter/newInterface10.go new file mode 100644 index 00000000..463f2522 --- /dev/null +++ b/internal/gcimporter/newInterface10.go @@ -0,0 +1,21 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + named := make([]*types.Named, len(embeddeds)) + for i, e := range embeddeds { + var ok bool + named[i], ok = e.(*types.Named) + if !ok { + panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") + } + } + return types.NewInterface(methods, named) +} diff --git a/internal/gcimporter/newInterface11.go b/internal/gcimporter/newInterface11.go new file mode 100644 index 00000000..ab28b95c --- /dev/null +++ b/internal/gcimporter/newInterface11.go @@ -0,0 +1,13 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + return types.NewInterfaceType(methods, embeddeds) +} diff --git a/internal/gcimporter/testdata/a.go b/internal/gcimporter/testdata/a.go new file mode 100644 index 00000000..56e4292c --- /dev/null +++ b/internal/gcimporter/testdata/a.go @@ -0,0 +1,14 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Input for TestIssue13566 + +package a + +import "encoding/json" + +type A struct { + a *A + json json.RawMessage +} diff --git a/internal/gcimporter/testdata/b.go b/internal/gcimporter/testdata/b.go new file mode 100644 index 00000000..41966782 --- /dev/null +++ b/internal/gcimporter/testdata/b.go @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Input for TestIssue13566 + +package b + +import "./a" + +type A a.A diff --git a/internal/gcimporter/testdata/exports.go b/internal/gcimporter/testdata/exports.go new file mode 100644 index 00000000..8ee28b09 --- /dev/null +++ b/internal/gcimporter/testdata/exports.go @@ -0,0 +1,89 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is used to generate an object file which +// serves as test file for gcimporter_test.go. + +package exports + +import ( + "go/ast" +) + +// Issue 3682: Correctly read dotted identifiers from export data. +const init1 = 0 + +func init() {} + +const ( + C0 int = 0 + C1 = 3.14159265 + C2 = 2.718281828i + C3 = -123.456e-789 + C4 = +123.456E+789 + C5 = 1234i + C6 = "foo\n" + C7 = `bar\n` +) + +type ( + T1 int + T2 [10]int + T3 []int + T4 *int + T5 chan int + T6a chan<- int + T6b chan (<-chan int) + T6c chan<- (chan int) + T7 <-chan *ast.File + T8 struct{} + T9 struct { + a int + b, c float32 + d []string `go:"tag"` + } + T10 struct { + T8 + T9 + _ *T10 + } + T11 map[int]string + T12 interface{} + T13 interface { + m1() + m2(int) float32 + } + T14 interface { + T12 + T13 + m3(x ...struct{}) []T9 + } + T15 func() + T16 func(int) + T17 func(x int) + T18 func() float32 + T19 func() (x float32) + T20 func(...interface{}) + T21 struct{ next *T21 } + T22 struct{ link *T23 } + T23 struct{ link *T22 } + T24 *T24 + T25 *T26 + T26 *T27 + T27 *T25 + T28 func(T28) T28 +) + +var ( + V0 int + V1 = -991.0 +) + +func F1() {} +func F2(x int) {} +func F3() int { return 0 } +func F4() float32 { return 0 } +func F5(a, b, c int, u, v, w struct{ x, y T1 }, more ...interface{}) (p, q, r chan<- T10) + +func (p *T1) M1() diff --git a/internal/gcimporter/testdata/issue15920.go b/internal/gcimporter/testdata/issue15920.go new file mode 100644 index 00000000..c70f7d82 --- /dev/null +++ b/internal/gcimporter/testdata/issue15920.go @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +// The underlying type of Error is the underlying type of error. +// Make sure we can import this again without problems. +type Error error + +func F() Error { return nil } diff --git a/internal/gcimporter/testdata/issue20046.go b/internal/gcimporter/testdata/issue20046.go new file mode 100644 index 00000000..c63ee821 --- /dev/null +++ b/internal/gcimporter/testdata/issue20046.go @@ -0,0 +1,9 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +var V interface { + M() +} diff --git a/internal/gcimporter/testdata/issue25301.go b/internal/gcimporter/testdata/issue25301.go new file mode 100644 index 00000000..e3dc98b4 --- /dev/null +++ b/internal/gcimporter/testdata/issue25301.go @@ -0,0 +1,17 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package issue25301 + +type ( + A = interface { + M() + } + T interface { + A + } + S struct{} +) + +func (S) M() { println("m") } diff --git a/internal/gcimporter/testdata/p.go b/internal/gcimporter/testdata/p.go new file mode 100644 index 00000000..9e2e7057 --- /dev/null +++ b/internal/gcimporter/testdata/p.go @@ -0,0 +1,13 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Input for TestIssue15517 + +package p + +const C = 0 + +var V int + +func F() {} diff --git a/internal/gcimporter/testdata/versions/test.go b/internal/gcimporter/testdata/versions/test.go new file mode 100644 index 00000000..6362adc2 --- /dev/null +++ b/internal/gcimporter/testdata/versions/test.go @@ -0,0 +1,30 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/testdata/versions.test.go. + +// To create a test case for a new export format version, +// build this package with the latest compiler and store +// the resulting .a file appropriately named in the versions +// directory. The VersionHandling test will pick it up. +// +// In the testdata/versions: +// +// go build -o test_go1.$X_$Y.a test.go +// +// with $X = Go version and $Y = export format version +// (add 'b' or 'i' to distinguish between binary and +// indexed format starting with 1.11 as long as both +// formats are supported). +// +// Make sure this source is extended such that it exercises +// whatever export format change has taken place. + +package test + +// Any release before and including Go 1.7 didn't encode +// the package for a blank struct field. +type BlankField struct { + _ int +} diff --git a/package.go b/package.go index c8acca23..0702592b 100644 --- a/package.go +++ b/package.go @@ -10,7 +10,7 @@ import ( "os" "strings" - "golang.org/x/tools/go/gcexportdata" + "github.com/visualfc/gocode/internal/gcexportdata" ) type package_parser interface { diff --git a/package_types.go b/package_types.go index 088dff8a..244831f2 100644 --- a/package_types.go +++ b/package_types.go @@ -8,8 +8,8 @@ import ( "io" "log" + "github.com/visualfc/gocode/internal/gcexportdata" pkgwalk "github.com/visualfc/gotools/types" - "golang.org/x/tools/go/gcexportdata" ) type types_parser struct { From e8d6135e7f80e1f1022a597952dbfae001298e2a Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 14 Apr 2020 22:08:39 +0800 Subject: [PATCH 077/133] update depends --- go.mod | 4 +- go.sum | 47 + internal/gcexportdata/gcexportdata.go | 2 +- internal/gcimporter/gcimporter.go | 2 +- vendor/github.com/visualfc/fastmod/fastmod.go | 92 +- vendor/github.com/visualfc/fastmod/go.mod | 2 + vendor/github.com/visualfc/fastmod/go.sum | 16 + .../fastmod/internal/modfile/gopkgin.go | 47 - .../visualfc/gotools/pkg/stdlib/mkpkglist.go | 216 --- .../visualfc/gotools/pkg/stdlib/mkstdlib.go | 101 -- .../visualfc/gotools/pkg/stdlib/pkglist.go | 85 +- .../visualfc/gotools/pkg/stdlib/zstdlib.go | 1317 +++++++++-------- .../visualfc/gotools/types/types.go | 949 ++++++++---- vendor/golang.org/x/mod/LICENSE | 27 + vendor/golang.org/x/mod/PATENTS | 22 + .../x/mod/internal/lazyregexp/lazyre.go | 78 + .../x/mod}/modfile/print.go | 1 + .../x/mod}/modfile/read.go | 44 +- .../x/mod}/modfile/rule.go | 122 +- .../x/mod}/module/module.go | 396 +++-- .../x/mod}/semver/semver.go | 4 +- .../x/tools/go/ast/astutil/enclosing.go | 627 ++++++++ .../x/tools/go/ast/astutil/imports.go | 482 ++++++ .../x/tools/go/ast/astutil/rewrite.go | 477 ++++++ .../golang.org/x/tools/go/ast/astutil/util.go | 14 + .../x/tools/go/buildutil/overlay.go | 2 +- .../x/tools/go/gcexportdata/gcexportdata.go | 2 +- .../x/tools/go/gcexportdata/main.go | 99 -- .../golang.org/x/tools/go/internal/cgo/cgo.go | 220 +++ .../x/tools/go/internal/cgo/cgo_pkgconfig.go | 39 + .../x/tools/go/internal/gcimporter/bimport.go | 11 +- .../go/internal/gcimporter/gcimporter.go | 8 +- .../x/tools/go/internal/gcimporter/iexport.go | 34 +- .../x/tools/go/internal/gcimporter/iimport.go | 68 +- vendor/golang.org/x/tools/go/loader/doc.go | 204 +++ vendor/golang.org/x/tools/go/loader/loader.go | 1086 ++++++++++++++ vendor/golang.org/x/tools/go/loader/util.go | 124 ++ vendor/golang.org/x/xerrors/LICENSE | 27 + vendor/golang.org/x/xerrors/PATENTS | 22 + vendor/golang.org/x/xerrors/README | 2 + vendor/golang.org/x/xerrors/adaptor.go | 193 +++ vendor/golang.org/x/xerrors/codereview.cfg | 1 + vendor/golang.org/x/xerrors/doc.go | 22 + vendor/golang.org/x/xerrors/errors.go | 33 + vendor/golang.org/x/xerrors/fmt.go | 187 +++ vendor/golang.org/x/xerrors/format.go | 34 + vendor/golang.org/x/xerrors/frame.go | 56 + vendor/golang.org/x/xerrors/go.mod | 3 + .../golang.org/x/xerrors/internal/internal.go | 8 + vendor/golang.org/x/xerrors/wrap.go | 106 ++ vendor/modules.txt | 28 +- 51 files changed, 6195 insertions(+), 1598 deletions(-) create mode 100644 vendor/github.com/visualfc/fastmod/go.sum delete mode 100644 vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go create mode 100644 vendor/golang.org/x/mod/LICENSE create mode 100644 vendor/golang.org/x/mod/PATENTS create mode 100644 vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go rename vendor/{github.com/visualfc/fastmod/internal => golang.org/x/mod}/modfile/print.go (97%) rename vendor/{github.com/visualfc/fastmod/internal => golang.org/x/mod}/modfile/read.go (94%) rename vendor/{github.com/visualfc/fastmod/internal => golang.org/x/mod}/modfile/rule.go (86%) rename vendor/{github.com/visualfc/fastmod/internal => golang.org/x/mod}/module/module.go (57%) rename vendor/{github.com/visualfc/fastmod/internal => golang.org/x/mod}/semver/semver.go (99%) create mode 100644 vendor/golang.org/x/tools/go/ast/astutil/enclosing.go create mode 100644 vendor/golang.org/x/tools/go/ast/astutil/imports.go create mode 100644 vendor/golang.org/x/tools/go/ast/astutil/rewrite.go create mode 100644 vendor/golang.org/x/tools/go/ast/astutil/util.go delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/main.go create mode 100644 vendor/golang.org/x/tools/go/internal/cgo/cgo.go create mode 100644 vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go create mode 100644 vendor/golang.org/x/tools/go/loader/doc.go create mode 100644 vendor/golang.org/x/tools/go/loader/loader.go create mode 100644 vendor/golang.org/x/tools/go/loader/util.go create mode 100644 vendor/golang.org/x/xerrors/LICENSE create mode 100644 vendor/golang.org/x/xerrors/PATENTS create mode 100644 vendor/golang.org/x/xerrors/README create mode 100644 vendor/golang.org/x/xerrors/adaptor.go create mode 100644 vendor/golang.org/x/xerrors/codereview.cfg create mode 100644 vendor/golang.org/x/xerrors/doc.go create mode 100644 vendor/golang.org/x/xerrors/errors.go create mode 100644 vendor/golang.org/x/xerrors/fmt.go create mode 100644 vendor/golang.org/x/xerrors/format.go create mode 100644 vendor/golang.org/x/xerrors/frame.go create mode 100644 vendor/golang.org/x/xerrors/go.mod create mode 100644 vendor/golang.org/x/xerrors/internal/internal.go create mode 100644 vendor/golang.org/x/xerrors/wrap.go diff --git a/go.mod b/go.mod index 628851f1..9a44129c 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.12 require ( - github.com/visualfc/gotools v1.0.0 - golang.org/x/tools v0.0.0-20190710184609-286818132824 + github.com/visualfc/gotools v1.1.0 + golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 ) diff --git a/go.sum b/go.sum index 3ad018bb..16db4850 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,42 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.10-0.20191209115840-8ab47f72e854/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-delve/delve v1.2.1-0.20190713012804-df65be43aeb1/go.mod h1:DR/S+I+xQmTINVqEzooWl5FmZe6PYn9g6Mr99xEjhi0= +github.com/go-delve/delve v1.4.0/go.mod h1:gQM0ReOJLNAvPuKAXfjHngtE93C2yc/ekTbo7YbAHSo= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2F817yeZsSFMfnpXUYHJsuU5+W6AT8= github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f h1:XXkmqMVWchE7AizXintmZ8bZr3Sy8RaLk+wSjTbWOkk= github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= github.com/visualfc/fastmod v1.0.0 h1:3UcYFM+mzdk5AeKF7itO7D7rEv9Vkk0f2HOZi6KCMh8= github.com/visualfc/fastmod v1.0.0/go.mod h1:MjR7AyXKzcr5S9uEeJPI4xID37/q88a8FSBS/2H8AFc= +github.com/visualfc/fastmod v1.2.0 h1:DwuyA4xcSzQ/dwAA75nO2J8YXr8h/ouLEzzhIKGfURA= +github.com/visualfc/fastmod v1.2.0/go.mod h1:GGLvzTGsAMsVBMSLEnypACnwEj6syguJSV0qob6LveI= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= @@ -28,16 +45,46 @@ github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae h1:+gFYnw038UDXdE github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae/go.mod h1:6EzUzmR//1Tc63pj2BE+38T23PQDW64AEyMQoncXOcI= github.com/visualfc/gotools v1.0.0 h1:08O9KKHoW68uvacgpHOxJWL/lPiMtISUsaBH5yd7++w= github.com/visualfc/gotools v1.0.0/go.mod h1:imEdbI+QLcpnRkK4UUnFFjwUZF7Dl4cjqknTIJ4Zms0= +github.com/visualfc/gotools v1.1.0 h1:zVzTsi1dwYV1RCldZa8iCNMnPlVnxt2JJq2SQEqWls0= +github.com/visualfc/gotools v1.1.0/go.mod h1:2v+PW2aVfSHAyGN/K6YY+0USyWUDHM6m1rt814MaOhc= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= +golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY= golang.org/x/tools v0.0.0-20190710184609-286818132824/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 h1:gkI/wGGwpcG5W4hLCzZNGxA4wzWBGGDStRI1MrjDl2Q= +golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/internal/gcexportdata/gcexportdata.go b/internal/gcexportdata/gcexportdata.go index 027b4d75..250de66f 100644 --- a/internal/gcexportdata/gcexportdata.go +++ b/internal/gcexportdata/gcexportdata.go @@ -18,7 +18,7 @@ // Go 1.8 export data files, so they will work before and after the // Go update. (See discussion at https://golang.org/issue/15651.) // -package gcexportdata // import "golang.org/x/tools/go/gcexportdata" +package gcexportdata import ( "bufio" diff --git a/internal/gcimporter/gcimporter.go b/internal/gcimporter/gcimporter.go index 9cf18660..31238f0d 100644 --- a/internal/gcimporter/gcimporter.go +++ b/internal/gcimporter/gcimporter.go @@ -9,7 +9,7 @@ // Package gcimporter provides various functions for reading // gc-generated object files that can be used to implement the // Importer interface defined by the Go 1.5 standard library package. -package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" +package gcimporter import ( "bufio" diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index bf0ce6fe..b54b6f41 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // -// internal modfile/module/semver copy from Go1.11 source package fastmod @@ -15,20 +14,10 @@ import ( "path/filepath" "strings" - "github.com/visualfc/fastmod/internal/modfile" - "github.com/visualfc/fastmod/internal/module" + "golang.org/x/mod/modfile" + "golang.org/x/mod/module" ) -// var ( -// PkgModPath string -// ) - -// func UpdatePkgMod(ctx *build.Context) { -// if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { -// PkgModPath = filepath.Join(list[0], "pkg/mod") -// } -// } - func fixVersion(path, vers string) (string, error) { return vers, nil } @@ -40,7 +29,11 @@ func LookupModFile(dir string) (string, error) { if err != nil { return "", err } - return strings.TrimSpace(string(data)), nil + fpath := strings.TrimSpace(string(data)) + if strings.HasSuffix(fpath, ".mod") { + return fpath, nil + } + return "", nil } type ModuleList struct { @@ -82,7 +75,7 @@ func (m *Mod) EncodeVersionPath() string { if strings.HasPrefix(v.Path, "./") { return v.Path } - path, _ := module.EncodePath(v.Path) + path, _ := module.EscapePath(v.Path) if v.Version != "" { return path + "@" + v.Version } @@ -143,9 +136,13 @@ const ( PkgTypeLocal // mod pkg sub local PkgTypeLocalMod // mod pkg sub local mod PkgTypeDepMod // mod pkg dep gopath/pkg/mod + PkgTypeVendor ) func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { + if pkg == m.path { + return m.path, m.fdir, PkgTypeMod + } if strings.HasPrefix(pkg, m.path+"/") { return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]), PkgTypeLocal } @@ -181,8 +178,8 @@ func (mc *ModuleList) LoadModule(dir string) (*Module, error) { if err != nil { return nil, err } - if !strings.HasSuffix(fmod, ".mod") { - return nil, err + if fmod == "" { + return nil, nil } return mc.LoadModuleFile(fmod) } @@ -223,6 +220,7 @@ type Package struct { ModList *ModuleList Root *Node NodeMap map[string]*Node + isStd bool } func (p *Package) Node() *Node { @@ -265,6 +263,14 @@ func (p *Package) lookup(node *Node, pkg string) (path string, dir string, typ P } func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { + if p.isStd { + for _, m := range p.Root.Mods { + if m.Require.Path == pkg { + vpath := filepath.Join(p.Root.fdir, "vendor", pkg) + return pkg, vpath, PkgTypeVendor + } + } + } return p.lookup(p.Root, pkg) } @@ -334,15 +340,61 @@ func GetPkgModPath(ctx *build.Context) string { } func LoadPackage(dir string, ctx *build.Context) (*Package, error) { + fmod, err := LookupModFile(dir) + if err != nil { + return nil, err + } + if fmod == "" { + return nil, nil + } ml := NewModuleList(ctx) - m, err := ml.LoadModule(dir) - if m == nil { + m, err := ml.LoadModuleFile(fmod) + if err != nil { return nil, err } node := &Node{m, nil, nil} pkgmpath := GetPkgModPath(ctx) - p := &Package{ctx, pkgmpath, ml, node, make(map[string]*Node)} + p := &Package{ctx, pkgmpath, ml, node, make(map[string]*Node), false} p.NodeMap[m.fdir] = node p.load(p.Root) return p, nil } + +func NewPackage(ctx *build.Context) *Package { + return &Package{ + ctx: ctx, + pkgModPath: GetPkgModPath(ctx), + } +} + +func (p *Package) Clear() { + p.ModList = NewModuleList(p.ctx) + p.Root = nil + p.NodeMap = make(map[string]*Node) +} + +func (p *Package) LoadModule(dir string) (err error) { + p.Clear() + fmod, err := LookupModFile(dir) + if err != nil { + return err + } + if fmod == "" { + return nil + } + m, err := p.ModList.LoadModuleFile(fmod) + if err != nil { + return err + } + p.Root = &Node{m, nil, nil} + p.NodeMap[m.fdir] = p.Root + if m.path == "std" && filepath.Join(p.ctx.GOROOT, "src") == m.fdir { + p.isStd = true + } + p.load(p.Root) + return nil +} + +func (p *Package) IsValid() bool { + return p.Root != nil +} diff --git a/vendor/github.com/visualfc/fastmod/go.mod b/vendor/github.com/visualfc/fastmod/go.mod index 5a131119..b0c86e2c 100644 --- a/vendor/github.com/visualfc/fastmod/go.mod +++ b/vendor/github.com/visualfc/fastmod/go.mod @@ -1,3 +1,5 @@ module github.com/visualfc/fastmod go 1.12 + +require golang.org/x/mod v0.2.0 diff --git a/vendor/github.com/visualfc/fastmod/go.sum b/vendor/github.com/visualfc/fastmod/go.sum new file mode 100644 index 00000000..2f5e80d6 --- /dev/null +++ b/vendor/github.com/visualfc/fastmod/go.sum @@ -0,0 +1,16 @@ +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go b/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go deleted file mode 100644 index c94b3848..00000000 --- a/vendor/github.com/visualfc/fastmod/internal/modfile/gopkgin.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// TODO: Figure out what gopkg.in should do. - -package modfile - -import "strings" - -// ParseGopkgIn splits gopkg.in import paths into their constituent parts -func ParseGopkgIn(path string) (root, repo, major, subdir string, ok bool) { - if !strings.HasPrefix(path, "gopkg.in/") { - return - } - f := strings.Split(path, "/") - if len(f) >= 2 { - if elem, v, ok := dotV(f[1]); ok { - root = strings.Join(f[:2], "/") - repo = "github.com/go-" + elem + "/" + elem - major = v - subdir = strings.Join(f[2:], "/") - return root, repo, major, subdir, true - } - } - if len(f) >= 3 { - if elem, v, ok := dotV(f[2]); ok { - root = strings.Join(f[:3], "/") - repo = "github.com/" + f[1] + "/" + elem - major = v - subdir = strings.Join(f[3:], "/") - return root, repo, major, subdir, true - } - } - return -} - -func dotV(name string) (elem, v string, ok bool) { - i := len(name) - 1 - for i >= 0 && '0' <= name[i] && name[i] <= '9' { - i-- - } - if i <= 2 || i+1 >= len(name) || name[i-1] != '.' || name[i] != 'v' || name[i+1] == '0' && len(name) != i+2 { - return "", "", false - } - return name[:i-1], name[i:], true -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go deleted file mode 100644 index 41d18cdb..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkpkglist.go +++ /dev/null @@ -1,216 +0,0 @@ -// +build ignore - -package main - -import ( - "bytes" - "fmt" - "go/format" - "io/ioutil" - "log" - "os/exec" - "strings" -) - -var basePkgList = ` -archive/tar -archive/zip -bufio -bytes -compress/bzip2 -compress/flate -compress/gzip -compress/lzw -compress/zlib -container/heap -container/list -container/ring -context -crypto -crypto/aes -crypto/cipher -crypto/des -crypto/dsa -crypto/ecdsa -crypto/elliptic -crypto/hmac -crypto/md5 -crypto/rand -crypto/rc4 -crypto/rsa -crypto/sha1 -crypto/sha256 -crypto/sha512 -crypto/subtle -crypto/tls -crypto/x509 -crypto/x509/pkix -database/sql -database/sql/driver -debug/dwarf -debug/elf -debug/gosym -debug/macho -debug/pe -debug/plan9obj -encoding -encoding/ascii85 -encoding/asn1 -encoding/base32 -encoding/base64 -encoding/binary -encoding/csv -encoding/gob -encoding/hex -encoding/json -encoding/pem -encoding/xml -errors -expvar -flag -fmt -go/ast -go/build -go/constant -go/doc -go/format -go/importer -go/parser -go/printer -go/scanner -go/token -go/types -hash -hash/adler32 -hash/crc32 -hash/crc64 -hash/fnv -html -html/template -image -image/color -image/color/palette -image/draw -image/gif -image/jpeg -image/png -index/suffixarray -io -io/ioutil -log -log/syslog -math -math/big -math/bits -math/cmplx -math/rand -mime -mime/multipart -mime/quotedprintable -net -net/http -net/http/cgi -net/http/cookiejar -net/http/fcgi -net/http/httptest -net/http/httptrace -net/http/httputil -net/http/pprof -net/mail -net/rpc -net/rpc/jsonrpc -net/smtp -net/textproto -net/url -os -os/exec -os/signal -os/user -path -path/filepath -plugin -reflect -regexp -regexp/syntax -runtime -runtime/cgo -runtime/debug -runtime/pprof -runtime/race -runtime/trace -sort -strconv -strings -sync -sync/atomic -syscall -testing -testing/iotest -testing/quick -text/scanner -text/tabwriter -text/template -text/template/parse -time -unicode -unicode/utf16 -unicode/utf8 -unsafe -` - -func main() { - cmd := exec.Command("go", "list", "std") - out, err := cmd.Output() - if err != nil { - log.Fatalln(err) - } - var pkgList []string - for _, v := range strings.Split(string(out), "\n") { - if v == "" { - continue - } - // if strings.HasPrefix(v, "vendor/") { - // continue - // } - pkgList = append(pkgList, v) - } - - var list []string - index := 0 - for _, v := range pkgList { - v = strings.TrimSpace(v) - if v == "" { - continue - } - v = "\"" + v + "\"" - if index%4 == 0 && index != 0 { - v = "\n" + v - } - list = append(list, v) - index++ - } - var buf bytes.Buffer - outf := func(format string, args ...interface{}) { - fmt.Fprintf(&buf, format, args...) - } - outf("// AUTO-GENERATED BY mkpkglist.go\n\n") - outf("package stdlib\n") - outf("var Packages = []string{\n") - outf(strings.Join(list, ",")) - outf("}\n") - outf(` -func IsStdPkg(pkg string) bool { - for _, v := range Packages { - if v == pkg { - return true - } - } - return false -}`) - fmtbuf, err := format.Source(buf.Bytes()) - if err != nil { - log.Fatal(err) - } - //os.Stdout.Write(fmtbuf) - ioutil.WriteFile("./pkglist.go", fmtbuf, 0777) -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go deleted file mode 100644 index 529263cd..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/mkstdlib.go +++ /dev/null @@ -1,101 +0,0 @@ -// +build ignore - -// mkstdlib generates the zstdlib.go file, containing the Go standard -// library API symbols. It's baked into the binary to avoid scanning -// GOPATH in the common case. -package main - -import ( - "bufio" - "bytes" - "fmt" - "go/format" - "io" - "io/ioutil" - "log" - "os" - "path" - "path/filepath" - "regexp" - "sort" - "strings" -) - -func mustOpen(name string) io.Reader { - f, err := os.Open(name) - if err != nil { - log.Fatal(err) - } - return f -} - -func api(base string) string { - return filepath.Join(os.Getenv("GOROOT"), "api", base) -} - -var sym = regexp.MustCompile(`^pkg (\S+).*?, (?:var|func|type|const) ([A-Z]\w*)`) - -func main() { - var buf bytes.Buffer - outf := func(format string, args ...interface{}) { - fmt.Fprintf(&buf, format, args...) - } - outf("// AUTO-GENERATED BY mkstdlib.go\n\n") - outf("package stdlib\n") - outf("var Symbols = map[string]string{\n") - f := io.MultiReader( - mustOpen(api("go1.txt")), - mustOpen(api("go1.1.txt")), - mustOpen(api("go1.2.txt")), - mustOpen(api("go1.3.txt")), - mustOpen(api("go1.4.txt")), - mustOpen(api("go1.5.txt")), - mustOpen(api("go1.6.txt")), - mustOpen(api("go1.7.txt")), - mustOpen(api("go1.8.txt")), - mustOpen(api("go1.9.txt")), - mustOpen(api("go1.10.txt")), - mustOpen(api("go1.11.txt")), - ) - sc := bufio.NewScanner(f) - fullImport := map[string]string{} // "zip.NewReader" => "archive/zip" - ambiguous := map[string]bool{} - var keys []string - for sc.Scan() { - l := sc.Text() - has := func(v string) bool { return strings.Contains(l, v) } - if has("struct, ") || has("interface, ") || has(", method (") { - continue - } - if m := sym.FindStringSubmatch(l); m != nil { - full := m[1] - key := path.Base(full) + "." + m[2] - if exist, ok := fullImport[key]; ok { - if exist != full { - ambiguous[key] = true - } - } else { - fullImport[key] = full - keys = append(keys, key) - } - } - } - if err := sc.Err(); err != nil { - log.Fatal(err) - } - sort.Strings(keys) - for _, key := range keys { - if ambiguous[key] { - outf("\t// %q is ambiguous\n", key) - } else { - outf("\t%q: %q,\n", key, fullImport[key]) - } - } - outf("}\n") - fmtbuf, err := format.Source(buf.Bytes()) - if err != nil { - log.Fatal(err) - } - //os.Stdout.Write(fmtbuf) - ioutil.WriteFile("./zstdlib.go", fmtbuf, 0777) -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go index b5bf3269..0d38c902 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go @@ -7,50 +7,47 @@ var Packages = []string{ "compress/bzip2", "compress/flate", "compress/gzip", "compress/lzw", "compress/zlib", "container/heap", "container/list", "container/ring", "context", "crypto", "crypto/aes", "crypto/cipher", - "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/elliptic", - "crypto/hmac", "crypto/internal/randutil", "crypto/internal/subtle", "crypto/md5", - "crypto/rand", "crypto/rc4", "crypto/rsa", "crypto/sha1", - "crypto/sha256", "crypto/sha512", "crypto/subtle", "crypto/tls", - "crypto/x509", "crypto/x509/pkix", "database/sql", "database/sql/driver", - "debug/dwarf", "debug/elf", "debug/gosym", "debug/macho", - "debug/pe", "debug/plan9obj", "encoding", "encoding/ascii85", - "encoding/asn1", "encoding/base32", "encoding/base64", "encoding/binary", - "encoding/csv", "encoding/gob", "encoding/hex", "encoding/json", - "encoding/pem", "encoding/xml", "errors", "expvar", - "flag", "fmt", "go/ast", "go/build", - "go/constant", "go/doc", "go/format", "go/importer", - "go/internal/gccgoimporter", "go/internal/gcimporter", "go/internal/srcimporter", "go/parser", - "go/printer", "go/scanner", "go/token", "go/types", - "hash", "hash/adler32", "hash/crc32", "hash/crc64", - "hash/fnv", "html", "html/template", "image", - "image/color", "image/color/palette", "image/draw", "image/gif", - "image/internal/imageutil", "image/jpeg", "image/png", "index/suffixarray", - "internal/bytealg", "internal/cpu", "internal/nettrace", "internal/poll", - "internal/race", "internal/singleflight", "internal/syscall/unix", "internal/syscall/windows", - "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "internal/testenv", "internal/testlog", - "internal/trace", "io", "io/ioutil", "log", - "log/syslog", "math", "math/big", "math/bits", - "math/cmplx", "math/rand", "mime", "mime/multipart", - "mime/quotedprintable", "net", "net/http", "net/http/cgi", - "net/http/cookiejar", "net/http/fcgi", "net/http/httptest", "net/http/httptrace", - "net/http/httputil", "net/http/internal", "net/http/pprof", "net/internal/socktest", - "net/mail", "net/rpc", "net/rpc/jsonrpc", "net/smtp", - "net/textproto", "net/url", "os", "os/exec", - "os/signal", "os/signal/internal/pty", "os/user", "path", - "path/filepath", "plugin", "reflect", "regexp", - "regexp/syntax", "runtime", "runtime/cgo", "runtime/debug", - "runtime/internal/atomic", "runtime/internal/sys", "runtime/pprof", "runtime/pprof/internal/profile", - "runtime/race", "runtime/trace", "sort", "strconv", - "strings", "sync", "sync/atomic", "syscall", - "testing", "testing/internal/testdeps", "testing/iotest", "testing/quick", - "text/scanner", "text/tabwriter", "text/template", "text/template/parse", - "time", "unicode", "unicode/utf16", "unicode/utf8", - "unsafe", "vendor/golang_org/x/crypto/chacha20poly1305", "vendor/golang_org/x/crypto/cryptobyte", "vendor/golang_org/x/crypto/cryptobyte/asn1", - "vendor/golang_org/x/crypto/curve25519", "vendor/golang_org/x/crypto/internal/chacha20", "vendor/golang_org/x/crypto/poly1305", "vendor/golang_org/x/net/dns/dnsmessage", - "vendor/golang_org/x/net/http/httpguts", "vendor/golang_org/x/net/http/httpproxy", "vendor/golang_org/x/net/http2/hpack", "vendor/golang_org/x/net/idna", - "vendor/golang_org/x/net/internal/nettest", "vendor/golang_org/x/net/nettest", "vendor/golang_org/x/net/route", "vendor/golang_org/x/text/secure", - "vendor/golang_org/x/text/secure/bidirule", "vendor/golang_org/x/text/transform", "vendor/golang_org/x/text/unicode", "vendor/golang_org/x/text/unicode/bidi", - "vendor/golang_org/x/text/unicode/norm"} + "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/ed25519", + "crypto/ed25519/internal/edwards25519", "crypto/elliptic", "crypto/hmac", "crypto/internal/randutil", + "crypto/internal/subtle", "crypto/md5", "crypto/rand", "crypto/rc4", + "crypto/rsa", "crypto/sha1", "crypto/sha256", "crypto/sha512", + "crypto/subtle", "crypto/tls", "crypto/x509", "crypto/x509/pkix", + "database/sql", "database/sql/driver", "debug/dwarf", "debug/elf", + "debug/gosym", "debug/macho", "debug/pe", "debug/plan9obj", + "encoding", "encoding/ascii85", "encoding/asn1", "encoding/base32", + "encoding/base64", "encoding/binary", "encoding/csv", "encoding/gob", + "encoding/hex", "encoding/json", "encoding/pem", "encoding/xml", + "errors", "expvar", "flag", "fmt", + "go/ast", "go/build", "go/constant", "go/doc", + "go/format", "go/importer", "go/internal/gccgoimporter", "go/internal/gcimporter", + "go/internal/srcimporter", "go/parser", "go/printer", "go/scanner", + "go/token", "go/types", "hash", "hash/adler32", + "hash/crc32", "hash/crc64", "hash/fnv", "hash/maphash", + "html", "html/template", "image", "image/color", + "image/color/palette", "image/draw", "image/gif", "image/internal/imageutil", + "image/jpeg", "image/png", "index/suffixarray", "internal/bytealg", + "internal/cfg", "internal/cpu", "internal/fmtsort", "internal/goroot", + "internal/goversion", "internal/lazyregexp", "internal/lazytemplate", "internal/nettrace", + "internal/obscuretestdata", "internal/oserror", "internal/poll", "internal/race", + "internal/reflectlite", "internal/singleflight", "internal/syscall/unix", "internal/testenv", + "internal/testlog", "internal/trace", "internal/xcoff", "io", + "io/ioutil", "log", "log/syslog", "math", + "math/big", "math/bits", "math/cmplx", "math/rand", + "mime", "mime/multipart", "mime/quotedprintable", "net", + "net/http", "net/http/cgi", "net/http/cookiejar", "net/http/fcgi", + "net/http/httptest", "net/http/httptrace", "net/http/httputil", "net/http/internal", + "net/http/pprof", "net/internal/socktest", "net/mail", "net/rpc", + "net/rpc/jsonrpc", "net/smtp", "net/textproto", "net/url", + "os", "os/exec", "os/signal", "os/signal/internal/pty", + "os/user", "path", "path/filepath", "plugin", + "reflect", "regexp", "regexp/syntax", "runtime", + "runtime/cgo", "runtime/debug", "runtime/internal/atomic", "runtime/internal/math", + "runtime/internal/sys", "runtime/pprof", "runtime/pprof/internal/profile", "runtime/race", + "runtime/trace", "sort", "strconv", "strings", + "sync", "sync/atomic", "syscall", "testing", + "testing/internal/testdeps", "testing/iotest", "testing/quick", "text/scanner", + "text/tabwriter", "text/template", "text/template/parse", "time", + "unicode", "unicode/utf16", "unicode/utf8", "unsafe"} func IsStdPkg(pkg string) bool { for _, v := range Packages { diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go index 510aeee2..62c98e76 100644 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go +++ b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go @@ -31,6 +31,7 @@ var Symbols = map[string]string{ "asn1.RawValue": "encoding/asn1", "asn1.StructuralError": "encoding/asn1", "asn1.SyntaxError": "encoding/asn1", + "asn1.TagBMPString": "encoding/asn1", "asn1.TagBitString": "encoding/asn1", "asn1.TagBoolean": "encoding/asn1", "asn1.TagEnum": "encoding/asn1", @@ -236,6 +237,12 @@ var Symbols = map[string]string{ "binary.Uvarint": "encoding/binary", "binary.Varint": "encoding/binary", "binary.Write": "encoding/binary", + "bits.Add": "math/bits", + "bits.Add32": "math/bits", + "bits.Add64": "math/bits", + "bits.Div": "math/bits", + "bits.Div32": "math/bits", + "bits.Div64": "math/bits", "bits.LeadingZeros": "math/bits", "bits.LeadingZeros16": "math/bits", "bits.LeadingZeros32": "math/bits", @@ -246,11 +253,17 @@ var Symbols = map[string]string{ "bits.Len32": "math/bits", "bits.Len64": "math/bits", "bits.Len8": "math/bits", + "bits.Mul": "math/bits", + "bits.Mul32": "math/bits", + "bits.Mul64": "math/bits", "bits.OnesCount": "math/bits", "bits.OnesCount16": "math/bits", "bits.OnesCount32": "math/bits", "bits.OnesCount64": "math/bits", "bits.OnesCount8": "math/bits", + "bits.Rem": "math/bits", + "bits.Rem32": "math/bits", + "bits.Rem64": "math/bits", "bits.Reverse": "math/bits", "bits.Reverse16": "math/bits", "bits.Reverse32": "math/bits", @@ -265,6 +278,9 @@ var Symbols = map[string]string{ "bits.RotateLeft32": "math/bits", "bits.RotateLeft64": "math/bits", "bits.RotateLeft8": "math/bits", + "bits.Sub": "math/bits", + "bits.Sub32": "math/bits", + "bits.Sub64": "math/bits", "bits.TrailingZeros": "math/bits", "bits.TrailingZeros16": "math/bits", "bits.TrailingZeros32": "math/bits", @@ -341,6 +357,7 @@ var Symbols = map[string]string{ "bytes.Reader": "bytes", "bytes.Repeat": "bytes", "bytes.Replace": "bytes", + "bytes.ReplaceAll": "bytes", "bytes.Runes": "bytes", "bytes.Split": "bytes", "bytes.SplitAfter": "bytes", @@ -353,6 +370,7 @@ var Symbols = map[string]string{ "bytes.ToTitleSpecial": "bytes", "bytes.ToUpper": "bytes", "bytes.ToUpperSpecial": "bytes", + "bytes.ToValidUTF8": "bytes", "bytes.Trim": "bytes", "bytes.TrimFunc": "bytes", "bytes.TrimLeft": "bytes", @@ -459,6 +477,7 @@ var Symbols = map[string]string{ "constant.Int": "go/constant", "constant.Int64Val": "go/constant", "constant.Kind": "go/constant", + "constant.Make": "go/constant", "constant.MakeBool": "go/constant", "constant.MakeFloat64": "go/constant", "constant.MakeFromBytes": "go/constant", @@ -480,6 +499,7 @@ var Symbols = map[string]string{ "constant.Uint64Val": "go/constant", "constant.UnaryOp": "go/constant", "constant.Unknown": "go/constant", + "constant.Val": "go/constant", "context.Background": "context", "context.CancelFunc": "context", "context.Canceled": "context", @@ -550,9 +570,12 @@ var Symbols = map[string]string{ "csv.ParseError": "encoding/csv", "csv.Reader": "encoding/csv", "csv.Writer": "encoding/csv", + "debug.BuildInfo": "runtime/debug", "debug.FreeOSMemory": "runtime/debug", "debug.GCStats": "runtime/debug", + "debug.Module": "runtime/debug", "debug.PrintStack": "runtime/debug", + "debug.ReadBuildInfo": "runtime/debug", "debug.ReadGCStats": "runtime/debug", "debug.SetGCPercent": "runtime/debug", "debug.SetMaxStack": "runtime/debug", @@ -575,8 +598,10 @@ var Symbols = map[string]string{ "doc.IsPredeclared": "go/doc", "doc.Mode": "go/doc", "doc.New": "go/doc", + "doc.NewFromFiles": "go/doc", "doc.Note": "go/doc", "doc.Package": "go/doc", + "doc.PreserveAST": "go/doc", "doc.Synopsis": "go/doc", "doc.ToHTML": "go/doc", "doc.ToText": "go/doc", @@ -654,36 +679,65 @@ var Symbols = map[string]string{ "dwarf.Attr": "debug/dwarf", "dwarf.AttrAbstractOrigin": "debug/dwarf", "dwarf.AttrAccessibility": "debug/dwarf", + "dwarf.AttrAddrBase": "debug/dwarf", "dwarf.AttrAddrClass": "debug/dwarf", + "dwarf.AttrAlignment": "debug/dwarf", "dwarf.AttrAllocated": "debug/dwarf", "dwarf.AttrArtificial": "debug/dwarf", "dwarf.AttrAssociated": "debug/dwarf", "dwarf.AttrBaseTypes": "debug/dwarf", + "dwarf.AttrBinaryScale": "debug/dwarf", "dwarf.AttrBitOffset": "debug/dwarf", "dwarf.AttrBitSize": "debug/dwarf", "dwarf.AttrByteSize": "debug/dwarf", + "dwarf.AttrCallAllCalls": "debug/dwarf", + "dwarf.AttrCallAllSourceCalls": "debug/dwarf", + "dwarf.AttrCallAllTailCalls": "debug/dwarf", "dwarf.AttrCallColumn": "debug/dwarf", + "dwarf.AttrCallDataLocation": "debug/dwarf", + "dwarf.AttrCallDataValue": "debug/dwarf", "dwarf.AttrCallFile": "debug/dwarf", "dwarf.AttrCallLine": "debug/dwarf", + "dwarf.AttrCallOrigin": "debug/dwarf", + "dwarf.AttrCallPC": "debug/dwarf", + "dwarf.AttrCallParameter": "debug/dwarf", + "dwarf.AttrCallReturnPC": "debug/dwarf", + "dwarf.AttrCallTailCall": "debug/dwarf", + "dwarf.AttrCallTarget": "debug/dwarf", + "dwarf.AttrCallTargetClobbered": "debug/dwarf", + "dwarf.AttrCallValue": "debug/dwarf", "dwarf.AttrCalling": "debug/dwarf", "dwarf.AttrCommonRef": "debug/dwarf", "dwarf.AttrCompDir": "debug/dwarf", + "dwarf.AttrConstExpr": "debug/dwarf", "dwarf.AttrConstValue": "debug/dwarf", "dwarf.AttrContainingType": "debug/dwarf", "dwarf.AttrCount": "debug/dwarf", + "dwarf.AttrDataBitOffset": "debug/dwarf", "dwarf.AttrDataLocation": "debug/dwarf", "dwarf.AttrDataMemberLoc": "debug/dwarf", + "dwarf.AttrDecimalScale": "debug/dwarf", + "dwarf.AttrDecimalSign": "debug/dwarf", "dwarf.AttrDeclColumn": "debug/dwarf", "dwarf.AttrDeclFile": "debug/dwarf", "dwarf.AttrDeclLine": "debug/dwarf", "dwarf.AttrDeclaration": "debug/dwarf", "dwarf.AttrDefaultValue": "debug/dwarf", + "dwarf.AttrDefaulted": "debug/dwarf", + "dwarf.AttrDeleted": "debug/dwarf", "dwarf.AttrDescription": "debug/dwarf", + "dwarf.AttrDigitCount": "debug/dwarf", "dwarf.AttrDiscr": "debug/dwarf", "dwarf.AttrDiscrList": "debug/dwarf", "dwarf.AttrDiscrValue": "debug/dwarf", + "dwarf.AttrDwoName": "debug/dwarf", + "dwarf.AttrElemental": "debug/dwarf", "dwarf.AttrEncoding": "debug/dwarf", + "dwarf.AttrEndianity": "debug/dwarf", "dwarf.AttrEntrypc": "debug/dwarf", + "dwarf.AttrEnumClass": "debug/dwarf", + "dwarf.AttrExplicit": "debug/dwarf", + "dwarf.AttrExportSymbols": "debug/dwarf", "dwarf.AttrExtension": "debug/dwarf", "dwarf.AttrExternal": "debug/dwarf", "dwarf.AttrFrameBase": "debug/dwarf", @@ -694,27 +748,47 @@ var Symbols = map[string]string{ "dwarf.AttrInline": "debug/dwarf", "dwarf.AttrIsOptional": "debug/dwarf", "dwarf.AttrLanguage": "debug/dwarf", + "dwarf.AttrLinkageName": "debug/dwarf", "dwarf.AttrLocation": "debug/dwarf", + "dwarf.AttrLoclistsBase": "debug/dwarf", "dwarf.AttrLowerBound": "debug/dwarf", "dwarf.AttrLowpc": "debug/dwarf", "dwarf.AttrMacroInfo": "debug/dwarf", + "dwarf.AttrMacros": "debug/dwarf", + "dwarf.AttrMainSubprogram": "debug/dwarf", + "dwarf.AttrMutable": "debug/dwarf", "dwarf.AttrName": "debug/dwarf", "dwarf.AttrNamelistItem": "debug/dwarf", + "dwarf.AttrNoreturn": "debug/dwarf", + "dwarf.AttrObjectPointer": "debug/dwarf", "dwarf.AttrOrdering": "debug/dwarf", + "dwarf.AttrPictureString": "debug/dwarf", "dwarf.AttrPriority": "debug/dwarf", "dwarf.AttrProducer": "debug/dwarf", "dwarf.AttrPrototyped": "debug/dwarf", + "dwarf.AttrPure": "debug/dwarf", "dwarf.AttrRanges": "debug/dwarf", + "dwarf.AttrRank": "debug/dwarf", + "dwarf.AttrRecursive": "debug/dwarf", + "dwarf.AttrReference": "debug/dwarf", "dwarf.AttrReturnAddr": "debug/dwarf", + "dwarf.AttrRnglistsBase": "debug/dwarf", + "dwarf.AttrRvalueReference": "debug/dwarf", "dwarf.AttrSegment": "debug/dwarf", "dwarf.AttrSibling": "debug/dwarf", + "dwarf.AttrSignature": "debug/dwarf", + "dwarf.AttrSmall": "debug/dwarf", "dwarf.AttrSpecification": "debug/dwarf", "dwarf.AttrStartScope": "debug/dwarf", "dwarf.AttrStaticLink": "debug/dwarf", "dwarf.AttrStmtList": "debug/dwarf", + "dwarf.AttrStrOffsetsBase": "debug/dwarf", "dwarf.AttrStride": "debug/dwarf", "dwarf.AttrStrideSize": "debug/dwarf", "dwarf.AttrStringLength": "debug/dwarf", + "dwarf.AttrStringLengthBitSize": "debug/dwarf", + "dwarf.AttrStringLengthByteSize": "debug/dwarf", + "dwarf.AttrThreadsScaled": "debug/dwarf", "dwarf.AttrTrampoline": "debug/dwarf", "dwarf.AttrType": "debug/dwarf", "dwarf.AttrUpperBound": "debug/dwarf", @@ -728,18 +802,23 @@ var Symbols = map[string]string{ "dwarf.BoolType": "debug/dwarf", "dwarf.CharType": "debug/dwarf", "dwarf.Class": "debug/dwarf", + "dwarf.ClassAddrPtr": "debug/dwarf", "dwarf.ClassAddress": "debug/dwarf", "dwarf.ClassBlock": "debug/dwarf", "dwarf.ClassConstant": "debug/dwarf", "dwarf.ClassExprLoc": "debug/dwarf", "dwarf.ClassFlag": "debug/dwarf", "dwarf.ClassLinePtr": "debug/dwarf", + "dwarf.ClassLocList": "debug/dwarf", "dwarf.ClassLocListPtr": "debug/dwarf", "dwarf.ClassMacPtr": "debug/dwarf", "dwarf.ClassRangeListPtr": "debug/dwarf", "dwarf.ClassReference": "debug/dwarf", "dwarf.ClassReferenceAlt": "debug/dwarf", "dwarf.ClassReferenceSig": "debug/dwarf", + "dwarf.ClassRngList": "debug/dwarf", + "dwarf.ClassRngListsPtr": "debug/dwarf", + "dwarf.ClassStrOffsetsPtr": "debug/dwarf", "dwarf.ClassString": "debug/dwarf", "dwarf.ClassStringAlt": "debug/dwarf", "dwarf.ClassUnknown": "debug/dwarf", @@ -770,9 +849,13 @@ var Symbols = map[string]string{ "dwarf.Tag": "debug/dwarf", "dwarf.TagAccessDeclaration": "debug/dwarf", "dwarf.TagArrayType": "debug/dwarf", + "dwarf.TagAtomicType": "debug/dwarf", "dwarf.TagBaseType": "debug/dwarf", + "dwarf.TagCallSite": "debug/dwarf", + "dwarf.TagCallSiteParameter": "debug/dwarf", "dwarf.TagCatchDwarfBlock": "debug/dwarf", "dwarf.TagClassType": "debug/dwarf", + "dwarf.TagCoarrayType": "debug/dwarf", "dwarf.TagCommonDwarfBlock": "debug/dwarf", "dwarf.TagCommonInclusion": "debug/dwarf", "dwarf.TagCompileUnit": "debug/dwarf", @@ -780,12 +863,15 @@ var Symbols = map[string]string{ "dwarf.TagConstType": "debug/dwarf", "dwarf.TagConstant": "debug/dwarf", "dwarf.TagDwarfProcedure": "debug/dwarf", + "dwarf.TagDynamicType": "debug/dwarf", "dwarf.TagEntryPoint": "debug/dwarf", "dwarf.TagEnumerationType": "debug/dwarf", "dwarf.TagEnumerator": "debug/dwarf", "dwarf.TagFileType": "debug/dwarf", "dwarf.TagFormalParameter": "debug/dwarf", "dwarf.TagFriend": "debug/dwarf", + "dwarf.TagGenericSubrange": "debug/dwarf", + "dwarf.TagImmutableType": "debug/dwarf", "dwarf.TagImportedDeclaration": "debug/dwarf", "dwarf.TagImportedModule": "debug/dwarf", "dwarf.TagImportedUnit": "debug/dwarf", @@ -809,6 +895,7 @@ var Symbols = map[string]string{ "dwarf.TagRvalueReferenceType": "debug/dwarf", "dwarf.TagSetType": "debug/dwarf", "dwarf.TagSharedType": "debug/dwarf", + "dwarf.TagSkeletonUnit": "debug/dwarf", "dwarf.TagStringType": "debug/dwarf", "dwarf.TagStructType": "debug/dwarf", "dwarf.TagSubprogram": "debug/dwarf", @@ -834,12 +921,23 @@ var Symbols = map[string]string{ "dwarf.UcharType": "debug/dwarf", "dwarf.UintType": "debug/dwarf", "dwarf.UnspecifiedType": "debug/dwarf", + "dwarf.UnsupportedType": "debug/dwarf", "dwarf.VoidType": "debug/dwarf", "ecdsa.GenerateKey": "crypto/ecdsa", "ecdsa.PrivateKey": "crypto/ecdsa", "ecdsa.PublicKey": "crypto/ecdsa", "ecdsa.Sign": "crypto/ecdsa", "ecdsa.Verify": "crypto/ecdsa", + "ed25519.GenerateKey": "crypto/ed25519", + "ed25519.NewKeyFromSeed": "crypto/ed25519", + "ed25519.PrivateKey": "crypto/ed25519", + "ed25519.PrivateKeySize": "crypto/ed25519", + "ed25519.PublicKey": "crypto/ed25519", + "ed25519.PublicKeySize": "crypto/ed25519", + "ed25519.SeedSize": "crypto/ed25519", + "ed25519.Sign": "crypto/ed25519", + "ed25519.SignatureSize": "crypto/ed25519", + "ed25519.Verify": "crypto/ed25519", "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf", "elf.COMPRESS_HIOS": "debug/elf", "elf.COMPRESS_HIPROC": "debug/elf", @@ -1817,6 +1915,7 @@ var Symbols = map[string]string{ "elf.R_PPC_UADDR32": "debug/elf", "elf.R_RISCV": "debug/elf", "elf.R_RISCV_32": "debug/elf", + "elf.R_RISCV_32_PCREL": "debug/elf", "elf.R_RISCV_64": "debug/elf", "elf.R_RISCV_ADD16": "debug/elf", "elf.R_RISCV_ADD32": "debug/elf", @@ -2086,7 +2185,10 @@ var Symbols = map[string]string{ "encoding.BinaryUnmarshaler": "encoding", "encoding.TextMarshaler": "encoding", "encoding.TextUnmarshaler": "encoding", + "errors.As": "errors", + "errors.Is": "errors", "errors.New": "errors", + "errors.Unwrap": "errors", "exec.Cmd": "os/exec", "exec.Command": "os/exec", "exec.CommandContext": "os/exec", @@ -2355,6 +2457,7 @@ var Symbols = map[string]string{ "http.MethodTrace": "net/http", "http.NewFileTransport": "net/http", "http.NewRequest": "net/http", + "http.NewRequestWithContext": "net/http", "http.NewServeMux": "net/http", "http.NoBody": "net/http", "http.NotFound": "net/http", @@ -2379,6 +2482,7 @@ var Symbols = map[string]string{ "http.SameSite": "net/http", "http.SameSiteDefaultMode": "net/http", "http.SameSiteLaxMode": "net/http", + "http.SameSiteNoneMode": "net/http", "http.SameSiteStrictMode": "net/http", "http.Serve": "net/http", "http.ServeContent": "net/http", @@ -2400,6 +2504,7 @@ var Symbols = map[string]string{ "http.StatusConflict": "net/http", "http.StatusContinue": "net/http", "http.StatusCreated": "net/http", + "http.StatusEarlyHints": "net/http", "http.StatusExpectationFailed": "net/http", "http.StatusFailedDependency": "net/http", "http.StatusForbidden": "net/http", @@ -2446,6 +2551,7 @@ var Symbols = map[string]string{ "http.StatusTeapot": "net/http", "http.StatusTemporaryRedirect": "net/http", "http.StatusText": "net/http", + "http.StatusTooEarly": "net/http", "http.StatusTooManyRequests": "net/http", "http.StatusUnauthorized": "net/http", "http.StatusUnavailableForLegalReasons": "net/http", @@ -2543,6 +2649,7 @@ var Symbols = map[string]string{ "image.ZR": "image", "importer.Default": "go/importer", "importer.For": "go/importer", + "importer.ForCompiler": "go/importer", "importer.Lookup": "go/importer", "io.ByteReader": "io", "io.ByteScanner": "io", @@ -2582,6 +2689,7 @@ var Symbols = map[string]string{ "io.SeekEnd": "io", "io.SeekStart": "io", "io.Seeker": "io", + "io.StringWriter": "io", "io.TeeReader": "io", "io.WriteCloser": "io", "io.WriteSeeker": "io", @@ -2654,6 +2762,7 @@ var Symbols = map[string]string{ "log.Ldate": "log", "log.Llongfile": "log", "log.Lmicroseconds": "log", + "log.Lmsgprefix": "log", "log.Logger": "log", "log.Lshortfile": "log", "log.LstdFlags": "log", @@ -2670,6 +2779,7 @@ var Symbols = map[string]string{ "log.SetFlags": "log", "log.SetOutput": "log", "log.SetPrefix": "log", + "log.Writer": "log", "lzw.LSB": "compress/lzw", "lzw.MSB": "compress/lzw", "lzw.NewReader": "compress/lzw", @@ -2812,6 +2922,9 @@ var Symbols = map[string]string{ "mail.ParseAddressList": "net/mail", "mail.ParseDate": "net/mail", "mail.ReadMessage": "net/mail", + "maphash.Hash": "hash/maphash", + "maphash.MakeSeed": "hash/maphash", + "maphash.Seed": "hash/maphash", "math.Abs": "math", "math.Acos": "math", "math.Acosh": "math", @@ -2834,6 +2947,7 @@ var Symbols = map[string]string{ "math.Exp": "math", "math.Exp2": "math", "math.Expm1": "math", + "math.FMA": "math", "math.Float32bits": "math", "math.Float32frombits": "math", "math.Float64bits": "math", @@ -3128,6 +3242,8 @@ var Symbols = map[string]string{ "os.Truncate": "os", "os.Unsetenv": "os", "os.UserCacheDir": "os", + "os.UserConfigDir": "os", + "os.UserHomeDir": "os", "palette.Plan9": "image/color/palette", "palette.WebSafe": "image/color/palette", "parse.ActionNode": "text/template/parse", @@ -3221,6 +3337,7 @@ var Symbols = map[string]string{ "pe.IMAGE_FILE_MACHINE_AMD64": "debug/pe", "pe.IMAGE_FILE_MACHINE_ARM": "debug/pe", "pe.IMAGE_FILE_MACHINE_ARM64": "debug/pe", + "pe.IMAGE_FILE_MACHINE_ARMNT": "debug/pe", "pe.IMAGE_FILE_MACHINE_EBC": "debug/pe", "pe.IMAGE_FILE_MACHINE_I386": "debug/pe", "pe.IMAGE_FILE_MACHINE_IA64": "debug/pe", @@ -3389,6 +3506,7 @@ var Symbols = map[string]string{ "reflect.MakeMapWithSize": "reflect", "reflect.MakeSlice": "reflect", "reflect.Map": "reflect", + "reflect.MapIter": "reflect", "reflect.MapOf": "reflect", "reflect.Method": "reflect", "reflect.New": "reflect", @@ -3635,8 +3753,10 @@ var Symbols = map[string]string{ "sql.NamedArg": "database/sql", "sql.NullBool": "database/sql", "sql.NullFloat64": "database/sql", + "sql.NullInt32": "database/sql", "sql.NullInt64": "database/sql", "sql.NullString": "database/sql", + "sql.NullTime": "database/sql", "sql.Open": "database/sql", "sql.OpenDB": "database/sql", "sql.Out": "database/sql", @@ -3711,6 +3831,7 @@ var Symbols = map[string]string{ "strings.Reader": "strings", "strings.Repeat": "strings", "strings.Replace": "strings", + "strings.ReplaceAll": "strings", "strings.Replacer": "strings", "strings.Split": "strings", "strings.SplitAfter": "strings", @@ -3723,6 +3844,7 @@ var Symbols = map[string]string{ "strings.ToTitleSpecial": "strings", "strings.ToUpper": "strings", "strings.ToUpperSpecial": "strings", + "strings.ToValidUTF8": "strings", "strings.Trim": "strings", "strings.TrimFunc": "strings", "strings.TrimLeft": "strings", @@ -4282,7 +4404,10 @@ var Symbols = map[string]string{ "syscall.CTL_NET": "syscall", "syscall.CTL_QUERY": "syscall", "syscall.CTRL_BREAK_EVENT": "syscall", + "syscall.CTRL_CLOSE_EVENT": "syscall", "syscall.CTRL_C_EVENT": "syscall", + "syscall.CTRL_LOGOFF_EVENT": "syscall", + "syscall.CTRL_SHUTDOWN_EVENT": "syscall", "syscall.CancelIo": "syscall", "syscall.CancelIoEx": "syscall", "syscall.CertAddCertificateContextToStore": "syscall", @@ -5317,6 +5442,7 @@ var Symbols = map[string]string{ "syscall.FreeLibrary": "syscall", "syscall.Fsid": "syscall", "syscall.Fstat": "syscall", + "syscall.Fstatat": "syscall", "syscall.Fstatfs": "syscall", "syscall.Fstore_t": "syscall", "syscall.Fsync": "syscall", @@ -8574,6 +8700,7 @@ var Symbols = map[string]string{ "syscall.Syscall": "syscall", "syscall.Syscall12": "syscall", "syscall.Syscall15": "syscall", + "syscall.Syscall18": "syscall", "syscall.Syscall6": "syscall", "syscall.Syscall9": "syscall", "syscall.Sysctl": "syscall", @@ -8842,6 +8969,7 @@ var Symbols = map[string]string{ "syscall.TransmitFile": "syscall", "syscall.TransmitFileBuffers": "syscall", "syscall.Truncate": "syscall", + "syscall.UNIX_PATH_MAX": "syscall", "syscall.USAGE_MATCH_TYPE_AND": "syscall", "syscall.USAGE_MATCH_TYPE_OR": "syscall", "syscall.UTF16FromString": "syscall", @@ -9069,586 +9197,611 @@ var Symbols = map[string]string{ // "template.Template" is ambiguous "template.URL": "html/template", // "template.URLQueryEscaper" is ambiguous - "testing.AllocsPerRun": "testing", - "testing.B": "testing", - "testing.Benchmark": "testing", - "testing.BenchmarkResult": "testing", - "testing.Cover": "testing", - "testing.CoverBlock": "testing", - "testing.CoverMode": "testing", - "testing.Coverage": "testing", - "testing.InternalBenchmark": "testing", - "testing.InternalExample": "testing", - "testing.InternalTest": "testing", - "testing.M": "testing", - "testing.Main": "testing", - "testing.MainStart": "testing", - "testing.PB": "testing", - "testing.RegisterCover": "testing", - "testing.RunBenchmarks": "testing", - "testing.RunExamples": "testing", - "testing.RunTests": "testing", - "testing.Short": "testing", - "testing.T": "testing", - "testing.Verbose": "testing", - "textproto.CanonicalMIMEHeaderKey": "net/textproto", - "textproto.Conn": "net/textproto", - "textproto.Dial": "net/textproto", - "textproto.Error": "net/textproto", - "textproto.MIMEHeader": "net/textproto", - "textproto.NewConn": "net/textproto", - "textproto.NewReader": "net/textproto", - "textproto.NewWriter": "net/textproto", - "textproto.Pipeline": "net/textproto", - "textproto.ProtocolError": "net/textproto", - "textproto.Reader": "net/textproto", - "textproto.TrimBytes": "net/textproto", - "textproto.TrimString": "net/textproto", - "textproto.Writer": "net/textproto", - "time.ANSIC": "time", - "time.After": "time", - "time.AfterFunc": "time", - "time.April": "time", - "time.August": "time", - "time.Date": "time", - "time.December": "time", - "time.Duration": "time", - "time.February": "time", - "time.FixedZone": "time", - "time.Friday": "time", - "time.Hour": "time", - "time.January": "time", - "time.July": "time", - "time.June": "time", - "time.Kitchen": "time", - "time.LoadLocation": "time", - "time.LoadLocationFromTZData": "time", - "time.Local": "time", - "time.Location": "time", - "time.March": "time", - "time.May": "time", - "time.Microsecond": "time", - "time.Millisecond": "time", - "time.Minute": "time", - "time.Monday": "time", - "time.Month": "time", - "time.Nanosecond": "time", - "time.NewTicker": "time", - "time.NewTimer": "time", - "time.November": "time", - "time.Now": "time", - "time.October": "time", - "time.Parse": "time", - "time.ParseDuration": "time", - "time.ParseError": "time", - "time.ParseInLocation": "time", - "time.RFC1123": "time", - "time.RFC1123Z": "time", - "time.RFC3339": "time", - "time.RFC3339Nano": "time", - "time.RFC822": "time", - "time.RFC822Z": "time", - "time.RFC850": "time", - "time.RubyDate": "time", - "time.Saturday": "time", - "time.Second": "time", - "time.September": "time", - "time.Since": "time", - "time.Sleep": "time", - "time.Stamp": "time", - "time.StampMicro": "time", - "time.StampMilli": "time", - "time.StampNano": "time", - "time.Sunday": "time", - "time.Thursday": "time", - "time.Tick": "time", - "time.Ticker": "time", - "time.Time": "time", - "time.Timer": "time", - "time.Tuesday": "time", - "time.UTC": "time", - "time.Unix": "time", - "time.UnixDate": "time", - "time.Until": "time", - "time.Wednesday": "time", - "time.Weekday": "time", - "tls.Certificate": "crypto/tls", - "tls.CertificateRequestInfo": "crypto/tls", - "tls.Client": "crypto/tls", - "tls.ClientAuthType": "crypto/tls", - "tls.ClientHelloInfo": "crypto/tls", - "tls.ClientSessionCache": "crypto/tls", - "tls.ClientSessionState": "crypto/tls", - "tls.Config": "crypto/tls", - "tls.Conn": "crypto/tls", - "tls.ConnectionState": "crypto/tls", - "tls.CurveID": "crypto/tls", - "tls.CurveP256": "crypto/tls", - "tls.CurveP384": "crypto/tls", - "tls.CurveP521": "crypto/tls", - "tls.Dial": "crypto/tls", - "tls.DialWithDialer": "crypto/tls", - "tls.ECDSAWithP256AndSHA256": "crypto/tls", - "tls.ECDSAWithP384AndSHA384": "crypto/tls", - "tls.ECDSAWithP521AndSHA512": "crypto/tls", - "tls.ECDSAWithSHA1": "crypto/tls", - "tls.Listen": "crypto/tls", - "tls.LoadX509KeyPair": "crypto/tls", - "tls.NewLRUClientSessionCache": "crypto/tls", - "tls.NewListener": "crypto/tls", - "tls.NoClientCert": "crypto/tls", - "tls.PKCS1WithSHA1": "crypto/tls", - "tls.PKCS1WithSHA256": "crypto/tls", - "tls.PKCS1WithSHA384": "crypto/tls", - "tls.PKCS1WithSHA512": "crypto/tls", - "tls.PSSWithSHA256": "crypto/tls", - "tls.PSSWithSHA384": "crypto/tls", - "tls.PSSWithSHA512": "crypto/tls", - "tls.RecordHeaderError": "crypto/tls", - "tls.RenegotiateFreelyAsClient": "crypto/tls", - "tls.RenegotiateNever": "crypto/tls", - "tls.RenegotiateOnceAsClient": "crypto/tls", - "tls.RenegotiationSupport": "crypto/tls", - "tls.RequestClientCert": "crypto/tls", - "tls.RequireAndVerifyClientCert": "crypto/tls", - "tls.RequireAnyClientCert": "crypto/tls", - "tls.Server": "crypto/tls", - "tls.SignatureScheme": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.TLS_FALLBACK_SCSV": "crypto/tls", - "tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_RSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.VerifyClientCertIfGiven": "crypto/tls", - "tls.VersionSSL30": "crypto/tls", - "tls.VersionTLS10": "crypto/tls", - "tls.VersionTLS11": "crypto/tls", - "tls.VersionTLS12": "crypto/tls", - "tls.X25519": "crypto/tls", - "tls.X509KeyPair": "crypto/tls", - "token.ADD": "go/token", - "token.ADD_ASSIGN": "go/token", - "token.AND": "go/token", - "token.AND_ASSIGN": "go/token", - "token.AND_NOT": "go/token", - "token.AND_NOT_ASSIGN": "go/token", - "token.ARROW": "go/token", - "token.ASSIGN": "go/token", - "token.BREAK": "go/token", - "token.CASE": "go/token", - "token.CHAN": "go/token", - "token.CHAR": "go/token", - "token.COLON": "go/token", - "token.COMMA": "go/token", - "token.COMMENT": "go/token", - "token.CONST": "go/token", - "token.CONTINUE": "go/token", - "token.DEC": "go/token", - "token.DEFAULT": "go/token", - "token.DEFER": "go/token", - "token.DEFINE": "go/token", - "token.ELLIPSIS": "go/token", - "token.ELSE": "go/token", - "token.EOF": "go/token", - "token.EQL": "go/token", - "token.FALLTHROUGH": "go/token", - "token.FLOAT": "go/token", - "token.FOR": "go/token", - "token.FUNC": "go/token", - "token.File": "go/token", - "token.FileSet": "go/token", - "token.GEQ": "go/token", - "token.GO": "go/token", - "token.GOTO": "go/token", - "token.GTR": "go/token", - "token.HighestPrec": "go/token", - "token.IDENT": "go/token", - "token.IF": "go/token", - "token.ILLEGAL": "go/token", - "token.IMAG": "go/token", - "token.IMPORT": "go/token", - "token.INC": "go/token", - "token.INT": "go/token", - "token.INTERFACE": "go/token", - "token.LAND": "go/token", - "token.LBRACE": "go/token", - "token.LBRACK": "go/token", - "token.LEQ": "go/token", - "token.LOR": "go/token", - "token.LPAREN": "go/token", - "token.LSS": "go/token", - "token.Lookup": "go/token", - "token.LowestPrec": "go/token", - "token.MAP": "go/token", - "token.MUL": "go/token", - "token.MUL_ASSIGN": "go/token", - "token.NEQ": "go/token", - "token.NOT": "go/token", - "token.NewFileSet": "go/token", - "token.NoPos": "go/token", - "token.OR": "go/token", - "token.OR_ASSIGN": "go/token", - "token.PACKAGE": "go/token", - "token.PERIOD": "go/token", - "token.Pos": "go/token", - "token.Position": "go/token", - "token.QUO": "go/token", - "token.QUO_ASSIGN": "go/token", - "token.RANGE": "go/token", - "token.RBRACE": "go/token", - "token.RBRACK": "go/token", - "token.REM": "go/token", - "token.REM_ASSIGN": "go/token", - "token.RETURN": "go/token", - "token.RPAREN": "go/token", - "token.SELECT": "go/token", - "token.SEMICOLON": "go/token", - "token.SHL": "go/token", - "token.SHL_ASSIGN": "go/token", - "token.SHR": "go/token", - "token.SHR_ASSIGN": "go/token", - "token.STRING": "go/token", - "token.STRUCT": "go/token", - "token.SUB": "go/token", - "token.SUB_ASSIGN": "go/token", - "token.SWITCH": "go/token", - "token.TYPE": "go/token", - "token.Token": "go/token", - "token.UnaryPrec": "go/token", - "token.VAR": "go/token", - "token.XOR": "go/token", - "token.XOR_ASSIGN": "go/token", - "trace.IsEnabled": "runtime/trace", - "trace.Log": "runtime/trace", - "trace.Logf": "runtime/trace", - "trace.NewTask": "runtime/trace", - "trace.Region": "runtime/trace", - "trace.Start": "runtime/trace", - "trace.StartRegion": "runtime/trace", - "trace.Stop": "runtime/trace", - "trace.Task": "runtime/trace", - "trace.WithRegion": "runtime/trace", - "types.Array": "go/types", - "types.AssertableTo": "go/types", - "types.AssignableTo": "go/types", - "types.Basic": "go/types", - "types.BasicInfo": "go/types", - "types.BasicKind": "go/types", - "types.Bool": "go/types", - "types.Builtin": "go/types", - "types.Byte": "go/types", - "types.Chan": "go/types", - "types.ChanDir": "go/types", - "types.Checker": "go/types", - "types.Comparable": "go/types", - "types.Complex128": "go/types", - "types.Complex64": "go/types", - "types.Config": "go/types", - "types.Const": "go/types", - "types.ConvertibleTo": "go/types", - "types.DefPredeclaredTestFuncs": "go/types", - "types.Default": "go/types", - "types.Error": "go/types", - "types.Eval": "go/types", - "types.ExprString": "go/types", - "types.FieldVal": "go/types", - "types.Float32": "go/types", - "types.Float64": "go/types", - "types.Func": "go/types", - "types.Id": "go/types", - "types.Identical": "go/types", - "types.IdenticalIgnoreTags": "go/types", - "types.Implements": "go/types", - "types.ImportMode": "go/types", - "types.Importer": "go/types", - "types.ImporterFrom": "go/types", - "types.Info": "go/types", - "types.Initializer": "go/types", - "types.Int": "go/types", - "types.Int16": "go/types", - "types.Int32": "go/types", - "types.Int64": "go/types", - "types.Int8": "go/types", - "types.Interface": "go/types", - "types.Invalid": "go/types", - "types.IsBoolean": "go/types", - "types.IsComplex": "go/types", - "types.IsConstType": "go/types", - "types.IsFloat": "go/types", - "types.IsInteger": "go/types", - "types.IsInterface": "go/types", - "types.IsNumeric": "go/types", - "types.IsOrdered": "go/types", - "types.IsString": "go/types", - "types.IsUnsigned": "go/types", - "types.IsUntyped": "go/types", - "types.Label": "go/types", - "types.LookupFieldOrMethod": "go/types", - "types.Map": "go/types", - "types.MethodExpr": "go/types", - "types.MethodSet": "go/types", - "types.MethodVal": "go/types", - "types.MissingMethod": "go/types", - "types.Named": "go/types", - "types.NewArray": "go/types", - "types.NewChan": "go/types", - "types.NewChecker": "go/types", - "types.NewConst": "go/types", - "types.NewField": "go/types", - "types.NewFunc": "go/types", - "types.NewInterface": "go/types", - "types.NewInterfaceType": "go/types", - "types.NewLabel": "go/types", - "types.NewMap": "go/types", - "types.NewMethodSet": "go/types", - "types.NewNamed": "go/types", - "types.NewPackage": "go/types", - "types.NewParam": "go/types", - "types.NewPkgName": "go/types", - "types.NewPointer": "go/types", - "types.NewScope": "go/types", - "types.NewSignature": "go/types", - "types.NewSlice": "go/types", - "types.NewStruct": "go/types", - "types.NewTuple": "go/types", - "types.NewTypeName": "go/types", - "types.NewVar": "go/types", - "types.Nil": "go/types", - "types.ObjectString": "go/types", - "types.Package": "go/types", - "types.PkgName": "go/types", - "types.Pointer": "go/types", - "types.Qualifier": "go/types", - "types.RecvOnly": "go/types", - "types.RelativeTo": "go/types", - "types.Rune": "go/types", - "types.Scope": "go/types", - "types.Selection": "go/types", - "types.SelectionKind": "go/types", - "types.SelectionString": "go/types", - "types.SendOnly": "go/types", - "types.SendRecv": "go/types", - "types.Signature": "go/types", - "types.Sizes": "go/types", - "types.SizesFor": "go/types", - "types.Slice": "go/types", - "types.StdSizes": "go/types", - "types.String": "go/types", - "types.Struct": "go/types", - "types.Tuple": "go/types", - "types.Typ": "go/types", - "types.Type": "go/types", - "types.TypeAndValue": "go/types", - "types.TypeName": "go/types", - "types.TypeString": "go/types", - "types.Uint": "go/types", - "types.Uint16": "go/types", - "types.Uint32": "go/types", - "types.Uint64": "go/types", - "types.Uint8": "go/types", - "types.Uintptr": "go/types", - "types.Universe": "go/types", - "types.Unsafe": "go/types", - "types.UnsafePointer": "go/types", - "types.UntypedBool": "go/types", - "types.UntypedComplex": "go/types", - "types.UntypedFloat": "go/types", - "types.UntypedInt": "go/types", - "types.UntypedNil": "go/types", - "types.UntypedRune": "go/types", - "types.UntypedString": "go/types", - "types.Var": "go/types", - "types.WriteExpr": "go/types", - "types.WriteSignature": "go/types", - "types.WriteType": "go/types", - "unicode.ASCII_Hex_Digit": "unicode", - "unicode.Adlam": "unicode", - "unicode.Ahom": "unicode", - "unicode.Anatolian_Hieroglyphs": "unicode", - "unicode.Arabic": "unicode", - "unicode.Armenian": "unicode", - "unicode.Avestan": "unicode", - "unicode.AzeriCase": "unicode", - "unicode.Balinese": "unicode", - "unicode.Bamum": "unicode", - "unicode.Bassa_Vah": "unicode", - "unicode.Batak": "unicode", - "unicode.Bengali": "unicode", - "unicode.Bhaiksuki": "unicode", - "unicode.Bidi_Control": "unicode", - "unicode.Bopomofo": "unicode", - "unicode.Brahmi": "unicode", - "unicode.Braille": "unicode", - "unicode.Buginese": "unicode", - "unicode.Buhid": "unicode", - "unicode.C": "unicode", - "unicode.Canadian_Aboriginal": "unicode", - "unicode.Carian": "unicode", - "unicode.CaseRange": "unicode", - "unicode.CaseRanges": "unicode", - "unicode.Categories": "unicode", - "unicode.Caucasian_Albanian": "unicode", - "unicode.Cc": "unicode", - "unicode.Cf": "unicode", - "unicode.Chakma": "unicode", - "unicode.Cham": "unicode", - "unicode.Cherokee": "unicode", - "unicode.Co": "unicode", - "unicode.Common": "unicode", - "unicode.Coptic": "unicode", - "unicode.Cs": "unicode", - "unicode.Cuneiform": "unicode", - "unicode.Cypriot": "unicode", - "unicode.Cyrillic": "unicode", - "unicode.Dash": "unicode", - "unicode.Deprecated": "unicode", - "unicode.Deseret": "unicode", - "unicode.Devanagari": "unicode", - "unicode.Diacritic": "unicode", - "unicode.Digit": "unicode", - "unicode.Duployan": "unicode", - "unicode.Egyptian_Hieroglyphs": "unicode", - "unicode.Elbasan": "unicode", - "unicode.Ethiopic": "unicode", - "unicode.Extender": "unicode", - "unicode.FoldCategory": "unicode", - "unicode.FoldScript": "unicode", - "unicode.Georgian": "unicode", - "unicode.Glagolitic": "unicode", - "unicode.Gothic": "unicode", - "unicode.Grantha": "unicode", - "unicode.GraphicRanges": "unicode", - "unicode.Greek": "unicode", - "unicode.Gujarati": "unicode", - "unicode.Gurmukhi": "unicode", - "unicode.Han": "unicode", - "unicode.Hangul": "unicode", - "unicode.Hanunoo": "unicode", - "unicode.Hatran": "unicode", - "unicode.Hebrew": "unicode", - "unicode.Hex_Digit": "unicode", - "unicode.Hiragana": "unicode", - "unicode.Hyphen": "unicode", - "unicode.IDS_Binary_Operator": "unicode", - "unicode.IDS_Trinary_Operator": "unicode", - "unicode.Ideographic": "unicode", - "unicode.Imperial_Aramaic": "unicode", - "unicode.In": "unicode", - "unicode.Inherited": "unicode", - "unicode.Inscriptional_Pahlavi": "unicode", - "unicode.Inscriptional_Parthian": "unicode", - "unicode.Is": "unicode", - "unicode.IsControl": "unicode", - "unicode.IsDigit": "unicode", - "unicode.IsGraphic": "unicode", - "unicode.IsLetter": "unicode", - "unicode.IsLower": "unicode", - "unicode.IsMark": "unicode", - "unicode.IsNumber": "unicode", - "unicode.IsOneOf": "unicode", - "unicode.IsPrint": "unicode", - "unicode.IsPunct": "unicode", - "unicode.IsSpace": "unicode", - "unicode.IsSymbol": "unicode", - "unicode.IsTitle": "unicode", - "unicode.IsUpper": "unicode", - "unicode.Javanese": "unicode", - "unicode.Join_Control": "unicode", - "unicode.Kaithi": "unicode", - "unicode.Kannada": "unicode", - "unicode.Katakana": "unicode", - "unicode.Kayah_Li": "unicode", - "unicode.Kharoshthi": "unicode", - "unicode.Khmer": "unicode", - "unicode.Khojki": "unicode", - "unicode.Khudawadi": "unicode", - "unicode.L": "unicode", - "unicode.Lao": "unicode", - "unicode.Latin": "unicode", - "unicode.Lepcha": "unicode", - "unicode.Letter": "unicode", - "unicode.Limbu": "unicode", - "unicode.Linear_A": "unicode", - "unicode.Linear_B": "unicode", - "unicode.Lisu": "unicode", - "unicode.Ll": "unicode", - "unicode.Lm": "unicode", - "unicode.Lo": "unicode", - "unicode.Logical_Order_Exception": "unicode", - "unicode.Lower": "unicode", - "unicode.LowerCase": "unicode", - "unicode.Lt": "unicode", - "unicode.Lu": "unicode", - "unicode.Lycian": "unicode", - "unicode.Lydian": "unicode", - "unicode.M": "unicode", - "unicode.Mahajani": "unicode", - "unicode.Malayalam": "unicode", - "unicode.Mandaic": "unicode", - "unicode.Manichaean": "unicode", - "unicode.Marchen": "unicode", - "unicode.Mark": "unicode", - "unicode.Masaram_Gondi": "unicode", - "unicode.MaxASCII": "unicode", - "unicode.MaxCase": "unicode", - "unicode.MaxLatin1": "unicode", - "unicode.MaxRune": "unicode", - "unicode.Mc": "unicode", - "unicode.Me": "unicode", - "unicode.Meetei_Mayek": "unicode", - "unicode.Mende_Kikakui": "unicode", - "unicode.Meroitic_Cursive": "unicode", - "unicode.Meroitic_Hieroglyphs": "unicode", - "unicode.Miao": "unicode", - "unicode.Mn": "unicode", - "unicode.Modi": "unicode", - "unicode.Mongolian": "unicode", - "unicode.Mro": "unicode", - "unicode.Multani": "unicode", - "unicode.Myanmar": "unicode", - "unicode.N": "unicode", - "unicode.Nabataean": "unicode", - "unicode.Nd": "unicode", - "unicode.New_Tai_Lue": "unicode", - "unicode.Newa": "unicode", - "unicode.Nko": "unicode", - "unicode.Nl": "unicode", - "unicode.No": "unicode", - "unicode.Noncharacter_Code_Point": "unicode", - "unicode.Number": "unicode", - "unicode.Nushu": "unicode", - "unicode.Ogham": "unicode", - "unicode.Ol_Chiki": "unicode", - "unicode.Old_Hungarian": "unicode", - "unicode.Old_Italic": "unicode", - "unicode.Old_North_Arabian": "unicode", - "unicode.Old_Permic": "unicode", - "unicode.Old_Persian": "unicode", - "unicode.Old_South_Arabian": "unicode", - "unicode.Old_Turkic": "unicode", - "unicode.Oriya": "unicode", - "unicode.Osage": "unicode", - "unicode.Osmanya": "unicode", - "unicode.Other": "unicode", - "unicode.Other_Alphabetic": "unicode", + "testing.AllocsPerRun": "testing", + "testing.B": "testing", + "testing.Benchmark": "testing", + "testing.BenchmarkResult": "testing", + "testing.Cover": "testing", + "testing.CoverBlock": "testing", + "testing.CoverMode": "testing", + "testing.Coverage": "testing", + "testing.Init": "testing", + "testing.InternalBenchmark": "testing", + "testing.InternalExample": "testing", + "testing.InternalTest": "testing", + "testing.M": "testing", + "testing.Main": "testing", + "testing.MainStart": "testing", + "testing.PB": "testing", + "testing.RegisterCover": "testing", + "testing.RunBenchmarks": "testing", + "testing.RunExamples": "testing", + "testing.RunTests": "testing", + "testing.Short": "testing", + "testing.T": "testing", + "testing.Verbose": "testing", + "textproto.CanonicalMIMEHeaderKey": "net/textproto", + "textproto.Conn": "net/textproto", + "textproto.Dial": "net/textproto", + "textproto.Error": "net/textproto", + "textproto.MIMEHeader": "net/textproto", + "textproto.NewConn": "net/textproto", + "textproto.NewReader": "net/textproto", + "textproto.NewWriter": "net/textproto", + "textproto.Pipeline": "net/textproto", + "textproto.ProtocolError": "net/textproto", + "textproto.Reader": "net/textproto", + "textproto.TrimBytes": "net/textproto", + "textproto.TrimString": "net/textproto", + "textproto.Writer": "net/textproto", + "time.ANSIC": "time", + "time.After": "time", + "time.AfterFunc": "time", + "time.April": "time", + "time.August": "time", + "time.Date": "time", + "time.December": "time", + "time.Duration": "time", + "time.February": "time", + "time.FixedZone": "time", + "time.Friday": "time", + "time.Hour": "time", + "time.January": "time", + "time.July": "time", + "time.June": "time", + "time.Kitchen": "time", + "time.LoadLocation": "time", + "time.LoadLocationFromTZData": "time", + "time.Local": "time", + "time.Location": "time", + "time.March": "time", + "time.May": "time", + "time.Microsecond": "time", + "time.Millisecond": "time", + "time.Minute": "time", + "time.Monday": "time", + "time.Month": "time", + "time.Nanosecond": "time", + "time.NewTicker": "time", + "time.NewTimer": "time", + "time.November": "time", + "time.Now": "time", + "time.October": "time", + "time.Parse": "time", + "time.ParseDuration": "time", + "time.ParseError": "time", + "time.ParseInLocation": "time", + "time.RFC1123": "time", + "time.RFC1123Z": "time", + "time.RFC3339": "time", + "time.RFC3339Nano": "time", + "time.RFC822": "time", + "time.RFC822Z": "time", + "time.RFC850": "time", + "time.RubyDate": "time", + "time.Saturday": "time", + "time.Second": "time", + "time.September": "time", + "time.Since": "time", + "time.Sleep": "time", + "time.Stamp": "time", + "time.StampMicro": "time", + "time.StampMilli": "time", + "time.StampNano": "time", + "time.Sunday": "time", + "time.Thursday": "time", + "time.Tick": "time", + "time.Ticker": "time", + "time.Time": "time", + "time.Timer": "time", + "time.Tuesday": "time", + "time.UTC": "time", + "time.Unix": "time", + "time.UnixDate": "time", + "time.Until": "time", + "time.Wednesday": "time", + "time.Weekday": "time", + "tls.Certificate": "crypto/tls", + "tls.CertificateRequestInfo": "crypto/tls", + "tls.CipherSuite": "crypto/tls", + "tls.CipherSuiteName": "crypto/tls", + "tls.CipherSuites": "crypto/tls", + "tls.Client": "crypto/tls", + "tls.ClientAuthType": "crypto/tls", + "tls.ClientHelloInfo": "crypto/tls", + "tls.ClientSessionCache": "crypto/tls", + "tls.ClientSessionState": "crypto/tls", + "tls.Config": "crypto/tls", + "tls.Conn": "crypto/tls", + "tls.ConnectionState": "crypto/tls", + "tls.CurveID": "crypto/tls", + "tls.CurveP256": "crypto/tls", + "tls.CurveP384": "crypto/tls", + "tls.CurveP521": "crypto/tls", + "tls.Dial": "crypto/tls", + "tls.DialWithDialer": "crypto/tls", + "tls.ECDSAWithP256AndSHA256": "crypto/tls", + "tls.ECDSAWithP384AndSHA384": "crypto/tls", + "tls.ECDSAWithP521AndSHA512": "crypto/tls", + "tls.ECDSAWithSHA1": "crypto/tls", + "tls.Ed25519": "crypto/tls", + "tls.InsecureCipherSuites": "crypto/tls", + "tls.Listen": "crypto/tls", + "tls.LoadX509KeyPair": "crypto/tls", + "tls.NewLRUClientSessionCache": "crypto/tls", + "tls.NewListener": "crypto/tls", + "tls.NoClientCert": "crypto/tls", + "tls.PKCS1WithSHA1": "crypto/tls", + "tls.PKCS1WithSHA256": "crypto/tls", + "tls.PKCS1WithSHA384": "crypto/tls", + "tls.PKCS1WithSHA512": "crypto/tls", + "tls.PSSWithSHA256": "crypto/tls", + "tls.PSSWithSHA384": "crypto/tls", + "tls.PSSWithSHA512": "crypto/tls", + "tls.RecordHeaderError": "crypto/tls", + "tls.RenegotiateFreelyAsClient": "crypto/tls", + "tls.RenegotiateNever": "crypto/tls", + "tls.RenegotiateOnceAsClient": "crypto/tls", + "tls.RenegotiationSupport": "crypto/tls", + "tls.RequestClientCert": "crypto/tls", + "tls.RequireAndVerifyClientCert": "crypto/tls", + "tls.RequireAnyClientCert": "crypto/tls", + "tls.Server": "crypto/tls", + "tls.SignatureScheme": "crypto/tls", + "tls.TLS_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_CHACHA20_POLY1305_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": "crypto/tls", + "tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": "crypto/tls", + "tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.TLS_FALLBACK_SCSV": "crypto/tls", + "tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", + "tls.TLS_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", + "tls.TLS_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", + "tls.TLS_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", + "tls.TLS_RSA_WITH_RC4_128_SHA": "crypto/tls", + "tls.VerifyClientCertIfGiven": "crypto/tls", + "tls.VersionSSL30": "crypto/tls", + "tls.VersionTLS10": "crypto/tls", + "tls.VersionTLS11": "crypto/tls", + "tls.VersionTLS12": "crypto/tls", + "tls.VersionTLS13": "crypto/tls", + "tls.X25519": "crypto/tls", + "tls.X509KeyPair": "crypto/tls", + "token.ADD": "go/token", + "token.ADD_ASSIGN": "go/token", + "token.AND": "go/token", + "token.AND_ASSIGN": "go/token", + "token.AND_NOT": "go/token", + "token.AND_NOT_ASSIGN": "go/token", + "token.ARROW": "go/token", + "token.ASSIGN": "go/token", + "token.BREAK": "go/token", + "token.CASE": "go/token", + "token.CHAN": "go/token", + "token.CHAR": "go/token", + "token.COLON": "go/token", + "token.COMMA": "go/token", + "token.COMMENT": "go/token", + "token.CONST": "go/token", + "token.CONTINUE": "go/token", + "token.DEC": "go/token", + "token.DEFAULT": "go/token", + "token.DEFER": "go/token", + "token.DEFINE": "go/token", + "token.ELLIPSIS": "go/token", + "token.ELSE": "go/token", + "token.EOF": "go/token", + "token.EQL": "go/token", + "token.FALLTHROUGH": "go/token", + "token.FLOAT": "go/token", + "token.FOR": "go/token", + "token.FUNC": "go/token", + "token.File": "go/token", + "token.FileSet": "go/token", + "token.GEQ": "go/token", + "token.GO": "go/token", + "token.GOTO": "go/token", + "token.GTR": "go/token", + "token.HighestPrec": "go/token", + "token.IDENT": "go/token", + "token.IF": "go/token", + "token.ILLEGAL": "go/token", + "token.IMAG": "go/token", + "token.IMPORT": "go/token", + "token.INC": "go/token", + "token.INT": "go/token", + "token.INTERFACE": "go/token", + "token.IsExported": "go/token", + "token.IsIdentifier": "go/token", + "token.IsKeyword": "go/token", + "token.LAND": "go/token", + "token.LBRACE": "go/token", + "token.LBRACK": "go/token", + "token.LEQ": "go/token", + "token.LOR": "go/token", + "token.LPAREN": "go/token", + "token.LSS": "go/token", + "token.Lookup": "go/token", + "token.LowestPrec": "go/token", + "token.MAP": "go/token", + "token.MUL": "go/token", + "token.MUL_ASSIGN": "go/token", + "token.NEQ": "go/token", + "token.NOT": "go/token", + "token.NewFileSet": "go/token", + "token.NoPos": "go/token", + "token.OR": "go/token", + "token.OR_ASSIGN": "go/token", + "token.PACKAGE": "go/token", + "token.PERIOD": "go/token", + "token.Pos": "go/token", + "token.Position": "go/token", + "token.QUO": "go/token", + "token.QUO_ASSIGN": "go/token", + "token.RANGE": "go/token", + "token.RBRACE": "go/token", + "token.RBRACK": "go/token", + "token.REM": "go/token", + "token.REM_ASSIGN": "go/token", + "token.RETURN": "go/token", + "token.RPAREN": "go/token", + "token.SELECT": "go/token", + "token.SEMICOLON": "go/token", + "token.SHL": "go/token", + "token.SHL_ASSIGN": "go/token", + "token.SHR": "go/token", + "token.SHR_ASSIGN": "go/token", + "token.STRING": "go/token", + "token.STRUCT": "go/token", + "token.SUB": "go/token", + "token.SUB_ASSIGN": "go/token", + "token.SWITCH": "go/token", + "token.TYPE": "go/token", + "token.Token": "go/token", + "token.UnaryPrec": "go/token", + "token.VAR": "go/token", + "token.XOR": "go/token", + "token.XOR_ASSIGN": "go/token", + "trace.IsEnabled": "runtime/trace", + "trace.Log": "runtime/trace", + "trace.Logf": "runtime/trace", + "trace.NewTask": "runtime/trace", + "trace.Region": "runtime/trace", + "trace.Start": "runtime/trace", + "trace.StartRegion": "runtime/trace", + "trace.Stop": "runtime/trace", + "trace.Task": "runtime/trace", + "trace.WithRegion": "runtime/trace", + "types.Array": "go/types", + "types.AssertableTo": "go/types", + "types.AssignableTo": "go/types", + "types.Basic": "go/types", + "types.BasicInfo": "go/types", + "types.BasicKind": "go/types", + "types.Bool": "go/types", + "types.Builtin": "go/types", + "types.Byte": "go/types", + "types.Chan": "go/types", + "types.ChanDir": "go/types", + "types.CheckExpr": "go/types", + "types.Checker": "go/types", + "types.Comparable": "go/types", + "types.Complex128": "go/types", + "types.Complex64": "go/types", + "types.Config": "go/types", + "types.Const": "go/types", + "types.ConvertibleTo": "go/types", + "types.DefPredeclaredTestFuncs": "go/types", + "types.Default": "go/types", + "types.Error": "go/types", + "types.Eval": "go/types", + "types.ExprString": "go/types", + "types.FieldVal": "go/types", + "types.Float32": "go/types", + "types.Float64": "go/types", + "types.Func": "go/types", + "types.Id": "go/types", + "types.Identical": "go/types", + "types.IdenticalIgnoreTags": "go/types", + "types.Implements": "go/types", + "types.ImportMode": "go/types", + "types.Importer": "go/types", + "types.ImporterFrom": "go/types", + "types.Info": "go/types", + "types.Initializer": "go/types", + "types.Int": "go/types", + "types.Int16": "go/types", + "types.Int32": "go/types", + "types.Int64": "go/types", + "types.Int8": "go/types", + "types.Interface": "go/types", + "types.Invalid": "go/types", + "types.IsBoolean": "go/types", + "types.IsComplex": "go/types", + "types.IsConstType": "go/types", + "types.IsFloat": "go/types", + "types.IsInteger": "go/types", + "types.IsInterface": "go/types", + "types.IsNumeric": "go/types", + "types.IsOrdered": "go/types", + "types.IsString": "go/types", + "types.IsUnsigned": "go/types", + "types.IsUntyped": "go/types", + "types.Label": "go/types", + "types.LookupFieldOrMethod": "go/types", + "types.Map": "go/types", + "types.MethodExpr": "go/types", + "types.MethodSet": "go/types", + "types.MethodVal": "go/types", + "types.MissingMethod": "go/types", + "types.Named": "go/types", + "types.NewArray": "go/types", + "types.NewChan": "go/types", + "types.NewChecker": "go/types", + "types.NewConst": "go/types", + "types.NewField": "go/types", + "types.NewFunc": "go/types", + "types.NewInterface": "go/types", + "types.NewInterfaceType": "go/types", + "types.NewLabel": "go/types", + "types.NewMap": "go/types", + "types.NewMethodSet": "go/types", + "types.NewNamed": "go/types", + "types.NewPackage": "go/types", + "types.NewParam": "go/types", + "types.NewPkgName": "go/types", + "types.NewPointer": "go/types", + "types.NewScope": "go/types", + "types.NewSignature": "go/types", + "types.NewSlice": "go/types", + "types.NewStruct": "go/types", + "types.NewTuple": "go/types", + "types.NewTypeName": "go/types", + "types.NewVar": "go/types", + "types.Nil": "go/types", + "types.ObjectString": "go/types", + "types.Package": "go/types", + "types.PkgName": "go/types", + "types.Pointer": "go/types", + "types.Qualifier": "go/types", + "types.RecvOnly": "go/types", + "types.RelativeTo": "go/types", + "types.Rune": "go/types", + "types.Scope": "go/types", + "types.Selection": "go/types", + "types.SelectionKind": "go/types", + "types.SelectionString": "go/types", + "types.SendOnly": "go/types", + "types.SendRecv": "go/types", + "types.Signature": "go/types", + "types.Sizes": "go/types", + "types.SizesFor": "go/types", + "types.Slice": "go/types", + "types.StdSizes": "go/types", + "types.String": "go/types", + "types.Struct": "go/types", + "types.Tuple": "go/types", + "types.Typ": "go/types", + "types.Type": "go/types", + "types.TypeAndValue": "go/types", + "types.TypeName": "go/types", + "types.TypeString": "go/types", + "types.Uint": "go/types", + "types.Uint16": "go/types", + "types.Uint32": "go/types", + "types.Uint64": "go/types", + "types.Uint8": "go/types", + "types.Uintptr": "go/types", + "types.Universe": "go/types", + "types.Unsafe": "go/types", + "types.UnsafePointer": "go/types", + "types.UntypedBool": "go/types", + "types.UntypedComplex": "go/types", + "types.UntypedFloat": "go/types", + "types.UntypedInt": "go/types", + "types.UntypedNil": "go/types", + "types.UntypedRune": "go/types", + "types.UntypedString": "go/types", + "types.Var": "go/types", + "types.WriteExpr": "go/types", + "types.WriteSignature": "go/types", + "types.WriteType": "go/types", + "unicode.ASCII_Hex_Digit": "unicode", + "unicode.Adlam": "unicode", + "unicode.Ahom": "unicode", + "unicode.Anatolian_Hieroglyphs": "unicode", + "unicode.Arabic": "unicode", + "unicode.Armenian": "unicode", + "unicode.Avestan": "unicode", + "unicode.AzeriCase": "unicode", + "unicode.Balinese": "unicode", + "unicode.Bamum": "unicode", + "unicode.Bassa_Vah": "unicode", + "unicode.Batak": "unicode", + "unicode.Bengali": "unicode", + "unicode.Bhaiksuki": "unicode", + "unicode.Bidi_Control": "unicode", + "unicode.Bopomofo": "unicode", + "unicode.Brahmi": "unicode", + "unicode.Braille": "unicode", + "unicode.Buginese": "unicode", + "unicode.Buhid": "unicode", + "unicode.C": "unicode", + "unicode.Canadian_Aboriginal": "unicode", + "unicode.Carian": "unicode", + "unicode.CaseRange": "unicode", + "unicode.CaseRanges": "unicode", + "unicode.Categories": "unicode", + "unicode.Caucasian_Albanian": "unicode", + "unicode.Cc": "unicode", + "unicode.Cf": "unicode", + "unicode.Chakma": "unicode", + "unicode.Cham": "unicode", + "unicode.Cherokee": "unicode", + "unicode.Co": "unicode", + "unicode.Common": "unicode", + "unicode.Coptic": "unicode", + "unicode.Cs": "unicode", + "unicode.Cuneiform": "unicode", + "unicode.Cypriot": "unicode", + "unicode.Cyrillic": "unicode", + "unicode.Dash": "unicode", + "unicode.Deprecated": "unicode", + "unicode.Deseret": "unicode", + "unicode.Devanagari": "unicode", + "unicode.Diacritic": "unicode", + "unicode.Digit": "unicode", + "unicode.Dogra": "unicode", + "unicode.Duployan": "unicode", + "unicode.Egyptian_Hieroglyphs": "unicode", + "unicode.Elbasan": "unicode", + "unicode.Elymaic": "unicode", + "unicode.Ethiopic": "unicode", + "unicode.Extender": "unicode", + "unicode.FoldCategory": "unicode", + "unicode.FoldScript": "unicode", + "unicode.Georgian": "unicode", + "unicode.Glagolitic": "unicode", + "unicode.Gothic": "unicode", + "unicode.Grantha": "unicode", + "unicode.GraphicRanges": "unicode", + "unicode.Greek": "unicode", + "unicode.Gujarati": "unicode", + "unicode.Gunjala_Gondi": "unicode", + "unicode.Gurmukhi": "unicode", + "unicode.Han": "unicode", + "unicode.Hangul": "unicode", + "unicode.Hanifi_Rohingya": "unicode", + "unicode.Hanunoo": "unicode", + "unicode.Hatran": "unicode", + "unicode.Hebrew": "unicode", + "unicode.Hex_Digit": "unicode", + "unicode.Hiragana": "unicode", + "unicode.Hyphen": "unicode", + "unicode.IDS_Binary_Operator": "unicode", + "unicode.IDS_Trinary_Operator": "unicode", + "unicode.Ideographic": "unicode", + "unicode.Imperial_Aramaic": "unicode", + "unicode.In": "unicode", + "unicode.Inherited": "unicode", + "unicode.Inscriptional_Pahlavi": "unicode", + "unicode.Inscriptional_Parthian": "unicode", + "unicode.Is": "unicode", + "unicode.IsControl": "unicode", + "unicode.IsDigit": "unicode", + "unicode.IsGraphic": "unicode", + "unicode.IsLetter": "unicode", + "unicode.IsLower": "unicode", + "unicode.IsMark": "unicode", + "unicode.IsNumber": "unicode", + "unicode.IsOneOf": "unicode", + "unicode.IsPrint": "unicode", + "unicode.IsPunct": "unicode", + "unicode.IsSpace": "unicode", + "unicode.IsSymbol": "unicode", + "unicode.IsTitle": "unicode", + "unicode.IsUpper": "unicode", + "unicode.Javanese": "unicode", + "unicode.Join_Control": "unicode", + "unicode.Kaithi": "unicode", + "unicode.Kannada": "unicode", + "unicode.Katakana": "unicode", + "unicode.Kayah_Li": "unicode", + "unicode.Kharoshthi": "unicode", + "unicode.Khmer": "unicode", + "unicode.Khojki": "unicode", + "unicode.Khudawadi": "unicode", + "unicode.L": "unicode", + "unicode.Lao": "unicode", + "unicode.Latin": "unicode", + "unicode.Lepcha": "unicode", + "unicode.Letter": "unicode", + "unicode.Limbu": "unicode", + "unicode.Linear_A": "unicode", + "unicode.Linear_B": "unicode", + "unicode.Lisu": "unicode", + "unicode.Ll": "unicode", + "unicode.Lm": "unicode", + "unicode.Lo": "unicode", + "unicode.Logical_Order_Exception": "unicode", + "unicode.Lower": "unicode", + "unicode.LowerCase": "unicode", + "unicode.Lt": "unicode", + "unicode.Lu": "unicode", + "unicode.Lycian": "unicode", + "unicode.Lydian": "unicode", + "unicode.M": "unicode", + "unicode.Mahajani": "unicode", + "unicode.Makasar": "unicode", + "unicode.Malayalam": "unicode", + "unicode.Mandaic": "unicode", + "unicode.Manichaean": "unicode", + "unicode.Marchen": "unicode", + "unicode.Mark": "unicode", + "unicode.Masaram_Gondi": "unicode", + "unicode.MaxASCII": "unicode", + "unicode.MaxCase": "unicode", + "unicode.MaxLatin1": "unicode", + "unicode.MaxRune": "unicode", + "unicode.Mc": "unicode", + "unicode.Me": "unicode", + "unicode.Medefaidrin": "unicode", + "unicode.Meetei_Mayek": "unicode", + "unicode.Mende_Kikakui": "unicode", + "unicode.Meroitic_Cursive": "unicode", + "unicode.Meroitic_Hieroglyphs": "unicode", + "unicode.Miao": "unicode", + "unicode.Mn": "unicode", + "unicode.Modi": "unicode", + "unicode.Mongolian": "unicode", + "unicode.Mro": "unicode", + "unicode.Multani": "unicode", + "unicode.Myanmar": "unicode", + "unicode.N": "unicode", + "unicode.Nabataean": "unicode", + "unicode.Nandinagari": "unicode", + "unicode.Nd": "unicode", + "unicode.New_Tai_Lue": "unicode", + "unicode.Newa": "unicode", + "unicode.Nko": "unicode", + "unicode.Nl": "unicode", + "unicode.No": "unicode", + "unicode.Noncharacter_Code_Point": "unicode", + "unicode.Number": "unicode", + "unicode.Nushu": "unicode", + "unicode.Nyiakeng_Puachue_Hmong": "unicode", + "unicode.Ogham": "unicode", + "unicode.Ol_Chiki": "unicode", + "unicode.Old_Hungarian": "unicode", + "unicode.Old_Italic": "unicode", + "unicode.Old_North_Arabian": "unicode", + "unicode.Old_Permic": "unicode", + "unicode.Old_Persian": "unicode", + "unicode.Old_Sogdian": "unicode", + "unicode.Old_South_Arabian": "unicode", + "unicode.Old_Turkic": "unicode", + "unicode.Oriya": "unicode", + "unicode.Osage": "unicode", + "unicode.Osmanya": "unicode", + "unicode.Other": "unicode", + "unicode.Other_Alphabetic": "unicode", "unicode.Other_Default_Ignorable_Code_Point": "unicode", "unicode.Other_Grapheme_Extend": "unicode", "unicode.Other_ID_Continue": "unicode", @@ -9702,6 +9855,7 @@ var Symbols = map[string]string{ "unicode.Sm": "unicode", "unicode.So": "unicode", "unicode.Soft_Dotted": "unicode", + "unicode.Sogdian": "unicode", "unicode.Sora_Sompeng": "unicode", "unicode.Soyombo": "unicode", "unicode.Space": "unicode", @@ -9740,6 +9894,7 @@ var Symbols = map[string]string{ "unicode.Vai": "unicode", "unicode.Variation_Selector": "unicode", "unicode.Version": "unicode", + "unicode.Wancho": "unicode", "unicode.Warang_Citi": "unicode", "unicode.White_Space": "unicode", "unicode.Yi": "unicode", @@ -9815,6 +9970,7 @@ var Symbols = map[string]string{ "x509.ECDSAWithSHA256": "crypto/x509", "x509.ECDSAWithSHA384": "crypto/x509", "x509.ECDSAWithSHA512": "crypto/x509", + "x509.Ed25519": "crypto/x509", "x509.EncryptPEMBlock": "crypto/x509", "x509.ErrUnsupportedAlgorithm": "crypto/x509", "x509.Expired": "crypto/x509", @@ -9877,6 +10033,7 @@ var Symbols = map[string]string{ "x509.ParsePKCS8PrivateKey": "crypto/x509", "x509.ParsePKIXPublicKey": "crypto/x509", "x509.PublicKeyAlgorithm": "crypto/x509", + "x509.PureEd25519": "crypto/x509", "x509.RSA": "crypto/x509", "x509.SHA1WithRSA": "crypto/x509", "x509.SHA256WithRSA": "crypto/x509", diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go index 5ddbadf1..2e51d8e3 100644 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ b/vendor/github.com/visualfc/gotools/types/types.go @@ -20,6 +20,7 @@ import ( "os" "path/filepath" "regexp" + "runtime" "sort" "strconv" "strings" @@ -41,19 +42,21 @@ var Command = &command.Command{ } var ( - typesVerbose bool - typesAllowBinary bool - typesFilePos string - typesCursorText string - typesFileStdin bool - typesFindUse bool - typesFindDef bool - typesFindUseAll bool - typesFindSkipGoroot bool - typesFindInfo bool - typesFindDoc bool - typesTags string - typesTagList = []string{} // exploded version of tags flag; set in main + typesVerbose bool + typesAllowBinary bool + typesFilePos string + typesCursorText string + typesFileStdin bool + typesFindUse bool + typesFindDef bool + typesFindUseAll bool + typesFindSkipGoroot bool + typesFindInfo bool + typesFindDoc bool + typesFindImportRange bool + typesFindImport bool + typesTags string + typesTagList = []string{} // exploded version of tags flag; set in main ) //func init @@ -67,6 +70,8 @@ func init() { Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define") Command.Flag.BoolVar(&typesFindUse, "use", false, "find cursor usages") Command.Flag.BoolVar(&typesFindUseAll, "all", false, "find cursor all usages in GOPATH") + Command.Flag.BoolVar(&typesFindImport, "import", false, "find cursor usages with import") + Command.Flag.BoolVar(&typesFindImportRange, "import_range", false, "find cursor usages with import range") Command.Flag.BoolVar(&typesFindSkipGoroot, "skip_goroot", false, "find cursor all usages skip GOROOT") Command.Flag.BoolVar(&typesFindDoc, "doc", false, "find cursor def doc") Command.Flag.StringVar(&typesTags, "tags", "", "space-separated list of build tags to apply when parsing") @@ -76,6 +81,7 @@ type ObjKind int const ( ObjNone ObjKind = iota + ObjPackage ObjPkgName ObjTypeName ObjInterface @@ -93,7 +99,7 @@ const ( ObjComment ) -var ObjKindName = []string{"none", "package", +var ObjKindName = []string{"none", "package", "package", "type", "interface", "struct", "const", "var", "field", "func", "method", @@ -198,12 +204,14 @@ func runTypes(cmd *command.Command, args []string) error { } w.cmd = cmd w.findMode = &FindMode{ - Info: typesFindInfo, - Define: typesFindDef, - Doc: typesFindDoc, - Usage: typesFindUse, - UsageAll: typesFindUseAll, - SkipGoroot: typesFindSkipGoroot, + Info: typesFindInfo, + Define: typesFindDef, + Doc: typesFindDoc, + Usage: typesFindUse, + UsageAll: typesFindUseAll, + Import: typesFindImport, + ImportRange: typesFindImportRange, + SkipGoroot: typesFindSkipGoroot, } for _, pkgName := range args { @@ -254,12 +262,14 @@ type SourceData struct { } type FindMode struct { - Info bool - Doc bool - Define bool - Usage bool - UsageAll bool - SkipGoroot bool + Info bool + Doc bool + Define bool + Usage bool + UsageAll bool + Import bool + ImportRange bool + SkipGoroot bool } func (f *FindMode) IsValid() bool { @@ -387,10 +397,10 @@ func (p *PkgWalker) Check(name string, conf *PkgConfig, cusror *FileCursor) (pkg } //p.Imported[name] = nil p.importingName = make(map[string]bool) + // check go mod and skip GOROOT p.ModPkg = nil - // check mod var import_path string - if filepath.IsAbs(name) { + if filepath.IsAbs(name) && !strings.HasPrefix(name, runtime.GOROOT()) { p.ModPkg, _ = fastmod.LoadPackage(name, p.Context) if p.ModPkg != nil { dir := filepath.ToSlash(p.ModPkg.Node().ModDir()) @@ -725,6 +735,7 @@ func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *Fi } cursor.xtest = isXTest } + return w.LookupObjects(conf, cursor) if nm := w.CheckIsName(cursor); nm != nil { return w.LookupName(pkg, conf, cursor, nm) } else if is := w.CheckIsImport(cursor); is != nil { @@ -774,6 +785,163 @@ func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *File for _, pos := range usages { w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } + + // if !w.findMode.UsageAll { + // return nil + // } + + // cursorPkg := pkg + // if cursorPkg == nil { + // return nil + // } + // var pkg_path string + // var xpkg_path string + // if conf.Pkg != nil { + // pkg_path = conf.Pkg.Path() + // } + // if conf.XPkg != nil { + // xpkg_path = conf.XPkg.Path() + // } + + // var find_def_pkg string + // var uses_paths []string + + // if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { + // find_def_pkg = cursorPkg.Path() + // if w.findMode.SkipGoroot { + // bp, err := w.importPath(conf.Bpkg.Dir, find_def_pkg, 0) + // if err == nil && !bp.Goroot { + // uses_paths = append(uses_paths, find_def_pkg) + // } + // } else { + // uses_paths = append(uses_paths, find_def_pkg) + // } + // } + + // cursorPkgPath := pkg.Path() + // if w.ModPkg == nil && pkgutil.IsVendorExperiment() { + // cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) + // } + // // check on module dir + // if w.ModPkg != nil { + // dir := w.ModPkg.Node().ModDir() + // filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + // if !info.IsDir() { + // return nil + // } + // if path != dir && info.Name() == "vendor" { + // return filepath.SkipDir + // } + // if conf.Bpkg.Dir == path { + // return nil + // } + // bp, err := w.importPath(dir, path, 0) + // if err != nil { + // return nil + // } + // if !bp.IsCommand() { + // importPath := w.ModPkg.Node().Path() + // if path != dir { + // importPath = filepath.Join(importPath, path[len(dir)+1:]) + // } + // if importPath == cursorPkgPath { + // return nil + // } + // } + // find := false + // for _, v := range bp.Imports { + // if v == cursorPkgPath { + // find = true + // break + // } + // } + // if find { + // importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) + // for _, v := range uses_paths { + // if v == importPath { + // return nil + // } + // } + // uses_paths = append(uses_paths, importPath) + // } + // return nil + // }) + // } + // ctx := *w.Context + // searchAll := true + // if w.ModPkg != nil { + // ctx.GOPATH = "" + // if w.findMode.SkipGoroot { + // searchAll = false + // } + // } + // if searchAll { + // buildutil.ForEachPackage(&ctx, func(importPath string, err error) { + // if err != nil { + // return + // } + // if importPath == conf.Pkg.Path() { + // return + // } + // bp, err := w.importPath("", importPath, 0) + // if err != nil { + // return + // } + // find := false + // if bp.ImportPath == cursorPkg.Path() { + // find = true + // } else { + // for _, v := range bp.Imports { + // if v == cursorPkgPath { + // find = true + // break + // } + // } + // } + // if find { + // for _, v := range uses_paths { + // if v == bp.ImportPath { + // return + // } + // } + // if w.findMode.SkipGoroot && bp.Goroot { + // return + // } + // uses_paths = append(uses_paths, bp.ImportPath) + // } + // }) + // } + + // //w.Imported = make(map[string]*types.Package) + + // for _, v := range uses_paths { + // var usages []int + // vpkg, conf, _ := w.Import("", v, NewPkgConfig(false, true), nil) + // if vpkg != nil && vpkg != pkg { + // if conf.Info != nil { + // for k, v := range conf.Info.Uses { + // if k != nil && v != nil && IsSameObject(v, cursorObj) { + // usages = append(usages, int(k.Pos())) + // } + // } + // } + // if conf.XInfo != nil { + // for k, v := range conf.XInfo.Uses { + // if k != nil && v != nil && IsSameObject(v, cursorObj) { + // usages = append(usages, int(k.Pos())) + // } + // } + // } + // } + // if v == find_def_pkg { + // usages = append(usages, int(cursorPos)) + // } + // (sort.IntSlice(usages)).Sort() + // for _, pos := range usages { + // w.cmd.Println(w.FileSet.Position(token.Pos(pos))) + // } + // } + return nil } @@ -1169,9 +1337,9 @@ func (w *PkgWalker) LookupByText(pkgInfo *types.Info, text string) types.Object func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { var cursorObj types.Object var cursorSelection *types.Selection - var cursorObjIsDef bool + var cursorId ast.Expr + var kind ObjKind //lookup defs - var pkg *types.Package var pkgInfo *types.Info if cursor.xtest { @@ -1181,239 +1349,132 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { pkgInfo = conf.Info pkg = conf.Pkg } - - _ = cursorObjIsDef - if cursorObj == nil { - for sel, obj := range pkgInfo.Selections { - if cursor.pos >= sel.Sel.Pos() && cursor.pos <= sel.Sel.End() { - cursorObj = obj.Obj() - cursorSelection = obj - break - } - } - } - var cursorId *ast.Ident - if cursorObj == nil { - for id, obj := range pkgInfo.Defs { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - cursorId = id - cursorObjIsDef = true - break - } - } - } - _ = cursorSelection - if cursorObj == nil { - for id, obj := range pkgInfo.Uses { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - break - } - } - } - if cursorObj == nil { - for id, obj := range pkgInfo.Implicits { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - break - } + var packageName string + var packagePath string + var isImport bool + if im := w.CheckIsName(cursor); im != nil { + cursorId = im + kind = ObjPackage + packageName = im.Name + packagePath = pkg.Path() + } else if im := w.CheckIsImport(cursor); im != nil { + cursorId = im.Path + kind = ObjPkgName + isImport = true + packagePath, _ = strconv.Unquote(im.Path.Value) + if im.Name != nil { + packageName = im.Name.Name + } else { + nameList := strings.Split(packagePath, "/") + packageName = nameList[len(nameList)-1] } - } - if cursorObj == nil && cursor.text != "" { - cursorObj = w.LookupByText(pkgInfo, cursor.text) - } - - var kind ObjKind - if cursorObj != nil { - var err error - kind, err = parserObjKind(cursorObj) - if err != nil { - return err + } else if v := w.CheckIsBasic(cursor, pkgInfo); v != nil { + if w.findMode.Info { + w.cmd.Println(fmt.Sprintf("basic type %v (%v)", v.Kind, v.Value)) + return nil } - } else if cursorId != nil { - kind = ObjImplicit + return fmt.Errorf("not support basic type: %v (%v)", v.Kind, v.Value) } else { - for id, _ := range pkgInfo.Types { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - switch v := id.(type) { - case *ast.BasicLit: - if w.findMode.Info { - w.cmd.Println(fmt.Sprintf("basic type %v (%v)", v.Kind, v.Value)) - return nil + cursorObj, cursorSelection = w.CheckIsObject(cursor, pkgInfo) + if cursorObj == nil && cursor.text != "" { + cursorObj = w.LookupByText(pkgInfo, cursor.text) + } + if cursorObj != nil { + kind, _ = parserObjKind(cursorObj) + if kind == ObjField { + if cursorObj.(*types.Var).Anonymous() { + typ := orgType(cursorObj.Type()) + if named, ok := typ.(*types.Named); ok { + cursorObj = named.Obj() } - return fmt.Errorf("not support basic type: %v (%v)", v.Kind, v.Value) } + } else if kind == ObjPkgName { + packageName = cursorObj.(*types.PkgName).Imported().Name() + packagePath = cursorObj.(*types.PkgName).Imported().Path() } } - //TODO - return fmt.Errorf("not find object %v:%v", cursor.fileName, cursor.pos) } - if kind == ObjField { - if cursorObj.(*types.Var).Anonymous() { - typ := orgType(cursorObj.Type()) - if named, ok := typ.(*types.Named); ok { - cursorObj = named.Obj() - } - } + + if cursorId == nil && cursorObj == nil { + return fmt.Errorf("not found object") } + var findInfo *ObjectInfo var cursorPkg *types.Package var cursorPos token.Pos - if cursorObj != nil { - cursorPkg = cursorObj.Pkg() - cursorPos = cursorObj.Pos() + findInfo = w.CheckObjectInfo(cursorObj, cursorSelection, kind, pkg, pkgInfo) } else { - cursorPkg = pkg - cursorPos = cursorId.Pos() + findInfo = &ObjectInfo{ + pkg: pkg, + pos: cursorId.Pos(), + } } - //var fieldTypeInfo *types.Info - var fieldTypeObj types.Object - // if cursorPkg == pkg { - // fieldTypeInfo = pkgInfo - // } - cursorIsInterfaceMethod := false - var cursorInterfaceTypeName string - var cursorInterfaceTypeNamed *types.Named + cursorPkg = findInfo.pkg + cursorPos = findInfo.pos - if kind == ObjMethod && cursorSelection != nil && cursorSelection.Recv() != nil { - sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature) - if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { - if named, ok := cursorSelection.Recv().(*types.Named); ok { - obj, na := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil && na != nil { - cursorObj = obj - cursorPkg = na.Obj().Pkg() - cursorInterfaceTypeName = na.Obj().Name() - cursorInterfaceTypeNamed = na - cursorIsInterfaceMethod = true + if w.findMode.Define { + if isImport { + var fname = packageName + var fpath = packagePath + var findpath string = fpath + //check imported and vendor + for _, v := range w.Imported { + vpath := v.Path() + pos := strings.Index(vpath, "/vendor/") + if pos >= 0 { + vpath = vpath[pos+8:] } - } - } - } else if kind == ObjField && cursorSelection != nil { - if recv := cursorSelection.Recv(); recv != nil { - typ := orgType(recv) - if typ != nil { - if name, ok := typ.(*types.Named); ok { - fieldTypeObj = name.Obj() - na := w.lookupNamedField(name, cursorObj.Name()) - if na != nil { - fieldTypeObj = na.Obj() - } - //check current pkg - if fieldTypeObj != nil && fieldTypeObj.Pkg() == pkg { - cursorPkg = fieldTypeObj.Pkg() - if t, ok := fieldTypeObj.Type().Underlying().(*types.Struct); ok { - for i := 0; i < t.NumFields(); i++ { - if t.Field(i).Id() == cursorObj.Id() { - cursorPos = t.Field(i).Pos() - break - } - } - } - } + if vpath == fpath { + findpath = v.Path() + break } } - } - } - if typesVerbose { - w.cmd.Println("parser", cursorObj, kind, cursorIsInterfaceMethod) - } - if cursorPkg != nil && cursorPkg != pkg && - kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { - pkg, conf, _ := w.Import("", cursorPkg.Path(), NewPkgConfig(true, true), nil) - if pkg != nil { - if cursorIsInterfaceMethod { - for k, v := range conf.Info.Defs { - if k != nil && v != nil && IsSameObject(v, cursorInterfaceTypeNamed.Obj()) { - named := v.Type().(*types.Named) - obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil && typ != nil { - cursorObj = obj - cursorPos = obj.Pos() - cursorPkg = typ.Obj().Pkg() - cursorInterfaceTypeName = typ.Obj().Name() - break - } - } - } - // for _, obj := range conf.Info.Defs { - // if obj == nil { - // continue - // } - // if fn, ok := obj.(*types.Func); ok { - // if fn.Name() == cursorObj.Name() { - // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { - // if named, ok := sig.Recv().Type().(*types.Named); ok { - // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { - // cursorPos = obj.Pos() - // break - // } - // } - // } - // } - // } - // } - } else if kind == ObjField && fieldTypeObj != nil { - for _, obj := range conf.Info.Defs { - if obj == nil { - continue - } - if _, ok := obj.(*types.TypeName); ok { - if IsSameObject(fieldTypeObj, obj) { - if t, ok := obj.Type().Underlying().(*types.Struct); ok { - for i := 0; i < t.NumFields(); i++ { - if t.Field(i).Id() == cursorObj.Id() { - cursorPos = t.Field(i).Pos() - break - } - } - } - break - } - } - } + bp, err := w.importPath("", findpath, build.FindOnly) + if err == nil { + w.cmd.Println(w.FileSet.Position(findInfo.pos).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) } else { - for k, v := range conf.Info.Defs { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - cursorPos = k.Pos() - break - } - } + w.cmd.Println(w.FileSet.Position(findInfo.pos)) } + } else { + w.cmd.Println(w.FileSet.Position(findInfo.pos)) } - // if kind == ObjField || cursorIsInterfaceMethod { - // fieldTypeInfo = conf.Info - // } - } - // if kind == ObjField { - // fieldTypeObj = w.LookupStructFromField(fieldTypeInfo, cursorPkg, cursorObj, cursorPos) - // } - if w.findMode.Define { - w.cmd.Println(w.FileSet.Position(cursorPos)) } if w.findMode.Info { - /*if kind == ObjField && fieldTypeObj != nil { - typeName := fieldTypeObj.Name() - if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg { - typeName = fieldTypeObj.Pkg().Name() + "." + fieldTypeObj.Name() - } - fmt.Println(typeName, simpleObjInfo(cursorObj)) - } else */ + // if kind == ObjField && fieldTypeObj != nil { + // typeName := fieldTypeObj.Name() + // if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg { + // typeName = fieldTypeObj.Pkg().Name() + "." + fieldTypeObj.Name() + // } + // fmt.Println(typeName, simpleObjInfo(cursorObj)) + // } else if kind == ObjBuiltin { w.cmd.Println(builtinInfo(cursorObj.Name())) + } else if kind == ObjPackage { + if packageName == packagePath { + w.cmd.Printf("package %s\n", packageName) + } else { + w.cmd.Printf("package %s (%q)\n", packageName, packagePath) + } } else if kind == ObjPkgName { - w.cmd.Println(cursorObj.String()) + if packageName == packagePath { + w.cmd.Printf("package %s\n", packageName) + } else { + w.cmd.Printf("package %s (%q)\n", packageName, packagePath) + } } else if kind == ObjImplicit { - w.cmd.Printf("%s is implicit\n", cursorId.Name) - } else if cursorIsInterfaceMethod { - w.cmd.Println(strings.Replace(simpleObjInfo(cursorObj), "(interface)", cursorPkg.Name()+"."+cursorInterfaceTypeName, 1)) + w.cmd.Printf("%s is implicit\n", cursorObj) + } else if findInfo.isInterfaceMethod { + if cursorPkg == nil { + // error.Error() + w.cmd.Println(simpleObjInfo(findInfo.obj)) + } else { + w.cmd.Println(strings.Replace(simpleObjInfo(findInfo.obj), "(interface)", cursorPkg.Name()+"."+findInfo.interfaceTypeName, 1)) + } } else { w.cmd.Println(simpleObjInfo(cursorObj)) } } - if w.findMode.Doc && w.findMode.Define { pos := w.FileSet.Position(cursorPos) file := w.ParsedFileCache[pos.Filename] @@ -1433,25 +1494,45 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } } } + if !w.findMode.Usage { return nil } var usages []int - if kind == ObjPkgName { - for id, obj := range pkgInfo.Uses { - if obj != nil && obj.Id() == cursorObj.Id() { //!= nil && cursorObj.Pos() == obj.Pos() { - if _, ok := obj.(*types.PkgName); ok { - usages = append(usages, int(id.Pos())) + var importRange []ast.Expr + if kind == ObjPackage { + if !cursor.xtest { + usages = append(usages, findPackageDef(packageName, conf.Files)...) + if conf.XInfo != nil { + usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) + if w.findMode.ImportRange { + importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) + } else if w.findMode.Import { + usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) } } + } else { + usages = append(usages, findPackageDef(packageName, conf.XTestFiles)...) + } + } else if kind == ObjPkgName { + if conf.Info != nil { + usages = append(usages, findPackageUses(packagePath, conf.Files, conf.Info)...) + if w.findMode.ImportRange { + importRange = append(importRange, findPackageImportRange(packagePath, conf.Files)...) + } else if w.findMode.Import { + usages = append(usages, findPackageImports(packageName, packagePath, conf.Files)...) + } + } + if conf.XInfo != nil { + usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) + if w.findMode.ImportRange { + importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) + } else if w.findMode.Import { + usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) + } } } else { - // for id, obj := range pkgInfo.Defs { - // if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() { - // usages = append(usages, int(id.Pos())) - // } - // } if cursorObj != nil { for id, obj := range pkgInfo.Uses { if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() { @@ -1477,7 +1558,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if cursorPkg != nil && (cursorPkg.Path() == pkg_path || cursorPkg.Path() == xpkg_path) && - kind != ObjPkgName { + kind != ObjPkgName && kind != ObjPackage { usages = append(usages, int(cursorPos)) } @@ -1486,7 +1567,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } //check look for current pkg.object on pkg_test - if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) { + if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) || IsSamePkg(cursorPkg, conf.XPkg) { var addInfo *types.Info if cursor.xtest { addInfo = conf.Info @@ -1495,22 +1576,35 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { } if addInfo != nil && cursorPkg != nil { var usages []int - // for id, obj := range addInfo.Defs { - // if id != nil && obj != nil && obj.Id() == cursorObj.Id() { - // usages = append(usages, int(id.Pos())) - // } - // } + // for id, obj := range addInfo.Defs { + // if id != nil && obj != nil && obj.Id() == cursorObj.Id() { + // usages = append(usages, int(id.Pos())) + // } + // } for k, v := range addInfo.Uses { if k != nil && v != nil && IsSameObject(v, cursorObj) { usages = append(usages, int(k.Pos())) } } + + if importRange != nil { + sort.Sort(ExprSlice(importRange)) + for _, expr := range importRange { + pos := w.FileSet.Position(expr.Pos() + 1) + pos.String() + w.cmd.Printf("%s:%d:%d-%d\n", + pos.Filename, pos.Line, pos.Column, + pos.Column+int(expr.End())-int(expr.Pos())-2) + } + } + (sort.IntSlice(usages)).Sort() for _, pos := range usages { w.cmd.Println(w.FileSet.Position(token.Pos(pos))) } } } + if !w.findMode.UsageAll { return nil } @@ -1533,10 +1627,17 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { uses_paths = append(uses_paths, find_def_pkg) } } + findPkgPath := pkg.Path() + if cursorObj != nil { + findPkgPath = cursorObj.Pkg().Path() + } + if kind == ObjPackage || kind == ObjPkgName { + findPkgPath = packagePath + } - cursorPkgPath := cursorObj.Pkg().Path() + //cursorPkgPath := cursorObj.Pkg().Path() if w.ModPkg == nil && pkgutil.IsVendorExperiment() { - cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) + findPkgPath = pkgutil.VendorPathToImportPath(findPkgPath) } // check on module dir if w.ModPkg != nil { @@ -1560,25 +1661,30 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if path != dir { importPath = filepath.Join(importPath, path[len(dir)+1:]) } - if importPath == cursorPkgPath { + if kind == ObjPackage && importPath == findPkgPath { return nil } } - find := false - for _, v := range bp.Imports { - if v == cursorPkgPath { - find = true - break + if kind == ObjPkgName && bp.ImportPath == findPkgPath { + uses_paths = append(uses_paths, bp.ImportPath) + } else { + find := false + imports := append(append([]string{}, bp.Imports...), bp.XTestImports...) + for _, v := range imports { + if v == findPkgPath { + find = true + break + } } - } - if find { - importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) - for _, v := range uses_paths { - if v == importPath { - return nil + if find { + importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) + for _, v := range uses_paths { + if v == importPath { + return nil + } } + uses_paths = append(uses_paths, importPath) } - uses_paths = append(uses_paths, importPath) } return nil }) @@ -1596,6 +1702,7 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if err != nil { return } + if importPath == conf.Pkg.Path() { return } @@ -1603,48 +1710,75 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if err != nil { return } - find := false - if bp.ImportPath == cursorPkg.Path() { - find = true + if kind == ObjPkgName && bp.ImportPath == findPkgPath { + uses_paths = append(uses_paths, bp.ImportPath) } else { - for _, v := range bp.Imports { - if v == cursorPkgPath { - find = true - break + find := false + if bp.ImportPath == cursorPkg.Path() { + find = true + } else { + imports := append(append([]string{}, bp.Imports...), bp.XTestImports...) + for _, v := range imports { + if v == findPkgPath { + find = true + break + } } } - } - if find { - for _, v := range uses_paths { - if v == bp.ImportPath { + if find { + for _, v := range uses_paths { + if v == bp.ImportPath { + return + } + } + if w.findMode.SkipGoroot && bp.Goroot { return } + uses_paths = append(uses_paths, bp.ImportPath) } - if w.findMode.SkipGoroot && bp.Goroot { - return - } - uses_paths = append(uses_paths, bp.ImportPath) } }) } //w.Imported = make(map[string]*types.Package) - for _, v := range uses_paths { var usages []int + var importRange []ast.Expr vpkg, conf, _ := w.Import("", v, NewPkgConfig(false, true), nil) + if vpkg != nil && vpkg.Path() == packagePath && kind == ObjPkgName { + usages = append(usages, findPackageDef(packageName, conf.Files)...) + } if vpkg != nil && vpkg != pkg { - if conf.Info != nil { - for k, v := range conf.Info.Uses { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - usages = append(usages, int(k.Pos())) + if kind == ObjPackage || kind == ObjPkgName { + if conf.Info != nil { + usages = append(usages, findPackageUses(packagePath, conf.Files, conf.Info)...) + if w.findMode.ImportRange { + importRange = append(importRange, findPackageImportRange(packagePath, conf.Files)...) + } else if w.findMode.Import { + usages = append(usages, findPackageImports(packageName, packagePath, conf.Files)...) } } - } - if conf.XInfo != nil { - for k, v := range conf.XInfo.Uses { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - usages = append(usages, int(k.Pos())) + if conf.XInfo != nil { + usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) + if w.findMode.ImportRange { + importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) + } else if w.findMode.Import { + usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) + } + } + } else { + if conf.Info != nil { + for k, v := range conf.Info.Uses { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + usages = append(usages, int(k.Pos())) + } + } + } + if conf.XInfo != nil { + for k, v := range conf.XInfo.Uses { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + usages = append(usages, int(k.Pos())) + } } } } @@ -1652,6 +1786,17 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { if v == find_def_pkg { usages = append(usages, int(cursorPos)) } + + if importRange != nil { + sort.Sort(ExprSlice(importRange)) + for _, expr := range importRange { + pos := w.FileSet.Position(expr.Pos() + 1) + pos.String() + w.cmd.Printf("%s:%d:%d-%d\n", + pos.Filename, pos.Line, pos.Column, + pos.Column+int(expr.End())-int(expr.Pos())-2) + } + } (sort.IntSlice(usages)).Sort() for _, pos := range usages { w.cmd.Println(w.FileSet.Position(token.Pos(pos))) @@ -1660,6 +1805,50 @@ func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { return nil } +func findPackageDef(pkgname string, files map[string]*ast.File) (pos []int) { + for _, f := range files { + if pkgname == f.Name.Name { + pos = append(pos, int(f.Name.Pos())) + } + } + return +} + +func findPackageImports(pkgname string, pkgpath string, files map[string]*ast.File) (pos []int) { + for _, f := range files { + for _, im := range f.Imports { + fpath, _ := strconv.Unquote(im.Path.Value) + if fpath == pkgpath { + pos = append(pos, int(im.Path.End())-len(pkgname)-1) + } + } + } + return +} + +func findPackageImportRange(pkgpath string, files map[string]*ast.File) (expr []ast.Expr) { + for _, f := range files { + for _, im := range f.Imports { + fpath, _ := strconv.Unquote(im.Path.Value) + if fpath == pkgpath { + expr = append(expr, im.Path) + } + } + } + return +} + +func findPackageUses(pkgpath string, files map[string]*ast.File, info *types.Info) (pos []int) { + for id, obj := range info.Uses { + if p, ok := obj.(*types.PkgName); ok { + if im := p.Imported(); im != nil && im.Path() == pkgpath { + pos = append(pos, int(id.Pos())) + } + } + } + return +} + func (w *PkgWalker) CheckIsName(cursor *FileCursor) *ast.Ident { if cursor.fileDir == "" { return nil @@ -1690,6 +1879,184 @@ func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec { return nil } +func (w *PkgWalker) CheckIsBasic(cursor *FileCursor, pkgInfo *types.Info) *ast.BasicLit { + for id, _ := range pkgInfo.Types { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + switch v := id.(type) { + case *ast.BasicLit: + return v + } + } + } + return nil +} + +func (w *PkgWalker) CheckIsObject(cursor *FileCursor, pkgInfo *types.Info) (cursorObj types.Object, cursorSelection *types.Selection) { + //check selection + for sel, obj := range pkgInfo.Selections { + if cursor.pos >= sel.Sel.Pos() && cursor.pos <= sel.Sel.End() { + cursorObj = obj.Obj() + cursorSelection = obj + return + } + } + //check def + for id, obj := range pkgInfo.Defs { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + return + } + } + //check use + for id, obj := range pkgInfo.Uses { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + return + } + } + //check implicits + for id, obj := range pkgInfo.Implicits { + if cursor.pos >= id.Pos() && cursor.pos <= id.End() { + cursorObj = obj + return + } + } + return +} + +func (w *PkgWalker) CheckObjectInfo(cursorObj types.Object, cursorSelection *types.Selection, kind ObjKind, pkg *types.Package, pkgInfo *types.Info) *ObjectInfo { + cursorPkg := cursorObj.Pkg() + cursorPos := cursorObj.Pos() + + var fieldTypeObj types.Object + cursorIsInterfaceMethod := false + var cursorInterfaceTypeName string + var cursorInterfaceTypeNamed *types.Named + + if kind == ObjMethod && cursorSelection != nil && cursorSelection.Recv() != nil { + sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature) + if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { + if named, ok := cursorSelection.Recv().(*types.Named); ok { + obj, na := w.lookupNamedMethod(named, cursorObj.Name()) + if obj != nil && na != nil { + cursorObj = obj + cursorPkg = na.Obj().Pkg() + cursorInterfaceTypeName = na.Obj().Name() + cursorInterfaceTypeNamed = na + cursorIsInterfaceMethod = true + } + } + } + } else if kind == ObjField && cursorSelection != nil { + if recv := cursorSelection.Recv(); recv != nil { + typ := orgType(recv) + if typ != nil { + if name, ok := typ.(*types.Named); ok { + fieldTypeObj = name.Obj() + na := w.lookupNamedField(name, cursorObj.Name()) + if na != nil { + fieldTypeObj = na.Obj() + } + //check current pkg + if fieldTypeObj != nil && fieldTypeObj.Pkg() == pkg { + cursorPkg = fieldTypeObj.Pkg() + if t, ok := fieldTypeObj.Type().Underlying().(*types.Struct); ok { + for i := 0; i < t.NumFields(); i++ { + if t.Field(i).Id() == cursorObj.Id() { + cursorPos = t.Field(i).Pos() + break + } + } + } + } + } + } + } + } + if cursorPkg != nil && cursorPkg != pkg && + kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { + pkg, conf, _ := w.Import("", cursorPkg.Path(), NewPkgConfig(true, true), nil) + if pkg != nil { + if cursorIsInterfaceMethod { + for k, v := range conf.Info.Defs { + if k != nil && v != nil && IsSameObject(v, cursorInterfaceTypeNamed.Obj()) { + named := v.Type().(*types.Named) + obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) + if obj != nil && typ != nil { + cursorObj = obj + cursorPos = obj.Pos() + cursorPkg = typ.Obj().Pkg() + cursorInterfaceTypeName = typ.Obj().Name() + break + } + } + } + // for _, obj := range conf.Info.Defs { + // if obj == nil { + // continue + // } + // if fn, ok := obj.(*types.Func); ok { + // if fn.Name() == cursorObj.Name() { + // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { + // if named, ok := sig.Recv().Type().(*types.Named); ok { + // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { + // cursorPos = obj.Pos() + // break + // } + // } + // } + // } + // } + // } + } else if kind == ObjField && fieldTypeObj != nil { + for _, obj := range conf.Info.Defs { + if obj == nil { + continue + } + if _, ok := obj.(*types.TypeName); ok { + if IsSameObject(fieldTypeObj, obj) { + if t, ok := obj.Type().Underlying().(*types.Struct); ok { + for i := 0; i < t.NumFields(); i++ { + if t.Field(i).Id() == cursorObj.Id() { + cursorPos = t.Field(i).Pos() + break + } + } + } + break + } + } + } + } else { + for k, v := range conf.Info.Defs { + if k != nil && v != nil && IsSameObject(v, cursorObj) { + cursorPos = k.Pos() + break + } + } + } + } + // if kind == ObjField || cursorIsInterfaceMethod { + // fieldTypeInfo = conf.Info + // } + } + return &ObjectInfo{ + cursorPkg, + cursorObj, + cursorPos, + cursorIsInterfaceMethod, + cursorInterfaceTypeName, + } +} + +type ObjectInfo struct { + pkg *types.Package + obj types.Object + pos token.Pos + isInterfaceMethod bool + interfaceTypeName string +} + func inRange(node ast.Node, p token.Pos) bool { if node == nil { return false @@ -1705,3 +2072,9 @@ func (w *PkgWalker) nodeString(node interface{}) string { printer.Fprint(&b, w.FileSet, node) return b.String() } + +type ExprSlice []ast.Expr + +func (p ExprSlice) Len() int { return len(p) } +func (p ExprSlice) Less(i, j int) bool { return p[i].Pos() < p[j].Pos() } +func (p ExprSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/golang.org/x/mod/LICENSE b/vendor/golang.org/x/mod/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/vendor/golang.org/x/mod/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/mod/PATENTS b/vendor/golang.org/x/mod/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/golang.org/x/mod/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go b/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go new file mode 100644 index 00000000..2681af35 --- /dev/null +++ b/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go @@ -0,0 +1,78 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package lazyregexp is a thin wrapper over regexp, allowing the use of global +// regexp variables without forcing them to be compiled at init. +package lazyregexp + +import ( + "os" + "regexp" + "strings" + "sync" +) + +// Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be +// compiled the first time it is needed. +type Regexp struct { + str string + once sync.Once + rx *regexp.Regexp +} + +func (r *Regexp) re() *regexp.Regexp { + r.once.Do(r.build) + return r.rx +} + +func (r *Regexp) build() { + r.rx = regexp.MustCompile(r.str) + r.str = "" +} + +func (r *Regexp) FindSubmatch(s []byte) [][]byte { + return r.re().FindSubmatch(s) +} + +func (r *Regexp) FindStringSubmatch(s string) []string { + return r.re().FindStringSubmatch(s) +} + +func (r *Regexp) FindStringSubmatchIndex(s string) []int { + return r.re().FindStringSubmatchIndex(s) +} + +func (r *Regexp) ReplaceAllString(src, repl string) string { + return r.re().ReplaceAllString(src, repl) +} + +func (r *Regexp) FindString(s string) string { + return r.re().FindString(s) +} + +func (r *Regexp) FindAllString(s string, n int) []string { + return r.re().FindAllString(s, n) +} + +func (r *Regexp) MatchString(s string) bool { + return r.re().MatchString(s) +} + +func (r *Regexp) SubexpNames() []string { + return r.re().SubexpNames() +} + +var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test") + +// New creates a new lazy regexp, delaying the compiling work until it is first +// needed. If the code is being run as part of tests, the regexp compiling will +// happen immediately. +func New(str string) *Regexp { + lr := &Regexp{str: str} + if inTest { + // In tests, always compile the regexps early. + lr.re() + } + return lr +} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/print.go b/vendor/golang.org/x/mod/modfile/print.go similarity index 97% rename from vendor/github.com/visualfc/fastmod/internal/modfile/print.go rename to vendor/golang.org/x/mod/modfile/print.go index cefc43b1..3bbea385 100644 --- a/vendor/github.com/visualfc/fastmod/internal/modfile/print.go +++ b/vendor/golang.org/x/mod/modfile/print.go @@ -12,6 +12,7 @@ import ( "strings" ) +// Format returns a go.mod file as a byte slice, formatted in standard style. func Format(f *FileSyntax) []byte { pr := &printer{} pr.file(f) diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/read.go b/vendor/golang.org/x/mod/modfile/read.go similarity index 94% rename from vendor/github.com/visualfc/fastmod/internal/modfile/read.go rename to vendor/golang.org/x/mod/modfile/read.go index 1d81ff1a..616d00ef 100644 --- a/vendor/github.com/visualfc/fastmod/internal/modfile/read.go +++ b/vendor/golang.org/x/mod/modfile/read.go @@ -17,7 +17,8 @@ import ( "unicode/utf8" ) -// A Position describes the position between two bytes of input. +// A Position describes an arbitrary source position in a file, including the +// file, line, column, and byte offset. type Position struct { Line int // line in input (starting at 1) LineRune int // rune in line (starting at 1) @@ -89,6 +90,19 @@ func (x *FileSyntax) Span() (start, end Position) { return start, end } +// addLine adds a line containing the given tokens to the file. +// +// If the first token of the hint matches the first token of the +// line, the new line is added at the end of the block containing hint, +// extracting hint into a new block if it is not yet in one. +// +// If the hint is non-nil buts its first token does not match, +// the new line is added after the block containing hint +// (or hint itself, if not in a block). +// +// If no hint is provided, addLine appends the line to the end of +// the last block with a matching first token, +// or to the end of the file if no such block exists. func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { if hint == nil { // If no hint given, add to the last statement of the given type. @@ -110,11 +124,27 @@ func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { } } + newLineAfter := func(i int) *Line { + new := &Line{Token: tokens} + if i == len(x.Stmt) { + x.Stmt = append(x.Stmt, new) + } else { + x.Stmt = append(x.Stmt, nil) + copy(x.Stmt[i+2:], x.Stmt[i+1:]) + x.Stmt[i+1] = new + } + return new + } + if hint != nil { for i, stmt := range x.Stmt { switch stmt := stmt.(type) { case *Line: if stmt == hint { + if stmt.Token == nil || stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + // Convert line to line block. stmt.InBlock = true block := &LineBlock{Token: stmt.Token[:1], Line: []*Line{stmt}} @@ -124,15 +154,25 @@ func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { block.Line = append(block.Line, new) return new } + case *LineBlock: if stmt == hint { + if stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + new := &Line{Token: tokens[1:], InBlock: true} stmt.Line = append(stmt.Line, new) return new } + for j, line := range stmt.Line { if line == hint { - // Add new line after hint. + if stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + + // Add new line after hint within the block. stmt.Line = append(stmt.Line, nil) copy(stmt.Line[j+2:], stmt.Line[j+1:]) new := &Line{Token: tokens[1:], InBlock: true} diff --git a/vendor/github.com/visualfc/fastmod/internal/modfile/rule.go b/vendor/golang.org/x/mod/modfile/rule.go similarity index 86% rename from vendor/github.com/visualfc/fastmod/internal/modfile/rule.go rename to vendor/golang.org/x/mod/modfile/rule.go index b5a75c77..62af0688 100644 --- a/vendor/github.com/visualfc/fastmod/internal/modfile/rule.go +++ b/vendor/golang.org/x/mod/modfile/rule.go @@ -9,14 +9,13 @@ import ( "errors" "fmt" "path/filepath" - "regexp" "sort" "strconv" "strings" "unicode" - "github.com/visualfc/fastmod/internal/module" - "github.com/visualfc/fastmod/internal/semver" + "golang.org/x/mod/internal/lazyregexp" + "golang.org/x/mod/module" ) // A File is the parsed, interpreted form of a go.mod file. @@ -154,7 +153,7 @@ func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (*File return f, nil } -var goVersionRE = regexp.MustCompile(`([1-9][0-9]*)\.(0|[1-9][0-9]*)`) +var GoVersionRE = lazyregexp.New(`^([1-9][0-9]*)\.(0|[1-9][0-9]*)$`) func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, fix VersionFixer, strict bool) { // If strict is false, this module is a dependency. @@ -181,7 +180,7 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f fmt.Fprintf(errs, "%s:%d: repeated go statement\n", f.Syntax.Name, line.Start.Line) return } - if len(args) != 1 || !goVersionRE.MatchString(args[0]) { + if len(args) != 1 || !GoVersionRE.MatchString(args[0]) { fmt.Fprintf(errs, "%s:%d: usage: go 1.23\n", f.Syntax.Name, line.Start.Line) return } @@ -195,7 +194,7 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f f.Module = &Module{Syntax: line} if len(args) != 1 { - fmt.Fprintf(errs, "%s:%d: usage: module module/path [version]\n", f.Syntax.Name, line.Start.Line) + fmt.Fprintf(errs, "%s:%d: usage: module module/path\n", f.Syntax.Name, line.Start.Line) return } s, err := parseString(&args[0]) @@ -214,10 +213,9 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) return } - old := args[1] - v, err := parseVersion(s, &args[1], fix) + v, err := parseVersion(verb, s, &args[1], fix) if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %q: %v\n", f.Syntax.Name, line.Start.Line, old, err) + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) return } pathMajor, err := modulePathMajor(s) @@ -225,11 +223,8 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) return } - if !module.MatchPathMajor(v, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) + if err := module.CheckPathMajor(v, pathMajor); err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) return } if verb == "require" { @@ -265,17 +260,13 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f } var v string if arrow == 2 { - old := args[1] - v, err = parseVersion(s, &args[1], fix) + v, err = parseVersion(verb, s, &args[1], fix) if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) return } - if !module.MatchPathMajor(v, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) + if err := module.CheckPathMajor(v, pathMajor); err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) return } } @@ -296,10 +287,9 @@ func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, f } } if len(args) == arrow+3 { - old := args[arrow+1] - nv, err = parseVersion(ns, &args[arrow+2], fix) + nv, err = parseVersion(verb, ns, &args[arrow+2], fix) if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) return } if IsDirectoryPath(ns) { @@ -323,8 +313,8 @@ func isIndirect(line *Line) bool { if len(line.Suffix) == 0 { return false } - f := strings.Fields(line.Suffix[0].Token) - return (len(f) == 2 && f[1] == "indirect" || len(f) > 2 && f[1] == "indirect;") && f[0] == "//" + f := strings.Fields(strings.TrimPrefix(line.Suffix[0].Token, string(slashSlash))) + return (len(f) == 1 && f[0] == "indirect" || len(f) > 1 && f[0] == "indirect;") } // setIndirect sets line to have (or not have) a "// indirect" comment. @@ -339,13 +329,17 @@ func setIndirect(line *Line, indirect bool) { line.Suffix = []Comment{{Token: "// indirect", Suffix: true}} return } - // Insert at beginning of existing comment. + com := &line.Suffix[0] - space := " " - if len(com.Token) > 2 && com.Token[2] == ' ' || com.Token[2] == '\t' { - space = "" + text := strings.TrimSpace(strings.TrimPrefix(com.Token, string(slashSlash))) + if text == "" { + // Empty comment. + com.Token = "// indirect" + return } - com.Token = "// indirect;" + space + com.Token[2:] + + // Insert at beginning of existing comment. + com.Token = "// indirect; " + text return } @@ -411,15 +405,41 @@ func parseString(s *string) (string, error) { return t, nil } -func parseVersion(path string, s *string, fix VersionFixer) (string, error) { +type Error struct { + Verb string + ModPath string + Err error +} + +func (e *Error) Error() string { + return fmt.Sprintf("%s %s: %v", e.Verb, e.ModPath, e.Err) +} + +func (e *Error) Unwrap() error { return e.Err } + +func parseVersion(verb string, path string, s *string, fix VersionFixer) (string, error) { t, err := parseString(s) if err != nil { - return "", err + return "", &Error{ + Verb: verb, + ModPath: path, + Err: &module.InvalidVersionError{ + Version: *s, + Err: err, + }, + } } if fix != nil { var err error t, err = fix(path, t) if err != nil { + if err, ok := err.(*module.ModuleError); ok { + return "", &Error{ + Verb: verb, + ModPath: path, + Err: err.Err, + } + } return "", err } } @@ -427,7 +447,14 @@ func parseVersion(path string, s *string, fix VersionFixer) (string, error) { *s = v return *s, nil } - return "", fmt.Errorf("version must be of the form v1.2.3") + return "", &Error{ + Verb: verb, + ModPath: path, + Err: &module.InvalidVersionError{ + Version: t, + Err: errors.New("must be of the form v1.2.3"), + }, + } } func modulePathMajor(path string) (string, error) { @@ -477,6 +504,26 @@ func (f *File) Cleanup() { f.Syntax.Cleanup() } +func (f *File) AddGoStmt(version string) error { + if !GoVersionRE.MatchString(version) { + return fmt.Errorf("invalid language version string %q", version) + } + if f.Go == nil { + var hint Expr + if f.Module != nil && f.Module.Syntax != nil { + hint = f.Module.Syntax + } + f.Go = &Go{ + Version: version, + Syntax: f.Syntax.addLine(hint, "go", version), + } + } else { + f.Go.Version = version + f.Syntax.updateLine(f.Go.Syntax, "go", version) + } + return nil +} + func (f *File) AddRequire(path, vers string) error { need := true for _, r := range f.Require { @@ -516,6 +563,8 @@ func (f *File) SetRequire(req []*Require) { if v, ok := need[r.Mod.Path]; ok { r.Mod.Version = v r.Indirect = indirect[r.Mod.Path] + } else { + *r = Require{} } } @@ -527,6 +576,9 @@ func (f *File) SetRequire(req []*Require) { var newLines []*Line for _, line := range stmt.Line { if p, err := parseString(&line.Token[0]); err == nil && need[p] != "" { + if len(line.Comments.Before) == 1 && len(line.Comments.Before[0].Token) == 0 { + line.Comments.Before = line.Comments.Before[:0] + } line.Token[1] = need[p] delete(need, p) setIndirect(line, indirect[p]) diff --git a/vendor/github.com/visualfc/fastmod/internal/module/module.go b/vendor/golang.org/x/mod/module/module.go similarity index 57% rename from vendor/github.com/visualfc/fastmod/internal/module/module.go rename to vendor/golang.org/x/mod/module/module.go index 5754f4c9..6cd37280 100644 --- a/vendor/github.com/visualfc/fastmod/internal/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -2,8 +2,86 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package module defines the module.Version type -// along with support code. +// Package module defines the module.Version type along with support code. +// +// The module.Version type is a simple Path, Version pair: +// +// type Version struct { +// Path string +// Version string +// } +// +// There are no restrictions imposed directly by use of this structure, +// but additional checking functions, most notably Check, verify that +// a particular path, version pair is valid. +// +// Escaped Paths +// +// Module paths appear as substrings of file system paths +// (in the download cache) and of web server URLs in the proxy protocol. +// In general we cannot rely on file systems to be case-sensitive, +// nor can we rely on web servers, since they read from file systems. +// That is, we cannot rely on the file system to keep rsc.io/QUOTE +// and rsc.io/quote separate. Windows and macOS don't. +// Instead, we must never require two different casings of a file path. +// Because we want the download cache to match the proxy protocol, +// and because we want the proxy protocol to be possible to serve +// from a tree of static files (which might be stored on a case-insensitive +// file system), the proxy protocol must never require two different casings +// of a URL path either. +// +// One possibility would be to make the escaped form be the lowercase +// hexadecimal encoding of the actual path bytes. This would avoid ever +// needing different casings of a file path, but it would be fairly illegible +// to most programmers when those paths appeared in the file system +// (including in file paths in compiler errors and stack traces) +// in web server logs, and so on. Instead, we want a safe escaped form that +// leaves most paths unaltered. +// +// The safe escaped form is to replace every uppercase letter +// with an exclamation mark followed by the letter's lowercase equivalent. +// +// For example, +// +// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. +// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy +// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. +// +// Import paths that avoid upper-case letters are left unchanged. +// Note that because import paths are ASCII-only and avoid various +// problematic punctuation (like : < and >), the escaped form is also ASCII-only +// and avoids the same problematic punctuation. +// +// Import paths have never allowed exclamation marks, so there is no +// need to define how to escape a literal !. +// +// Unicode Restrictions +// +// Today, paths are disallowed from using Unicode. +// +// Although paths are currently disallowed from using Unicode, +// we would like at some point to allow Unicode letters as well, to assume that +// file systems and URLs are Unicode-safe (storing UTF-8), and apply +// the !-for-uppercase convention for escaping them in the file system. +// But there are at least two subtle considerations. +// +// First, note that not all case-fold equivalent distinct runes +// form an upper/lower pair. +// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) +// are three distinct runes that case-fold to each other. +// When we do add Unicode letters, we must not assume that upper/lower +// are the only case-equivalent pairs. +// Perhaps the Kelvin symbol would be disallowed entirely, for example. +// Or perhaps it would escape as "!!k", or perhaps as "(212A)". +// +// Second, it would be nice to allow Unicode marks as well as letters, +// but marks include combining marks, and then we must deal not +// only with case folding but also normalization: both U+00E9 ('é') +// and U+0065 U+0301 ('e' followed by combining acute accent) +// look the same on the page and are treated by some file systems +// as the same path. If we do allow Unicode marks in paths, there +// must be some kind of normalization to allow only one canonical +// encoding of any character used in an import path. package module // IMPORTANT NOTE @@ -24,22 +102,95 @@ import ( "unicode" "unicode/utf8" - "github.com/visualfc/fastmod/internal/semver" + "golang.org/x/mod/semver" + errors "golang.org/x/xerrors" ) -// A Version is defined by a module path and version pair. +// A Version (for clients, a module.Version) is defined by a module path and version pair. +// These are stored in their plain (unescaped) form. type Version struct { + // Path is a module path, like "golang.org/x/text" or "rsc.io/quote/v2". Path string // Version is usually a semantic version in canonical form. - // There are two exceptions to this general rule. + // There are three exceptions to this general rule. // First, the top-level target of a build has no specific version // and uses Version = "". // Second, during MVS calculations the version "none" is used // to represent the decision to take no version of a given module. + // Third, filesystem paths found in "replace" directives are + // represented by a path with an empty version. Version string `json:",omitempty"` } +// String returns a representation of the Version suitable for logging +// (Path@Version, or just Path if Version is empty). +func (m Version) String() string { + if m.Version == "" { + return m.Path + } + return m.Path + "@" + m.Version +} + +// A ModuleError indicates an error specific to a module. +type ModuleError struct { + Path string + Version string + Err error +} + +// VersionError returns a ModuleError derived from a Version and error, +// or err itself if it is already such an error. +func VersionError(v Version, err error) error { + var mErr *ModuleError + if errors.As(err, &mErr) && mErr.Path == v.Path && mErr.Version == v.Version { + return err + } + return &ModuleError{ + Path: v.Path, + Version: v.Version, + Err: err, + } +} + +func (e *ModuleError) Error() string { + if v, ok := e.Err.(*InvalidVersionError); ok { + return fmt.Sprintf("%s@%s: invalid %s: %v", e.Path, v.Version, v.noun(), v.Err) + } + if e.Version != "" { + return fmt.Sprintf("%s@%s: %v", e.Path, e.Version, e.Err) + } + return fmt.Sprintf("module %s: %v", e.Path, e.Err) +} + +func (e *ModuleError) Unwrap() error { return e.Err } + +// An InvalidVersionError indicates an error specific to a version, with the +// module path unknown or specified externally. +// +// A ModuleError may wrap an InvalidVersionError, but an InvalidVersionError +// must not wrap a ModuleError. +type InvalidVersionError struct { + Version string + Pseudo bool + Err error +} + +// noun returns either "version" or "pseudo-version", depending on whether +// e.Version is a pseudo-version. +func (e *InvalidVersionError) noun() string { + if e.Pseudo { + return "pseudo-version" + } + return "version" +} + +func (e *InvalidVersionError) Error() string { + return fmt.Sprintf("%s %q invalid: %s", e.noun(), e.Version, e.Err) +} + +func (e *InvalidVersionError) Unwrap() error { return e.Err } + // Check checks that a given module path, version pair is valid. // In addition to the path being a valid module path // and the version being a valid semantic version, @@ -51,17 +202,14 @@ func Check(path, version string) error { return err } if !semver.IsValid(version) { - return fmt.Errorf("malformed semantic version %v", version) + return &ModuleError{ + Path: path, + Err: &InvalidVersionError{Version: version, Err: errors.New("not a semantic version")}, + } } _, pathMajor, _ := SplitPathVersion(path) - if !MatchPathMajor(version, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - if pathMajor[0] == '.' { // .v1 - pathMajor = pathMajor[1:] - } - return fmt.Errorf("mismatched module path %v and version %v (want %v)", path, version, pathMajor) + if err := CheckPathMajor(version, pathMajor); err != nil { + return &ModuleError{Path: path, Err: err} } return nil } @@ -79,7 +227,7 @@ func firstPathOK(r rune) bool { // Paths can be ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. // This matches what "go get" has historically recognized in import paths. // TODO(rsc): We would like to allow Unicode letters, but that requires additional -// care in the safe encoding (see note below). +// care in the safe encoding (see "escaped paths" above). func pathOK(r rune) bool { if r < utf8.RuneSelf { return r == '+' || r == '-' || r == '.' || r == '_' || r == '~' || @@ -94,7 +242,7 @@ func pathOK(r rune) bool { // For now we allow all Unicode letters but otherwise limit to pathOK plus a few more punctuation characters. // If we expand the set of allowed characters here, we have to // work harder at detecting potential case-folding and normalization collisions. -// See note about "safe encoding" below. +// See note about "escaped paths" above. func fileNameOK(r rune) bool { if r < utf8.RuneSelf { // Entire set of ASCII punctuation, from which we remove characters: @@ -120,6 +268,17 @@ func fileNameOK(r rune) bool { } // CheckPath checks that a module path is valid. +// A valid module path is a valid import path, as checked by CheckImportPath, +// with two additional constraints. +// First, the leading path element (up to the first slash, if any), +// by convention a domain name, must contain only lower-case ASCII letters, +// ASCII digits, dots (U+002E), and dashes (U+002D); +// it must contain at least one dot and cannot start with a dash. +// Second, for a final path element of the form /vN, where N looks numeric +// (ASCII digits and dots) must not begin with a leading zero, must not be /v1, +// and must not contain any dots. For paths beginning with "gopkg.in/", +// this second requirement is replaced by a requirement that the path +// follow the gopkg.in server's conventions. func CheckPath(path string) error { if err := checkPath(path, false); err != nil { return fmt.Errorf("malformed module path %q: %v", path, err) @@ -149,6 +308,20 @@ func CheckPath(path string) error { } // CheckImportPath checks that an import path is valid. +// +// A valid import path consists of one or more valid path elements +// separated by slashes (U+002F). (It must not begin with nor end in a slash.) +// +// A valid path element is a non-empty string made up of +// ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. +// It must not begin or end with a dot (U+002E), nor contain two dots in a row. +// +// The element prefix up to the first dot must not be a reserved file name +// on Windows, regardless of case (CON, com1, NuL, and so on). +// +// CheckImportPath may be less restrictive in the future, but see the +// top-level package documentation for additional information about +// subtleties of Unicode. func CheckImportPath(path string) error { if err := checkPath(path, false); err != nil { return fmt.Errorf("malformed import path %q: %v", path, err) @@ -169,8 +342,8 @@ func checkPath(path string, fileName bool) error { if path == "" { return fmt.Errorf("empty string") } - if strings.Contains(path, "..") { - return fmt.Errorf("double dot") + if path[0] == '-' { + return fmt.Errorf("leading dash") } if strings.Contains(path, "//") { return fmt.Errorf("double slash") @@ -226,13 +399,24 @@ func checkElem(elem string, fileName bool) error { } for _, bad := range badWindowsNames { if strings.EqualFold(bad, short) { - return fmt.Errorf("disallowed path element %q", elem) + return fmt.Errorf("%q disallowed as path element component on Windows", short) } } return nil } -// CheckFilePath checks whether a slash-separated file path is valid. +// CheckFilePath checks that a slash-separated file path is valid. +// The definition of a valid file path is the same as the definition +// of a valid import path except that the set of allowed characters is larger: +// all Unicode letters, ASCII digits, the ASCII space character (U+0020), +// and the ASCII punctuation characters +// “!#$%&()+,-.=@[]^_{}~”. +// (The excluded punctuation characters, " * < > ? ` ' | / \ and :, +// have special meanings in certain shells or operating systems.) +// +// CheckFilePath may be less restrictive in the future, but see the +// top-level package documentation for additional information about +// subtleties of Unicode. func CheckFilePath(path string) error { if err := checkPath(path, true); err != nil { return fmt.Errorf("malformed file path %q: %v", path, err) @@ -271,6 +455,9 @@ var badWindowsNames = []string{ // and version is either empty or "/vN" for N >= 2. // As a special case, gopkg.in paths are recognized directly; // they require ".vN" instead of "/vN", and for all N, not just N >= 2. +// SplitPathVersion returns with ok = false when presented with +// a path whose last path element does not satisfy the constraints +// applied by CheckPath, such as "example.com/pkg/v1" or "example.com/pkg/v1.2". func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { if strings.HasPrefix(path, "gopkg.in/") { return splitGopkgIn(path) @@ -284,7 +471,7 @@ func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { } i-- } - if i <= 1 || path[i-1] != 'v' || path[i-2] != '/' { + if i <= 1 || i == len(path) || path[i-1] != 'v' || path[i-2] != '/' { return path, "", true } prefix, pathMajor = path[:i-2], path[i-2:] @@ -319,20 +506,65 @@ func splitGopkgIn(path string) (prefix, pathMajor string, ok bool) { // MatchPathMajor reports whether the semantic version v // matches the path major version pathMajor. +// +// MatchPathMajor returns true if and only if CheckPathMajor returns nil. func MatchPathMajor(v, pathMajor string) bool { + return CheckPathMajor(v, pathMajor) == nil +} + +// CheckPathMajor returns a non-nil error if the semantic version v +// does not match the path major version pathMajor. +func CheckPathMajor(v, pathMajor string) error { + // TODO(jayconrod): return errors or panic for invalid inputs. This function + // (and others) was covered by integration tests for cmd/go, and surrounding + // code protected against invalid inputs like non-canonical versions. if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { pathMajor = strings.TrimSuffix(pathMajor, "-unstable") } if strings.HasPrefix(v, "v0.0.0-") && pathMajor == ".v1" { // Allow old bug in pseudo-versions that generated v0.0.0- pseudoversion for gopkg .v1. // For example, gopkg.in/yaml.v2@v2.2.1's go.mod requires gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405. - return true + return nil } m := semver.Major(v) if pathMajor == "" { - return m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" + if m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" { + return nil + } + pathMajor = "v0 or v1" + } else if pathMajor[0] == '/' || pathMajor[0] == '.' { + if m == pathMajor[1:] { + return nil + } + pathMajor = pathMajor[1:] + } + return &InvalidVersionError{ + Version: v, + Err: fmt.Errorf("should be %s, not %s", pathMajor, semver.Major(v)), } - return (pathMajor[0] == '/' || pathMajor[0] == '.') && m == pathMajor[1:] +} + +// PathMajorPrefix returns the major-version tag prefix implied by pathMajor. +// An empty PathMajorPrefix allows either v0 or v1. +// +// Note that MatchPathMajor may accept some versions that do not actually begin +// with this prefix: namely, it accepts a 'v0.0.0-' prefix for a '.v1' +// pathMajor, even though that pathMajor implies 'v1' tagging. +func PathMajorPrefix(pathMajor string) string { + if pathMajor == "" { + return "" + } + if pathMajor[0] != '/' && pathMajor[0] != '.' { + panic("pathMajor suffix " + pathMajor + " passed to PathMajorPrefix lacks separator") + } + if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { + pathMajor = strings.TrimSuffix(pathMajor, "-unstable") + } + m := pathMajor[1:] + if m != semver.Major(m) { + panic("pathMajor suffix " + pathMajor + "passed to PathMajorPrefix is not a valid major version") + } + return m } // CanonicalVersion returns the canonical form of the version string v. @@ -345,7 +577,10 @@ func CanonicalVersion(v string) string { return cv } -// Sort sorts the list by Path, breaking ties by comparing Versions. +// Sort sorts the list by Path, breaking ties by comparing Version fields. +// The Version fields are interpreted as semantic versions (using semver.Compare) +// optionally followed by a tie-breaking suffix introduced by a slash character, +// like in "v0.0.1/go.mod". func Sort(list []Version) { sort.Slice(list, func(i, j int) bool { mi := list[i] @@ -372,93 +607,36 @@ func Sort(list []Version) { }) } -// Safe encodings -// -// Module paths appear as substrings of file system paths -// (in the download cache) and of web server URLs in the proxy protocol. -// In general we cannot rely on file systems to be case-sensitive, -// nor can we rely on web servers, since they read from file systems. -// That is, we cannot rely on the file system to keep rsc.io/QUOTE -// and rsc.io/quote separate. Windows and macOS don't. -// Instead, we must never require two different casings of a file path. -// Because we want the download cache to match the proxy protocol, -// and because we want the proxy protocol to be possible to serve -// from a tree of static files (which might be stored on a case-insensitive -// file system), the proxy protocol must never require two different casings -// of a URL path either. -// -// One possibility would be to make the safe encoding be the lowercase -// hexadecimal encoding of the actual path bytes. This would avoid ever -// needing different casings of a file path, but it would be fairly illegible -// to most programmers when those paths appeared in the file system -// (including in file paths in compiler errors and stack traces) -// in web server logs, and so on. Instead, we want a safe encoding that -// leaves most paths unaltered. -// -// The safe encoding is this: -// replace every uppercase letter with an exclamation mark -// followed by the letter's lowercase equivalent. -// -// For example, -// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. -// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy -// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. -// -// Import paths that avoid upper-case letters are left unchanged. -// Note that because import paths are ASCII-only and avoid various -// problematic punctuation (like : < and >), the safe encoding is also ASCII-only -// and avoids the same problematic punctuation. -// -// Import paths have never allowed exclamation marks, so there is no -// need to define how to encode a literal !. -// -// Although paths are disallowed from using Unicode (see pathOK above), -// the eventual plan is to allow Unicode letters as well, to assume that -// file systems and URLs are Unicode-safe (storing UTF-8), and apply -// the !-for-uppercase convention. Note however that not all runes that -// are different but case-fold equivalent are an upper/lower pair. -// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) -// are considered to case-fold to each other. When we do add Unicode -// letters, we must not assume that upper/lower are the only case-equivalent pairs. -// Perhaps the Kelvin symbol would be disallowed entirely, for example. -// Or perhaps it would encode as "!!k", or perhaps as "(212A)". -// -// Also, it would be nice to allow Unicode marks as well as letters, -// but marks include combining marks, and then we must deal not -// only with case folding but also normalization: both U+00E9 ('é') -// and U+0065 U+0301 ('e' followed by combining acute accent) -// look the same on the page and are treated by some file systems -// as the same path. If we do allow Unicode marks in paths, there -// must be some kind of normalization to allow only one canonical -// encoding of any character used in an import path. - -// EncodePath returns the safe encoding of the given module path. +// EscapePath returns the escaped form of the given module path. // It fails if the module path is invalid. -func EncodePath(path string) (encoding string, err error) { +func EscapePath(path string) (escaped string, err error) { if err := CheckPath(path); err != nil { return "", err } - return encodeString(path) + return escapeString(path) } -// EncodeVersion returns the safe encoding of the given module version. +// EscapeVersion returns the escaped form of the given module version. // Versions are allowed to be in non-semver form but must be valid file names // and not contain exclamation marks. -func EncodeVersion(v string) (encoding string, err error) { +func EscapeVersion(v string) (escaped string, err error) { if err := checkElem(v, true); err != nil || strings.Contains(v, "!") { - return "", fmt.Errorf("disallowed version string %q", v) + return "", &InvalidVersionError{ + Version: v, + Err: fmt.Errorf("disallowed version string"), + } } - return encodeString(v) + return escapeString(v) } -func encodeString(s string) (encoding string, err error) { +func escapeString(s string) (escaped string, err error) { haveUpper := false for _, r := range s { if r == '!' || r >= utf8.RuneSelf { // This should be disallowed by CheckPath, but diagnose anyway. - // The correctness of the encoding loop below depends on it. - return "", fmt.Errorf("internal error: inconsistency in EncodePath") + // The correctness of the escaping loop below depends on it. + return "", fmt.Errorf("internal error: inconsistency in EscapePath") } if 'A' <= r && r <= 'Z' { haveUpper = true @@ -480,39 +658,39 @@ func encodeString(s string) (encoding string, err error) { return string(buf), nil } -// DecodePath returns the module path of the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid path. -func DecodePath(encoding string) (path string, err error) { - path, ok := decodeString(encoding) +// UnescapePath returns the module path for the given escaped path. +// It fails if the escaped path is invalid or describes an invalid path. +func UnescapePath(escaped string) (path string, err error) { + path, ok := unescapeString(escaped) if !ok { - return "", fmt.Errorf("invalid module path encoding %q", encoding) + return "", fmt.Errorf("invalid escaped module path %q", escaped) } if err := CheckPath(path); err != nil { - return "", fmt.Errorf("invalid module path encoding %q: %v", encoding, err) + return "", fmt.Errorf("invalid escaped module path %q: %v", escaped, err) } return path, nil } -// DecodeVersion returns the version string for the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid version. +// UnescapeVersion returns the version string for the given escaped version. +// It fails if the escaped form is invalid or describes an invalid version. // Versions are allowed to be in non-semver form but must be valid file names // and not contain exclamation marks. -func DecodeVersion(encoding string) (v string, err error) { - v, ok := decodeString(encoding) +func UnescapeVersion(escaped string) (v string, err error) { + v, ok := unescapeString(escaped) if !ok { - return "", fmt.Errorf("invalid version encoding %q", encoding) + return "", fmt.Errorf("invalid escaped version %q", escaped) } if err := checkElem(v, true); err != nil { - return "", fmt.Errorf("disallowed version string %q", v) + return "", fmt.Errorf("invalid escaped version %q: %v", v, err) } return v, nil } -func decodeString(encoding string) (string, bool) { +func unescapeString(escaped string) (string, bool) { var buf []byte bang := false - for _, r := range encoding { + for _, r := range escaped { if r >= utf8.RuneSelf { return "", false } diff --git a/vendor/github.com/visualfc/fastmod/internal/semver/semver.go b/vendor/golang.org/x/mod/semver/semver.go similarity index 99% rename from vendor/github.com/visualfc/fastmod/internal/semver/semver.go rename to vendor/golang.org/x/mod/semver/semver.go index 4af7118e..2988e3cf 100644 --- a/vendor/github.com/visualfc/fastmod/internal/semver/semver.go +++ b/vendor/golang.org/x/mod/semver/semver.go @@ -107,7 +107,7 @@ func Build(v string) string { } // Compare returns an integer comparing two versions according to -// according to semantic version precedence. +// semantic version precedence. // The result will be 0 if v == w, -1 if v < w, or +1 if v > w. // // An invalid semantic version string is considered less than a valid one. @@ -263,7 +263,7 @@ func parseBuild(v string) (t, rest string, ok bool) { i := 1 start := 1 for i < len(v) { - if !isIdentChar(v[i]) { + if !isIdentChar(v[i]) && v[i] != '.' { return } if v[i] == '.' { diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go new file mode 100644 index 00000000..6b7052b8 --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go @@ -0,0 +1,627 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package astutil + +// This file defines utilities for working with source positions. + +import ( + "fmt" + "go/ast" + "go/token" + "sort" +) + +// PathEnclosingInterval returns the node that encloses the source +// interval [start, end), and all its ancestors up to the AST root. +// +// The definition of "enclosing" used by this function considers +// additional whitespace abutting a node to be enclosed by it. +// In this example: +// +// z := x + y // add them +// <-A-> +// <----B-----> +// +// the ast.BinaryExpr(+) node is considered to enclose interval B +// even though its [Pos()..End()) is actually only interval A. +// This behaviour makes user interfaces more tolerant of imperfect +// input. +// +// This function treats tokens as nodes, though they are not included +// in the result. e.g. PathEnclosingInterval("+") returns the +// enclosing ast.BinaryExpr("x + y"). +// +// If start==end, the 1-char interval following start is used instead. +// +// The 'exact' result is true if the interval contains only path[0] +// and perhaps some adjacent whitespace. It is false if the interval +// overlaps multiple children of path[0], or if it contains only +// interior whitespace of path[0]. +// In this example: +// +// z := x + y // add them +// <--C--> <---E--> +// ^ +// D +// +// intervals C, D and E are inexact. C is contained by the +// z-assignment statement, because it spans three of its children (:=, +// x, +). So too is the 1-char interval D, because it contains only +// interior whitespace of the assignment. E is considered interior +// whitespace of the BlockStmt containing the assignment. +// +// Precondition: [start, end) both lie within the same file as root. +// TODO(adonovan): return (nil, false) in this case and remove precond. +// Requires FileSet; see loader.tokenFileContainsPos. +// +// Postcondition: path is never nil; it always contains at least 'root'. +// +func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) { + // fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging + + // Precondition: node.[Pos..End) and adjoining whitespace contain [start, end). + var visit func(node ast.Node) bool + visit = func(node ast.Node) bool { + path = append(path, node) + + nodePos := node.Pos() + nodeEnd := node.End() + + // fmt.Printf("visit(%T, %d, %d)\n", node, nodePos, nodeEnd) // debugging + + // Intersect [start, end) with interval of node. + if start < nodePos { + start = nodePos + } + if end > nodeEnd { + end = nodeEnd + } + + // Find sole child that contains [start, end). + children := childrenOf(node) + l := len(children) + for i, child := range children { + // [childPos, childEnd) is unaugmented interval of child. + childPos := child.Pos() + childEnd := child.End() + + // [augPos, augEnd) is whitespace-augmented interval of child. + augPos := childPos + augEnd := childEnd + if i > 0 { + augPos = children[i-1].End() // start of preceding whitespace + } + if i < l-1 { + nextChildPos := children[i+1].Pos() + // Does [start, end) lie between child and next child? + if start >= augEnd && end <= nextChildPos { + return false // inexact match + } + augEnd = nextChildPos // end of following whitespace + } + + // fmt.Printf("\tchild %d: [%d..%d)\tcontains interval [%d..%d)?\n", + // i, augPos, augEnd, start, end) // debugging + + // Does augmented child strictly contain [start, end)? + if augPos <= start && end <= augEnd { + _, isToken := child.(tokenNode) + return isToken || visit(child) + } + + // Does [start, end) overlap multiple children? + // i.e. left-augmented child contains start + // but LR-augmented child does not contain end. + if start < childEnd && end > augEnd { + break + } + } + + // No single child contained [start, end), + // so node is the result. Is it exact? + + // (It's tempting to put this condition before the + // child loop, but it gives the wrong result in the + // case where a node (e.g. ExprStmt) and its sole + // child have equal intervals.) + if start == nodePos && end == nodeEnd { + return true // exact match + } + + return false // inexact: overlaps multiple children + } + + if start > end { + start, end = end, start + } + + if start < root.End() && end > root.Pos() { + if start == end { + end = start + 1 // empty interval => interval of size 1 + } + exact = visit(root) + + // Reverse the path: + for i, l := 0, len(path); i < l/2; i++ { + path[i], path[l-1-i] = path[l-1-i], path[i] + } + } else { + // Selection lies within whitespace preceding the + // first (or following the last) declaration in the file. + // The result nonetheless always includes the ast.File. + path = append(path, root) + } + + return +} + +// tokenNode is a dummy implementation of ast.Node for a single token. +// They are used transiently by PathEnclosingInterval but never escape +// this package. +// +type tokenNode struct { + pos token.Pos + end token.Pos +} + +func (n tokenNode) Pos() token.Pos { + return n.pos +} + +func (n tokenNode) End() token.Pos { + return n.end +} + +func tok(pos token.Pos, len int) ast.Node { + return tokenNode{pos, pos + token.Pos(len)} +} + +// childrenOf returns the direct non-nil children of ast.Node n. +// It may include fake ast.Node implementations for bare tokens. +// it is not safe to call (e.g.) ast.Walk on such nodes. +// +func childrenOf(n ast.Node) []ast.Node { + var children []ast.Node + + // First add nodes for all true subtrees. + ast.Inspect(n, func(node ast.Node) bool { + if node == n { // push n + return true // recur + } + if node != nil { // push child + children = append(children, node) + } + return false // no recursion + }) + + // Then add fake Nodes for bare tokens. + switch n := n.(type) { + case *ast.ArrayType: + children = append(children, + tok(n.Lbrack, len("[")), + tok(n.Elt.End(), len("]"))) + + case *ast.AssignStmt: + children = append(children, + tok(n.TokPos, len(n.Tok.String()))) + + case *ast.BasicLit: + children = append(children, + tok(n.ValuePos, len(n.Value))) + + case *ast.BinaryExpr: + children = append(children, tok(n.OpPos, len(n.Op.String()))) + + case *ast.BlockStmt: + children = append(children, + tok(n.Lbrace, len("{")), + tok(n.Rbrace, len("}"))) + + case *ast.BranchStmt: + children = append(children, + tok(n.TokPos, len(n.Tok.String()))) + + case *ast.CallExpr: + children = append(children, + tok(n.Lparen, len("(")), + tok(n.Rparen, len(")"))) + if n.Ellipsis != 0 { + children = append(children, tok(n.Ellipsis, len("..."))) + } + + case *ast.CaseClause: + if n.List == nil { + children = append(children, + tok(n.Case, len("default"))) + } else { + children = append(children, + tok(n.Case, len("case"))) + } + children = append(children, tok(n.Colon, len(":"))) + + case *ast.ChanType: + switch n.Dir { + case ast.RECV: + children = append(children, tok(n.Begin, len("<-chan"))) + case ast.SEND: + children = append(children, tok(n.Begin, len("chan<-"))) + case ast.RECV | ast.SEND: + children = append(children, tok(n.Begin, len("chan"))) + } + + case *ast.CommClause: + if n.Comm == nil { + children = append(children, + tok(n.Case, len("default"))) + } else { + children = append(children, + tok(n.Case, len("case"))) + } + children = append(children, tok(n.Colon, len(":"))) + + case *ast.Comment: + // nop + + case *ast.CommentGroup: + // nop + + case *ast.CompositeLit: + children = append(children, + tok(n.Lbrace, len("{")), + tok(n.Rbrace, len("{"))) + + case *ast.DeclStmt: + // nop + + case *ast.DeferStmt: + children = append(children, + tok(n.Defer, len("defer"))) + + case *ast.Ellipsis: + children = append(children, + tok(n.Ellipsis, len("..."))) + + case *ast.EmptyStmt: + // nop + + case *ast.ExprStmt: + // nop + + case *ast.Field: + // TODO(adonovan): Field.{Doc,Comment,Tag}? + + case *ast.FieldList: + children = append(children, + tok(n.Opening, len("(")), + tok(n.Closing, len(")"))) + + case *ast.File: + // TODO test: Doc + children = append(children, + tok(n.Package, len("package"))) + + case *ast.ForStmt: + children = append(children, + tok(n.For, len("for"))) + + case *ast.FuncDecl: + // TODO(adonovan): FuncDecl.Comment? + + // Uniquely, FuncDecl breaks the invariant that + // preorder traversal yields tokens in lexical order: + // in fact, FuncDecl.Recv precedes FuncDecl.Type.Func. + // + // As a workaround, we inline the case for FuncType + // here and order things correctly. + // + children = nil // discard ast.Walk(FuncDecl) info subtrees + children = append(children, tok(n.Type.Func, len("func"))) + if n.Recv != nil { + children = append(children, n.Recv) + } + children = append(children, n.Name) + if n.Type.Params != nil { + children = append(children, n.Type.Params) + } + if n.Type.Results != nil { + children = append(children, n.Type.Results) + } + if n.Body != nil { + children = append(children, n.Body) + } + + case *ast.FuncLit: + // nop + + case *ast.FuncType: + if n.Func != 0 { + children = append(children, + tok(n.Func, len("func"))) + } + + case *ast.GenDecl: + children = append(children, + tok(n.TokPos, len(n.Tok.String()))) + if n.Lparen != 0 { + children = append(children, + tok(n.Lparen, len("(")), + tok(n.Rparen, len(")"))) + } + + case *ast.GoStmt: + children = append(children, + tok(n.Go, len("go"))) + + case *ast.Ident: + children = append(children, + tok(n.NamePos, len(n.Name))) + + case *ast.IfStmt: + children = append(children, + tok(n.If, len("if"))) + + case *ast.ImportSpec: + // TODO(adonovan): ImportSpec.{Doc,EndPos}? + + case *ast.IncDecStmt: + children = append(children, + tok(n.TokPos, len(n.Tok.String()))) + + case *ast.IndexExpr: + children = append(children, + tok(n.Lbrack, len("{")), + tok(n.Rbrack, len("}"))) + + case *ast.InterfaceType: + children = append(children, + tok(n.Interface, len("interface"))) + + case *ast.KeyValueExpr: + children = append(children, + tok(n.Colon, len(":"))) + + case *ast.LabeledStmt: + children = append(children, + tok(n.Colon, len(":"))) + + case *ast.MapType: + children = append(children, + tok(n.Map, len("map"))) + + case *ast.ParenExpr: + children = append(children, + tok(n.Lparen, len("(")), + tok(n.Rparen, len(")"))) + + case *ast.RangeStmt: + children = append(children, + tok(n.For, len("for")), + tok(n.TokPos, len(n.Tok.String()))) + + case *ast.ReturnStmt: + children = append(children, + tok(n.Return, len("return"))) + + case *ast.SelectStmt: + children = append(children, + tok(n.Select, len("select"))) + + case *ast.SelectorExpr: + // nop + + case *ast.SendStmt: + children = append(children, + tok(n.Arrow, len("<-"))) + + case *ast.SliceExpr: + children = append(children, + tok(n.Lbrack, len("[")), + tok(n.Rbrack, len("]"))) + + case *ast.StarExpr: + children = append(children, tok(n.Star, len("*"))) + + case *ast.StructType: + children = append(children, tok(n.Struct, len("struct"))) + + case *ast.SwitchStmt: + children = append(children, tok(n.Switch, len("switch"))) + + case *ast.TypeAssertExpr: + children = append(children, + tok(n.Lparen-1, len(".")), + tok(n.Lparen, len("(")), + tok(n.Rparen, len(")"))) + + case *ast.TypeSpec: + // TODO(adonovan): TypeSpec.{Doc,Comment}? + + case *ast.TypeSwitchStmt: + children = append(children, tok(n.Switch, len("switch"))) + + case *ast.UnaryExpr: + children = append(children, tok(n.OpPos, len(n.Op.String()))) + + case *ast.ValueSpec: + // TODO(adonovan): ValueSpec.{Doc,Comment}? + + case *ast.BadDecl, *ast.BadExpr, *ast.BadStmt: + // nop + } + + // TODO(adonovan): opt: merge the logic of ast.Inspect() into + // the switch above so we can make interleaved callbacks for + // both Nodes and Tokens in the right order and avoid the need + // to sort. + sort.Sort(byPos(children)) + + return children +} + +type byPos []ast.Node + +func (sl byPos) Len() int { + return len(sl) +} +func (sl byPos) Less(i, j int) bool { + return sl[i].Pos() < sl[j].Pos() +} +func (sl byPos) Swap(i, j int) { + sl[i], sl[j] = sl[j], sl[i] +} + +// NodeDescription returns a description of the concrete type of n suitable +// for a user interface. +// +// TODO(adonovan): in some cases (e.g. Field, FieldList, Ident, +// StarExpr) we could be much more specific given the path to the AST +// root. Perhaps we should do that. +// +func NodeDescription(n ast.Node) string { + switch n := n.(type) { + case *ast.ArrayType: + return "array type" + case *ast.AssignStmt: + return "assignment" + case *ast.BadDecl: + return "bad declaration" + case *ast.BadExpr: + return "bad expression" + case *ast.BadStmt: + return "bad statement" + case *ast.BasicLit: + return "basic literal" + case *ast.BinaryExpr: + return fmt.Sprintf("binary %s operation", n.Op) + case *ast.BlockStmt: + return "block" + case *ast.BranchStmt: + switch n.Tok { + case token.BREAK: + return "break statement" + case token.CONTINUE: + return "continue statement" + case token.GOTO: + return "goto statement" + case token.FALLTHROUGH: + return "fall-through statement" + } + case *ast.CallExpr: + if len(n.Args) == 1 && !n.Ellipsis.IsValid() { + return "function call (or conversion)" + } + return "function call" + case *ast.CaseClause: + return "case clause" + case *ast.ChanType: + return "channel type" + case *ast.CommClause: + return "communication clause" + case *ast.Comment: + return "comment" + case *ast.CommentGroup: + return "comment group" + case *ast.CompositeLit: + return "composite literal" + case *ast.DeclStmt: + return NodeDescription(n.Decl) + " statement" + case *ast.DeferStmt: + return "defer statement" + case *ast.Ellipsis: + return "ellipsis" + case *ast.EmptyStmt: + return "empty statement" + case *ast.ExprStmt: + return "expression statement" + case *ast.Field: + // Can be any of these: + // struct {x, y int} -- struct field(s) + // struct {T} -- anon struct field + // interface {I} -- interface embedding + // interface {f()} -- interface method + // func (A) func(B) C -- receiver, param(s), result(s) + return "field/method/parameter" + case *ast.FieldList: + return "field/method/parameter list" + case *ast.File: + return "source file" + case *ast.ForStmt: + return "for loop" + case *ast.FuncDecl: + return "function declaration" + case *ast.FuncLit: + return "function literal" + case *ast.FuncType: + return "function type" + case *ast.GenDecl: + switch n.Tok { + case token.IMPORT: + return "import declaration" + case token.CONST: + return "constant declaration" + case token.TYPE: + return "type declaration" + case token.VAR: + return "variable declaration" + } + case *ast.GoStmt: + return "go statement" + case *ast.Ident: + return "identifier" + case *ast.IfStmt: + return "if statement" + case *ast.ImportSpec: + return "import specification" + case *ast.IncDecStmt: + if n.Tok == token.INC { + return "increment statement" + } + return "decrement statement" + case *ast.IndexExpr: + return "index expression" + case *ast.InterfaceType: + return "interface type" + case *ast.KeyValueExpr: + return "key/value association" + case *ast.LabeledStmt: + return "statement label" + case *ast.MapType: + return "map type" + case *ast.Package: + return "package" + case *ast.ParenExpr: + return "parenthesized " + NodeDescription(n.X) + case *ast.RangeStmt: + return "range loop" + case *ast.ReturnStmt: + return "return statement" + case *ast.SelectStmt: + return "select statement" + case *ast.SelectorExpr: + return "selector" + case *ast.SendStmt: + return "channel send" + case *ast.SliceExpr: + return "slice expression" + case *ast.StarExpr: + return "*-operation" // load/store expr or pointer type + case *ast.StructType: + return "struct type" + case *ast.SwitchStmt: + return "switch statement" + case *ast.TypeAssertExpr: + return "type assertion" + case *ast.TypeSpec: + return "type specification" + case *ast.TypeSwitchStmt: + return "type switch" + case *ast.UnaryExpr: + return fmt.Sprintf("unary %s operation", n.Op) + case *ast.ValueSpec: + return "value specification" + + } + panic(fmt.Sprintf("unexpected node type: %T", n)) +} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go new file mode 100644 index 00000000..2087ceec --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/astutil/imports.go @@ -0,0 +1,482 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package astutil contains common utilities for working with the Go AST. +package astutil // import "golang.org/x/tools/go/ast/astutil" + +import ( + "fmt" + "go/ast" + "go/token" + "strconv" + "strings" +) + +// AddImport adds the import path to the file f, if absent. +func AddImport(fset *token.FileSet, f *ast.File, path string) (added bool) { + return AddNamedImport(fset, f, "", path) +} + +// AddNamedImport adds the import with the given name and path to the file f, if absent. +// If name is not empty, it is used to rename the import. +// +// For example, calling +// AddNamedImport(fset, f, "pathpkg", "path") +// adds +// import pathpkg "path" +func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string) (added bool) { + if imports(f, name, path) { + return false + } + + newImport := &ast.ImportSpec{ + Path: &ast.BasicLit{ + Kind: token.STRING, + Value: strconv.Quote(path), + }, + } + if name != "" { + newImport.Name = &ast.Ident{Name: name} + } + + // Find an import decl to add to. + // The goal is to find an existing import + // whose import path has the longest shared + // prefix with path. + var ( + bestMatch = -1 // length of longest shared prefix + lastImport = -1 // index in f.Decls of the file's final import decl + impDecl *ast.GenDecl // import decl containing the best match + impIndex = -1 // spec index in impDecl containing the best match + + isThirdPartyPath = isThirdParty(path) + ) + for i, decl := range f.Decls { + gen, ok := decl.(*ast.GenDecl) + if ok && gen.Tok == token.IMPORT { + lastImport = i + // Do not add to import "C", to avoid disrupting the + // association with its doc comment, breaking cgo. + if declImports(gen, "C") { + continue + } + + // Match an empty import decl if that's all that is available. + if len(gen.Specs) == 0 && bestMatch == -1 { + impDecl = gen + } + + // Compute longest shared prefix with imports in this group and find best + // matched import spec. + // 1. Always prefer import spec with longest shared prefix. + // 2. While match length is 0, + // - for stdlib package: prefer first import spec. + // - for third party package: prefer first third party import spec. + // We cannot use last import spec as best match for third party package + // because grouped imports are usually placed last by goimports -local + // flag. + // See issue #19190. + seenAnyThirdParty := false + for j, spec := range gen.Specs { + impspec := spec.(*ast.ImportSpec) + p := importPath(impspec) + n := matchLen(p, path) + if n > bestMatch || (bestMatch == 0 && !seenAnyThirdParty && isThirdPartyPath) { + bestMatch = n + impDecl = gen + impIndex = j + } + seenAnyThirdParty = seenAnyThirdParty || isThirdParty(p) + } + } + } + + // If no import decl found, add one after the last import. + if impDecl == nil { + impDecl = &ast.GenDecl{ + Tok: token.IMPORT, + } + if lastImport >= 0 { + impDecl.TokPos = f.Decls[lastImport].End() + } else { + // There are no existing imports. + // Our new import, preceded by a blank line, goes after the package declaration + // and after the comment, if any, that starts on the same line as the + // package declaration. + impDecl.TokPos = f.Package + + file := fset.File(f.Package) + pkgLine := file.Line(f.Package) + for _, c := range f.Comments { + if file.Line(c.Pos()) > pkgLine { + break + } + // +2 for a blank line + impDecl.TokPos = c.End() + 2 + } + } + f.Decls = append(f.Decls, nil) + copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:]) + f.Decls[lastImport+1] = impDecl + } + + // Insert new import at insertAt. + insertAt := 0 + if impIndex >= 0 { + // insert after the found import + insertAt = impIndex + 1 + } + impDecl.Specs = append(impDecl.Specs, nil) + copy(impDecl.Specs[insertAt+1:], impDecl.Specs[insertAt:]) + impDecl.Specs[insertAt] = newImport + pos := impDecl.Pos() + if insertAt > 0 { + // If there is a comment after an existing import, preserve the comment + // position by adding the new import after the comment. + if spec, ok := impDecl.Specs[insertAt-1].(*ast.ImportSpec); ok && spec.Comment != nil { + pos = spec.Comment.End() + } else { + // Assign same position as the previous import, + // so that the sorter sees it as being in the same block. + pos = impDecl.Specs[insertAt-1].Pos() + } + } + if newImport.Name != nil { + newImport.Name.NamePos = pos + } + newImport.Path.ValuePos = pos + newImport.EndPos = pos + + // Clean up parens. impDecl contains at least one spec. + if len(impDecl.Specs) == 1 { + // Remove unneeded parens. + impDecl.Lparen = token.NoPos + } else if !impDecl.Lparen.IsValid() { + // impDecl needs parens added. + impDecl.Lparen = impDecl.Specs[0].Pos() + } + + f.Imports = append(f.Imports, newImport) + + if len(f.Decls) <= 1 { + return true + } + + // Merge all the import declarations into the first one. + var first *ast.GenDecl + for i := 0; i < len(f.Decls); i++ { + decl := f.Decls[i] + gen, ok := decl.(*ast.GenDecl) + if !ok || gen.Tok != token.IMPORT || declImports(gen, "C") { + continue + } + if first == nil { + first = gen + continue // Don't touch the first one. + } + // We now know there is more than one package in this import + // declaration. Ensure that it ends up parenthesized. + first.Lparen = first.Pos() + // Move the imports of the other import declaration to the first one. + for _, spec := range gen.Specs { + spec.(*ast.ImportSpec).Path.ValuePos = first.Pos() + first.Specs = append(first.Specs, spec) + } + f.Decls = append(f.Decls[:i], f.Decls[i+1:]...) + i-- + } + + return true +} + +func isThirdParty(importPath string) bool { + // Third party package import path usually contains "." (".com", ".org", ...) + // This logic is taken from golang.org/x/tools/imports package. + return strings.Contains(importPath, ".") +} + +// DeleteImport deletes the import path from the file f, if present. +// If there are duplicate import declarations, all matching ones are deleted. +func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool) { + return DeleteNamedImport(fset, f, "", path) +} + +// DeleteNamedImport deletes the import with the given name and path from the file f, if present. +// If there are duplicate import declarations, all matching ones are deleted. +func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (deleted bool) { + var delspecs []*ast.ImportSpec + var delcomments []*ast.CommentGroup + + // Find the import nodes that import path, if any. + for i := 0; i < len(f.Decls); i++ { + decl := f.Decls[i] + gen, ok := decl.(*ast.GenDecl) + if !ok || gen.Tok != token.IMPORT { + continue + } + for j := 0; j < len(gen.Specs); j++ { + spec := gen.Specs[j] + impspec := spec.(*ast.ImportSpec) + if importName(impspec) != name || importPath(impspec) != path { + continue + } + + // We found an import spec that imports path. + // Delete it. + delspecs = append(delspecs, impspec) + deleted = true + copy(gen.Specs[j:], gen.Specs[j+1:]) + gen.Specs = gen.Specs[:len(gen.Specs)-1] + + // If this was the last import spec in this decl, + // delete the decl, too. + if len(gen.Specs) == 0 { + copy(f.Decls[i:], f.Decls[i+1:]) + f.Decls = f.Decls[:len(f.Decls)-1] + i-- + break + } else if len(gen.Specs) == 1 { + if impspec.Doc != nil { + delcomments = append(delcomments, impspec.Doc) + } + if impspec.Comment != nil { + delcomments = append(delcomments, impspec.Comment) + } + for _, cg := range f.Comments { + // Found comment on the same line as the import spec. + if cg.End() < impspec.Pos() && fset.Position(cg.End()).Line == fset.Position(impspec.Pos()).Line { + delcomments = append(delcomments, cg) + break + } + } + + spec := gen.Specs[0].(*ast.ImportSpec) + + // Move the documentation right after the import decl. + if spec.Doc != nil { + for fset.Position(gen.TokPos).Line+1 < fset.Position(spec.Doc.Pos()).Line { + fset.File(gen.TokPos).MergeLine(fset.Position(gen.TokPos).Line) + } + } + for _, cg := range f.Comments { + if cg.End() < spec.Pos() && fset.Position(cg.End()).Line == fset.Position(spec.Pos()).Line { + for fset.Position(gen.TokPos).Line+1 < fset.Position(spec.Pos()).Line { + fset.File(gen.TokPos).MergeLine(fset.Position(gen.TokPos).Line) + } + break + } + } + } + if j > 0 { + lastImpspec := gen.Specs[j-1].(*ast.ImportSpec) + lastLine := fset.Position(lastImpspec.Path.ValuePos).Line + line := fset.Position(impspec.Path.ValuePos).Line + + // We deleted an entry but now there may be + // a blank line-sized hole where the import was. + if line-lastLine > 1 || !gen.Rparen.IsValid() { + // There was a blank line immediately preceding the deleted import, + // so there's no need to close the hole. The right parenthesis is + // invalid after AddImport to an import statement without parenthesis. + // Do nothing. + } else if line != fset.File(gen.Rparen).LineCount() { + // There was no blank line. Close the hole. + fset.File(gen.Rparen).MergeLine(line) + } + } + j-- + } + } + + // Delete imports from f.Imports. + for i := 0; i < len(f.Imports); i++ { + imp := f.Imports[i] + for j, del := range delspecs { + if imp == del { + copy(f.Imports[i:], f.Imports[i+1:]) + f.Imports = f.Imports[:len(f.Imports)-1] + copy(delspecs[j:], delspecs[j+1:]) + delspecs = delspecs[:len(delspecs)-1] + i-- + break + } + } + } + + // Delete comments from f.Comments. + for i := 0; i < len(f.Comments); i++ { + cg := f.Comments[i] + for j, del := range delcomments { + if cg == del { + copy(f.Comments[i:], f.Comments[i+1:]) + f.Comments = f.Comments[:len(f.Comments)-1] + copy(delcomments[j:], delcomments[j+1:]) + delcomments = delcomments[:len(delcomments)-1] + i-- + break + } + } + } + + if len(delspecs) > 0 { + panic(fmt.Sprintf("deleted specs from Decls but not Imports: %v", delspecs)) + } + + return +} + +// RewriteImport rewrites any import of path oldPath to path newPath. +func RewriteImport(fset *token.FileSet, f *ast.File, oldPath, newPath string) (rewrote bool) { + for _, imp := range f.Imports { + if importPath(imp) == oldPath { + rewrote = true + // record old End, because the default is to compute + // it using the length of imp.Path.Value. + imp.EndPos = imp.End() + imp.Path.Value = strconv.Quote(newPath) + } + } + return +} + +// UsesImport reports whether a given import is used. +func UsesImport(f *ast.File, path string) (used bool) { + spec := importSpec(f, path) + if spec == nil { + return + } + + name := spec.Name.String() + switch name { + case "": + // If the package name is not explicitly specified, + // make an educated guess. This is not guaranteed to be correct. + lastSlash := strings.LastIndex(path, "/") + if lastSlash == -1 { + name = path + } else { + name = path[lastSlash+1:] + } + case "_", ".": + // Not sure if this import is used - err on the side of caution. + return true + } + + ast.Walk(visitFn(func(n ast.Node) { + sel, ok := n.(*ast.SelectorExpr) + if ok && isTopName(sel.X, name) { + used = true + } + }), f) + + return +} + +type visitFn func(node ast.Node) + +func (fn visitFn) Visit(node ast.Node) ast.Visitor { + fn(node) + return fn +} + +// imports reports whether f has an import with the specified name and path. +func imports(f *ast.File, name, path string) bool { + for _, s := range f.Imports { + if importName(s) == name && importPath(s) == path { + return true + } + } + return false +} + +// importSpec returns the import spec if f imports path, +// or nil otherwise. +func importSpec(f *ast.File, path string) *ast.ImportSpec { + for _, s := range f.Imports { + if importPath(s) == path { + return s + } + } + return nil +} + +// importName returns the name of s, +// or "" if the import is not named. +func importName(s *ast.ImportSpec) string { + if s.Name == nil { + return "" + } + return s.Name.Name +} + +// importPath returns the unquoted import path of s, +// or "" if the path is not properly quoted. +func importPath(s *ast.ImportSpec) string { + t, err := strconv.Unquote(s.Path.Value) + if err != nil { + return "" + } + return t +} + +// declImports reports whether gen contains an import of path. +func declImports(gen *ast.GenDecl, path string) bool { + if gen.Tok != token.IMPORT { + return false + } + for _, spec := range gen.Specs { + impspec := spec.(*ast.ImportSpec) + if importPath(impspec) == path { + return true + } + } + return false +} + +// matchLen returns the length of the longest path segment prefix shared by x and y. +func matchLen(x, y string) int { + n := 0 + for i := 0; i < len(x) && i < len(y) && x[i] == y[i]; i++ { + if x[i] == '/' { + n++ + } + } + return n +} + +// isTopName returns true if n is a top-level unresolved identifier with the given name. +func isTopName(n ast.Expr, name string) bool { + id, ok := n.(*ast.Ident) + return ok && id.Name == name && id.Obj == nil +} + +// Imports returns the file imports grouped by paragraph. +func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec { + var groups [][]*ast.ImportSpec + + for _, decl := range f.Decls { + genDecl, ok := decl.(*ast.GenDecl) + if !ok || genDecl.Tok != token.IMPORT { + break + } + + group := []*ast.ImportSpec{} + + var lastLine int + for _, spec := range genDecl.Specs { + importSpec := spec.(*ast.ImportSpec) + pos := importSpec.Path.ValuePos + line := fset.Position(pos).Line + if lastLine > 0 && pos > 0 && line-lastLine > 1 { + groups = append(groups, group) + group = []*ast.ImportSpec{} + } + group = append(group, importSpec) + lastLine = line + } + groups = append(groups, group) + } + + return groups +} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go b/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go new file mode 100644 index 00000000..cf72ea99 --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go @@ -0,0 +1,477 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package astutil + +import ( + "fmt" + "go/ast" + "reflect" + "sort" +) + +// An ApplyFunc is invoked by Apply for each node n, even if n is nil, +// before and/or after the node's children, using a Cursor describing +// the current node and providing operations on it. +// +// The return value of ApplyFunc controls the syntax tree traversal. +// See Apply for details. +type ApplyFunc func(*Cursor) bool + +// Apply traverses a syntax tree recursively, starting with root, +// and calling pre and post for each node as described below. +// Apply returns the syntax tree, possibly modified. +// +// If pre is not nil, it is called for each node before the node's +// children are traversed (pre-order). If pre returns false, no +// children are traversed, and post is not called for that node. +// +// If post is not nil, and a prior call of pre didn't return false, +// post is called for each node after its children are traversed +// (post-order). If post returns false, traversal is terminated and +// Apply returns immediately. +// +// Only fields that refer to AST nodes are considered children; +// i.e., token.Pos, Scopes, Objects, and fields of basic types +// (strings, etc.) are ignored. +// +// Children are traversed in the order in which they appear in the +// respective node's struct definition. A package's files are +// traversed in the filenames' alphabetical order. +// +func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) { + parent := &struct{ ast.Node }{root} + defer func() { + if r := recover(); r != nil && r != abort { + panic(r) + } + result = parent.Node + }() + a := &application{pre: pre, post: post} + a.apply(parent, "Node", nil, root) + return +} + +var abort = new(int) // singleton, to signal termination of Apply + +// A Cursor describes a node encountered during Apply. +// Information about the node and its parent is available +// from the Node, Parent, Name, and Index methods. +// +// If p is a variable of type and value of the current parent node +// c.Parent(), and f is the field identifier with name c.Name(), +// the following invariants hold: +// +// p.f == c.Node() if c.Index() < 0 +// p.f[c.Index()] == c.Node() if c.Index() >= 0 +// +// The methods Replace, Delete, InsertBefore, and InsertAfter +// can be used to change the AST without disrupting Apply. +type Cursor struct { + parent ast.Node + name string + iter *iterator // valid if non-nil + node ast.Node +} + +// Node returns the current Node. +func (c *Cursor) Node() ast.Node { return c.node } + +// Parent returns the parent of the current Node. +func (c *Cursor) Parent() ast.Node { return c.parent } + +// Name returns the name of the parent Node field that contains the current Node. +// If the parent is a *ast.Package and the current Node is a *ast.File, Name returns +// the filename for the current Node. +func (c *Cursor) Name() string { return c.name } + +// Index reports the index >= 0 of the current Node in the slice of Nodes that +// contains it, or a value < 0 if the current Node is not part of a slice. +// The index of the current node changes if InsertBefore is called while +// processing the current node. +func (c *Cursor) Index() int { + if c.iter != nil { + return c.iter.index + } + return -1 +} + +// field returns the current node's parent field value. +func (c *Cursor) field() reflect.Value { + return reflect.Indirect(reflect.ValueOf(c.parent)).FieldByName(c.name) +} + +// Replace replaces the current Node with n. +// The replacement node is not walked by Apply. +func (c *Cursor) Replace(n ast.Node) { + if _, ok := c.node.(*ast.File); ok { + file, ok := n.(*ast.File) + if !ok { + panic("attempt to replace *ast.File with non-*ast.File") + } + c.parent.(*ast.Package).Files[c.name] = file + return + } + + v := c.field() + if i := c.Index(); i >= 0 { + v = v.Index(i) + } + v.Set(reflect.ValueOf(n)) +} + +// Delete deletes the current Node from its containing slice. +// If the current Node is not part of a slice, Delete panics. +// As a special case, if the current node is a package file, +// Delete removes it from the package's Files map. +func (c *Cursor) Delete() { + if _, ok := c.node.(*ast.File); ok { + delete(c.parent.(*ast.Package).Files, c.name) + return + } + + i := c.Index() + if i < 0 { + panic("Delete node not contained in slice") + } + v := c.field() + l := v.Len() + reflect.Copy(v.Slice(i, l), v.Slice(i+1, l)) + v.Index(l - 1).Set(reflect.Zero(v.Type().Elem())) + v.SetLen(l - 1) + c.iter.step-- +} + +// InsertAfter inserts n after the current Node in its containing slice. +// If the current Node is not part of a slice, InsertAfter panics. +// Apply does not walk n. +func (c *Cursor) InsertAfter(n ast.Node) { + i := c.Index() + if i < 0 { + panic("InsertAfter node not contained in slice") + } + v := c.field() + v.Set(reflect.Append(v, reflect.Zero(v.Type().Elem()))) + l := v.Len() + reflect.Copy(v.Slice(i+2, l), v.Slice(i+1, l)) + v.Index(i + 1).Set(reflect.ValueOf(n)) + c.iter.step++ +} + +// InsertBefore inserts n before the current Node in its containing slice. +// If the current Node is not part of a slice, InsertBefore panics. +// Apply will not walk n. +func (c *Cursor) InsertBefore(n ast.Node) { + i := c.Index() + if i < 0 { + panic("InsertBefore node not contained in slice") + } + v := c.field() + v.Set(reflect.Append(v, reflect.Zero(v.Type().Elem()))) + l := v.Len() + reflect.Copy(v.Slice(i+1, l), v.Slice(i, l)) + v.Index(i).Set(reflect.ValueOf(n)) + c.iter.index++ +} + +// application carries all the shared data so we can pass it around cheaply. +type application struct { + pre, post ApplyFunc + cursor Cursor + iter iterator +} + +func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.Node) { + // convert typed nil into untyped nil + if v := reflect.ValueOf(n); v.Kind() == reflect.Ptr && v.IsNil() { + n = nil + } + + // avoid heap-allocating a new cursor for each apply call; reuse a.cursor instead + saved := a.cursor + a.cursor.parent = parent + a.cursor.name = name + a.cursor.iter = iter + a.cursor.node = n + + if a.pre != nil && !a.pre(&a.cursor) { + a.cursor = saved + return + } + + // walk children + // (the order of the cases matches the order of the corresponding node types in go/ast) + switch n := n.(type) { + case nil: + // nothing to do + + // Comments and fields + case *ast.Comment: + // nothing to do + + case *ast.CommentGroup: + if n != nil { + a.applyList(n, "List") + } + + case *ast.Field: + a.apply(n, "Doc", nil, n.Doc) + a.applyList(n, "Names") + a.apply(n, "Type", nil, n.Type) + a.apply(n, "Tag", nil, n.Tag) + a.apply(n, "Comment", nil, n.Comment) + + case *ast.FieldList: + a.applyList(n, "List") + + // Expressions + case *ast.BadExpr, *ast.Ident, *ast.BasicLit: + // nothing to do + + case *ast.Ellipsis: + a.apply(n, "Elt", nil, n.Elt) + + case *ast.FuncLit: + a.apply(n, "Type", nil, n.Type) + a.apply(n, "Body", nil, n.Body) + + case *ast.CompositeLit: + a.apply(n, "Type", nil, n.Type) + a.applyList(n, "Elts") + + case *ast.ParenExpr: + a.apply(n, "X", nil, n.X) + + case *ast.SelectorExpr: + a.apply(n, "X", nil, n.X) + a.apply(n, "Sel", nil, n.Sel) + + case *ast.IndexExpr: + a.apply(n, "X", nil, n.X) + a.apply(n, "Index", nil, n.Index) + + case *ast.SliceExpr: + a.apply(n, "X", nil, n.X) + a.apply(n, "Low", nil, n.Low) + a.apply(n, "High", nil, n.High) + a.apply(n, "Max", nil, n.Max) + + case *ast.TypeAssertExpr: + a.apply(n, "X", nil, n.X) + a.apply(n, "Type", nil, n.Type) + + case *ast.CallExpr: + a.apply(n, "Fun", nil, n.Fun) + a.applyList(n, "Args") + + case *ast.StarExpr: + a.apply(n, "X", nil, n.X) + + case *ast.UnaryExpr: + a.apply(n, "X", nil, n.X) + + case *ast.BinaryExpr: + a.apply(n, "X", nil, n.X) + a.apply(n, "Y", nil, n.Y) + + case *ast.KeyValueExpr: + a.apply(n, "Key", nil, n.Key) + a.apply(n, "Value", nil, n.Value) + + // Types + case *ast.ArrayType: + a.apply(n, "Len", nil, n.Len) + a.apply(n, "Elt", nil, n.Elt) + + case *ast.StructType: + a.apply(n, "Fields", nil, n.Fields) + + case *ast.FuncType: + a.apply(n, "Params", nil, n.Params) + a.apply(n, "Results", nil, n.Results) + + case *ast.InterfaceType: + a.apply(n, "Methods", nil, n.Methods) + + case *ast.MapType: + a.apply(n, "Key", nil, n.Key) + a.apply(n, "Value", nil, n.Value) + + case *ast.ChanType: + a.apply(n, "Value", nil, n.Value) + + // Statements + case *ast.BadStmt: + // nothing to do + + case *ast.DeclStmt: + a.apply(n, "Decl", nil, n.Decl) + + case *ast.EmptyStmt: + // nothing to do + + case *ast.LabeledStmt: + a.apply(n, "Label", nil, n.Label) + a.apply(n, "Stmt", nil, n.Stmt) + + case *ast.ExprStmt: + a.apply(n, "X", nil, n.X) + + case *ast.SendStmt: + a.apply(n, "Chan", nil, n.Chan) + a.apply(n, "Value", nil, n.Value) + + case *ast.IncDecStmt: + a.apply(n, "X", nil, n.X) + + case *ast.AssignStmt: + a.applyList(n, "Lhs") + a.applyList(n, "Rhs") + + case *ast.GoStmt: + a.apply(n, "Call", nil, n.Call) + + case *ast.DeferStmt: + a.apply(n, "Call", nil, n.Call) + + case *ast.ReturnStmt: + a.applyList(n, "Results") + + case *ast.BranchStmt: + a.apply(n, "Label", nil, n.Label) + + case *ast.BlockStmt: + a.applyList(n, "List") + + case *ast.IfStmt: + a.apply(n, "Init", nil, n.Init) + a.apply(n, "Cond", nil, n.Cond) + a.apply(n, "Body", nil, n.Body) + a.apply(n, "Else", nil, n.Else) + + case *ast.CaseClause: + a.applyList(n, "List") + a.applyList(n, "Body") + + case *ast.SwitchStmt: + a.apply(n, "Init", nil, n.Init) + a.apply(n, "Tag", nil, n.Tag) + a.apply(n, "Body", nil, n.Body) + + case *ast.TypeSwitchStmt: + a.apply(n, "Init", nil, n.Init) + a.apply(n, "Assign", nil, n.Assign) + a.apply(n, "Body", nil, n.Body) + + case *ast.CommClause: + a.apply(n, "Comm", nil, n.Comm) + a.applyList(n, "Body") + + case *ast.SelectStmt: + a.apply(n, "Body", nil, n.Body) + + case *ast.ForStmt: + a.apply(n, "Init", nil, n.Init) + a.apply(n, "Cond", nil, n.Cond) + a.apply(n, "Post", nil, n.Post) + a.apply(n, "Body", nil, n.Body) + + case *ast.RangeStmt: + a.apply(n, "Key", nil, n.Key) + a.apply(n, "Value", nil, n.Value) + a.apply(n, "X", nil, n.X) + a.apply(n, "Body", nil, n.Body) + + // Declarations + case *ast.ImportSpec: + a.apply(n, "Doc", nil, n.Doc) + a.apply(n, "Name", nil, n.Name) + a.apply(n, "Path", nil, n.Path) + a.apply(n, "Comment", nil, n.Comment) + + case *ast.ValueSpec: + a.apply(n, "Doc", nil, n.Doc) + a.applyList(n, "Names") + a.apply(n, "Type", nil, n.Type) + a.applyList(n, "Values") + a.apply(n, "Comment", nil, n.Comment) + + case *ast.TypeSpec: + a.apply(n, "Doc", nil, n.Doc) + a.apply(n, "Name", nil, n.Name) + a.apply(n, "Type", nil, n.Type) + a.apply(n, "Comment", nil, n.Comment) + + case *ast.BadDecl: + // nothing to do + + case *ast.GenDecl: + a.apply(n, "Doc", nil, n.Doc) + a.applyList(n, "Specs") + + case *ast.FuncDecl: + a.apply(n, "Doc", nil, n.Doc) + a.apply(n, "Recv", nil, n.Recv) + a.apply(n, "Name", nil, n.Name) + a.apply(n, "Type", nil, n.Type) + a.apply(n, "Body", nil, n.Body) + + // Files and packages + case *ast.File: + a.apply(n, "Doc", nil, n.Doc) + a.apply(n, "Name", nil, n.Name) + a.applyList(n, "Decls") + // Don't walk n.Comments; they have either been walked already if + // they are Doc comments, or they can be easily walked explicitly. + + case *ast.Package: + // collect and sort names for reproducible behavior + var names []string + for name := range n.Files { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + a.apply(n, name, nil, n.Files[name]) + } + + default: + panic(fmt.Sprintf("Apply: unexpected node type %T", n)) + } + + if a.post != nil && !a.post(&a.cursor) { + panic(abort) + } + + a.cursor = saved +} + +// An iterator controls iteration over a slice of nodes. +type iterator struct { + index, step int +} + +func (a *application) applyList(parent ast.Node, name string) { + // avoid heap-allocating a new iterator for each applyList call; reuse a.iter instead + saved := a.iter + a.iter.index = 0 + for { + // must reload parent.name each time, since cursor modifications might change it + v := reflect.Indirect(reflect.ValueOf(parent)).FieldByName(name) + if a.iter.index >= v.Len() { + break + } + + // element x may be nil in a bad AST - be cautious + var x ast.Node + if e := v.Index(a.iter.index); e.IsValid() { + x = e.Interface().(ast.Node) + } + + a.iter.step = 1 + a.apply(parent, name, &a.iter, x) + a.iter.index += a.iter.step + } + a.iter = saved +} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/util.go b/vendor/golang.org/x/tools/go/ast/astutil/util.go new file mode 100644 index 00000000..76306298 --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/astutil/util.go @@ -0,0 +1,14 @@ +package astutil + +import "go/ast" + +// Unparen returns e with any enclosing parentheses stripped. +func Unparen(e ast.Expr) ast.Expr { + for { + p, ok := e.(*ast.ParenExpr) + if !ok { + return e + } + e = p.X + } +} diff --git a/vendor/golang.org/x/tools/go/buildutil/overlay.go b/vendor/golang.org/x/tools/go/buildutil/overlay.go index 3f71c4fe..8e239086 100644 --- a/vendor/golang.org/x/tools/go/buildutil/overlay.go +++ b/vendor/golang.org/x/tools/go/buildutil/overlay.go @@ -65,7 +65,7 @@ func OverlayContext(orig *build.Context, overlay map[string][]byte) *build.Conte // // The archive consists of a series of files. Each file consists of a // name, a decimal file size and the file contents, separated by -// newlinews. No newline follows after the file contents. +// newlines. No newline follows after the file contents. func ParseOverlayArchive(archive io.Reader) (map[string][]byte, error) { overlay := make(map[string][]byte) r := bufio.NewReader(archive) diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go index 98b3987b..f8363d8f 100644 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -100,7 +100,7 @@ func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, // Write writes encoded type information for the specified package to out. // The FileSet provides file position information for named objects. func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { - b, err := gcimporter.BExportData(fset, pkg) + b, err := gcimporter.IExportData(fset, pkg) if err != nil { return err } diff --git a/vendor/golang.org/x/tools/go/gcexportdata/main.go b/vendor/golang.org/x/tools/go/gcexportdata/main.go deleted file mode 100644 index 2713dce6..00000000 --- a/vendor/golang.org/x/tools/go/gcexportdata/main.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// The gcexportdata command is a diagnostic tool that displays the -// contents of gc export data files. -package main - -import ( - "flag" - "fmt" - "go/token" - "go/types" - "log" - "os" - - "golang.org/x/tools/go/gcexportdata" - "golang.org/x/tools/go/types/typeutil" -) - -var packageFlag = flag.String("package", "", "alternative package to print") - -func main() { - log.SetPrefix("gcexportdata: ") - log.SetFlags(0) - flag.Usage = func() { - fmt.Fprintln(os.Stderr, "usage: gcexportdata [-package path] file.a") - } - flag.Parse() - if flag.NArg() != 1 { - flag.Usage() - os.Exit(2) - } - filename := flag.Args()[0] - - f, err := os.Open(filename) - if err != nil { - log.Fatal(err) - } - - r, err := gcexportdata.NewReader(f) - if err != nil { - log.Fatalf("%s: %s", filename, err) - } - - // Decode the package. - const primary = "" - imports := make(map[string]*types.Package) - fset := token.NewFileSet() - pkg, err := gcexportdata.Read(r, fset, imports, primary) - if err != nil { - log.Fatalf("%s: %s", filename, err) - } - - // Optionally select an indirectly mentioned package. - if *packageFlag != "" { - pkg = imports[*packageFlag] - if pkg == nil { - fmt.Fprintf(os.Stderr, "export data file %s does not mention %s; has:\n", - filename, *packageFlag) - for p := range imports { - if p != primary { - fmt.Fprintf(os.Stderr, "\t%s\n", p) - } - } - os.Exit(1) - } - } - - // Print all package-level declarations, including non-exported ones. - fmt.Printf("package %s\n", pkg.Name()) - for _, imp := range pkg.Imports() { - fmt.Printf("import %q\n", imp.Path()) - } - qual := func(p *types.Package) string { - if pkg == p { - return "" - } - return p.Name() - } - scope := pkg.Scope() - for _, name := range scope.Names() { - obj := scope.Lookup(name) - fmt.Printf("%s: %s\n", - fset.Position(obj.Pos()), - types.ObjectString(obj, qual)) - - // For types, print each method. - if _, ok := obj.(*types.TypeName); ok { - for _, method := range typeutil.IntuitiveMethodSet(obj.Type(), nil) { - fmt.Printf("%s: %s\n", - fset.Position(method.Obj().Pos()), - types.SelectionString(method, qual)) - } - } - } -} diff --git a/vendor/golang.org/x/tools/go/internal/cgo/cgo.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo.go new file mode 100644 index 00000000..5db8b309 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/cgo/cgo.go @@ -0,0 +1,220 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cgo handles cgo preprocessing of files containing `import "C"`. +// +// DESIGN +// +// The approach taken is to run the cgo processor on the package's +// CgoFiles and parse the output, faking the filenames of the +// resulting ASTs so that the synthetic file containing the C types is +// called "C" (e.g. "~/go/src/net/C") and the preprocessed files +// have their original names (e.g. "~/go/src/net/cgo_unix.go"), +// not the names of the actual temporary files. +// +// The advantage of this approach is its fidelity to 'go build'. The +// downside is that the token.Position.Offset for each AST node is +// incorrect, being an offset within the temporary file. Line numbers +// should still be correct because of the //line comments. +// +// The logic of this file is mostly plundered from the 'go build' +// tool, which also invokes the cgo preprocessor. +// +// +// REJECTED ALTERNATIVE +// +// An alternative approach that we explored is to extend go/types' +// Importer mechanism to provide the identity of the importing package +// so that each time `import "C"` appears it resolves to a different +// synthetic package containing just the objects needed in that case. +// The loader would invoke cgo but parse only the cgo_types.go file +// defining the package-level objects, discarding the other files +// resulting from preprocessing. +// +// The benefit of this approach would have been that source-level +// syntax information would correspond exactly to the original cgo +// file, with no preprocessing involved, making source tools like +// godoc, guru, and eg happy. However, the approach was rejected +// due to the additional complexity it would impose on go/types. (It +// made for a beautiful demo, though.) +// +// cgo files, despite their *.go extension, are not legal Go source +// files per the specification since they may refer to unexported +// members of package "C" such as C.int. Also, a function such as +// C.getpwent has in effect two types, one matching its C type and one +// which additionally returns (errno C.int). The cgo preprocessor +// uses name mangling to distinguish these two functions in the +// processed code, but go/types would need to duplicate this logic in +// its handling of function calls, analogous to the treatment of map +// lookups in which y=m[k] and y,ok=m[k] are both legal. + +package cgo + +import ( + "fmt" + "go/ast" + "go/build" + "go/parser" + "go/token" + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "regexp" + "strings" +) + +// ProcessFiles invokes the cgo preprocessor on bp.CgoFiles, parses +// the output and returns the resulting ASTs. +// +func ProcessFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { + tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C") + if err != nil { + return nil, err + } + defer os.RemoveAll(tmpdir) + + pkgdir := bp.Dir + if DisplayPath != nil { + pkgdir = DisplayPath(pkgdir) + } + + cgoFiles, cgoDisplayFiles, err := Run(bp, pkgdir, tmpdir, false) + if err != nil { + return nil, err + } + var files []*ast.File + for i := range cgoFiles { + rd, err := os.Open(cgoFiles[i]) + if err != nil { + return nil, err + } + display := filepath.Join(bp.Dir, cgoDisplayFiles[i]) + f, err := parser.ParseFile(fset, display, rd, mode) + rd.Close() + if err != nil { + return nil, err + } + files = append(files, f) + } + return files, nil +} + +var cgoRe = regexp.MustCompile(`[/\\:]`) + +// Run invokes the cgo preprocessor on bp.CgoFiles and returns two +// lists of files: the resulting processed files (in temporary +// directory tmpdir) and the corresponding names of the unprocessed files. +// +// Run is adapted from (*builder).cgo in +// $GOROOT/src/cmd/go/build.go, but these features are unsupported: +// Objective C, CGOPKGPATH, CGO_FLAGS. +// +// If useabs is set to true, absolute paths of the bp.CgoFiles will be passed in +// to the cgo preprocessor. This in turn will set the // line comments +// referring to those files to use absolute paths. This is needed for +// go/packages using the legacy go list support so it is able to find +// the original files. +func Run(bp *build.Package, pkgdir, tmpdir string, useabs bool) (files, displayFiles []string, err error) { + cgoCPPFLAGS, _, _, _ := cflags(bp, true) + _, cgoexeCFLAGS, _, _ := cflags(bp, false) + + if len(bp.CgoPkgConfig) > 0 { + pcCFLAGS, err := pkgConfigFlags(bp) + if err != nil { + return nil, nil, err + } + cgoCPPFLAGS = append(cgoCPPFLAGS, pcCFLAGS...) + } + + // Allows including _cgo_export.h from .[ch] files in the package. + cgoCPPFLAGS = append(cgoCPPFLAGS, "-I", tmpdir) + + // _cgo_gotypes.go (displayed "C") contains the type definitions. + files = append(files, filepath.Join(tmpdir, "_cgo_gotypes.go")) + displayFiles = append(displayFiles, "C") + for _, fn := range bp.CgoFiles { + // "foo.cgo1.go" (displayed "foo.go") is the processed Go source. + f := cgoRe.ReplaceAllString(fn[:len(fn)-len("go")], "_") + files = append(files, filepath.Join(tmpdir, f+"cgo1.go")) + displayFiles = append(displayFiles, fn) + } + + var cgoflags []string + if bp.Goroot && bp.ImportPath == "runtime/cgo" { + cgoflags = append(cgoflags, "-import_runtime_cgo=false") + } + if bp.Goroot && bp.ImportPath == "runtime/race" || bp.ImportPath == "runtime/cgo" { + cgoflags = append(cgoflags, "-import_syscall=false") + } + + var cgoFiles []string = bp.CgoFiles + if useabs { + cgoFiles = make([]string, len(bp.CgoFiles)) + for i := range cgoFiles { + cgoFiles[i] = filepath.Join(pkgdir, bp.CgoFiles[i]) + } + } + + args := stringList( + "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--", + cgoCPPFLAGS, cgoexeCFLAGS, cgoFiles, + ) + if false { + log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir) + } + cmd := exec.Command(args[0], args[1:]...) + cmd.Dir = pkgdir + cmd.Stdout = os.Stderr + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + return nil, nil, fmt.Errorf("cgo failed: %s: %s", args, err) + } + + return files, displayFiles, nil +} + +// -- unmodified from 'go build' --------------------------------------- + +// Return the flags to use when invoking the C or C++ compilers, or cgo. +func cflags(p *build.Package, def bool) (cppflags, cflags, cxxflags, ldflags []string) { + var defaults string + if def { + defaults = "-g -O2" + } + + cppflags = stringList(envList("CGO_CPPFLAGS", ""), p.CgoCPPFLAGS) + cflags = stringList(envList("CGO_CFLAGS", defaults), p.CgoCFLAGS) + cxxflags = stringList(envList("CGO_CXXFLAGS", defaults), p.CgoCXXFLAGS) + ldflags = stringList(envList("CGO_LDFLAGS", defaults), p.CgoLDFLAGS) + return +} + +// envList returns the value of the given environment variable broken +// into fields, using the default value when the variable is empty. +func envList(key, def string) []string { + v := os.Getenv(key) + if v == "" { + v = def + } + return strings.Fields(v) +} + +// stringList's arguments should be a sequence of string or []string values. +// stringList flattens them into a single []string. +func stringList(args ...interface{}) []string { + var x []string + for _, arg := range args { + switch arg := arg.(type) { + case []string: + x = append(x, arg...) + case string: + x = append(x, arg) + default: + panic("stringList: invalid argument") + } + } + return x +} diff --git a/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go new file mode 100644 index 00000000..b5bb95a6 --- /dev/null +++ b/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go @@ -0,0 +1,39 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgo + +import ( + "errors" + "fmt" + "go/build" + "os/exec" + "strings" +) + +// pkgConfig runs pkg-config with the specified arguments and returns the flags it prints. +func pkgConfig(mode string, pkgs []string) (flags []string, err error) { + cmd := exec.Command("pkg-config", append([]string{mode}, pkgs...)...) + out, err := cmd.CombinedOutput() + if err != nil { + s := fmt.Sprintf("%s failed: %v", strings.Join(cmd.Args, " "), err) + if len(out) > 0 { + s = fmt.Sprintf("%s: %s", s, out) + } + return nil, errors.New(s) + } + if len(out) > 0 { + flags = strings.Fields(string(out)) + } + return +} + +// pkgConfigFlags calls pkg-config if needed and returns the cflags +// needed to build the package. +func pkgConfigFlags(p *build.Package) (cflags []string, err error) { + if len(p.CgoPkgConfig) == 0 { + return nil, nil + } + return pkgConfig("--cflags", p.CgoPkgConfig) +} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go index e3c31078..e9f73d14 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go @@ -332,7 +332,7 @@ func (p *importer) pos() token.Pos { p.prevFile = file p.prevLine = line - return p.fake.pos(file, line) + return p.fake.pos(file, line, 0) } // Synthesize a token.Pos @@ -341,7 +341,9 @@ type fakeFileSet struct { files map[string]*token.File } -func (s *fakeFileSet) pos(file string, line int) token.Pos { +func (s *fakeFileSet) pos(file string, line, column int) token.Pos { + // TODO(mdempsky): Make use of column. + // Since we don't know the set of needed file positions, we // reserve maxlines positions per file. const maxlines = 64 * 1024 @@ -976,10 +978,11 @@ const ( aliasTag ) +var predeclOnce sync.Once var predecl []types.Type // initialized lazily func predeclared() []types.Type { - if predecl == nil { + predeclOnce.Do(func() { // initialize lazily to be sure that all // elements have been initialized before predecl = []types.Type{ // basic types @@ -1026,7 +1029,7 @@ func predeclared() []types.Type { // used internally by gc; never used by this package or in .a files anyType{}, } - } + }) return predecl } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index 9cf18660..8dcd8bbb 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -344,7 +344,7 @@ func (p *parser) expectKeyword(keyword string) { // PackageId = string_lit . // -func (p *parser) parsePackageId() string { +func (p *parser) parsePackageID() string { id, err := strconv.Unquote(p.expect(scanner.String)) if err != nil { p.error(err) @@ -384,7 +384,7 @@ func (p *parser) parseDotIdent() string { // func (p *parser) parseQualifiedName() (id, name string) { p.expect('@') - id = p.parsePackageId() + id = p.parsePackageID() p.expect('.') // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields. if p.tok == '?' { @@ -696,7 +696,7 @@ func (p *parser) parseInterfaceType(parent *types.Package) types.Type { // Complete requires the type's embedded interfaces to be fully defined, // but we do not define any - return types.NewInterface(methods, nil).Complete() + return newInterface(methods, nil).Complete() } // ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type . @@ -785,7 +785,7 @@ func (p *parser) parseType(parent *types.Package) types.Type { func (p *parser) parseImportDecl() { p.expectKeyword("import") name := p.parsePackageName() - p.getPkg(p.parsePackageId(), name) + p.getPkg(p.parsePackageID(), name) } // int_lit = [ "+" | "-" ] { "0" ... "9" } . diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go index be671c79..4be32a2e 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go @@ -6,8 +6,6 @@ // This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; // see that file for specification of the format. -// +build go1.11 - package gcimporter import ( @@ -28,7 +26,10 @@ import ( const iexportVersion = 0 // IExportData returns the binary export data for pkg. +// // If no file set is provided, position info will be missing. +// The package path of the top-level package will not be recorded, +// so that calls to IImportData can override with a provided package path. func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { defer func() { if e := recover(); e != nil { @@ -48,6 +49,7 @@ func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) stringIndex: map[string]uint64{}, declIndex: map[types.Object]uint64{}, typIndex: map[types.Type]uint64{}, + localpkg: pkg, } for i, pt := range predeclared() { @@ -73,7 +75,7 @@ func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) // Append indices to data0 section. dataLen := uint64(p.data0.Len()) w := p.newWriter() - w.writeIndex(p.declIndex, pkg) + w.writeIndex(p.declIndex) w.flush() // Assemble header. @@ -95,14 +97,14 @@ func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) // we're writing out the main index, which is also read by // non-compiler tools and includes a complete package description // (i.e., name and height). -func (w *exportWriter) writeIndex(index map[types.Object]uint64, localpkg *types.Package) { +func (w *exportWriter) writeIndex(index map[types.Object]uint64) { // Build a map from packages to objects from that package. pkgObjs := map[*types.Package][]types.Object{} // For the main index, make sure to include every package that // we reference, even if we're not exporting (or reexporting) // any symbols from it. - pkgObjs[localpkg] = nil + pkgObjs[w.p.localpkg] = nil for pkg := range w.p.allPkgs { pkgObjs[pkg] = nil } @@ -121,12 +123,12 @@ func (w *exportWriter) writeIndex(index map[types.Object]uint64, localpkg *types } sort.Slice(pkgs, func(i, j int) bool { - return pkgs[i].Path() < pkgs[j].Path() + return w.exportPath(pkgs[i]) < w.exportPath(pkgs[j]) }) w.uint64(uint64(len(pkgs))) for _, pkg := range pkgs { - w.string(pkg.Path()) + w.string(w.exportPath(pkg)) w.string(pkg.Name()) w.uint64(uint64(0)) // package height is not needed for go/types @@ -143,6 +145,8 @@ type iexporter struct { fset *token.FileSet out *bytes.Buffer + localpkg *types.Package + // allPkgs tracks all packages that have been referenced by // the export data, so we can ensure to include them in the // main index. @@ -195,6 +199,13 @@ type exportWriter struct { prevLine int64 } +func (w *exportWriter) exportPath(pkg *types.Package) string { + if pkg == w.p.localpkg { + return "" + } + return pkg.Path() +} + func (p *iexporter) doDecl(obj types.Object) { w := p.newWriter() w.setPkg(obj.Pkg(), false) @@ -267,6 +278,11 @@ func (w *exportWriter) tag(tag byte) { } func (w *exportWriter) pos(pos token.Pos) { + if w.p.fset == nil { + w.int64(0) + return + } + p := w.p.fset.Position(pos) file := p.Filename line := int64(p.Line) @@ -299,7 +315,7 @@ func (w *exportWriter) pkg(pkg *types.Package) { // Ensure any referenced packages are declared in the main index. w.p.allPkgs[pkg] = true - w.string(pkg.Path()) + w.string(w.exportPath(pkg)) } func (w *exportWriter) qualifiedIdent(obj types.Object) { @@ -394,7 +410,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { w.pos(f.Pos()) w.string(f.Name()) w.typ(f.Type(), pkg) - w.bool(f.Embedded()) + w.bool(f.Anonymous()) w.string(t.Tag(i)) // note (or tag) } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go index 3cb7ae5b..a31a8802 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go @@ -63,8 +63,8 @@ const ( // If the export data version is not recognized or the format is otherwise // compromised, an error is returned. func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - const currentVersion = 0 - version := -1 + const currentVersion = 1 + version := int64(-1) defer func() { if e := recover(); e != nil { if version > currentVersion { @@ -77,9 +77,9 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] r := &intReader{bytes.NewReader(data), path} - version = int(r.uint64()) + version = int64(r.uint64()) switch version { - case currentVersion: + case currentVersion, 0: default: errorf("unknown iexport format version %d", version) } @@ -93,7 +93,8 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] r.Seek(sLen+dLen, io.SeekCurrent) p := iimporter{ - ipath: path, + ipath: path, + version: int(version), stringData: stringData, stringCache: make(map[uint64]string), @@ -142,20 +143,18 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] p.pkgIndex[pkg] = nameIndex pkgList[i] = pkg } - var localpkg *types.Package - for _, pkg := range pkgList { - if pkg.Path() == path { - localpkg = pkg - } + if len(pkgList) == 0 { + errorf("no packages found for %s", path) + panic("unreachable") } - - names := make([]string, 0, len(p.pkgIndex[localpkg])) - for name := range p.pkgIndex[localpkg] { + p.ipkg = pkgList[0] + names := make([]string, 0, len(p.pkgIndex[p.ipkg])) + for name := range p.pkgIndex[p.ipkg] { names = append(names, name) } sort.Strings(names) for _, name := range names { - p.doDecl(localpkg, name) + p.doDecl(p.ipkg, name) } for _, typ := range p.interfaceList { @@ -165,17 +164,19 @@ func IImportData(fset *token.FileSet, imports map[string]*types.Package, data [] // record all referenced packages as imports list := append(([]*types.Package)(nil), pkgList[1:]...) sort.Sort(byPath(list)) - localpkg.SetImports(list) + p.ipkg.SetImports(list) // package was imported completely and without errors - localpkg.MarkComplete() + p.ipkg.MarkComplete() consumed, _ := r.Seek(0, io.SeekCurrent) - return int(consumed), localpkg, nil + return int(consumed), p.ipkg, nil } type iimporter struct { - ipath string + ipath string + ipkg *types.Package + version int stringData []byte stringCache map[uint64]string @@ -226,6 +227,9 @@ func (p *iimporter) pkgAt(off uint64) *types.Package { return pkg } path := p.stringAt(off) + if path == p.ipath { + return p.ipkg + } errorf("missing package %q in %q", path, p.ipath) return nil } @@ -255,6 +259,7 @@ type importReader struct { currPkg *types.Package prevFile string prevLine int64 + prevColumn int64 } func (r *importReader) obj(name string) { @@ -448,6 +453,19 @@ func (r *importReader) qualifiedIdent() (*types.Package, string) { } func (r *importReader) pos() token.Pos { + if r.p.version >= 1 { + r.posv1() + } else { + r.posv0() + } + + if r.prevFile == "" && r.prevLine == 0 && r.prevColumn == 0 { + return token.NoPos + } + return r.p.fake.pos(r.prevFile, int(r.prevLine), int(r.prevColumn)) +} + +func (r *importReader) posv0() { delta := r.int64() if delta != deltaNewFile { r.prevLine += delta @@ -457,12 +475,18 @@ func (r *importReader) pos() token.Pos { r.prevFile = r.string() r.prevLine = l } +} - if r.prevFile == "" && r.prevLine == 0 { - return token.NoPos +func (r *importReader) posv1() { + delta := r.int64() + r.prevColumn += delta >> 1 + if delta&1 != 0 { + delta = r.int64() + r.prevLine += delta >> 1 + if delta&1 != 0 { + r.prevFile = r.string() + } } - - return r.p.fake.pos(r.prevFile, int(r.prevLine)) } func (r *importReader) typ() types.Type { diff --git a/vendor/golang.org/x/tools/go/loader/doc.go b/vendor/golang.org/x/tools/go/loader/doc.go new file mode 100644 index 00000000..c5aa31c1 --- /dev/null +++ b/vendor/golang.org/x/tools/go/loader/doc.go @@ -0,0 +1,204 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package loader loads a complete Go program from source code, parsing +// and type-checking the initial packages plus their transitive closure +// of dependencies. The ASTs and the derived facts are retained for +// later use. +// +// Deprecated: This is an older API and does not have support +// for modules. Use golang.org/x/tools/go/packages instead. +// +// The package defines two primary types: Config, which specifies a +// set of initial packages to load and various other options; and +// Program, which is the result of successfully loading the packages +// specified by a configuration. +// +// The configuration can be set directly, but *Config provides various +// convenience methods to simplify the common cases, each of which can +// be called any number of times. Finally, these are followed by a +// call to Load() to actually load and type-check the program. +// +// var conf loader.Config +// +// // Use the command-line arguments to specify +// // a set of initial packages to load from source. +// // See FromArgsUsage for help. +// rest, err := conf.FromArgs(os.Args[1:], wantTests) +// +// // Parse the specified files and create an ad hoc package with path "foo". +// // All files must have the same 'package' declaration. +// conf.CreateFromFilenames("foo", "foo.go", "bar.go") +// +// // Create an ad hoc package with path "foo" from +// // the specified already-parsed files. +// // All ASTs must have the same 'package' declaration. +// conf.CreateFromFiles("foo", parsedFiles) +// +// // Add "runtime" to the set of packages to be loaded. +// conf.Import("runtime") +// +// // Adds "fmt" and "fmt_test" to the set of packages +// // to be loaded. "fmt" will include *_test.go files. +// conf.ImportWithTests("fmt") +// +// // Finally, load all the packages specified by the configuration. +// prog, err := conf.Load() +// +// See examples_test.go for examples of API usage. +// +// +// CONCEPTS AND TERMINOLOGY +// +// The WORKSPACE is the set of packages accessible to the loader. The +// workspace is defined by Config.Build, a *build.Context. The +// default context treats subdirectories of $GOROOT and $GOPATH as +// packages, but this behavior may be overridden. +// +// An AD HOC package is one specified as a set of source files on the +// command line. In the simplest case, it may consist of a single file +// such as $GOROOT/src/net/http/triv.go. +// +// EXTERNAL TEST packages are those comprised of a set of *_test.go +// files all with the same 'package foo_test' declaration, all in the +// same directory. (go/build.Package calls these files XTestFiles.) +// +// An IMPORTABLE package is one that can be referred to by some import +// spec. Every importable package is uniquely identified by its +// PACKAGE PATH or just PATH, a string such as "fmt", "encoding/json", +// or "cmd/vendor/golang.org/x/arch/x86/x86asm". A package path +// typically denotes a subdirectory of the workspace. +// +// An import declaration uses an IMPORT PATH to refer to a package. +// Most import declarations use the package path as the import path. +// +// Due to VENDORING (https://golang.org/s/go15vendor), the +// interpretation of an import path may depend on the directory in which +// it appears. To resolve an import path to a package path, go/build +// must search the enclosing directories for a subdirectory named +// "vendor". +// +// ad hoc packages and external test packages are NON-IMPORTABLE. The +// path of an ad hoc package is inferred from the package +// declarations of its files and is therefore not a unique package key. +// For example, Config.CreatePkgs may specify two initial ad hoc +// packages, both with path "main". +// +// An AUGMENTED package is an importable package P plus all the +// *_test.go files with same 'package foo' declaration as P. +// (go/build.Package calls these files TestFiles.) +// +// The INITIAL packages are those specified in the configuration. A +// DEPENDENCY is a package loaded to satisfy an import in an initial +// package or another dependency. +// +package loader + +// IMPLEMENTATION NOTES +// +// 'go test', in-package test files, and import cycles +// --------------------------------------------------- +// +// An external test package may depend upon members of the augmented +// package that are not in the unaugmented package, such as functions +// that expose internals. (See bufio/export_test.go for an example.) +// So, the loader must ensure that for each external test package +// it loads, it also augments the corresponding non-test package. +// +// The import graph over n unaugmented packages must be acyclic; the +// import graph over n-1 unaugmented packages plus one augmented +// package must also be acyclic. ('go test' relies on this.) But the +// import graph over n augmented packages may contain cycles. +// +// First, all the (unaugmented) non-test packages and their +// dependencies are imported in the usual way; the loader reports an +// error if it detects an import cycle. +// +// Then, each package P for which testing is desired is augmented by +// the list P' of its in-package test files, by calling +// (*types.Checker).Files. This arrangement ensures that P' may +// reference definitions within P, but P may not reference definitions +// within P'. Furthermore, P' may import any other package, including +// ones that depend upon P, without an import cycle error. +// +// Consider two packages A and B, both of which have lists of +// in-package test files we'll call A' and B', and which have the +// following import graph edges: +// B imports A +// B' imports A +// A' imports B +// This last edge would be expected to create an error were it not +// for the special type-checking discipline above. +// Cycles of size greater than two are possible. For example: +// compress/bzip2/bzip2_test.go (package bzip2) imports "io/ioutil" +// io/ioutil/tempfile_test.go (package ioutil) imports "regexp" +// regexp/exec_test.go (package regexp) imports "compress/bzip2" +// +// +// Concurrency +// ----------- +// +// Let us define the import dependency graph as follows. Each node is a +// list of files passed to (Checker).Files at once. Many of these lists +// are the production code of an importable Go package, so those nodes +// are labelled by the package's path. The remaining nodes are +// ad hoc packages and lists of in-package *_test.go files that augment +// an importable package; those nodes have no label. +// +// The edges of the graph represent import statements appearing within a +// file. An edge connects a node (a list of files) to the node it +// imports, which is importable and thus always labelled. +// +// Loading is controlled by this dependency graph. +// +// To reduce I/O latency, we start loading a package's dependencies +// asynchronously as soon as we've parsed its files and enumerated its +// imports (scanImports). This performs a preorder traversal of the +// import dependency graph. +// +// To exploit hardware parallelism, we type-check unrelated packages in +// parallel, where "unrelated" means not ordered by the partial order of +// the import dependency graph. +// +// We use a concurrency-safe non-blocking cache (importer.imported) to +// record the results of type-checking, whether success or failure. An +// entry is created in this cache by startLoad the first time the +// package is imported. The first goroutine to request an entry becomes +// responsible for completing the task and broadcasting completion to +// subsequent requestors, which block until then. +// +// Type checking occurs in (parallel) postorder: we cannot type-check a +// set of files until we have loaded and type-checked all of their +// immediate dependencies (and thus all of their transitive +// dependencies). If the input were guaranteed free of import cycles, +// this would be trivial: we could simply wait for completion of the +// dependencies and then invoke the typechecker. +// +// But as we saw in the 'go test' section above, some cycles in the +// import graph over packages are actually legal, so long as the +// cycle-forming edge originates in the in-package test files that +// augment the package. This explains why the nodes of the import +// dependency graph are not packages, but lists of files: the unlabelled +// nodes avoid the cycles. Consider packages A and B where B imports A +// and A's in-package tests AT import B. The naively constructed import +// graph over packages would contain a cycle (A+AT) --> B --> (A+AT) but +// the graph over lists of files is AT --> B --> A, where AT is an +// unlabelled node. +// +// Awaiting completion of the dependencies in a cyclic graph would +// deadlock, so we must materialize the import dependency graph (as +// importer.graph) and check whether each import edge forms a cycle. If +// x imports y, and the graph already contains a path from y to x, then +// there is an import cycle, in which case the processing of x must not +// wait for the completion of processing of y. +// +// When the type-checker makes a callback (doImport) to the loader for a +// given import edge, there are two possible cases. In the normal case, +// the dependency has already been completely type-checked; doImport +// does a cache lookup and returns it. In the cyclic case, the entry in +// the cache is still necessarily incomplete, indicating a cycle. We +// perform the cycle check again to obtain the error message, and return +// the error. +// +// The result of using concurrency is about a 2.5x speedup for stdlib_test. diff --git a/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/golang.org/x/tools/go/loader/loader.go new file mode 100644 index 00000000..bc12ca33 --- /dev/null +++ b/vendor/golang.org/x/tools/go/loader/loader.go @@ -0,0 +1,1086 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package loader + +// See doc.go for package documentation and implementation notes. + +import ( + "errors" + "fmt" + "go/ast" + "go/build" + "go/parser" + "go/token" + "go/types" + "os" + "path/filepath" + "sort" + "strings" + "sync" + "time" + + "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/go/internal/cgo" +) + +var ignoreVendor build.ImportMode + +const trace = false // show timing info for type-checking + +// Config specifies the configuration for loading a whole program from +// Go source code. +// The zero value for Config is a ready-to-use default configuration. +type Config struct { + // Fset is the file set for the parser to use when loading the + // program. If nil, it may be lazily initialized by any + // method of Config. + Fset *token.FileSet + + // ParserMode specifies the mode to be used by the parser when + // loading source packages. + ParserMode parser.Mode + + // TypeChecker contains options relating to the type checker. + // + // The supplied IgnoreFuncBodies is not used; the effective + // value comes from the TypeCheckFuncBodies func below. + // The supplied Import function is not used either. + TypeChecker types.Config + + // TypeCheckFuncBodies is a predicate over package paths. + // A package for which the predicate is false will + // have its package-level declarations type checked, but not + // its function bodies; this can be used to quickly load + // dependencies from source. If nil, all func bodies are type + // checked. + TypeCheckFuncBodies func(path string) bool + + // If Build is non-nil, it is used to locate source packages. + // Otherwise &build.Default is used. + // + // By default, cgo is invoked to preprocess Go files that + // import the fake package "C". This behaviour can be + // disabled by setting CGO_ENABLED=0 in the environment prior + // to startup, or by setting Build.CgoEnabled=false. + Build *build.Context + + // The current directory, used for resolving relative package + // references such as "./go/loader". If empty, os.Getwd will be + // used instead. + Cwd string + + // If DisplayPath is non-nil, it is used to transform each + // file name obtained from Build.Import(). This can be used + // to prevent a virtualized build.Config's file names from + // leaking into the user interface. + DisplayPath func(path string) string + + // If AllowErrors is true, Load will return a Program even + // if some of the its packages contained I/O, parser or type + // errors; such errors are accessible via PackageInfo.Errors. If + // false, Load will fail if any package had an error. + AllowErrors bool + + // CreatePkgs specifies a list of non-importable initial + // packages to create. The resulting packages will appear in + // the corresponding elements of the Program.Created slice. + CreatePkgs []PkgSpec + + // ImportPkgs specifies a set of initial packages to load. + // The map keys are package paths. + // + // The map value indicates whether to load tests. If true, Load + // will add and type-check two lists of files to the package: + // non-test files followed by in-package *_test.go files. In + // addition, it will append the external test package (if any) + // to Program.Created. + ImportPkgs map[string]bool + + // FindPackage is called during Load to create the build.Package + // for a given import path from a given directory. + // If FindPackage is nil, (*build.Context).Import is used. + // A client may use this hook to adapt to a proprietary build + // system that does not follow the "go build" layout + // conventions, for example. + // + // It must be safe to call concurrently from multiple goroutines. + FindPackage func(ctxt *build.Context, importPath, fromDir string, mode build.ImportMode) (*build.Package, error) + + // AfterTypeCheck is called immediately after a list of files + // has been type-checked and appended to info.Files. + // + // This optional hook function is the earliest opportunity for + // the client to observe the output of the type checker, + // which may be useful to reduce analysis latency when loading + // a large program. + // + // The function is permitted to modify info.Info, for instance + // to clear data structures that are no longer needed, which can + // dramatically reduce peak memory consumption. + // + // The function may be called twice for the same PackageInfo: + // once for the files of the package and again for the + // in-package test files. + // + // It must be safe to call concurrently from multiple goroutines. + AfterTypeCheck func(info *PackageInfo, files []*ast.File) +} + +// A PkgSpec specifies a non-importable package to be created by Load. +// Files are processed first, but typically only one of Files and +// Filenames is provided. The path needn't be globally unique. +// +// For vendoring purposes, the package's directory is the one that +// contains the first file. +type PkgSpec struct { + Path string // package path ("" => use package declaration) + Files []*ast.File // ASTs of already-parsed files + Filenames []string // names of files to be parsed +} + +// A Program is a Go program loaded from source as specified by a Config. +type Program struct { + Fset *token.FileSet // the file set for this program + + // Created[i] contains the initial package whose ASTs or + // filenames were supplied by Config.CreatePkgs[i], followed by + // the external test package, if any, of each package in + // Config.ImportPkgs ordered by ImportPath. + // + // NOTE: these files must not import "C". Cgo preprocessing is + // only performed on imported packages, not ad hoc packages. + // + // TODO(adonovan): we need to copy and adapt the logic of + // goFilesPackage (from $GOROOT/src/cmd/go/build.go) and make + // Config.Import and Config.Create methods return the same kind + // of entity, essentially a build.Package. + // Perhaps we can even reuse that type directly. + Created []*PackageInfo + + // Imported contains the initially imported packages, + // as specified by Config.ImportPkgs. + Imported map[string]*PackageInfo + + // AllPackages contains the PackageInfo of every package + // encountered by Load: all initial packages and all + // dependencies, including incomplete ones. + AllPackages map[*types.Package]*PackageInfo + + // importMap is the canonical mapping of package paths to + // packages. It contains all Imported initial packages, but not + // Created ones, and all imported dependencies. + importMap map[string]*types.Package +} + +// PackageInfo holds the ASTs and facts derived by the type-checker +// for a single package. +// +// Not mutated once exposed via the API. +// +type PackageInfo struct { + Pkg *types.Package + Importable bool // true if 'import "Pkg.Path()"' would resolve to this + TransitivelyErrorFree bool // true if Pkg and all its dependencies are free of errors + Files []*ast.File // syntax trees for the package's files + Errors []error // non-nil if the package had errors + types.Info // type-checker deductions. + dir string // package directory + + checker *types.Checker // transient type-checker state + errorFunc func(error) +} + +func (info *PackageInfo) String() string { return info.Pkg.Path() } + +func (info *PackageInfo) appendError(err error) { + if info.errorFunc != nil { + info.errorFunc(err) + } else { + fmt.Fprintln(os.Stderr, err) + } + info.Errors = append(info.Errors, err) +} + +func (conf *Config) fset() *token.FileSet { + if conf.Fset == nil { + conf.Fset = token.NewFileSet() + } + return conf.Fset +} + +// ParseFile is a convenience function (intended for testing) that invokes +// the parser using the Config's FileSet, which is initialized if nil. +// +// src specifies the parser input as a string, []byte, or io.Reader, and +// filename is its apparent name. If src is nil, the contents of +// filename are read from the file system. +// +func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) { + // TODO(adonovan): use conf.build() etc like parseFiles does. + return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode) +} + +// FromArgsUsage is a partial usage message that applications calling +// FromArgs may wish to include in their -help output. +const FromArgsUsage = ` + is a list of arguments denoting a set of initial packages. +It may take one of two forms: + +1. A list of *.go source files. + + All of the specified files are loaded, parsed and type-checked + as a single package. All the files must belong to the same directory. + +2. A list of import paths, each denoting a package. + + The package's directory is found relative to the $GOROOT and + $GOPATH using similar logic to 'go build', and the *.go files in + that directory are loaded, parsed and type-checked as a single + package. + + In addition, all *_test.go files in the directory are then loaded + and parsed. Those files whose package declaration equals that of + the non-*_test.go files are included in the primary package. Test + files whose package declaration ends with "_test" are type-checked + as another package, the 'external' test package, so that a single + import path may denote two packages. (Whether this behaviour is + enabled is tool-specific, and may depend on additional flags.) + +A '--' argument terminates the list of packages. +` + +// FromArgs interprets args as a set of initial packages to load from +// source and updates the configuration. It returns the list of +// unconsumed arguments. +// +// It is intended for use in command-line interfaces that require a +// set of initial packages to be specified; see FromArgsUsage message +// for details. +// +// Only superficial errors are reported at this stage; errors dependent +// on I/O are detected during Load. +// +func (conf *Config) FromArgs(args []string, xtest bool) ([]string, error) { + var rest []string + for i, arg := range args { + if arg == "--" { + rest = args[i+1:] + args = args[:i] + break // consume "--" and return the remaining args + } + } + + if len(args) > 0 && strings.HasSuffix(args[0], ".go") { + // Assume args is a list of a *.go files + // denoting a single ad hoc package. + for _, arg := range args { + if !strings.HasSuffix(arg, ".go") { + return nil, fmt.Errorf("named files must be .go files: %s", arg) + } + } + conf.CreateFromFilenames("", args...) + } else { + // Assume args are directories each denoting a + // package and (perhaps) an external test, iff xtest. + for _, arg := range args { + if xtest { + conf.ImportWithTests(arg) + } else { + conf.Import(arg) + } + } + } + + return rest, nil +} + +// CreateFromFilenames is a convenience function that adds +// a conf.CreatePkgs entry to create a package of the specified *.go +// files. +// +func (conf *Config) CreateFromFilenames(path string, filenames ...string) { + conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Filenames: filenames}) +} + +// CreateFromFiles is a convenience function that adds a conf.CreatePkgs +// entry to create package of the specified path and parsed files. +// +func (conf *Config) CreateFromFiles(path string, files ...*ast.File) { + conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Files: files}) +} + +// ImportWithTests is a convenience function that adds path to +// ImportPkgs, the set of initial source packages located relative to +// $GOPATH. The package will be augmented by any *_test.go files in +// its directory that contain a "package x" (not "package x_test") +// declaration. +// +// In addition, if any *_test.go files contain a "package x_test" +// declaration, an additional package comprising just those files will +// be added to CreatePkgs. +// +func (conf *Config) ImportWithTests(path string) { conf.addImport(path, true) } + +// Import is a convenience function that adds path to ImportPkgs, the +// set of initial packages that will be imported from source. +// +func (conf *Config) Import(path string) { conf.addImport(path, false) } + +func (conf *Config) addImport(path string, tests bool) { + if path == "C" { + return // ignore; not a real package + } + if conf.ImportPkgs == nil { + conf.ImportPkgs = make(map[string]bool) + } + conf.ImportPkgs[path] = conf.ImportPkgs[path] || tests +} + +// PathEnclosingInterval returns the PackageInfo and ast.Node that +// contain source interval [start, end), and all the node's ancestors +// up to the AST root. It searches all ast.Files of all packages in prog. +// exact is defined as for astutil.PathEnclosingInterval. +// +// The zero value is returned if not found. +// +func (prog *Program) PathEnclosingInterval(start, end token.Pos) (pkg *PackageInfo, path []ast.Node, exact bool) { + for _, info := range prog.AllPackages { + for _, f := range info.Files { + if f.Pos() == token.NoPos { + // This can happen if the parser saw + // too many errors and bailed out. + // (Use parser.AllErrors to prevent that.) + continue + } + if !tokenFileContainsPos(prog.Fset.File(f.Pos()), start) { + continue + } + if path, exact := astutil.PathEnclosingInterval(f, start, end); path != nil { + return info, path, exact + } + } + } + return nil, nil, false +} + +// InitialPackages returns a new slice containing the set of initial +// packages (Created + Imported) in unspecified order. +// +func (prog *Program) InitialPackages() []*PackageInfo { + infos := make([]*PackageInfo, 0, len(prog.Created)+len(prog.Imported)) + infos = append(infos, prog.Created...) + for _, info := range prog.Imported { + infos = append(infos, info) + } + return infos +} + +// Package returns the ASTs and results of type checking for the +// specified package. +func (prog *Program) Package(path string) *PackageInfo { + if info, ok := prog.AllPackages[prog.importMap[path]]; ok { + return info + } + for _, info := range prog.Created { + if path == info.Pkg.Path() { + return info + } + } + return nil +} + +// ---------- Implementation ---------- + +// importer holds the working state of the algorithm. +type importer struct { + conf *Config // the client configuration + start time.Time // for logging + + progMu sync.Mutex // guards prog + prog *Program // the resulting program + + // findpkg is a memoization of FindPackage. + findpkgMu sync.Mutex // guards findpkg + findpkg map[findpkgKey]*findpkgValue + + importedMu sync.Mutex // guards imported + imported map[string]*importInfo // all imported packages (incl. failures) by import path + + // import dependency graph: graph[x][y] => x imports y + // + // Since non-importable packages cannot be cyclic, we ignore + // their imports, thus we only need the subgraph over importable + // packages. Nodes are identified by their import paths. + graphMu sync.Mutex + graph map[string]map[string]bool +} + +type findpkgKey struct { + importPath string + fromDir string + mode build.ImportMode +} + +type findpkgValue struct { + ready chan struct{} // closed to broadcast readiness + bp *build.Package + err error +} + +// importInfo tracks the success or failure of a single import. +// +// Upon completion, exactly one of info and err is non-nil: +// info on successful creation of a package, err otherwise. +// A successful package may still contain type errors. +// +type importInfo struct { + path string // import path + info *PackageInfo // results of typechecking (including errors) + complete chan struct{} // closed to broadcast that info is set. +} + +// awaitCompletion blocks until ii is complete, +// i.e. the info field is safe to inspect. +func (ii *importInfo) awaitCompletion() { + <-ii.complete // wait for close +} + +// Complete marks ii as complete. +// Its info and err fields will not be subsequently updated. +func (ii *importInfo) Complete(info *PackageInfo) { + if info == nil { + panic("info == nil") + } + ii.info = info + close(ii.complete) +} + +type importError struct { + path string // import path + err error // reason for failure to create a package +} + +// Load creates the initial packages specified by conf.{Create,Import}Pkgs, +// loading their dependencies packages as needed. +// +// On success, Load returns a Program containing a PackageInfo for +// each package. On failure, it returns an error. +// +// If AllowErrors is true, Load will return a Program even if some +// packages contained I/O, parser or type errors, or if dependencies +// were missing. (Such errors are accessible via PackageInfo.Errors. If +// false, Load will fail if any package had an error. +// +// It is an error if no packages were loaded. +// +func (conf *Config) Load() (*Program, error) { + // Create a simple default error handler for parse/type errors. + if conf.TypeChecker.Error == nil { + conf.TypeChecker.Error = func(e error) { fmt.Fprintln(os.Stderr, e) } + } + + // Set default working directory for relative package references. + if conf.Cwd == "" { + var err error + conf.Cwd, err = os.Getwd() + if err != nil { + return nil, err + } + } + + // Install default FindPackage hook using go/build logic. + if conf.FindPackage == nil { + conf.FindPackage = (*build.Context).Import + } + + prog := &Program{ + Fset: conf.fset(), + Imported: make(map[string]*PackageInfo), + importMap: make(map[string]*types.Package), + AllPackages: make(map[*types.Package]*PackageInfo), + } + + imp := importer{ + conf: conf, + prog: prog, + findpkg: make(map[findpkgKey]*findpkgValue), + imported: make(map[string]*importInfo), + start: time.Now(), + graph: make(map[string]map[string]bool), + } + + // -- loading proper (concurrent phase) -------------------------------- + + var errpkgs []string // packages that contained errors + + // Load the initially imported packages and their dependencies, + // in parallel. + // No vendor check on packages imported from the command line. + infos, importErrors := imp.importAll("", conf.Cwd, conf.ImportPkgs, ignoreVendor) + for _, ie := range importErrors { + conf.TypeChecker.Error(ie.err) // failed to create package + errpkgs = append(errpkgs, ie.path) + } + for _, info := range infos { + prog.Imported[info.Pkg.Path()] = info + } + + // Augment the designated initial packages by their tests. + // Dependencies are loaded in parallel. + var xtestPkgs []*build.Package + for importPath, augment := range conf.ImportPkgs { + if !augment { + continue + } + + // No vendor check on packages imported from command line. + bp, err := imp.findPackage(importPath, conf.Cwd, ignoreVendor) + if err != nil { + // Package not found, or can't even parse package declaration. + // Already reported by previous loop; ignore it. + continue + } + + // Needs external test package? + if len(bp.XTestGoFiles) > 0 { + xtestPkgs = append(xtestPkgs, bp) + } + + // Consult the cache using the canonical package path. + path := bp.ImportPath + imp.importedMu.Lock() // (unnecessary, we're sequential here) + ii, ok := imp.imported[path] + // Paranoid checks added due to issue #11012. + if !ok { + // Unreachable. + // The previous loop called importAll and thus + // startLoad for each path in ImportPkgs, which + // populates imp.imported[path] with a non-zero value. + panic(fmt.Sprintf("imported[%q] not found", path)) + } + if ii == nil { + // Unreachable. + // The ii values in this loop are the same as in + // the previous loop, which enforced the invariant + // that at least one of ii.err and ii.info is non-nil. + panic(fmt.Sprintf("imported[%q] == nil", path)) + } + if ii.info == nil { + // Unreachable. + // awaitCompletion has the postcondition + // ii.info != nil. + panic(fmt.Sprintf("imported[%q].info = nil", path)) + } + info := ii.info + imp.importedMu.Unlock() + + // Parse the in-package test files. + files, errs := imp.conf.parsePackageFiles(bp, 't') + for _, err := range errs { + info.appendError(err) + } + + // The test files augmenting package P cannot be imported, + // but may import packages that import P, + // so we must disable the cycle check. + imp.addFiles(info, files, false) + } + + createPkg := func(path, dir string, files []*ast.File, errs []error) { + info := imp.newPackageInfo(path, dir) + for _, err := range errs { + info.appendError(err) + } + + // Ad hoc packages are non-importable, + // so no cycle check is needed. + // addFiles loads dependencies in parallel. + imp.addFiles(info, files, false) + prog.Created = append(prog.Created, info) + } + + // Create packages specified by conf.CreatePkgs. + for _, cp := range conf.CreatePkgs { + files, errs := parseFiles(conf.fset(), conf.build(), nil, conf.Cwd, cp.Filenames, conf.ParserMode) + files = append(files, cp.Files...) + + path := cp.Path + if path == "" { + if len(files) > 0 { + path = files[0].Name.Name + } else { + path = "(unnamed)" + } + } + + dir := conf.Cwd + if len(files) > 0 && files[0].Pos().IsValid() { + dir = filepath.Dir(conf.fset().File(files[0].Pos()).Name()) + } + createPkg(path, dir, files, errs) + } + + // Create external test packages. + sort.Sort(byImportPath(xtestPkgs)) + for _, bp := range xtestPkgs { + files, errs := imp.conf.parsePackageFiles(bp, 'x') + createPkg(bp.ImportPath+"_test", bp.Dir, files, errs) + } + + // -- finishing up (sequential) ---------------------------------------- + + if len(prog.Imported)+len(prog.Created) == 0 { + return nil, errors.New("no initial packages were loaded") + } + + // Create infos for indirectly imported packages. + // e.g. incomplete packages without syntax, loaded from export data. + for _, obj := range prog.importMap { + info := prog.AllPackages[obj] + if info == nil { + prog.AllPackages[obj] = &PackageInfo{Pkg: obj, Importable: true} + } else { + // finished + info.checker = nil + info.errorFunc = nil + } + } + + if !conf.AllowErrors { + // Report errors in indirectly imported packages. + for _, info := range prog.AllPackages { + if len(info.Errors) > 0 { + errpkgs = append(errpkgs, info.Pkg.Path()) + } + } + if errpkgs != nil { + var more string + if len(errpkgs) > 3 { + more = fmt.Sprintf(" and %d more", len(errpkgs)-3) + errpkgs = errpkgs[:3] + } + return nil, fmt.Errorf("couldn't load packages due to errors: %s%s", + strings.Join(errpkgs, ", "), more) + } + } + + markErrorFreePackages(prog.AllPackages) + + return prog, nil +} + +type byImportPath []*build.Package + +func (b byImportPath) Len() int { return len(b) } +func (b byImportPath) Less(i, j int) bool { return b[i].ImportPath < b[j].ImportPath } +func (b byImportPath) Swap(i, j int) { b[i], b[j] = b[j], b[i] } + +// markErrorFreePackages sets the TransitivelyErrorFree flag on all +// applicable packages. +func markErrorFreePackages(allPackages map[*types.Package]*PackageInfo) { + // Build the transpose of the import graph. + importedBy := make(map[*types.Package]map[*types.Package]bool) + for P := range allPackages { + for _, Q := range P.Imports() { + clients, ok := importedBy[Q] + if !ok { + clients = make(map[*types.Package]bool) + importedBy[Q] = clients + } + clients[P] = true + } + } + + // Find all packages reachable from some error package. + reachable := make(map[*types.Package]bool) + var visit func(*types.Package) + visit = func(p *types.Package) { + if !reachable[p] { + reachable[p] = true + for q := range importedBy[p] { + visit(q) + } + } + } + for _, info := range allPackages { + if len(info.Errors) > 0 { + visit(info.Pkg) + } + } + + // Mark the others as "transitively error-free". + for _, info := range allPackages { + if !reachable[info.Pkg] { + info.TransitivelyErrorFree = true + } + } +} + +// build returns the effective build context. +func (conf *Config) build() *build.Context { + if conf.Build != nil { + return conf.Build + } + return &build.Default +} + +// parsePackageFiles enumerates the files belonging to package path, +// then loads, parses and returns them, plus a list of I/O or parse +// errors that were encountered. +// +// 'which' indicates which files to include: +// 'g': include non-test *.go source files (GoFiles + processed CgoFiles) +// 't': include in-package *_test.go source files (TestGoFiles) +// 'x': include external *_test.go source files. (XTestGoFiles) +// +func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.File, []error) { + if bp.ImportPath == "unsafe" { + return nil, nil + } + var filenames []string + switch which { + case 'g': + filenames = bp.GoFiles + case 't': + filenames = bp.TestGoFiles + case 'x': + filenames = bp.XTestGoFiles + default: + panic(which) + } + + files, errs := parseFiles(conf.fset(), conf.build(), conf.DisplayPath, bp.Dir, filenames, conf.ParserMode) + + // Preprocess CgoFiles and parse the outputs (sequentially). + if which == 'g' && bp.CgoFiles != nil { + cgofiles, err := cgo.ProcessFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) + if err != nil { + errs = append(errs, err) + } else { + files = append(files, cgofiles...) + } + } + + return files, errs +} + +// doImport imports the package denoted by path. +// It implements the types.Importer signature. +// +// It returns an error if a package could not be created +// (e.g. go/build or parse error), but type errors are reported via +// the types.Config.Error callback (the first of which is also saved +// in the package's PackageInfo). +// +// Idempotent. +// +func (imp *importer) doImport(from *PackageInfo, to string) (*types.Package, error) { + if to == "C" { + // This should be unreachable, but ad hoc packages are + // not currently subject to cgo preprocessing. + // See https://golang.org/issue/11627. + return nil, fmt.Errorf(`the loader doesn't cgo-process ad hoc packages like %q; see Go issue 11627`, + from.Pkg.Path()) + } + + bp, err := imp.findPackage(to, from.dir, 0) + if err != nil { + return nil, err + } + + // The standard unsafe package is handled specially, + // and has no PackageInfo. + if bp.ImportPath == "unsafe" { + return types.Unsafe, nil + } + + // Look for the package in the cache using its canonical path. + path := bp.ImportPath + imp.importedMu.Lock() + ii := imp.imported[path] + imp.importedMu.Unlock() + if ii == nil { + panic("internal error: unexpected import: " + path) + } + if ii.info != nil { + return ii.info.Pkg, nil + } + + // Import of incomplete package: this indicates a cycle. + fromPath := from.Pkg.Path() + if cycle := imp.findPath(path, fromPath); cycle != nil { + // Normalize cycle: start from alphabetically largest node. + pos, start := -1, "" + for i, s := range cycle { + if pos < 0 || s > start { + pos, start = i, s + } + } + cycle = append(cycle, cycle[:pos]...)[pos:] // rotate cycle to start from largest + cycle = append(cycle, cycle[0]) // add start node to end to show cycliness + return nil, fmt.Errorf("import cycle: %s", strings.Join(cycle, " -> ")) + } + + panic("internal error: import of incomplete (yet acyclic) package: " + fromPath) +} + +// findPackage locates the package denoted by the importPath in the +// specified directory. +func (imp *importer) findPackage(importPath, fromDir string, mode build.ImportMode) (*build.Package, error) { + // We use a non-blocking duplicate-suppressing cache (gopl.io §9.7) + // to avoid holding the lock around FindPackage. + key := findpkgKey{importPath, fromDir, mode} + imp.findpkgMu.Lock() + v, ok := imp.findpkg[key] + if ok { + // cache hit + imp.findpkgMu.Unlock() + + <-v.ready // wait for entry to become ready + } else { + // Cache miss: this goroutine becomes responsible for + // populating the map entry and broadcasting its readiness. + v = &findpkgValue{ready: make(chan struct{})} + imp.findpkg[key] = v + imp.findpkgMu.Unlock() + + ioLimit <- true + v.bp, v.err = imp.conf.FindPackage(imp.conf.build(), importPath, fromDir, mode) + <-ioLimit + + if _, ok := v.err.(*build.NoGoError); ok { + v.err = nil // empty directory is not an error + } + + close(v.ready) // broadcast ready condition + } + return v.bp, v.err +} + +// importAll loads, parses, and type-checks the specified packages in +// parallel and returns their completed importInfos in unspecified order. +// +// fromPath is the package path of the importing package, if it is +// importable, "" otherwise. It is used for cycle detection. +// +// fromDir is the directory containing the import declaration that +// caused these imports. +// +func (imp *importer) importAll(fromPath, fromDir string, imports map[string]bool, mode build.ImportMode) (infos []*PackageInfo, errors []importError) { + // TODO(adonovan): opt: do the loop in parallel once + // findPackage is non-blocking. + var pending []*importInfo + for importPath := range imports { + bp, err := imp.findPackage(importPath, fromDir, mode) + if err != nil { + errors = append(errors, importError{ + path: importPath, + err: err, + }) + continue + } + pending = append(pending, imp.startLoad(bp)) + } + + if fromPath != "" { + // We're loading a set of imports. + // + // We must record graph edges from the importing package + // to its dependencies, and check for cycles. + imp.graphMu.Lock() + deps, ok := imp.graph[fromPath] + if !ok { + deps = make(map[string]bool) + imp.graph[fromPath] = deps + } + for _, ii := range pending { + deps[ii.path] = true + } + imp.graphMu.Unlock() + } + + for _, ii := range pending { + if fromPath != "" { + if cycle := imp.findPath(ii.path, fromPath); cycle != nil { + // Cycle-forming import: we must not await its + // completion since it would deadlock. + // + // We don't record the error in ii since + // the error is really associated with the + // cycle-forming edge, not the package itself. + // (Also it would complicate the + // invariants of importPath completion.) + if trace { + fmt.Fprintf(os.Stderr, "import cycle: %q\n", cycle) + } + continue + } + } + ii.awaitCompletion() + infos = append(infos, ii.info) + } + + return infos, errors +} + +// findPath returns an arbitrary path from 'from' to 'to' in the import +// graph, or nil if there was none. +func (imp *importer) findPath(from, to string) []string { + imp.graphMu.Lock() + defer imp.graphMu.Unlock() + + seen := make(map[string]bool) + var search func(stack []string, importPath string) []string + search = func(stack []string, importPath string) []string { + if !seen[importPath] { + seen[importPath] = true + stack = append(stack, importPath) + if importPath == to { + return stack + } + for x := range imp.graph[importPath] { + if p := search(stack, x); p != nil { + return p + } + } + } + return nil + } + return search(make([]string, 0, 20), from) +} + +// startLoad initiates the loading, parsing and type-checking of the +// specified package and its dependencies, if it has not already begun. +// +// It returns an importInfo, not necessarily in a completed state. The +// caller must call awaitCompletion() before accessing its info field. +// +// startLoad is concurrency-safe and idempotent. +// +func (imp *importer) startLoad(bp *build.Package) *importInfo { + path := bp.ImportPath + imp.importedMu.Lock() + ii, ok := imp.imported[path] + if !ok { + ii = &importInfo{path: path, complete: make(chan struct{})} + imp.imported[path] = ii + go func() { + info := imp.load(bp) + ii.Complete(info) + }() + } + imp.importedMu.Unlock() + + return ii +} + +// load implements package loading by parsing Go source files +// located by go/build. +func (imp *importer) load(bp *build.Package) *PackageInfo { + info := imp.newPackageInfo(bp.ImportPath, bp.Dir) + info.Importable = true + files, errs := imp.conf.parsePackageFiles(bp, 'g') + for _, err := range errs { + info.appendError(err) + } + + imp.addFiles(info, files, true) + + imp.progMu.Lock() + imp.prog.importMap[bp.ImportPath] = info.Pkg + imp.progMu.Unlock() + + return info +} + +// addFiles adds and type-checks the specified files to info, loading +// their dependencies if needed. The order of files determines the +// package initialization order. It may be called multiple times on the +// same package. Errors are appended to the info.Errors field. +// +// cycleCheck determines whether the imports within files create +// dependency edges that should be checked for potential cycles. +// +func (imp *importer) addFiles(info *PackageInfo, files []*ast.File, cycleCheck bool) { + // Ensure the dependencies are loaded, in parallel. + var fromPath string + if cycleCheck { + fromPath = info.Pkg.Path() + } + // TODO(adonovan): opt: make the caller do scanImports. + // Callers with a build.Package can skip it. + imp.importAll(fromPath, info.dir, scanImports(files), 0) + + if trace { + fmt.Fprintf(os.Stderr, "%s: start %q (%d)\n", + time.Since(imp.start), info.Pkg.Path(), len(files)) + } + + // Don't call checker.Files on Unsafe, even with zero files, + // because it would mutate the package, which is a global. + if info.Pkg == types.Unsafe { + if len(files) > 0 { + panic(`"unsafe" package contains unexpected files`) + } + } else { + // Ignore the returned (first) error since we + // already collect them all in the PackageInfo. + info.checker.Files(files) + info.Files = append(info.Files, files...) + } + + if imp.conf.AfterTypeCheck != nil { + imp.conf.AfterTypeCheck(info, files) + } + + if trace { + fmt.Fprintf(os.Stderr, "%s: stop %q\n", + time.Since(imp.start), info.Pkg.Path()) + } +} + +func (imp *importer) newPackageInfo(path, dir string) *PackageInfo { + var pkg *types.Package + if path == "unsafe" { + pkg = types.Unsafe + } else { + pkg = types.NewPackage(path, "") + } + info := &PackageInfo{ + Pkg: pkg, + Info: types.Info{ + Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), + Uses: make(map[*ast.Ident]types.Object), + Implicits: make(map[ast.Node]types.Object), + Scopes: make(map[ast.Node]*types.Scope), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + }, + errorFunc: imp.conf.TypeChecker.Error, + dir: dir, + } + + // Copy the types.Config so we can vary it across PackageInfos. + tc := imp.conf.TypeChecker + tc.IgnoreFuncBodies = false + if f := imp.conf.TypeCheckFuncBodies; f != nil { + tc.IgnoreFuncBodies = !f(path) + } + tc.Importer = closure{imp, info} + tc.Error = info.appendError // appendError wraps the user's Error function + + info.checker = types.NewChecker(&tc, imp.conf.fset(), pkg, &info.Info) + imp.progMu.Lock() + imp.prog.AllPackages[pkg] = info + imp.progMu.Unlock() + return info +} + +type closure struct { + imp *importer + info *PackageInfo +} + +func (c closure) Import(to string) (*types.Package, error) { return c.imp.doImport(c.info, to) } diff --git a/vendor/golang.org/x/tools/go/loader/util.go b/vendor/golang.org/x/tools/go/loader/util.go new file mode 100644 index 00000000..7f38dd74 --- /dev/null +++ b/vendor/golang.org/x/tools/go/loader/util.go @@ -0,0 +1,124 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package loader + +import ( + "go/ast" + "go/build" + "go/parser" + "go/token" + "io" + "os" + "strconv" + "sync" + + "golang.org/x/tools/go/buildutil" +) + +// We use a counting semaphore to limit +// the number of parallel I/O calls per process. +var ioLimit = make(chan bool, 10) + +// parseFiles parses the Go source files within directory dir and +// returns the ASTs of the ones that could be at least partially parsed, +// along with a list of I/O and parse errors encountered. +// +// I/O is done via ctxt, which may specify a virtual file system. +// displayPath is used to transform the filenames attached to the ASTs. +// +func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, files []string, mode parser.Mode) ([]*ast.File, []error) { + if displayPath == nil { + displayPath = func(path string) string { return path } + } + var wg sync.WaitGroup + n := len(files) + parsed := make([]*ast.File, n) + errors := make([]error, n) + for i, file := range files { + if !buildutil.IsAbsPath(ctxt, file) { + file = buildutil.JoinPath(ctxt, dir, file) + } + wg.Add(1) + go func(i int, file string) { + ioLimit <- true // wait + defer func() { + wg.Done() + <-ioLimit // signal + }() + var rd io.ReadCloser + var err error + if ctxt.OpenFile != nil { + rd, err = ctxt.OpenFile(file) + } else { + rd, err = os.Open(file) + } + if err != nil { + errors[i] = err // open failed + return + } + + // ParseFile may return both an AST and an error. + parsed[i], errors[i] = parser.ParseFile(fset, displayPath(file), rd, mode) + rd.Close() + }(i, file) + } + wg.Wait() + + // Eliminate nils, preserving order. + var o int + for _, f := range parsed { + if f != nil { + parsed[o] = f + o++ + } + } + parsed = parsed[:o] + + o = 0 + for _, err := range errors { + if err != nil { + errors[o] = err + o++ + } + } + errors = errors[:o] + + return parsed, errors +} + +// scanImports returns the set of all import paths from all +// import specs in the specified files. +func scanImports(files []*ast.File) map[string]bool { + imports := make(map[string]bool) + for _, f := range files { + for _, decl := range f.Decls { + if decl, ok := decl.(*ast.GenDecl); ok && decl.Tok == token.IMPORT { + for _, spec := range decl.Specs { + spec := spec.(*ast.ImportSpec) + + // NB: do not assume the program is well-formed! + path, err := strconv.Unquote(spec.Path.Value) + if err != nil { + continue // quietly ignore the error + } + if path == "C" { + continue // skip pseudopackage + } + imports[path] = true + } + } + } + } + return imports +} + +// ---------- Internal helpers ---------- + +// TODO(adonovan): make this a method: func (*token.File) Contains(token.Pos) +func tokenFileContainsPos(f *token.File, pos token.Pos) bool { + p := int(pos) + base := f.Base() + return base <= p && p < base+f.Size() +} diff --git a/vendor/golang.org/x/xerrors/LICENSE b/vendor/golang.org/x/xerrors/LICENSE new file mode 100644 index 00000000..e4a47e17 --- /dev/null +++ b/vendor/golang.org/x/xerrors/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2019 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/xerrors/PATENTS b/vendor/golang.org/x/xerrors/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/golang.org/x/xerrors/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/xerrors/README b/vendor/golang.org/x/xerrors/README new file mode 100644 index 00000000..aac7867a --- /dev/null +++ b/vendor/golang.org/x/xerrors/README @@ -0,0 +1,2 @@ +This repository holds the transition packages for the new Go 1.13 error values. +See golang.org/design/29934-error-values. diff --git a/vendor/golang.org/x/xerrors/adaptor.go b/vendor/golang.org/x/xerrors/adaptor.go new file mode 100644 index 00000000..4317f248 --- /dev/null +++ b/vendor/golang.org/x/xerrors/adaptor.go @@ -0,0 +1,193 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "bytes" + "fmt" + "io" + "reflect" + "strconv" +) + +// FormatError calls the FormatError method of f with an errors.Printer +// configured according to s and verb, and writes the result to s. +func FormatError(f Formatter, s fmt.State, verb rune) { + // Assuming this function is only called from the Format method, and given + // that FormatError takes precedence over Format, it cannot be called from + // any package that supports errors.Formatter. It is therefore safe to + // disregard that State may be a specific printer implementation and use one + // of our choice instead. + + // limitations: does not support printing error as Go struct. + + var ( + sep = " " // separator before next error + p = &state{State: s} + direct = true + ) + + var err error = f + + switch verb { + // Note that this switch must match the preference order + // for ordinary string printing (%#v before %+v, and so on). + + case 'v': + if s.Flag('#') { + if stringer, ok := err.(fmt.GoStringer); ok { + io.WriteString(&p.buf, stringer.GoString()) + goto exit + } + // proceed as if it were %v + } else if s.Flag('+') { + p.printDetail = true + sep = "\n - " + } + case 's': + case 'q', 'x', 'X': + // Use an intermediate buffer in the rare cases that precision, + // truncation, or one of the alternative verbs (q, x, and X) are + // specified. + direct = false + + default: + p.buf.WriteString("%!") + p.buf.WriteRune(verb) + p.buf.WriteByte('(') + switch { + case err != nil: + p.buf.WriteString(reflect.TypeOf(f).String()) + default: + p.buf.WriteString("") + } + p.buf.WriteByte(')') + io.Copy(s, &p.buf) + return + } + +loop: + for { + switch v := err.(type) { + case Formatter: + err = v.FormatError((*printer)(p)) + case fmt.Formatter: + v.Format(p, 'v') + break loop + default: + io.WriteString(&p.buf, v.Error()) + break loop + } + if err == nil { + break + } + if p.needColon || !p.printDetail { + p.buf.WriteByte(':') + p.needColon = false + } + p.buf.WriteString(sep) + p.inDetail = false + p.needNewline = false + } + +exit: + width, okW := s.Width() + prec, okP := s.Precision() + + if !direct || (okW && width > 0) || okP { + // Construct format string from State s. + format := []byte{'%'} + if s.Flag('-') { + format = append(format, '-') + } + if s.Flag('+') { + format = append(format, '+') + } + if s.Flag(' ') { + format = append(format, ' ') + } + if okW { + format = strconv.AppendInt(format, int64(width), 10) + } + if okP { + format = append(format, '.') + format = strconv.AppendInt(format, int64(prec), 10) + } + format = append(format, string(verb)...) + fmt.Fprintf(s, string(format), p.buf.String()) + } else { + io.Copy(s, &p.buf) + } +} + +var detailSep = []byte("\n ") + +// state tracks error printing state. It implements fmt.State. +type state struct { + fmt.State + buf bytes.Buffer + + printDetail bool + inDetail bool + needColon bool + needNewline bool +} + +func (s *state) Write(b []byte) (n int, err error) { + if s.printDetail { + if len(b) == 0 { + return 0, nil + } + if s.inDetail && s.needColon { + s.needNewline = true + if b[0] == '\n' { + b = b[1:] + } + } + k := 0 + for i, c := range b { + if s.needNewline { + if s.inDetail && s.needColon { + s.buf.WriteByte(':') + s.needColon = false + } + s.buf.Write(detailSep) + s.needNewline = false + } + if c == '\n' { + s.buf.Write(b[k:i]) + k = i + 1 + s.needNewline = true + } + } + s.buf.Write(b[k:]) + if !s.inDetail { + s.needColon = true + } + } else if !s.inDetail { + s.buf.Write(b) + } + return len(b), nil +} + +// printer wraps a state to implement an xerrors.Printer. +type printer state + +func (s *printer) Print(args ...interface{}) { + if !s.inDetail || s.printDetail { + fmt.Fprint((*state)(s), args...) + } +} + +func (s *printer) Printf(format string, args ...interface{}) { + if !s.inDetail || s.printDetail { + fmt.Fprintf((*state)(s), format, args...) + } +} + +func (s *printer) Detail() bool { + s.inDetail = true + return s.printDetail +} diff --git a/vendor/golang.org/x/xerrors/codereview.cfg b/vendor/golang.org/x/xerrors/codereview.cfg new file mode 100644 index 00000000..3f8b14b6 --- /dev/null +++ b/vendor/golang.org/x/xerrors/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/xerrors/doc.go b/vendor/golang.org/x/xerrors/doc.go new file mode 100644 index 00000000..eef99d9d --- /dev/null +++ b/vendor/golang.org/x/xerrors/doc.go @@ -0,0 +1,22 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package xerrors implements functions to manipulate errors. +// +// This package is based on the Go 2 proposal for error values: +// https://golang.org/design/29934-error-values +// +// These functions were incorporated into the standard library's errors package +// in Go 1.13: +// - Is +// - As +// - Unwrap +// +// Also, Errorf's %w verb was incorporated into fmt.Errorf. +// +// Use this package to get equivalent behavior in all supported Go versions. +// +// No other features of this package were included in Go 1.13, and at present +// there are no plans to include any of them. +package xerrors // import "golang.org/x/xerrors" diff --git a/vendor/golang.org/x/xerrors/errors.go b/vendor/golang.org/x/xerrors/errors.go new file mode 100644 index 00000000..e88d3772 --- /dev/null +++ b/vendor/golang.org/x/xerrors/errors.go @@ -0,0 +1,33 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import "fmt" + +// errorString is a trivial implementation of error. +type errorString struct { + s string + frame Frame +} + +// New returns an error that formats as the given text. +// +// The returned error contains a Frame set to the caller's location and +// implements Formatter to show this information when printed with details. +func New(text string) error { + return &errorString{text, Caller(1)} +} + +func (e *errorString) Error() string { + return e.s +} + +func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *errorString) FormatError(p Printer) (next error) { + p.Print(e.s) + e.frame.Format(p) + return nil +} diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go new file mode 100644 index 00000000..829862dd --- /dev/null +++ b/vendor/golang.org/x/xerrors/fmt.go @@ -0,0 +1,187 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "fmt" + "strings" + "unicode" + "unicode/utf8" + + "golang.org/x/xerrors/internal" +) + +const percentBangString = "%!" + +// Errorf formats according to a format specifier and returns the string as a +// value that satisfies error. +// +// The returned error includes the file and line number of the caller when +// formatted with additional detail enabled. If the last argument is an error +// the returned error's Format method will return it if the format string ends +// with ": %s", ": %v", or ": %w". If the last argument is an error and the +// format string ends with ": %w", the returned error implements an Unwrap +// method returning it. +// +// If the format specifier includes a %w verb with an error operand in a +// position other than at the end, the returned error will still implement an +// Unwrap method returning the operand, but the error's Format method will not +// return the wrapped error. +// +// It is invalid to include more than one %w verb or to supply it with an +// operand that does not implement the error interface. The %w verb is otherwise +// a synonym for %v. +func Errorf(format string, a ...interface{}) error { + format = formatPlusW(format) + // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. + wrap := strings.HasSuffix(format, ": %w") + idx, format2, ok := parsePercentW(format) + percentWElsewhere := !wrap && idx >= 0 + if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { + err := errorAt(a, len(a)-1) + if err == nil { + return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} + } + // TODO: this is not entirely correct. The error value could be + // printed elsewhere in format if it mixes numbered with unnumbered + // substitutions. With relatively small changes to doPrintf we can + // have it optionally ignore extra arguments and pass the argument + // list in its entirety. + msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) + frame := Frame{} + if internal.EnableTrace { + frame = Caller(1) + } + if wrap { + return &wrapError{msg, err, frame} + } + return &noWrapError{msg, err, frame} + } + // Support %w anywhere. + // TODO: don't repeat the wrapped error's message when %w occurs in the middle. + msg := fmt.Sprintf(format2, a...) + if idx < 0 { + return &noWrapError{msg, nil, Caller(1)} + } + err := errorAt(a, idx) + if !ok || err == nil { + // Too many %ws or argument of %w is not an error. Approximate the Go + // 1.13 fmt.Errorf message. + return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} + } + frame := Frame{} + if internal.EnableTrace { + frame = Caller(1) + } + return &wrapError{msg, err, frame} +} + +func errorAt(args []interface{}, i int) error { + if i < 0 || i >= len(args) { + return nil + } + err, ok := args[i].(error) + if !ok { + return nil + } + return err +} + +// formatPlusW is used to avoid the vet check that will barf at %w. +func formatPlusW(s string) string { + return s +} + +// Return the index of the only %w in format, or -1 if none. +// Also return a rewritten format string with %w replaced by %v, and +// false if there is more than one %w. +// TODO: handle "%[N]w". +func parsePercentW(format string) (idx int, newFormat string, ok bool) { + // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. + idx = -1 + ok = true + n := 0 + sz := 0 + var isW bool + for i := 0; i < len(format); i += sz { + if format[i] != '%' { + sz = 1 + continue + } + // "%%" is not a format directive. + if i+1 < len(format) && format[i+1] == '%' { + sz = 2 + continue + } + sz, isW = parsePrintfVerb(format[i:]) + if isW { + if idx >= 0 { + ok = false + } else { + idx = n + } + // "Replace" the last character, the 'w', with a 'v'. + p := i + sz - 1 + format = format[:p] + "v" + format[p+1:] + } + n++ + } + return idx, format, ok +} + +// Parse the printf verb starting with a % at s[0]. +// Return how many bytes it occupies and whether the verb is 'w'. +func parsePrintfVerb(s string) (int, bool) { + // Assume only that the directive is a sequence of non-letters followed by a single letter. + sz := 0 + var r rune + for i := 1; i < len(s); i += sz { + r, sz = utf8.DecodeRuneInString(s[i:]) + if unicode.IsLetter(r) { + return i + sz, r == 'w' + } + } + return len(s), false +} + +type noWrapError struct { + msg string + err error + frame Frame +} + +func (e *noWrapError) Error() string { + return fmt.Sprint(e) +} + +func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *noWrapError) FormatError(p Printer) (next error) { + p.Print(e.msg) + e.frame.Format(p) + return e.err +} + +type wrapError struct { + msg string + err error + frame Frame +} + +func (e *wrapError) Error() string { + return fmt.Sprint(e) +} + +func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *wrapError) FormatError(p Printer) (next error) { + p.Print(e.msg) + e.frame.Format(p) + return e.err +} + +func (e *wrapError) Unwrap() error { + return e.err +} diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go new file mode 100644 index 00000000..1bc9c26b --- /dev/null +++ b/vendor/golang.org/x/xerrors/format.go @@ -0,0 +1,34 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +// A Formatter formats error messages. +type Formatter interface { + error + + // FormatError prints the receiver's first error and returns the next error in + // the error chain, if any. + FormatError(p Printer) (next error) +} + +// A Printer formats error messages. +// +// The most common implementation of Printer is the one provided by package fmt +// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message +// typically provide their own implementations. +type Printer interface { + // Print appends args to the message output. + Print(args ...interface{}) + + // Printf writes a formatted string. + Printf(format string, args ...interface{}) + + // Detail reports whether error detail is requested. + // After the first call to Detail, all text written to the Printer + // is formatted as additional detail, or ignored when + // detail has not been requested. + // If Detail returns false, the caller can avoid printing the detail at all. + Detail() bool +} diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go new file mode 100644 index 00000000..0de628ec --- /dev/null +++ b/vendor/golang.org/x/xerrors/frame.go @@ -0,0 +1,56 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "runtime" +) + +// A Frame contains part of a call stack. +type Frame struct { + // Make room for three PCs: the one we were asked for, what it called, + // and possibly a PC for skipPleaseUseCallersFrames. See: + // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 + frames [3]uintptr +} + +// Caller returns a Frame that describes a frame on the caller's stack. +// The argument skip is the number of frames to skip over. +// Caller(0) returns the frame for the caller of Caller. +func Caller(skip int) Frame { + var s Frame + runtime.Callers(skip+1, s.frames[:]) + return s +} + +// location reports the file, line, and function of a frame. +// +// The returned function may be "" even if file and line are not. +func (f Frame) location() (function, file string, line int) { + frames := runtime.CallersFrames(f.frames[:]) + if _, ok := frames.Next(); !ok { + return "", "", 0 + } + fr, ok := frames.Next() + if !ok { + return "", "", 0 + } + return fr.Function, fr.File, fr.Line +} + +// Format prints the stack as error detail. +// It should be called from an error's Format implementation +// after printing any other error detail. +func (f Frame) Format(p Printer) { + if p.Detail() { + function, file, line := f.location() + if function != "" { + p.Printf("%s\n ", function) + } + if file != "" { + p.Printf("%s:%d\n", file, line) + } + } +} diff --git a/vendor/golang.org/x/xerrors/go.mod b/vendor/golang.org/x/xerrors/go.mod new file mode 100644 index 00000000..870d4f61 --- /dev/null +++ b/vendor/golang.org/x/xerrors/go.mod @@ -0,0 +1,3 @@ +module golang.org/x/xerrors + +go 1.11 diff --git a/vendor/golang.org/x/xerrors/internal/internal.go b/vendor/golang.org/x/xerrors/internal/internal.go new file mode 100644 index 00000000..89f4eca5 --- /dev/null +++ b/vendor/golang.org/x/xerrors/internal/internal.go @@ -0,0 +1,8 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +// EnableTrace indicates whether stack information should be recorded in errors. +var EnableTrace = true diff --git a/vendor/golang.org/x/xerrors/wrap.go b/vendor/golang.org/x/xerrors/wrap.go new file mode 100644 index 00000000..9a3b5103 --- /dev/null +++ b/vendor/golang.org/x/xerrors/wrap.go @@ -0,0 +1,106 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "reflect" +) + +// A Wrapper provides context around another error. +type Wrapper interface { + // Unwrap returns the next error in the error chain. + // If there is no next error, Unwrap returns nil. + Unwrap() error +} + +// Opaque returns an error with the same error formatting as err +// but that does not match err and cannot be unwrapped. +func Opaque(err error) error { + return noWrapper{err} +} + +type noWrapper struct { + error +} + +func (e noWrapper) FormatError(p Printer) (next error) { + if f, ok := e.error.(Formatter); ok { + return f.FormatError(p) + } + p.Print(e.error) + return nil +} + +// Unwrap returns the result of calling the Unwrap method on err, if err implements +// Unwrap. Otherwise, Unwrap returns nil. +func Unwrap(err error) error { + u, ok := err.(Wrapper) + if !ok { + return nil + } + return u.Unwrap() +} + +// Is reports whether any error in err's chain matches target. +// +// An error is considered to match a target if it is equal to that target or if +// it implements a method Is(error) bool such that Is(target) returns true. +func Is(err, target error) bool { + if target == nil { + return err == target + } + + isComparable := reflect.TypeOf(target).Comparable() + for { + if isComparable && err == target { + return true + } + if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { + return true + } + // TODO: consider supporing target.Is(err). This would allow + // user-definable predicates, but also may allow for coping with sloppy + // APIs, thereby making it easier to get away with them. + if err = Unwrap(err); err == nil { + return false + } + } +} + +// As finds the first error in err's chain that matches the type to which target +// points, and if so, sets the target to its value and returns true. An error +// matches a type if it is assignable to the target type, or if it has a method +// As(interface{}) bool such that As(target) returns true. As will panic if target +// is not a non-nil pointer to a type which implements error or is of interface type. +// +// The As method should set the target to its value and return true if err +// matches the type to which target points. +func As(err error, target interface{}) bool { + if target == nil { + panic("errors: target cannot be nil") + } + val := reflect.ValueOf(target) + typ := val.Type() + if typ.Kind() != reflect.Ptr || val.IsNil() { + panic("errors: target must be a non-nil pointer") + } + if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) { + panic("errors: *target must be interface or implement error") + } + targetType := typ.Elem() + for err != nil { + if reflect.TypeOf(err).AssignableTo(targetType) { + val.Elem().Set(reflect.ValueOf(err)) + return true + } + if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) { + return true + } + err = Unwrap(err) + } + return false +} + +var errorType = reflect.TypeOf((*error)(nil)).Elem() diff --git a/vendor/modules.txt b/vendor/modules.txt index 088b0c18..125e0464 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,16 +1,24 @@ -# github.com/visualfc/fastmod v1.0.0 +# github.com/visualfc/fastmod v1.2.0 github.com/visualfc/fastmod -github.com/visualfc/fastmod/internal/modfile -github.com/visualfc/fastmod/internal/module -github.com/visualfc/fastmod/internal/semver -# github.com/visualfc/gotools v1.0.0 -github.com/visualfc/gotools/pkgs -github.com/visualfc/gotools/types -github.com/visualfc/gotools/pkg/command +# github.com/visualfc/gotools v1.1.0 github.com/visualfc/gotools/pkg/buildctx +github.com/visualfc/gotools/pkg/command github.com/visualfc/gotools/pkg/pkgutil github.com/visualfc/gotools/pkg/stdlib -# golang.org/x/tools v0.0.0-20190710184609-286818132824 -golang.org/x/tools/go/gcexportdata +github.com/visualfc/gotools/pkgs +github.com/visualfc/gotools/types +# golang.org/x/mod v0.2.0 +golang.org/x/mod/internal/lazyregexp +golang.org/x/mod/modfile +golang.org/x/mod/module +golang.org/x/mod/semver +# golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 +golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/buildutil +golang.org/x/tools/go/gcexportdata +golang.org/x/tools/go/internal/cgo golang.org/x/tools/go/internal/gcimporter +golang.org/x/tools/go/loader +# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 +golang.org/x/xerrors +golang.org/x/xerrors/internal From e566c19b2ad40203a0d795cc9e0de85243f7ba14 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 14 Apr 2020 23:17:15 +0800 Subject: [PATCH 078/133] fastmod v1.2.1 --- go.mod | 2 +- go.sum | 4 ++++ vendor/github.com/visualfc/fastmod/fastmod.go | 2 +- vendor/modules.txt | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 9a44129c..8ec77973 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.12 require ( - github.com/visualfc/gotools v1.1.0 + github.com/visualfc/gotools v1.2.0 golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 ) diff --git a/go.sum b/go.sum index 16db4850..70e1f6b8 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ github.com/visualfc/fastmod v1.0.0 h1:3UcYFM+mzdk5AeKF7itO7D7rEv9Vkk0f2HOZi6KCMh github.com/visualfc/fastmod v1.0.0/go.mod h1:MjR7AyXKzcr5S9uEeJPI4xID37/q88a8FSBS/2H8AFc= github.com/visualfc/fastmod v1.2.0 h1:DwuyA4xcSzQ/dwAA75nO2J8YXr8h/ouLEzzhIKGfURA= github.com/visualfc/fastmod v1.2.0/go.mod h1:GGLvzTGsAMsVBMSLEnypACnwEj6syguJSV0qob6LveI= +github.com/visualfc/fastmod v1.2.1 h1:k+YsMjzLO3PyhMd/VxYMDvNW2RtAF3RRCe8a9xR0c1A= +github.com/visualfc/fastmod v1.2.1/go.mod h1:GGLvzTGsAMsVBMSLEnypACnwEj6syguJSV0qob6LveI= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= @@ -47,6 +49,8 @@ github.com/visualfc/gotools v1.0.0 h1:08O9KKHoW68uvacgpHOxJWL/lPiMtISUsaBH5yd7++ github.com/visualfc/gotools v1.0.0/go.mod h1:imEdbI+QLcpnRkK4UUnFFjwUZF7Dl4cjqknTIJ4Zms0= github.com/visualfc/gotools v1.1.0 h1:zVzTsi1dwYV1RCldZa8iCNMnPlVnxt2JJq2SQEqWls0= github.com/visualfc/gotools v1.1.0/go.mod h1:2v+PW2aVfSHAyGN/K6YY+0USyWUDHM6m1rt814MaOhc= +github.com/visualfc/gotools v1.2.0 h1:58GKKJvO4LOcFfh/HL8STJrKNabzH4JRbNZNvnOvjlk= +github.com/visualfc/gotools v1.2.0/go.mod h1:TMYm8wb8oTdahzzJ9fp5+SprhE4wIMK/RwpTbOayrgo= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index b54b6f41..037dc321 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -326,7 +326,7 @@ func (p *Package) LocalImportList(skipcmd bool) []string { if skipcmd && pkg.IsCommand() { continue } - ar = append(ar, path.Join(p.Root.path, pkg.ImportPath)) + ar = append(ar, pkg.ImportPath) } } return ar diff --git a/vendor/modules.txt b/vendor/modules.txt index 125e0464..df37a6d4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ -# github.com/visualfc/fastmod v1.2.0 +# github.com/visualfc/fastmod v1.2.1 github.com/visualfc/fastmod -# github.com/visualfc/gotools v1.1.0 +# github.com/visualfc/gotools v1.2.0 github.com/visualfc/gotools/pkg/buildctx github.com/visualfc/gotools/pkg/command github.com/visualfc/gotools/pkg/pkgutil From 159fff9b218bb4e7c3cbc91ba3fc84e530609b8d Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 15 Apr 2020 06:26:15 +0800 Subject: [PATCH 079/133] fastmod v1.3.2 --- go.mod | 4 +- go.sum | 37 ++----------------- vendor/github.com/visualfc/fastmod/fastmod.go | 2 +- vendor/github.com/visualfc/fastmod/go.mod | 2 +- vendor/modules.txt | 4 +- 5 files changed, 10 insertions(+), 39 deletions(-) diff --git a/go.mod b/go.mod index 8ec77973..4aec099c 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/visualfc/gocode -go 1.12 +go 1.13 require ( - github.com/visualfc/gotools v1.2.0 + github.com/visualfc/gotools v1.3.1 golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 ) diff --git a/go.sum b/go.sum index 70e1f6b8..4fd4e47c 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,14 @@ -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.10-0.20191209115840-8ab47f72e854/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-delve/delve v1.2.1-0.20190713012804-df65be43aeb1/go.mod h1:DR/S+I+xQmTINVqEzooWl5FmZe6PYn9g6Mr99xEjhi0= github.com/go-delve/delve v1.4.0/go.mod h1:gQM0ReOJLNAvPuKAXfjHngtE93C2yc/ekTbo7YbAHSo= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -22,40 +18,19 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5 h1:FuGn4YpG80MHJ2F817yeZsSFMfnpXUYHJsuU5+W6AT8= -github.com/visualfc/fastmod v0.0.0-20190714050813-3600cbe34ad5/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= -github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f h1:XXkmqMVWchE7AizXintmZ8bZr3Sy8RaLk+wSjTbWOkk= -github.com/visualfc/fastmod v0.0.0-20200106141131-2bd8bfc0578f/go.mod h1:qklLSKOIVNIn5SdfGlics3Ljx4kOC29a2gwOS+NjDnQ= -github.com/visualfc/fastmod v1.0.0 h1:3UcYFM+mzdk5AeKF7itO7D7rEv9Vkk0f2HOZi6KCMh8= -github.com/visualfc/fastmod v1.0.0/go.mod h1:MjR7AyXKzcr5S9uEeJPI4xID37/q88a8FSBS/2H8AFc= -github.com/visualfc/fastmod v1.2.0 h1:DwuyA4xcSzQ/dwAA75nO2J8YXr8h/ouLEzzhIKGfURA= -github.com/visualfc/fastmod v1.2.0/go.mod h1:GGLvzTGsAMsVBMSLEnypACnwEj6syguJSV0qob6LveI= -github.com/visualfc/fastmod v1.2.1 h1:k+YsMjzLO3PyhMd/VxYMDvNW2RtAF3RRCe8a9xR0c1A= -github.com/visualfc/fastmod v1.2.1/go.mod h1:GGLvzTGsAMsVBMSLEnypACnwEj6syguJSV0qob6LveI= -github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add h1:IsM5nV9n6bYvYDJ4GYAZK75Tps329E3F/TFSHfI+8kQ= -github.com/visualfc/gotools v0.0.0-20190714085810-6a1e383f5add/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= -github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479 h1:kFZs8cTk1rlyn9WDZJ4De/+8lVZDvecANydVWn3Sowk= -github.com/visualfc/gotools v0.0.0-20190715051201-65fc5d96f479/go.mod h1:m6PkBvi4j7UhZB5EFWuAmwz7EJXwiX5pQzzZm3nb64k= -github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae h1:+gFYnw038UDXdENB9zpp24o4ndEKAHgXCyxPZa/ClzQ= -github.com/visualfc/gotools v0.0.0-20200106141644-1f54722831ae/go.mod h1:6EzUzmR//1Tc63pj2BE+38T23PQDW64AEyMQoncXOcI= -github.com/visualfc/gotools v1.0.0 h1:08O9KKHoW68uvacgpHOxJWL/lPiMtISUsaBH5yd7++w= -github.com/visualfc/gotools v1.0.0/go.mod h1:imEdbI+QLcpnRkK4UUnFFjwUZF7Dl4cjqknTIJ4Zms0= -github.com/visualfc/gotools v1.1.0 h1:zVzTsi1dwYV1RCldZa8iCNMnPlVnxt2JJq2SQEqWls0= -github.com/visualfc/gotools v1.1.0/go.mod h1:2v+PW2aVfSHAyGN/K6YY+0USyWUDHM6m1rt814MaOhc= -github.com/visualfc/gotools v1.2.0 h1:58GKKJvO4LOcFfh/HL8STJrKNabzH4JRbNZNvnOvjlk= -github.com/visualfc/gotools v1.2.0/go.mod h1:TMYm8wb8oTdahzzJ9fp5+SprhE4wIMK/RwpTbOayrgo= +github.com/visualfc/fastmod v1.3.2 h1:epzPttZQB6zsll9g16s2s0TidibhYDRJOz9nin1jwWc= +github.com/visualfc/fastmod v1.3.2/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= +github.com/visualfc/gotools v1.3.1 h1:z09QKzE/lqfAy8VbH4dVlL/MHD1wbSuzNrDJRUbs9Hw= +github.com/visualfc/gotools v1.3.1/go.mod h1:bbHS1nLej89V5I+L1remNDfOlkje5qEaEN4rMnJo+wE= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= -golang.org/x/arch v0.0.0-20171004143515-077ac972c2e4/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= -golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= @@ -72,9 +47,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY= -golang.org/x/tools v0.0.0-20190710184609-286818132824/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 h1:gkI/wGGwpcG5W4hLCzZNGxA4wzWBGGDStRI1MrjDl2Q= @@ -89,6 +61,5 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index 037dc321..d25cffa5 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -326,7 +326,7 @@ func (p *Package) LocalImportList(skipcmd bool) []string { if skipcmd && pkg.IsCommand() { continue } - ar = append(ar, pkg.ImportPath) + ar = append(ar, path.Join(p.Root.path, pkg.Dir[len(p.Root.fdir):])) } } return ar diff --git a/vendor/github.com/visualfc/fastmod/go.mod b/vendor/github.com/visualfc/fastmod/go.mod index b0c86e2c..db7bf814 100644 --- a/vendor/github.com/visualfc/fastmod/go.mod +++ b/vendor/github.com/visualfc/fastmod/go.mod @@ -1,5 +1,5 @@ module github.com/visualfc/fastmod -go 1.12 +go 1.13 require golang.org/x/mod v0.2.0 diff --git a/vendor/modules.txt b/vendor/modules.txt index df37a6d4..7a8fee07 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ -# github.com/visualfc/fastmod v1.2.1 +# github.com/visualfc/fastmod v1.3.2 github.com/visualfc/fastmod -# github.com/visualfc/gotools v1.2.0 +# github.com/visualfc/gotools v1.3.1 github.com/visualfc/gotools/pkg/buildctx github.com/visualfc/gotools/pkg/command github.com/visualfc/gotools/pkg/pkgutil From 40ca1c8bbafe4b288771c2f4f74059fa4cca648a Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 12 May 2020 22:48:16 +0800 Subject: [PATCH 080/133] fix cursor_in func block rbrace=0 on Go1.14 --- autocompletefile.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/autocompletefile.go b/autocompletefile.go index f7c2bf1d..e8d72ab4 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -127,10 +127,6 @@ func (f *auto_complete_file) process_data(data []byte, ctx *auto_complete_contex func (f *auto_complete_file) process_decl_locals(decl ast.Decl) { switch t := decl.(type) { case *ast.FuncDecl: - // hack fix rbrace bug in Go 1.14 - if t.Body.Rbrace < t.Body.Lbrace { - t.Body.Rbrace = t.Body.End() - 1 - } if f.cursor_in(t.Body) { s := f.scope f.scope = new_scope(f.scope) @@ -432,7 +428,13 @@ func (f *auto_complete_file) cursor_in(block *ast.BlockStmt) bool { return false } - if f.cursor > f.offset(block.Lbrace) && f.cursor <= f.offset(block.Rbrace) { + // fix block.Rbrace=0 in Go1.14 + end := block.Rbrace + if end < block.Lbrace { + end = block.End() - 1 + } + + if f.cursor > f.offset(block.Lbrace) && f.cursor <= f.offset(end) { return true } return false From 2e945ad1f2a30bc6a32f9d1895f9d45e26eeeb4c Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 14 May 2020 16:13:36 +0800 Subject: [PATCH 081/133] update fastmod v1.3.5 --- go.mod | 2 +- go.sum | 8 ++++---- vendor/github.com/visualfc/fastmod/fastmod.go | 12 +++++++++--- vendor/modules.txt | 4 ++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 4aec099c..47119ea9 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.1 + github.com/visualfc/gotools v1.3.2 golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 ) diff --git a/go.sum b/go.sum index 4fd4e47c..182e4760 100644 --- a/go.sum +++ b/go.sum @@ -24,10 +24,10 @@ github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJa github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/visualfc/fastmod v1.3.2 h1:epzPttZQB6zsll9g16s2s0TidibhYDRJOz9nin1jwWc= -github.com/visualfc/fastmod v1.3.2/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= -github.com/visualfc/gotools v1.3.1 h1:z09QKzE/lqfAy8VbH4dVlL/MHD1wbSuzNrDJRUbs9Hw= -github.com/visualfc/gotools v1.3.1/go.mod h1:bbHS1nLej89V5I+L1remNDfOlkje5qEaEN4rMnJo+wE= +github.com/visualfc/fastmod v1.3.5 h1:MmgLQB+v/mvp63bFvG/62OBgwK5Ox+xrno9+IDudDsk= +github.com/visualfc/fastmod v1.3.5/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= +github.com/visualfc/gotools v1.3.2 h1:D+z5faes56giBFbJ73K4Jxtzl+DFSmYl89cKuO6EKAo= +github.com/visualfc/gotools v1.3.2/go.mod h1:sJlVum8XguTRRyWbnxvbG8v+tp7OUvQKxvBn45EBcnU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index d25cffa5..aebe1c8d 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -230,7 +230,8 @@ func (p *Package) Node() *Node { func (p *Package) load(node *Node) { for _, v := range node.Mods { var fmod string - if strings.HasPrefix(v.VersionPath(), "./") { + if strings.HasPrefix(v.VersionPath(), "./") || + strings.HasPrefix(v.VersionPath(), "../") { fmod = filepath.Join(node.ModDir(), v.VersionPath(), "go.mod") } else { fmod = filepath.Join(filepath.Join(p.pkgModPath, v.EncodeVersionPath()), "go.mod") @@ -262,10 +263,14 @@ func (p *Package) lookup(node *Node, pkg string) (path string, dir string, typ P return } +func (p *Package) IsStd() bool { + return p.isStd +} + func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { if p.isStd { for _, m := range p.Root.Mods { - if m.Require.Path == pkg { + if strings.HasPrefix(pkg, m.Require.Path) { vpath := filepath.Join(p.Root.fdir, "vendor", pkg) return pkg, vpath, PkgTypeVendor } @@ -326,7 +331,8 @@ func (p *Package) LocalImportList(skipcmd bool) []string { if skipcmd && pkg.IsCommand() { continue } - ar = append(ar, path.Join(p.Root.path, pkg.Dir[len(p.Root.fdir):])) + dir := filepath.Join(p.Root.path, pkg.Dir[len(p.Root.fdir):]) + ar = append(ar, filepath.ToSlash(dir)) } } return ar diff --git a/vendor/modules.txt b/vendor/modules.txt index 7a8fee07..2aa3670c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ -# github.com/visualfc/fastmod v1.3.2 +# github.com/visualfc/fastmod v1.3.5 github.com/visualfc/fastmod -# github.com/visualfc/gotools v1.3.1 +# github.com/visualfc/gotools v1.3.2 github.com/visualfc/gotools/pkg/buildctx github.com/visualfc/gotools/pkg/command github.com/visualfc/gotools/pkg/pkgutil From e7ac60dfa6a2f8cf1c77f8896b2b9ab3ff3b1a9a Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 17 May 2020 16:53:26 +0800 Subject: [PATCH 082/133] fix find_child_and_in_embedded is_alias --- decl.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/decl.go b/decl.go index 98b6b5da..3f6b9463 100644 --- a/decl.go +++ b/decl.go @@ -598,6 +598,10 @@ func lookup_pkg(tp type_path, scope *scope) string { } func type_to_decl(t ast.Expr, scope *scope) *decl { + if t == nil { + //TODO + return nil + } tp := get_type_path(t) d := lookup_path(tp, scope) if d != nil && d.class == decl_var { @@ -1043,6 +1047,11 @@ func (d *decl) find_child_and_in_embedded(name string) *decl { if d == nil { return nil } + if d.is_alias() { + if dd := d.type_dealias(); dd != nil { + return dd.find_child_and_in_embedded(name) + } + } if d.is_visited() { return nil From a8c0af008930adfc8cab64dd7f8ef99806bc0274 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 28 May 2020 14:04:50 +0800 Subject: [PATCH 083/133] update fastmod v1.3.6 --- go.mod | 3 ++- go.sum | 4 ++++ vendor/github.com/visualfc/fastmod/fastmod.go | 18 +++++++++++++----- vendor/modules.txt | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 47119ea9..399d9ecc 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.2 + github.com/visualfc/fastmod v1.3.6 // indirect + github.com/visualfc/gotools v1.3.3 golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 ) diff --git a/go.sum b/go.sum index 182e4760..794fd124 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/visualfc/fastmod v1.3.5 h1:MmgLQB+v/mvp63bFvG/62OBgwK5Ox+xrno9+IDudDsk= github.com/visualfc/fastmod v1.3.5/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= +github.com/visualfc/fastmod v1.3.6 h1:gFvAxk6VoEbk0JF1XP0KznbQl5hYJN9ZYhRYQy3pcKs= +github.com/visualfc/fastmod v1.3.6/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= github.com/visualfc/gotools v1.3.2 h1:D+z5faes56giBFbJ73K4Jxtzl+DFSmYl89cKuO6EKAo= github.com/visualfc/gotools v1.3.2/go.mod h1:sJlVum8XguTRRyWbnxvbG8v+tp7OUvQKxvBn45EBcnU= +github.com/visualfc/gotools v1.3.3 h1:5EkS2nIbiwRBGsQbO2o7POWLF9FbsqlcmuT6VEQd9Ns= +github.com/visualfc/gotools v1.3.3/go.mod h1:2Y5nz9DWmCFajE136ltyT0RWNvZ+9hBYsfnBIlxeHRk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go index aebe1c8d..a0c26513 100644 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ b/vendor/github.com/visualfc/fastmod/fastmod.go @@ -167,8 +167,12 @@ func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { if path == "" { return "", "", PkgTypeNil } - if strings.HasPrefix(path, "./") || strings.HasPrefix(path, "../") { - return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod + if modfile.IsDirectoryPath(path) { + if filepath.IsAbs(path) { + return pkg, path, PkgTypeLocalMod + } else { + return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod + } } return pkg, filepath.Join(m.pkgModPath, encpath), PkgTypeDepMod } @@ -230,9 +234,13 @@ func (p *Package) Node() *Node { func (p *Package) load(node *Node) { for _, v := range node.Mods { var fmod string - if strings.HasPrefix(v.VersionPath(), "./") || - strings.HasPrefix(v.VersionPath(), "../") { - fmod = filepath.Join(node.ModDir(), v.VersionPath(), "go.mod") + vpath := v.VersionPath() + if modfile.IsDirectoryPath(vpath) { + if filepath.IsAbs(vpath) { + fmod = filepath.Join(vpath, "go.mod") + } else { + fmod = filepath.Join(node.fdir, vpath, "go.mod") + } } else { fmod = filepath.Join(filepath.Join(p.pkgModPath, v.EncodeVersionPath()), "go.mod") } diff --git a/vendor/modules.txt b/vendor/modules.txt index 2aa3670c..c40c34ac 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/visualfc/fastmod v1.3.5 +# github.com/visualfc/fastmod v1.3.6 github.com/visualfc/fastmod # github.com/visualfc/gotools v1.3.2 github.com/visualfc/gotools/pkg/buildctx From 8cbede95a18632b43d506b42141310fcd79295b9 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 30 Oct 2020 20:42:35 +0800 Subject: [PATCH 084/133] fix go build -mod=vendor --- vendor/modules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/modules.txt b/vendor/modules.txt index c40c34ac..49b498ad 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ # github.com/visualfc/fastmod v1.3.6 github.com/visualfc/fastmod -# github.com/visualfc/gotools v1.3.2 +# github.com/visualfc/gotools v1.3.3 github.com/visualfc/gotools/pkg/buildctx github.com/visualfc/gotools/pkg/command github.com/visualfc/gotools/pkg/pkgutil From cfcb188102aebc1200266cea6bd64668f61ebb86 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 23 Feb 2021 17:39:31 +0800 Subject: [PATCH 085/133] x --- go.mod | 5 +- go.sum | 77 +- vendor/github.com/visualfc/fastmod/LICENSE | 28 - vendor/github.com/visualfc/fastmod/README.md | 11 - vendor/github.com/visualfc/fastmod/fastmod.go | 414 - vendor/github.com/visualfc/fastmod/go.mod | 5 - vendor/github.com/visualfc/fastmod/go.sum | 16 - .../github.com/visualfc/fastmod/pkgindex.go | 149 - vendor/github.com/visualfc/gotools/LICENSE | 28 - .../visualfc/gotools/pkg/buildctx/context.go | 55 - .../visualfc/gotools/pkg/command/command.go | 317 - .../visualfc/gotools/pkg/command/version.go | 33 - .../visualfc/gotools/pkg/pkgutil/pkgutil.go | 240 - .../visualfc/gotools/pkg/stdlib/go13.go | 19 - .../visualfc/gotools/pkg/stdlib/go14.go | 19 - .../visualfc/gotools/pkg/stdlib/pkglist.go | 59 - .../visualfc/gotools/pkg/stdlib/zstdlib.go | 10121 ---------------- .../github.com/visualfc/gotools/pkgs/pkgs.go | 389 - .../visualfc/gotools/types/types.go | 2080 ---- vendor/golang.org/x/mod/LICENSE | 27 - vendor/golang.org/x/mod/PATENTS | 22 - .../x/mod/internal/lazyregexp/lazyre.go | 78 - vendor/golang.org/x/mod/modfile/print.go | 165 - vendor/golang.org/x/mod/modfile/read.go | 909 -- vendor/golang.org/x/mod/modfile/rule.go | 776 -- vendor/golang.org/x/mod/module/module.go | 718 -- vendor/golang.org/x/mod/semver/semver.go | 388 - vendor/golang.org/x/tools/AUTHORS | 3 - vendor/golang.org/x/tools/CONTRIBUTORS | 3 - vendor/golang.org/x/tools/LICENSE | 27 - vendor/golang.org/x/tools/PATENTS | 22 - .../x/tools/go/ast/astutil/enclosing.go | 627 - .../x/tools/go/ast/astutil/imports.go | 482 - .../x/tools/go/ast/astutil/rewrite.go | 477 - .../golang.org/x/tools/go/ast/astutil/util.go | 14 - .../x/tools/go/buildutil/allpackages.go | 198 - .../x/tools/go/buildutil/fakecontext.go | 109 - .../x/tools/go/buildutil/overlay.go | 103 - .../golang.org/x/tools/go/buildutil/tags.go | 75 - .../golang.org/x/tools/go/buildutil/util.go | 212 - .../x/tools/go/gcexportdata/gcexportdata.go | 109 - .../x/tools/go/gcexportdata/importer.go | 73 - .../golang.org/x/tools/go/internal/cgo/cgo.go | 220 - .../x/tools/go/internal/cgo/cgo_pkgconfig.go | 39 - .../x/tools/go/internal/gcimporter/bexport.go | 852 -- .../x/tools/go/internal/gcimporter/bimport.go | 1039 -- .../go/internal/gcimporter/exportdata.go | 93 - .../go/internal/gcimporter/gcimporter.go | 1078 -- .../x/tools/go/internal/gcimporter/iexport.go | 739 -- .../x/tools/go/internal/gcimporter/iimport.go | 630 - .../go/internal/gcimporter/newInterface10.go | 21 - .../go/internal/gcimporter/newInterface11.go | 13 - vendor/golang.org/x/tools/go/loader/doc.go | 204 - vendor/golang.org/x/tools/go/loader/loader.go | 1086 -- vendor/golang.org/x/tools/go/loader/util.go | 124 - vendor/golang.org/x/xerrors/LICENSE | 27 - vendor/golang.org/x/xerrors/PATENTS | 22 - vendor/golang.org/x/xerrors/README | 2 - vendor/golang.org/x/xerrors/adaptor.go | 193 - vendor/golang.org/x/xerrors/codereview.cfg | 1 - vendor/golang.org/x/xerrors/doc.go | 22 - vendor/golang.org/x/xerrors/errors.go | 33 - vendor/golang.org/x/xerrors/fmt.go | 187 - vendor/golang.org/x/xerrors/format.go | 34 - vendor/golang.org/x/xerrors/frame.go | 56 - vendor/golang.org/x/xerrors/go.mod | 3 - .../golang.org/x/xerrors/internal/internal.go | 8 - vendor/golang.org/x/xerrors/wrap.go | 106 - vendor/modules.txt | 24 - 69 files changed, 23 insertions(+), 26515 deletions(-) delete mode 100644 vendor/github.com/visualfc/fastmod/LICENSE delete mode 100644 vendor/github.com/visualfc/fastmod/README.md delete mode 100644 vendor/github.com/visualfc/fastmod/fastmod.go delete mode 100644 vendor/github.com/visualfc/fastmod/go.mod delete mode 100644 vendor/github.com/visualfc/fastmod/go.sum delete mode 100644 vendor/github.com/visualfc/fastmod/pkgindex.go delete mode 100644 vendor/github.com/visualfc/gotools/LICENSE delete mode 100644 vendor/github.com/visualfc/gotools/pkg/buildctx/context.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/command/command.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/command/version.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go delete mode 100644 vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go delete mode 100644 vendor/github.com/visualfc/gotools/pkgs/pkgs.go delete mode 100644 vendor/github.com/visualfc/gotools/types/types.go delete mode 100644 vendor/golang.org/x/mod/LICENSE delete mode 100644 vendor/golang.org/x/mod/PATENTS delete mode 100644 vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go delete mode 100644 vendor/golang.org/x/mod/modfile/print.go delete mode 100644 vendor/golang.org/x/mod/modfile/read.go delete mode 100644 vendor/golang.org/x/mod/modfile/rule.go delete mode 100644 vendor/golang.org/x/mod/module/module.go delete mode 100644 vendor/golang.org/x/mod/semver/semver.go delete mode 100644 vendor/golang.org/x/tools/AUTHORS delete mode 100644 vendor/golang.org/x/tools/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/tools/LICENSE delete mode 100644 vendor/golang.org/x/tools/PATENTS delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/enclosing.go delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/imports.go delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/rewrite.go delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/util.go delete mode 100644 vendor/golang.org/x/tools/go/buildutil/allpackages.go delete mode 100644 vendor/golang.org/x/tools/go/buildutil/fakecontext.go delete mode 100644 vendor/golang.org/x/tools/go/buildutil/overlay.go delete mode 100644 vendor/golang.org/x/tools/go/buildutil/tags.go delete mode 100644 vendor/golang.org/x/tools/go/buildutil/util.go delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/importer.go delete mode 100644 vendor/golang.org/x/tools/go/internal/cgo/cgo.go delete mode 100644 vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go delete mode 100644 vendor/golang.org/x/tools/go/loader/doc.go delete mode 100644 vendor/golang.org/x/tools/go/loader/loader.go delete mode 100644 vendor/golang.org/x/tools/go/loader/util.go delete mode 100644 vendor/golang.org/x/xerrors/LICENSE delete mode 100644 vendor/golang.org/x/xerrors/PATENTS delete mode 100644 vendor/golang.org/x/xerrors/README delete mode 100644 vendor/golang.org/x/xerrors/adaptor.go delete mode 100644 vendor/golang.org/x/xerrors/codereview.cfg delete mode 100644 vendor/golang.org/x/xerrors/doc.go delete mode 100644 vendor/golang.org/x/xerrors/errors.go delete mode 100644 vendor/golang.org/x/xerrors/fmt.go delete mode 100644 vendor/golang.org/x/xerrors/format.go delete mode 100644 vendor/golang.org/x/xerrors/frame.go delete mode 100644 vendor/golang.org/x/xerrors/go.mod delete mode 100644 vendor/golang.org/x/xerrors/internal/internal.go delete mode 100644 vendor/golang.org/x/xerrors/wrap.go delete mode 100644 vendor/modules.txt diff --git a/go.mod b/go.mod index 399d9ecc..4e39d184 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/fastmod v1.3.6 // indirect - github.com/visualfc/gotools v1.3.3 - golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 + github.com/visualfc/gotools v1.3.4 + golang.org/x/tools v0.1.0 ) diff --git a/go.sum b/go.sum index 794fd124..5b40181e 100644 --- a/go.sum +++ b/go.sum @@ -1,69 +1,34 @@ -github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= -github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-delve/delve v1.4.0/go.mod h1:gQM0ReOJLNAvPuKAXfjHngtE93C2yc/ekTbo7YbAHSo= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/visualfc/fastmod v1.3.5 h1:MmgLQB+v/mvp63bFvG/62OBgwK5Ox+xrno9+IDudDsk= -github.com/visualfc/fastmod v1.3.5/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= -github.com/visualfc/fastmod v1.3.6 h1:gFvAxk6VoEbk0JF1XP0KznbQl5hYJN9ZYhRYQy3pcKs= -github.com/visualfc/fastmod v1.3.6/go.mod h1:IpOumy9gVomQ72T+yA7gayE3V1FCNlwr6if3mlqnasY= -github.com/visualfc/gotools v1.3.2 h1:D+z5faes56giBFbJ73K4Jxtzl+DFSmYl89cKuO6EKAo= -github.com/visualfc/gotools v1.3.2/go.mod h1:sJlVum8XguTRRyWbnxvbG8v+tp7OUvQKxvBn45EBcnU= -github.com/visualfc/gotools v1.3.3 h1:5EkS2nIbiwRBGsQbO2o7POWLF9FbsqlcmuT6VEQd9Ns= -github.com/visualfc/gotools v1.3.3/go.mod h1:2Y5nz9DWmCFajE136ltyT0RWNvZ+9hBYsfnBIlxeHRk= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= -golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= +github.com/visualfc/fastmod v1.3.7 h1:ITUMsKz0Kj0Qu0i8hUuW89xNQxn8GF+L6a2/OBFwXkM= +github.com/visualfc/fastmod v1.3.7/go.mod h1:JANyMjj5gFPsnwOMg9fFs21GR8mGS6dm8dYCaQ1zrJU= +github.com/visualfc/gotools v1.3.4 h1:WS0cwIsIyJpMy17RXFK7a7b9tqyeL/wcELGdKsUrzOA= +github.com/visualfc/gotools v1.3.4/go.mod h1:bmLKjKD3ZCnAV4WKKWiMUgYVnfZYoPq193egahhrNeI= +github.com/visualfc/goversion v1.0.1/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 h1:gkI/wGGwpcG5W4hLCzZNGxA4wzWBGGDStRI1MrjDl2Q= -golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/visualfc/fastmod/LICENSE b/vendor/github.com/visualfc/fastmod/LICENSE deleted file mode 100644 index ca2493d5..00000000 --- a/vendor/github.com/visualfc/fastmod/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2011-2017, visualfc -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of gotools nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/visualfc/fastmod/README.md b/vendor/github.com/visualfc/fastmod/README.md deleted file mode 100644 index 6817c373..00000000 --- a/vendor/github.com/visualfc/fastmod/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Fast parse Go modules - - go get github.com/visualfc/fastmod - -Usages: - - pkg, err := fastmod.LoadPackage(dir, &build.Default) - if err != nil { - return - } - path, dir, typ := pkg.Lookup(pkg) \ No newline at end of file diff --git a/vendor/github.com/visualfc/fastmod/fastmod.go b/vendor/github.com/visualfc/fastmod/fastmod.go deleted file mode 100644 index a0c26513..00000000 --- a/vendor/github.com/visualfc/fastmod/fastmod.go +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright 2018 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// - -package fastmod - -import ( - "go/build" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "strings" - - "golang.org/x/mod/modfile" - "golang.org/x/mod/module" -) - -func fixVersion(path, vers string) (string, error) { - return vers, nil -} - -func LookupModFile(dir string) (string, error) { - command := exec.Command("go", "env", "GOMOD") - command.Dir = dir - data, err := command.Output() - if err != nil { - return "", err - } - fpath := strings.TrimSpace(string(data)) - if strings.HasSuffix(fpath, ".mod") { - return fpath, nil - } - return "", nil -} - -type ModuleList struct { - pkgModPath string - Modules map[string]*Module -} - -func NewModuleList(ctx *build.Context) *ModuleList { - pkgModPath := GetPkgModPath(ctx) - return &ModuleList{pkgModPath, make(map[string]*Module)} -} - -type Version struct { - Path string - Version string -} - -type Mod struct { - Require *Version - Replace *Version -} - -func (m *Mod) VersionPath() string { - v := m.Require - if m.Replace != nil { - v = m.Replace - } - if v.Version != "" { - return v.Path + "@" + v.Version - } - return v.Path -} - -func (m *Mod) EncodeVersionPath() string { - v := m.Require - if m.Replace != nil { - v = m.Replace - } - if strings.HasPrefix(v.Path, "./") { - return v.Path - } - path, _ := module.EscapePath(v.Path) - if v.Version != "" { - return path + "@" + v.Version - } - return path -} - -type Module struct { - pkgModPath string - f *modfile.File - ftime int64 - path string - fmod string - fdir string - Mods []*Mod -} - -func (m *Module) init() { - rused := make(map[int]bool) - for _, r := range m.f.Require { - mod := &Mod{Require: &Version{r.Mod.Path, r.Mod.Version}} - for i, v := range m.f.Replace { - if r.Mod.Path == v.Old.Path && (v.Old.Version == "" || v.Old.Version == r.Mod.Version) { - mod.Replace = &Version{v.New.Path, v.New.Version} - rused[i] = true - break - } - } - m.Mods = append(m.Mods, mod) - } - for i, v := range m.f.Replace { - if rused[i] { - continue - } - mod := &Mod{Require: &Version{v.Old.Path, v.Old.Version}, Replace: &Version{v.New.Path, v.New.Version}} - m.Mods = append(m.Mods, mod) - } -} - -func (m *Module) Path() string { - return m.f.Module.Mod.Path -} - -func (m *Module) ModFile() string { - return m.fmod -} - -func (m *Module) ModDir() string { - return m.fdir -} - -type PkgType int - -const ( - PkgTypeNil PkgType = iota - PkgTypeGoroot // goroot pkg - PkgTypeGopath // gopath pkg - PkgTypeMod // mod pkg - PkgTypeLocal // mod pkg sub local - PkgTypeLocalMod // mod pkg sub local mod - PkgTypeDepMod // mod pkg dep gopath/pkg/mod - PkgTypeVendor -) - -func (m *Module) Lookup(pkg string) (path string, dir string, typ PkgType) { - if pkg == m.path { - return m.path, m.fdir, PkgTypeMod - } - if strings.HasPrefix(pkg, m.path+"/") { - return pkg, filepath.Join(m.fdir, pkg[len(m.path+"/"):]), PkgTypeLocal - } - var encpath string - // match full version, github.com/my/mypkg/v2 - for _, r := range m.Mods { - if r.Require.Path == pkg { - path = r.VersionPath() - encpath = r.EncodeVersionPath() - } - } - // match sub dir, github.com/my/mypkg/sub - if path == "" { - for _, r := range m.Mods { - if strings.HasPrefix(pkg, r.Require.Path+"/") { - path = r.VersionPath() + pkg[len(r.Require.Path):] - encpath = r.EncodeVersionPath() + pkg[len(r.Require.Path):] - break - } - } - } - if path == "" { - return "", "", PkgTypeNil - } - if modfile.IsDirectoryPath(path) { - if filepath.IsAbs(path) { - return pkg, path, PkgTypeLocalMod - } else { - return pkg, filepath.Join(m.fdir, path), PkgTypeLocalMod - } - } - return pkg, filepath.Join(m.pkgModPath, encpath), PkgTypeDepMod -} - -func (mc *ModuleList) LoadModule(dir string) (*Module, error) { - fmod, err := LookupModFile(dir) - if err != nil { - return nil, err - } - if fmod == "" { - return nil, nil - } - return mc.LoadModuleFile(fmod) -} - -func (mc *ModuleList) LoadModuleFile(fmod string) (*Module, error) { - info, err := os.Stat(fmod) - if err != nil { - return nil, err - } - if m, ok := mc.Modules[fmod]; ok { - if m.ftime == info.ModTime().UnixNano() { - return m, nil - } - } - data, err := ioutil.ReadFile(fmod) - if err != nil { - return nil, err - } - f, err := modfile.Parse(fmod, data, fixVersion) - if err != nil { - return nil, err - } - m := &Module{mc.pkgModPath, f, info.ModTime().UnixNano(), f.Module.Mod.Path, fmod, filepath.Dir(fmod), nil} - m.init() - mc.Modules[fmod] = m - return m, nil -} - -type Node struct { - *Module - Parent *Node - Children []*Node -} - -type Package struct { - ctx *build.Context - pkgModPath string - ModList *ModuleList - Root *Node - NodeMap map[string]*Node - isStd bool -} - -func (p *Package) Node() *Node { - return p.Root -} - -func (p *Package) load(node *Node) { - for _, v := range node.Mods { - var fmod string - vpath := v.VersionPath() - if modfile.IsDirectoryPath(vpath) { - if filepath.IsAbs(vpath) { - fmod = filepath.Join(vpath, "go.mod") - } else { - fmod = filepath.Join(node.fdir, vpath, "go.mod") - } - } else { - fmod = filepath.Join(filepath.Join(p.pkgModPath, v.EncodeVersionPath()), "go.mod") - } - m, err := p.ModList.LoadModuleFile(fmod) - if err != nil { - continue - } - child := &Node{m, node, nil} - node.Children = append(node.Children, child) - if _, ok := p.NodeMap[m.fdir]; !ok { - p.NodeMap[m.fdir] = child - p.load(child) - } - } -} - -func (p *Package) lookup(node *Node, pkg string) (path string, dir string, typ PkgType) { - path, dir, typ = node.Lookup(pkg) - if dir != "" { - return - } - for _, child := range node.Children { - path, dir, typ = p.lookup(child, pkg) - if dir != "" { - break - } - } - return -} - -func (p *Package) IsStd() bool { - return p.isStd -} - -func (p *Package) Lookup(pkg string) (path string, dir string, typ PkgType) { - if p.isStd { - for _, m := range p.Root.Mods { - if strings.HasPrefix(pkg, m.Require.Path) { - vpath := filepath.Join(p.Root.fdir, "vendor", pkg) - return pkg, vpath, PkgTypeVendor - } - } - } - return p.lookup(p.Root, pkg) -} - -func (p *Package) DepImportList(skipcmd bool, chkmodsub bool) []string { - if p.ModList == nil { - return nil - } - var ar []string - pathMap := make(map[string]bool) - for _, m := range p.ModList.Modules { - for _, mod := range m.Mods { - cpath, dir, typ := p.Lookup(mod.Require.Path) - ar = append(ar, cpath) - if !chkmodsub { - continue - } - if pathMap[mod.Require.Path] { - continue - } - pathMap[mod.Require.Path] = true - var relpath string - switch typ { - case PkgTypeLocalMod: - relpath = dir - case PkgTypeDepMod: - relpath = filepath.Join(p.pkgModPath, dir) - default: - continue - } - var pkgs PathPkgsIndex - pkgs.LoadIndex(*p.ctx, relpath) - pkgs.Sort() - for _, index := range pkgs.Indexs { - for _, pkg := range index.Pkgs { - if skipcmd && pkg.IsCommand() { - continue - } - ar = append(ar, path.Join(mod.Require.Path, pkg.ImportPath)) - } - } - } - } - return ar -} - -func (p *Package) LocalImportList(skipcmd bool) []string { - var pkgs PathPkgsIndex - pkgs.LoadIndex(*p.ctx, p.Root.fdir) - pkgs.Sort() - var ar []string - for _, index := range pkgs.Indexs { - for _, pkg := range index.Pkgs { - if skipcmd && pkg.IsCommand() { - continue - } - dir := filepath.Join(p.Root.path, pkg.Dir[len(p.Root.fdir):]) - ar = append(ar, filepath.ToSlash(dir)) - } - } - return ar -} - -func GetPkgModPath(ctx *build.Context) string { - if list := filepath.SplitList(ctx.GOPATH); len(list) > 0 && list[0] != "" { - return filepath.Join(list[0], "pkg/mod") - } - return "" -} - -func LoadPackage(dir string, ctx *build.Context) (*Package, error) { - fmod, err := LookupModFile(dir) - if err != nil { - return nil, err - } - if fmod == "" { - return nil, nil - } - ml := NewModuleList(ctx) - m, err := ml.LoadModuleFile(fmod) - if err != nil { - return nil, err - } - node := &Node{m, nil, nil} - pkgmpath := GetPkgModPath(ctx) - p := &Package{ctx, pkgmpath, ml, node, make(map[string]*Node), false} - p.NodeMap[m.fdir] = node - p.load(p.Root) - return p, nil -} - -func NewPackage(ctx *build.Context) *Package { - return &Package{ - ctx: ctx, - pkgModPath: GetPkgModPath(ctx), - } -} - -func (p *Package) Clear() { - p.ModList = NewModuleList(p.ctx) - p.Root = nil - p.NodeMap = make(map[string]*Node) -} - -func (p *Package) LoadModule(dir string) (err error) { - p.Clear() - fmod, err := LookupModFile(dir) - if err != nil { - return err - } - if fmod == "" { - return nil - } - m, err := p.ModList.LoadModuleFile(fmod) - if err != nil { - return err - } - p.Root = &Node{m, nil, nil} - p.NodeMap[m.fdir] = p.Root - if m.path == "std" && filepath.Join(p.ctx.GOROOT, "src") == m.fdir { - p.isStd = true - } - p.load(p.Root) - return nil -} - -func (p *Package) IsValid() bool { - return p.Root != nil -} diff --git a/vendor/github.com/visualfc/fastmod/go.mod b/vendor/github.com/visualfc/fastmod/go.mod deleted file mode 100644 index db7bf814..00000000 --- a/vendor/github.com/visualfc/fastmod/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/visualfc/fastmod - -go 1.13 - -require golang.org/x/mod v0.2.0 diff --git a/vendor/github.com/visualfc/fastmod/go.sum b/vendor/github.com/visualfc/fastmod/go.sum deleted file mode 100644 index 2f5e80d6..00000000 --- a/vendor/github.com/visualfc/fastmod/go.sum +++ /dev/null @@ -1,16 +0,0 @@ -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/visualfc/fastmod/pkgindex.go b/vendor/github.com/visualfc/fastmod/pkgindex.go deleted file mode 100644 index 163ac51d..00000000 --- a/vendor/github.com/visualfc/fastmod/pkgindex.go +++ /dev/null @@ -1,149 +0,0 @@ -package fastmod - -import ( - "fmt" - "go/build" - "os" - "path/filepath" - "sort" - "strings" - "sync" -) - -type PathPkgsIndex struct { - Indexs []*PkgsIndex -} - -func (p *PathPkgsIndex) LoadIndex(context build.Context, srcDirs ...string) { - var wg sync.WaitGroup - - for _, path := range srcDirs { - pi := &PkgsIndex{} - p.Indexs = append(p.Indexs, pi) - pkgsGate.enter() - f, err := os.Open(path) - if err != nil { - pkgsGate.leave() - //fmt.Fprintln(os.Stderr, err) - continue - } - children, err := f.Readdir(-1) - f.Close() - pkgsGate.leave() - if err != nil { - fmt.Fprint(os.Stderr, err) - continue - } - for _, child := range children { - if child.IsDir() { - wg.Add(1) - go func(path, name string) { - defer wg.Done() - pi.loadPkgsPath(&wg, path, name) - }(path, child.Name()) - } - } - } - wg.Wait() -} - -func (p *PathPkgsIndex) Sort() { - for _, v := range p.Indexs { - v.sort() - } -} - -type PkgsIndex struct { - sync.Mutex - Pkgs []*build.Package -} - -func (p *PkgsIndex) sort() { - sort.Sort(PkgSlice(p.Pkgs)) -} - -type PkgSlice []*build.Package - -func (p PkgSlice) Len() int { - return len([]*build.Package(p)) -} - -func (p PkgSlice) Less(i, j int) bool { - if p[i].IsCommand() && !p[j].IsCommand() { - return true - } else if !p[i].IsCommand() && p[j].IsCommand() { - return false - } - return p[i].ImportPath < p[j].ImportPath -} - -func (p PkgSlice) Swap(i, j int) { - p[i], p[j] = p[j], p[i] -} - -// pkgsgate protects the OS & filesystem from too much concurrency. -// Too much disk I/O -> too many threads -> swapping and bad scheduling. -// gate is a semaphore for limiting concurrency. -type gate chan struct{} - -func (g gate) enter() { g <- struct{}{} } -func (g gate) leave() { <-g } - -var pkgsGate = make(gate, 8) - -func (p *PkgsIndex) loadPkgsPath(wg *sync.WaitGroup, root, pkgrelpath string) { - importpath := filepath.ToSlash(pkgrelpath) - dir := filepath.Join(root, importpath) - - pkgsGate.enter() - defer pkgsGate.leave() - pkgDir, err := os.Open(dir) - if err != nil { - return - } - children, err := pkgDir.Readdir(-1) - pkgDir.Close() - if err != nil { - return - } - // hasGo tracks whether a directory actually appears to be a - // Go source code directory. If $GOPATH == $HOME, and - // $HOME/src has lots of other large non-Go projects in it, - // then the calls to importPathToName below can be expensive. - hasGo := false - for _, child := range children { - name := child.Name() - if name == "" { - continue - } - if c := name[0]; c == '.' || ('0' <= c && c <= '9') { - continue - } - if strings.HasSuffix(name, ".go") { - hasGo = true - } - if child.IsDir() { - if strings.HasPrefix(name, ".") || strings.HasPrefix(name, "_") || name == "testdata" { - continue - } - wg.Add(1) - go func(root, name string) { - defer wg.Done() - p.loadPkgsPath(wg, root, name) - }(root, filepath.Join(importpath, name)) - } - } - if hasGo { - buildPkg, err := build.ImportDir(dir, 0) - if err == nil { - if buildPkg.ImportPath == "." { - buildPkg.ImportPath = filepath.ToSlash(pkgrelpath) - buildPkg.Root = root - buildPkg.Goroot = true - } - p.Lock() - p.Pkgs = append(p.Pkgs, buildPkg) - p.Unlock() - } - } -} diff --git a/vendor/github.com/visualfc/gotools/LICENSE b/vendor/github.com/visualfc/gotools/LICENSE deleted file mode 100644 index ca2493d5..00000000 --- a/vendor/github.com/visualfc/gotools/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2011-2017, visualfc -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of gotools nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go b/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go deleted file mode 100644 index 4fbfe572..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/buildctx/context.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2011-2018 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package buildctx - -import ( - "go/build" - "os" -) - -var ( - fnLookupEnv = os.LookupEnv -) - -func SetLookupEnv(fn func(key string) (string, bool)) { - if fn != nil { - fnLookupEnv = fn - } else { - fnLookupEnv = os.LookupEnv - } -} - -func Default() *build.Context { - return &build.Default -} - -func System() *build.Context { - return NewContext(fnLookupEnv) -} - -func NewContext(env func(key string) (string, bool)) *build.Context { - c := build.Default - if v, ok := env("GOARCH"); ok { - c.GOARCH = v - } - if v, ok := env("GOOS"); ok { - c.GOOS = v - } - if v, ok := env("GOROOT"); ok { - c.GOROOT = v - } - if v, ok := env("GOPATH"); ok { - c.GOPATH = v - } - if v, ok := env("CGO_ENABLED"); ok { - switch v { - case "1": - c.CgoEnabled = true - case "0": - c.CgoEnabled = false - } - } - return &c -} diff --git a/vendor/github.com/visualfc/gotools/pkg/command/command.go b/vendor/github.com/visualfc/gotools/pkg/command/command.go deleted file mode 100644 index 7007d224..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/command/command.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//modify 2013-2014 visualfc - -package command - -import ( - "bytes" - "flag" - "fmt" - "io" - "log" - "os" - "strings" - "text/template" - "unicode" - "unicode/utf8" -) - -// A Command is an implementation of a go command -// like go build or go fix. -type Command struct { - // Run runs the command. - // The args are the arguments after the command name. - Run func(cmd *Command, args []string) error - - // UsageLine is the one-line usage message. - // The first word in the line is taken to be the command name. - UsageLine string - - // Short is the short description shown in the 'go help' output. - Short string - - // Long is the long message shown in the 'go help ' output. - Long string - - // Flag is a set of flags specific to this command. - Flag flag.FlagSet - - // CustomFlags indicates that the command will do its own - // flag parsing. - CustomFlags bool - - Stdin io.Reader - Stdout io.Writer - Stderr io.Writer -} - -// Name returns the command's name: the first word in the usage line. -func (c *Command) Name() string { - name := c.UsageLine - i := strings.Index(name, " ") - if i >= 0 { - name = name[:i] - } - return name -} - -func (c *Command) Usage() { - fmt.Fprintf(c.Stderr, "usage: %s %s\n", AppName, c.UsageLine) - c.Flag.SetOutput(c.Stderr) - c.Flag.PrintDefaults() - //fmt.Fprintf(os.Stderr, "%s\n", strings.TrimSpace(c.Long)) - //os.Exit(2) -} - -func (c *Command) PrintUsage() { - fmt.Fprintf(c.Stderr, "usage: %s %s\n", AppName, c.UsageLine) - c.Flag.SetOutput(c.Stderr) - c.Flag.PrintDefaults() -} - -// Runnable reports whether the command can be run; otherwise -// it is a documentation pseudo-command such as importpath. -func (c *Command) Runnable() bool { - return c.Run != nil -} - -func (c *Command) Println(args ...interface{}) { - fmt.Fprintln(c.Stdout, args...) -} - -func (c *Command) Printf(format string, args ...interface{}) { - fmt.Fprintf(c.Stdout, format, args...) -} - -var commands []*Command - -func Register(cmd *Command) { - commands = append(commands, cmd) -} - -func CommandList() (cmds []string) { - for _, cmd := range commands { - cmds = append(cmds, cmd.Name()) - } - return -} - -var ( - Stdout io.Writer = os.Stdout - Stderr io.Writer = os.Stderr - Stdin io.Reader = os.Stdin -) - -func RunArgs(arguments []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error { - flag.CommandLine.VisitAll(func(f *flag.Flag) { - f.Value.Set(f.DefValue) - }) - flag.CommandLine.Parse(arguments) - args := flag.Args() - if len(args) < 1 { - printUsage(os.Stderr) - return os.ErrInvalid - } - - if len(args) == 1 && strings.TrimSpace(args[0]) == "" { - printUsage(os.Stderr) - return os.ErrInvalid - } - - if args[0] == "help" { - if !help(args[1:]) { - return os.ErrInvalid - } - return nil - } - - for _, cmd := range commands { - if cmd.Name() == args[0] && cmd.Run != nil { - cmd.Flag.VisitAll(func(f *flag.Flag) { - f.Value.Set(f.DefValue) - }) - cmd.Flag.Usage = func() { cmd.Usage() } - cmd.Stdin = stdin - cmd.Stdout = stdout - cmd.Stderr = stderr - if cmd.CustomFlags { - args = args[1:] - } else { - err := cmd.Flag.Parse(args[1:]) - if err != nil { - return err - } - args = cmd.Flag.Args() - } - return cmd.Run(cmd, args) - } - } - - fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n", - AppName, args[0], AppName) - return os.ErrInvalid -} - -func Main() { - flag.Usage = func() { - printUsage(os.Stderr) - } - flag.Parse() - log.SetFlags(0) - - args := flag.Args() - if len(args) < 1 { - flag.Usage() - Exit(2) - } - - if len(args) == 1 && strings.TrimSpace(args[0]) == "" { - flag.Usage() - Exit(2) - } - - if args[0] == "help" { - if !help(args[1:]) { - os.Exit(2) - } - return - } - - for _, cmd := range commands { - if cmd.Name() == args[0] && cmd.Run != nil { - cmd.Stdin = Stdin - cmd.Stdout = Stdout - cmd.Stderr = Stderr - if cmd.CustomFlags { - args = args[1:] - } else { - err := cmd.Flag.Parse(args[1:]) - if err != nil { - Exit(2) - } - args = cmd.Flag.Args() - } - cmd.Flag.Usage = func() { cmd.Usage() } - err := cmd.Run(cmd, args) - if err != nil { - fmt.Fprintln(cmd.Stderr, err) - Exit(2) - } - Exit(0) - return - } - } - - fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n", - AppName, args[0], AppName) - Exit(2) -} - -var AppInfo string = "LiteIDE golang tool." -var AppName string = "tools" - -var usageTemplate = ` -Usage: - - {{AppName}} command [arguments] - -The commands are: -{{range .}}{{if .Runnable}} - {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}} - -Use "{{AppName}} help [command]" for more information about a command. - -Additional help topics: -{{range .}}{{if not .Runnable}} - {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}} - -Use "{{AppName}} help [topic]" for more information about that topic. - -` - -var helpTemplate = `{{if .Runnable}}usage: {{AppName}} {{.UsageLine}} - -{{end}}{{.Long | trim}} -` - -var documentationTemplate = `// -/* -{{range .}}{{if .Short}}{{.Short | capitalize}} - -{{end}}{{if .Runnable}}Usage: - - {{AppName}} {{.UsageLine}} - -{{end}}{{.Long | trim}} - - -{{end}}*/ -package main -` - -// tmpl executes the given template text on data, writing the result to w. -func tmpl(w io.Writer, text string, data interface{}) { - t := template.New("top") - t.Funcs(template.FuncMap{"trim": strings.TrimSpace, "capitalize": capitalize}) - template.Must(t.Parse(text)) - if err := t.Execute(w, data); err != nil { - panic(err) - } -} - -func capitalize(s string) string { - if s == "" { - return s - } - r, n := utf8.DecodeRuneInString(s) - return string(unicode.ToTitle(r)) + s[n:] -} - -func printUsage(w io.Writer) { - if len(AppInfo) > 0 { - fmt.Fprintln(w, AppInfo) - } - tmpl(w, strings.Replace(usageTemplate, "{{AppName}}", AppName, -1), commands) -} - -// help implements the 'help' command. -func help(args []string) bool { - if len(args) == 0 { - printUsage(os.Stdout) - // not exit 2: succeeded at 'go help'. - return true - } - if len(args) != 1 { - fmt.Fprintf(os.Stderr, "usage: %s help command\n\nToo many arguments given.\n", AppName) - return false - } - - arg := args[0] - - // 'go help documentation' generates doc.go. - if arg == "documentation" { - buf := new(bytes.Buffer) - printUsage(buf) - usage := &Command{Long: buf.String()} - tmpl(os.Stdout, strings.Replace(documentationTemplate, "{{AppName}}", AppName, -1), append([]*Command{usage}, commands...)) - return false - } - - for _, cmd := range commands { - if cmd.Name() == arg { - tmpl(os.Stdout, strings.Replace(helpTemplate, "{{AppName}}", AppName, -1), cmd) - // not exit 2: succeeded at 'go help cmd'. - return true - } - } - - fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run '%s help'.\n", arg, AppName) - return false -} - -func Exit(code int) { - os.Exit(code) -} diff --git a/vendor/github.com/visualfc/gotools/pkg/command/version.go b/vendor/github.com/visualfc/gotools/pkg/command/version.go deleted file mode 100644 index 0a887809..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/command/version.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2011-2015 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package command - -import ( - "os" - "runtime" -) - -func init() { - Register(cmdVersion) -} - -var AppVersion string = "1.0" - -var cmdVersion = &Command{ - Run: runVersion, - UsageLine: "version", - Short: "print tool version", - Long: `Version prints the version.`, -} - -func runVersion(cmd *Command, args []string) error { - if len(args) != 0 { - cmd.PrintUsage() - return os.ErrInvalid - } - - cmd.Printf("%s version %s [%s %s/%s]\n", AppName, AppVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH) - return nil -} diff --git a/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go b/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go deleted file mode 100644 index cbfa267c..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/pkgutil/pkgutil.go +++ /dev/null @@ -1,240 +0,0 @@ -package pkgutil - -import ( - "fmt" - "go/build" - "io/ioutil" - "os" - "path/filepath" - "regexp" - "strings" -) - -//var go15VendorExperiment = os.Getenv("GO15VENDOREXPERIMENT") == "1" - -func IsVendorExperiment() bool { - return true -} - -// matchPattern(pattern)(name) reports whether -// name matches pattern. Pattern is a limited glob -// pattern in which '...' means 'any string' and there -// is no other special syntax. -func matchPattern(pattern string) func(name string) bool { - re := regexp.QuoteMeta(pattern) - re = strings.Replace(re, `\.\.\.`, `.*`, -1) - // Special case: foo/... matches foo too. - if strings.HasSuffix(re, `/.*`) { - re = re[:len(re)-len(`/.*`)] + `(/.*)?` - } - reg := regexp.MustCompile(`^` + re + `$`) - return func(name string) bool { - return reg.MatchString(name) - } -} - -// hasPathPrefix reports whether the path s begins with the -// elements in prefix. -func hasPathPrefix(s, prefix string) bool { - switch { - default: - return false - case len(s) == len(prefix): - return s == prefix - case len(s) > len(prefix): - if prefix != "" && prefix[len(prefix)-1] == '/' { - return strings.HasPrefix(s, prefix) - } - return s[len(prefix)] == '/' && s[:len(prefix)] == prefix - } -} - -// hasFilePathPrefix reports whether the filesystem path s begins with the -// elements in prefix. -func hasFilePathPrefix(s, prefix string) bool { - sv := strings.ToUpper(filepath.VolumeName(s)) - pv := strings.ToUpper(filepath.VolumeName(prefix)) - s = s[len(sv):] - prefix = prefix[len(pv):] - switch { - default: - return false - case sv != pv: - return false - case len(s) == len(prefix): - return s == prefix - case len(s) > len(prefix): - if prefix != "" && prefix[len(prefix)-1] == filepath.Separator { - return strings.HasPrefix(s, prefix) - } - return s[len(prefix)] == filepath.Separator && s[:len(prefix)] == prefix - } -} - -// treeCanMatchPattern(pattern)(name) reports whether -// name or children of name can possibly match pattern. -// Pattern is the same limited glob accepted by matchPattern. -func treeCanMatchPattern(pattern string) func(name string) bool { - wildCard := false - if i := strings.Index(pattern, "..."); i >= 0 { - wildCard = true - pattern = pattern[:i] - } - return func(name string) bool { - return len(name) <= len(pattern) && hasPathPrefix(pattern, name) || - wildCard && strings.HasPrefix(name, pattern) - } -} - -var isDirCache = map[string]bool{} - -func isDir(path string) bool { - result, ok := isDirCache[path] - if ok { - return result - } - - fi, err := os.Stat(path) - result = err == nil && fi.IsDir() - isDirCache[path] = result - return result -} - -type Package struct { - Root string - Dir string - ImportPath string -} - -func ImportFile(fileName string) *Package { - return ImportDir(filepath.Dir(fileName)) -} - -func ImportDir(dir string) *Package { - pkg, err := build.ImportDir(dir, build.FindOnly) - if err != nil { - return &Package{"", dir, ""} - } - return &Package{pkg.Root, pkg.Dir, pkg.ImportPath} -} - -func ImportDirEx(ctx *build.Context, dir string) *Package { - pkg, err := ctx.ImportDir(dir, build.FindOnly) - if err != nil { - return &Package{"", dir, ""} - } - return &Package{pkg.Root, pkg.Dir, pkg.ImportPath} -} - -// expandPath returns the symlink-expanded form of path. -func expandPath(p string) string { - x, err := filepath.EvalSymlinks(p) - if err == nil { - return x - } - return p -} - -// vendoredImportPath returns the expansion of path when it appears in parent. -// If parent is x/y/z, then path might expand to x/y/z/vendor/path, x/y/vendor/path, -// x/vendor/path, vendor/path, or else stay path if none of those exist. -// vendoredImportPath returns the expanded path or, if no expansion is found, the original. -func VendoredImportPath(parent *Package, path string) (found string, err error) { - if parent == nil || parent.Root == "" { - return path, nil - } - - dir := filepath.Clean(parent.Dir) - root := filepath.Join(parent.Root, "src") - if !hasFilePathPrefix(dir, root) { - // Look for symlinks before reporting error. - dir = expandPath(dir) - root = expandPath(root) - } - if !hasFilePathPrefix(dir, root) || len(dir) <= len(root) || dir[len(root)] != filepath.Separator { - return "", fmt.Errorf("invalid vendoredImportPath: dir=%q root=%q separator=%q", dir, root, string(filepath.Separator)) - } - - vpath := "vendor/" + path - for i := len(dir); i >= len(root); i-- { - if i < len(dir) && dir[i] != filepath.Separator { - continue - } - // Note: checking for the vendor directory before checking - // for the vendor/path directory helps us hit the - // isDir cache more often. It also helps us prepare a more useful - // list of places we looked, to report when an import is not found. - if !isDir(filepath.Join(dir[:i], "vendor")) { - continue - } - targ := filepath.Join(dir[:i], vpath) - if isDir(targ) && hasGoFiles(targ) { - importPath := parent.ImportPath - if importPath == "command-line-arguments" { - // If parent.ImportPath is 'command-line-arguments'. - // set to relative directory to root (also chopped root directory) - importPath = dir[len(root)+1:] - } - // We started with parent's dir c:\gopath\src\foo\bar\baz\quux\xyzzy. - // We know the import path for parent's dir. - // We chopped off some number of path elements and - // added vendor\path to produce c:\gopath\src\foo\bar\baz\vendor\path. - // Now we want to know the import path for that directory. - // Construct it by chopping the same number of path elements - // (actually the same number of bytes) from parent's import path - // and then append /vendor/path. - chopped := len(dir) - i - if chopped == len(importPath)+1 { - // We walked up from c:\gopath\src\foo\bar - // and found c:\gopath\src\vendor\path. - // We chopped \foo\bar (length 8) but the import path is "foo/bar" (length 7). - // Use "vendor/path" without any prefix. - return vpath, nil - } - return importPath[:len(importPath)-chopped] + "/" + vpath, nil - } - } - return path, nil -} - -// hasGoFiles reports whether dir contains any files with names ending in .go. -// For a vendor check we must exclude directories that contain no .go files. -// Otherwise it is not possible to vendor just a/b/c and still import the -// non-vendored a/b. See golang.org/issue/13832. -func hasGoFiles(dir string) bool { - fis, _ := ioutil.ReadDir(dir) - for _, fi := range fis { - if !fi.IsDir() && strings.HasSuffix(fi.Name(), ".go") { - return true - } - } - return false -} - -// findVendor looks for the last non-terminating "vendor" path element in the given import path. -// If there isn't one, findVendor returns ok=false. -// Otherwise, findVendor returns ok=true and the index of the "vendor". -// -// Note that terminating "vendor" elements don't count: "x/vendor" is its own package, -// not the vendored copy of an import "" (the empty import path). -// This will allow people to have packages or commands named vendor. -// This may help reduce breakage, or it may just be confusing. We'll see. -func findVendor(path string) (index int, ok bool) { - // Two cases, depending on internal at start of string or not. - // The order matters: we must return the index of the final element, - // because the final one is where the effective import path starts. - switch { - case strings.Contains(path, "/vendor/"): - return strings.LastIndex(path, "/vendor/") + 1, true - case strings.HasPrefix(path, "vendor/"): - return 0, true - } - return 0, false -} - -func VendorPathToImportPath(path string) string { - if i, ok := findVendor(path); ok { - return path[i+len("vendor/"):] - } - return path -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go deleted file mode 100644 index d81ad917..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/go13.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !go1.4 - -package stdlib - -import ( - "go/build" - "os" - "path/filepath" -) - -func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) { - realpath := filepath.Join(context.GOROOT, "src", "pkg", path) - if _, err := os.Stat(realpath); err != nil { - realpath = filepath.Join(context.GOROOT, "src", path) - } - pkg, err := context.ImportDir(realpath, 0) - pkg.ImportPath = path - return pkg, err -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go deleted file mode 100644 index 9bd79d27..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/go14.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build go1.4 - -package stdlib - -import ( - "go/build" - "os" - "path/filepath" -) - -func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) { - realpath := filepath.Join(context.GOROOT, "src", path) - if _, err := os.Stat(realpath); err != nil { - realpath = filepath.Join(context.GOROOT, "src/pkg", path) - } - pkg, err := context.ImportDir(realpath, 0) - pkg.ImportPath = path - return pkg, err -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go deleted file mode 100644 index 0d38c902..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/pkglist.go +++ /dev/null @@ -1,59 +0,0 @@ -// AUTO-GENERATED BY mkpkglist.go - -package stdlib - -var Packages = []string{ - "archive/tar", "archive/zip", "bufio", "bytes", - "compress/bzip2", "compress/flate", "compress/gzip", "compress/lzw", - "compress/zlib", "container/heap", "container/list", "container/ring", - "context", "crypto", "crypto/aes", "crypto/cipher", - "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/ed25519", - "crypto/ed25519/internal/edwards25519", "crypto/elliptic", "crypto/hmac", "crypto/internal/randutil", - "crypto/internal/subtle", "crypto/md5", "crypto/rand", "crypto/rc4", - "crypto/rsa", "crypto/sha1", "crypto/sha256", "crypto/sha512", - "crypto/subtle", "crypto/tls", "crypto/x509", "crypto/x509/pkix", - "database/sql", "database/sql/driver", "debug/dwarf", "debug/elf", - "debug/gosym", "debug/macho", "debug/pe", "debug/plan9obj", - "encoding", "encoding/ascii85", "encoding/asn1", "encoding/base32", - "encoding/base64", "encoding/binary", "encoding/csv", "encoding/gob", - "encoding/hex", "encoding/json", "encoding/pem", "encoding/xml", - "errors", "expvar", "flag", "fmt", - "go/ast", "go/build", "go/constant", "go/doc", - "go/format", "go/importer", "go/internal/gccgoimporter", "go/internal/gcimporter", - "go/internal/srcimporter", "go/parser", "go/printer", "go/scanner", - "go/token", "go/types", "hash", "hash/adler32", - "hash/crc32", "hash/crc64", "hash/fnv", "hash/maphash", - "html", "html/template", "image", "image/color", - "image/color/palette", "image/draw", "image/gif", "image/internal/imageutil", - "image/jpeg", "image/png", "index/suffixarray", "internal/bytealg", - "internal/cfg", "internal/cpu", "internal/fmtsort", "internal/goroot", - "internal/goversion", "internal/lazyregexp", "internal/lazytemplate", "internal/nettrace", - "internal/obscuretestdata", "internal/oserror", "internal/poll", "internal/race", - "internal/reflectlite", "internal/singleflight", "internal/syscall/unix", "internal/testenv", - "internal/testlog", "internal/trace", "internal/xcoff", "io", - "io/ioutil", "log", "log/syslog", "math", - "math/big", "math/bits", "math/cmplx", "math/rand", - "mime", "mime/multipart", "mime/quotedprintable", "net", - "net/http", "net/http/cgi", "net/http/cookiejar", "net/http/fcgi", - "net/http/httptest", "net/http/httptrace", "net/http/httputil", "net/http/internal", - "net/http/pprof", "net/internal/socktest", "net/mail", "net/rpc", - "net/rpc/jsonrpc", "net/smtp", "net/textproto", "net/url", - "os", "os/exec", "os/signal", "os/signal/internal/pty", - "os/user", "path", "path/filepath", "plugin", - "reflect", "regexp", "regexp/syntax", "runtime", - "runtime/cgo", "runtime/debug", "runtime/internal/atomic", "runtime/internal/math", - "runtime/internal/sys", "runtime/pprof", "runtime/pprof/internal/profile", "runtime/race", - "runtime/trace", "sort", "strconv", "strings", - "sync", "sync/atomic", "syscall", "testing", - "testing/internal/testdeps", "testing/iotest", "testing/quick", "text/scanner", - "text/tabwriter", "text/template", "text/template/parse", "time", - "unicode", "unicode/utf16", "unicode/utf8", "unsafe"} - -func IsStdPkg(pkg string) bool { - for _, v := range Packages { - if v == pkg { - return true - } - } - return false -} diff --git a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go b/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go deleted file mode 100644 index 62c98e76..00000000 --- a/vendor/github.com/visualfc/gotools/pkg/stdlib/zstdlib.go +++ /dev/null @@ -1,10121 +0,0 @@ -// AUTO-GENERATED BY mkstdlib.go - -package stdlib - -var Symbols = map[string]string{ - "adler32.Checksum": "hash/adler32", - "adler32.New": "hash/adler32", - "adler32.Size": "hash/adler32", - "aes.BlockSize": "crypto/aes", - "aes.KeySizeError": "crypto/aes", - "aes.NewCipher": "crypto/aes", - "ascii85.CorruptInputError": "encoding/ascii85", - "ascii85.Decode": "encoding/ascii85", - "ascii85.Encode": "encoding/ascii85", - "ascii85.MaxEncodedLen": "encoding/ascii85", - "ascii85.NewDecoder": "encoding/ascii85", - "ascii85.NewEncoder": "encoding/ascii85", - "asn1.BitString": "encoding/asn1", - "asn1.ClassApplication": "encoding/asn1", - "asn1.ClassContextSpecific": "encoding/asn1", - "asn1.ClassPrivate": "encoding/asn1", - "asn1.ClassUniversal": "encoding/asn1", - "asn1.Enumerated": "encoding/asn1", - "asn1.Flag": "encoding/asn1", - "asn1.Marshal": "encoding/asn1", - "asn1.MarshalWithParams": "encoding/asn1", - "asn1.NullBytes": "encoding/asn1", - "asn1.NullRawValue": "encoding/asn1", - "asn1.ObjectIdentifier": "encoding/asn1", - "asn1.RawContent": "encoding/asn1", - "asn1.RawValue": "encoding/asn1", - "asn1.StructuralError": "encoding/asn1", - "asn1.SyntaxError": "encoding/asn1", - "asn1.TagBMPString": "encoding/asn1", - "asn1.TagBitString": "encoding/asn1", - "asn1.TagBoolean": "encoding/asn1", - "asn1.TagEnum": "encoding/asn1", - "asn1.TagGeneralString": "encoding/asn1", - "asn1.TagGeneralizedTime": "encoding/asn1", - "asn1.TagIA5String": "encoding/asn1", - "asn1.TagInteger": "encoding/asn1", - "asn1.TagNull": "encoding/asn1", - "asn1.TagNumericString": "encoding/asn1", - "asn1.TagOID": "encoding/asn1", - "asn1.TagOctetString": "encoding/asn1", - "asn1.TagPrintableString": "encoding/asn1", - "asn1.TagSequence": "encoding/asn1", - "asn1.TagSet": "encoding/asn1", - "asn1.TagT61String": "encoding/asn1", - "asn1.TagUTCTime": "encoding/asn1", - "asn1.TagUTF8String": "encoding/asn1", - "asn1.Unmarshal": "encoding/asn1", - "asn1.UnmarshalWithParams": "encoding/asn1", - "ast.ArrayType": "go/ast", - "ast.AssignStmt": "go/ast", - "ast.Bad": "go/ast", - "ast.BadDecl": "go/ast", - "ast.BadExpr": "go/ast", - "ast.BadStmt": "go/ast", - "ast.BasicLit": "go/ast", - "ast.BinaryExpr": "go/ast", - "ast.BlockStmt": "go/ast", - "ast.BranchStmt": "go/ast", - "ast.CallExpr": "go/ast", - "ast.CaseClause": "go/ast", - "ast.ChanDir": "go/ast", - "ast.ChanType": "go/ast", - "ast.CommClause": "go/ast", - "ast.Comment": "go/ast", - "ast.CommentGroup": "go/ast", - "ast.CommentMap": "go/ast", - "ast.CompositeLit": "go/ast", - "ast.Con": "go/ast", - "ast.DeclStmt": "go/ast", - "ast.DeferStmt": "go/ast", - "ast.Ellipsis": "go/ast", - "ast.EmptyStmt": "go/ast", - "ast.ExprStmt": "go/ast", - "ast.Field": "go/ast", - "ast.FieldFilter": "go/ast", - "ast.FieldList": "go/ast", - "ast.File": "go/ast", - "ast.FileExports": "go/ast", - "ast.Filter": "go/ast", - "ast.FilterDecl": "go/ast", - "ast.FilterFile": "go/ast", - "ast.FilterFuncDuplicates": "go/ast", - "ast.FilterImportDuplicates": "go/ast", - "ast.FilterPackage": "go/ast", - "ast.FilterUnassociatedComments": "go/ast", - "ast.ForStmt": "go/ast", - "ast.Fprint": "go/ast", - "ast.Fun": "go/ast", - "ast.FuncDecl": "go/ast", - "ast.FuncLit": "go/ast", - "ast.FuncType": "go/ast", - "ast.GenDecl": "go/ast", - "ast.GoStmt": "go/ast", - "ast.Ident": "go/ast", - "ast.IfStmt": "go/ast", - "ast.ImportSpec": "go/ast", - "ast.Importer": "go/ast", - "ast.IncDecStmt": "go/ast", - "ast.IndexExpr": "go/ast", - "ast.Inspect": "go/ast", - "ast.InterfaceType": "go/ast", - "ast.IsExported": "go/ast", - "ast.KeyValueExpr": "go/ast", - "ast.LabeledStmt": "go/ast", - "ast.Lbl": "go/ast", - "ast.MapType": "go/ast", - "ast.MergeMode": "go/ast", - "ast.MergePackageFiles": "go/ast", - "ast.NewCommentMap": "go/ast", - "ast.NewIdent": "go/ast", - "ast.NewObj": "go/ast", - "ast.NewPackage": "go/ast", - "ast.NewScope": "go/ast", - "ast.Node": "go/ast", - "ast.NotNilFilter": "go/ast", - "ast.ObjKind": "go/ast", - "ast.Object": "go/ast", - "ast.Package": "go/ast", - "ast.PackageExports": "go/ast", - "ast.ParenExpr": "go/ast", - "ast.Pkg": "go/ast", - "ast.Print": "go/ast", - "ast.RECV": "go/ast", - "ast.RangeStmt": "go/ast", - "ast.ReturnStmt": "go/ast", - "ast.SEND": "go/ast", - "ast.Scope": "go/ast", - "ast.SelectStmt": "go/ast", - "ast.SelectorExpr": "go/ast", - "ast.SendStmt": "go/ast", - "ast.SliceExpr": "go/ast", - "ast.SortImports": "go/ast", - "ast.StarExpr": "go/ast", - "ast.StructType": "go/ast", - "ast.SwitchStmt": "go/ast", - "ast.Typ": "go/ast", - "ast.TypeAssertExpr": "go/ast", - "ast.TypeSpec": "go/ast", - "ast.TypeSwitchStmt": "go/ast", - "ast.UnaryExpr": "go/ast", - "ast.ValueSpec": "go/ast", - "ast.Var": "go/ast", - "ast.Visitor": "go/ast", - "ast.Walk": "go/ast", - "atomic.AddInt32": "sync/atomic", - "atomic.AddInt64": "sync/atomic", - "atomic.AddUint32": "sync/atomic", - "atomic.AddUint64": "sync/atomic", - "atomic.AddUintptr": "sync/atomic", - "atomic.CompareAndSwapInt32": "sync/atomic", - "atomic.CompareAndSwapInt64": "sync/atomic", - "atomic.CompareAndSwapPointer": "sync/atomic", - "atomic.CompareAndSwapUint32": "sync/atomic", - "atomic.CompareAndSwapUint64": "sync/atomic", - "atomic.CompareAndSwapUintptr": "sync/atomic", - "atomic.LoadInt32": "sync/atomic", - "atomic.LoadInt64": "sync/atomic", - "atomic.LoadPointer": "sync/atomic", - "atomic.LoadUint32": "sync/atomic", - "atomic.LoadUint64": "sync/atomic", - "atomic.LoadUintptr": "sync/atomic", - "atomic.StoreInt32": "sync/atomic", - "atomic.StoreInt64": "sync/atomic", - "atomic.StorePointer": "sync/atomic", - "atomic.StoreUint32": "sync/atomic", - "atomic.StoreUint64": "sync/atomic", - "atomic.StoreUintptr": "sync/atomic", - "atomic.SwapInt32": "sync/atomic", - "atomic.SwapInt64": "sync/atomic", - "atomic.SwapPointer": "sync/atomic", - "atomic.SwapUint32": "sync/atomic", - "atomic.SwapUint64": "sync/atomic", - "atomic.SwapUintptr": "sync/atomic", - "atomic.Value": "sync/atomic", - "base32.CorruptInputError": "encoding/base32", - "base32.Encoding": "encoding/base32", - "base32.HexEncoding": "encoding/base32", - "base32.NewDecoder": "encoding/base32", - "base32.NewEncoder": "encoding/base32", - "base32.NewEncoding": "encoding/base32", - "base32.NoPadding": "encoding/base32", - "base32.StdEncoding": "encoding/base32", - "base32.StdPadding": "encoding/base32", - "base64.CorruptInputError": "encoding/base64", - "base64.Encoding": "encoding/base64", - "base64.NewDecoder": "encoding/base64", - "base64.NewEncoder": "encoding/base64", - "base64.NewEncoding": "encoding/base64", - "base64.NoPadding": "encoding/base64", - "base64.RawStdEncoding": "encoding/base64", - "base64.RawURLEncoding": "encoding/base64", - "base64.StdEncoding": "encoding/base64", - "base64.StdPadding": "encoding/base64", - "base64.URLEncoding": "encoding/base64", - "big.Above": "math/big", - "big.Accuracy": "math/big", - "big.AwayFromZero": "math/big", - "big.Below": "math/big", - "big.ErrNaN": "math/big", - "big.Exact": "math/big", - "big.Float": "math/big", - "big.Int": "math/big", - "big.Jacobi": "math/big", - "big.MaxBase": "math/big", - "big.MaxExp": "math/big", - "big.MaxPrec": "math/big", - "big.MinExp": "math/big", - "big.NewFloat": "math/big", - "big.NewInt": "math/big", - "big.NewRat": "math/big", - "big.ParseFloat": "math/big", - "big.Rat": "math/big", - "big.RoundingMode": "math/big", - "big.ToNearestAway": "math/big", - "big.ToNearestEven": "math/big", - "big.ToNegativeInf": "math/big", - "big.ToPositiveInf": "math/big", - "big.ToZero": "math/big", - "big.Word": "math/big", - "binary.BigEndian": "encoding/binary", - "binary.ByteOrder": "encoding/binary", - "binary.LittleEndian": "encoding/binary", - "binary.MaxVarintLen16": "encoding/binary", - "binary.MaxVarintLen32": "encoding/binary", - "binary.MaxVarintLen64": "encoding/binary", - "binary.PutUvarint": "encoding/binary", - "binary.PutVarint": "encoding/binary", - "binary.Read": "encoding/binary", - "binary.ReadUvarint": "encoding/binary", - "binary.ReadVarint": "encoding/binary", - "binary.Size": "encoding/binary", - "binary.Uvarint": "encoding/binary", - "binary.Varint": "encoding/binary", - "binary.Write": "encoding/binary", - "bits.Add": "math/bits", - "bits.Add32": "math/bits", - "bits.Add64": "math/bits", - "bits.Div": "math/bits", - "bits.Div32": "math/bits", - "bits.Div64": "math/bits", - "bits.LeadingZeros": "math/bits", - "bits.LeadingZeros16": "math/bits", - "bits.LeadingZeros32": "math/bits", - "bits.LeadingZeros64": "math/bits", - "bits.LeadingZeros8": "math/bits", - "bits.Len": "math/bits", - "bits.Len16": "math/bits", - "bits.Len32": "math/bits", - "bits.Len64": "math/bits", - "bits.Len8": "math/bits", - "bits.Mul": "math/bits", - "bits.Mul32": "math/bits", - "bits.Mul64": "math/bits", - "bits.OnesCount": "math/bits", - "bits.OnesCount16": "math/bits", - "bits.OnesCount32": "math/bits", - "bits.OnesCount64": "math/bits", - "bits.OnesCount8": "math/bits", - "bits.Rem": "math/bits", - "bits.Rem32": "math/bits", - "bits.Rem64": "math/bits", - "bits.Reverse": "math/bits", - "bits.Reverse16": "math/bits", - "bits.Reverse32": "math/bits", - "bits.Reverse64": "math/bits", - "bits.Reverse8": "math/bits", - "bits.ReverseBytes": "math/bits", - "bits.ReverseBytes16": "math/bits", - "bits.ReverseBytes32": "math/bits", - "bits.ReverseBytes64": "math/bits", - "bits.RotateLeft": "math/bits", - "bits.RotateLeft16": "math/bits", - "bits.RotateLeft32": "math/bits", - "bits.RotateLeft64": "math/bits", - "bits.RotateLeft8": "math/bits", - "bits.Sub": "math/bits", - "bits.Sub32": "math/bits", - "bits.Sub64": "math/bits", - "bits.TrailingZeros": "math/bits", - "bits.TrailingZeros16": "math/bits", - "bits.TrailingZeros32": "math/bits", - "bits.TrailingZeros64": "math/bits", - "bits.TrailingZeros8": "math/bits", - "bits.UintSize": "math/bits", - "bufio.ErrAdvanceTooFar": "bufio", - "bufio.ErrBufferFull": "bufio", - "bufio.ErrFinalToken": "bufio", - "bufio.ErrInvalidUnreadByte": "bufio", - "bufio.ErrInvalidUnreadRune": "bufio", - "bufio.ErrNegativeAdvance": "bufio", - "bufio.ErrNegativeCount": "bufio", - "bufio.ErrTooLong": "bufio", - "bufio.MaxScanTokenSize": "bufio", - "bufio.NewReadWriter": "bufio", - "bufio.NewReader": "bufio", - "bufio.NewReaderSize": "bufio", - "bufio.NewScanner": "bufio", - "bufio.NewWriter": "bufio", - "bufio.NewWriterSize": "bufio", - "bufio.ReadWriter": "bufio", - "bufio.Reader": "bufio", - "bufio.ScanBytes": "bufio", - "bufio.ScanLines": "bufio", - "bufio.ScanRunes": "bufio", - "bufio.ScanWords": "bufio", - "bufio.Scanner": "bufio", - "bufio.SplitFunc": "bufio", - "bufio.Writer": "bufio", - "build.AllowBinary": "go/build", - "build.ArchChar": "go/build", - "build.Context": "go/build", - "build.Default": "go/build", - "build.FindOnly": "go/build", - "build.IgnoreVendor": "go/build", - "build.Import": "go/build", - "build.ImportComment": "go/build", - "build.ImportDir": "go/build", - "build.ImportMode": "go/build", - "build.IsLocalImport": "go/build", - "build.MultiplePackageError": "go/build", - "build.NoGoError": "go/build", - "build.Package": "go/build", - "build.ToolDir": "go/build", - "bytes.Buffer": "bytes", - "bytes.Compare": "bytes", - "bytes.Contains": "bytes", - "bytes.ContainsAny": "bytes", - "bytes.ContainsRune": "bytes", - "bytes.Count": "bytes", - "bytes.Equal": "bytes", - "bytes.EqualFold": "bytes", - "bytes.ErrTooLarge": "bytes", - "bytes.Fields": "bytes", - "bytes.FieldsFunc": "bytes", - "bytes.HasPrefix": "bytes", - "bytes.HasSuffix": "bytes", - "bytes.Index": "bytes", - "bytes.IndexAny": "bytes", - "bytes.IndexByte": "bytes", - "bytes.IndexFunc": "bytes", - "bytes.IndexRune": "bytes", - "bytes.Join": "bytes", - "bytes.LastIndex": "bytes", - "bytes.LastIndexAny": "bytes", - "bytes.LastIndexByte": "bytes", - "bytes.LastIndexFunc": "bytes", - "bytes.Map": "bytes", - "bytes.MinRead": "bytes", - "bytes.NewBuffer": "bytes", - "bytes.NewBufferString": "bytes", - "bytes.NewReader": "bytes", - "bytes.Reader": "bytes", - "bytes.Repeat": "bytes", - "bytes.Replace": "bytes", - "bytes.ReplaceAll": "bytes", - "bytes.Runes": "bytes", - "bytes.Split": "bytes", - "bytes.SplitAfter": "bytes", - "bytes.SplitAfterN": "bytes", - "bytes.SplitN": "bytes", - "bytes.Title": "bytes", - "bytes.ToLower": "bytes", - "bytes.ToLowerSpecial": "bytes", - "bytes.ToTitle": "bytes", - "bytes.ToTitleSpecial": "bytes", - "bytes.ToUpper": "bytes", - "bytes.ToUpperSpecial": "bytes", - "bytes.ToValidUTF8": "bytes", - "bytes.Trim": "bytes", - "bytes.TrimFunc": "bytes", - "bytes.TrimLeft": "bytes", - "bytes.TrimLeftFunc": "bytes", - "bytes.TrimPrefix": "bytes", - "bytes.TrimRight": "bytes", - "bytes.TrimRightFunc": "bytes", - "bytes.TrimSpace": "bytes", - "bytes.TrimSuffix": "bytes", - "bzip2.NewReader": "compress/bzip2", - "bzip2.StructuralError": "compress/bzip2", - "cgi.Handler": "net/http/cgi", - "cgi.Request": "net/http/cgi", - "cgi.RequestFromMap": "net/http/cgi", - "cgi.Serve": "net/http/cgi", - "cipher.AEAD": "crypto/cipher", - "cipher.Block": "crypto/cipher", - "cipher.BlockMode": "crypto/cipher", - "cipher.NewCBCDecrypter": "crypto/cipher", - "cipher.NewCBCEncrypter": "crypto/cipher", - "cipher.NewCFBDecrypter": "crypto/cipher", - "cipher.NewCFBEncrypter": "crypto/cipher", - "cipher.NewCTR": "crypto/cipher", - "cipher.NewGCM": "crypto/cipher", - "cipher.NewGCMWithNonceSize": "crypto/cipher", - "cipher.NewGCMWithTagSize": "crypto/cipher", - "cipher.NewOFB": "crypto/cipher", - "cipher.Stream": "crypto/cipher", - "cipher.StreamReader": "crypto/cipher", - "cipher.StreamWriter": "crypto/cipher", - "cmplx.Abs": "math/cmplx", - "cmplx.Acos": "math/cmplx", - "cmplx.Acosh": "math/cmplx", - "cmplx.Asin": "math/cmplx", - "cmplx.Asinh": "math/cmplx", - "cmplx.Atan": "math/cmplx", - "cmplx.Atanh": "math/cmplx", - "cmplx.Conj": "math/cmplx", - "cmplx.Cos": "math/cmplx", - "cmplx.Cosh": "math/cmplx", - "cmplx.Cot": "math/cmplx", - "cmplx.Exp": "math/cmplx", - "cmplx.Inf": "math/cmplx", - "cmplx.IsInf": "math/cmplx", - "cmplx.IsNaN": "math/cmplx", - "cmplx.Log": "math/cmplx", - "cmplx.Log10": "math/cmplx", - "cmplx.NaN": "math/cmplx", - "cmplx.Phase": "math/cmplx", - "cmplx.Polar": "math/cmplx", - "cmplx.Pow": "math/cmplx", - "cmplx.Rect": "math/cmplx", - "cmplx.Sin": "math/cmplx", - "cmplx.Sinh": "math/cmplx", - "cmplx.Sqrt": "math/cmplx", - "cmplx.Tan": "math/cmplx", - "cmplx.Tanh": "math/cmplx", - "color.Alpha": "image/color", - "color.Alpha16": "image/color", - "color.Alpha16Model": "image/color", - "color.AlphaModel": "image/color", - "color.Black": "image/color", - "color.CMYK": "image/color", - "color.CMYKModel": "image/color", - "color.CMYKToRGB": "image/color", - "color.Color": "image/color", - "color.Gray": "image/color", - "color.Gray16": "image/color", - "color.Gray16Model": "image/color", - "color.GrayModel": "image/color", - "color.Model": "image/color", - "color.ModelFunc": "image/color", - "color.NRGBA": "image/color", - "color.NRGBA64": "image/color", - "color.NRGBA64Model": "image/color", - "color.NRGBAModel": "image/color", - "color.NYCbCrA": "image/color", - "color.NYCbCrAModel": "image/color", - "color.Opaque": "image/color", - "color.Palette": "image/color", - "color.RGBA": "image/color", - "color.RGBA64": "image/color", - "color.RGBA64Model": "image/color", - "color.RGBAModel": "image/color", - "color.RGBToCMYK": "image/color", - "color.RGBToYCbCr": "image/color", - "color.Transparent": "image/color", - "color.White": "image/color", - "color.YCbCr": "image/color", - "color.YCbCrModel": "image/color", - "color.YCbCrToRGB": "image/color", - "constant.BinaryOp": "go/constant", - "constant.BitLen": "go/constant", - "constant.Bool": "go/constant", - "constant.BoolVal": "go/constant", - "constant.Bytes": "go/constant", - "constant.Compare": "go/constant", - "constant.Complex": "go/constant", - "constant.Denom": "go/constant", - "constant.Float": "go/constant", - "constant.Float32Val": "go/constant", - "constant.Float64Val": "go/constant", - "constant.Imag": "go/constant", - "constant.Int": "go/constant", - "constant.Int64Val": "go/constant", - "constant.Kind": "go/constant", - "constant.Make": "go/constant", - "constant.MakeBool": "go/constant", - "constant.MakeFloat64": "go/constant", - "constant.MakeFromBytes": "go/constant", - "constant.MakeFromLiteral": "go/constant", - "constant.MakeImag": "go/constant", - "constant.MakeInt64": "go/constant", - "constant.MakeString": "go/constant", - "constant.MakeUint64": "go/constant", - "constant.MakeUnknown": "go/constant", - "constant.Num": "go/constant", - "constant.Real": "go/constant", - "constant.Shift": "go/constant", - "constant.Sign": "go/constant", - "constant.String": "go/constant", - "constant.StringVal": "go/constant", - "constant.ToComplex": "go/constant", - "constant.ToFloat": "go/constant", - "constant.ToInt": "go/constant", - "constant.Uint64Val": "go/constant", - "constant.UnaryOp": "go/constant", - "constant.Unknown": "go/constant", - "constant.Val": "go/constant", - "context.Background": "context", - "context.CancelFunc": "context", - "context.Canceled": "context", - "context.Context": "context", - "context.DeadlineExceeded": "context", - "context.TODO": "context", - "context.WithCancel": "context", - "context.WithDeadline": "context", - "context.WithTimeout": "context", - "context.WithValue": "context", - "cookiejar.Jar": "net/http/cookiejar", - "cookiejar.New": "net/http/cookiejar", - "cookiejar.Options": "net/http/cookiejar", - "cookiejar.PublicSuffixList": "net/http/cookiejar", - "crc32.Castagnoli": "hash/crc32", - "crc32.Checksum": "hash/crc32", - "crc32.ChecksumIEEE": "hash/crc32", - "crc32.IEEE": "hash/crc32", - "crc32.IEEETable": "hash/crc32", - "crc32.Koopman": "hash/crc32", - "crc32.MakeTable": "hash/crc32", - "crc32.New": "hash/crc32", - "crc32.NewIEEE": "hash/crc32", - "crc32.Size": "hash/crc32", - "crc32.Table": "hash/crc32", - "crc32.Update": "hash/crc32", - "crc64.Checksum": "hash/crc64", - "crc64.ECMA": "hash/crc64", - "crc64.ISO": "hash/crc64", - "crc64.MakeTable": "hash/crc64", - "crc64.New": "hash/crc64", - "crc64.Size": "hash/crc64", - "crc64.Table": "hash/crc64", - "crc64.Update": "hash/crc64", - "crypto.BLAKE2b_256": "crypto", - "crypto.BLAKE2b_384": "crypto", - "crypto.BLAKE2b_512": "crypto", - "crypto.BLAKE2s_256": "crypto", - "crypto.Decrypter": "crypto", - "crypto.DecrypterOpts": "crypto", - "crypto.Hash": "crypto", - "crypto.MD4": "crypto", - "crypto.MD5": "crypto", - "crypto.MD5SHA1": "crypto", - "crypto.PrivateKey": "crypto", - "crypto.PublicKey": "crypto", - "crypto.RIPEMD160": "crypto", - "crypto.RegisterHash": "crypto", - "crypto.SHA1": "crypto", - "crypto.SHA224": "crypto", - "crypto.SHA256": "crypto", - "crypto.SHA384": "crypto", - "crypto.SHA3_224": "crypto", - "crypto.SHA3_256": "crypto", - "crypto.SHA3_384": "crypto", - "crypto.SHA3_512": "crypto", - "crypto.SHA512": "crypto", - "crypto.SHA512_224": "crypto", - "crypto.SHA512_256": "crypto", - "crypto.Signer": "crypto", - "crypto.SignerOpts": "crypto", - "csv.ErrBareQuote": "encoding/csv", - "csv.ErrFieldCount": "encoding/csv", - "csv.ErrQuote": "encoding/csv", - "csv.ErrTrailingComma": "encoding/csv", - "csv.NewReader": "encoding/csv", - "csv.NewWriter": "encoding/csv", - "csv.ParseError": "encoding/csv", - "csv.Reader": "encoding/csv", - "csv.Writer": "encoding/csv", - "debug.BuildInfo": "runtime/debug", - "debug.FreeOSMemory": "runtime/debug", - "debug.GCStats": "runtime/debug", - "debug.Module": "runtime/debug", - "debug.PrintStack": "runtime/debug", - "debug.ReadBuildInfo": "runtime/debug", - "debug.ReadGCStats": "runtime/debug", - "debug.SetGCPercent": "runtime/debug", - "debug.SetMaxStack": "runtime/debug", - "debug.SetMaxThreads": "runtime/debug", - "debug.SetPanicOnFault": "runtime/debug", - "debug.SetTraceback": "runtime/debug", - "debug.Stack": "runtime/debug", - "debug.WriteHeapDump": "runtime/debug", - "des.BlockSize": "crypto/des", - "des.KeySizeError": "crypto/des", - "des.NewCipher": "crypto/des", - "des.NewTripleDESCipher": "crypto/des", - "doc.AllDecls": "go/doc", - "doc.AllMethods": "go/doc", - "doc.Example": "go/doc", - "doc.Examples": "go/doc", - "doc.Filter": "go/doc", - "doc.Func": "go/doc", - "doc.IllegalPrefixes": "go/doc", - "doc.IsPredeclared": "go/doc", - "doc.Mode": "go/doc", - "doc.New": "go/doc", - "doc.NewFromFiles": "go/doc", - "doc.Note": "go/doc", - "doc.Package": "go/doc", - "doc.PreserveAST": "go/doc", - "doc.Synopsis": "go/doc", - "doc.ToHTML": "go/doc", - "doc.ToText": "go/doc", - "doc.Type": "go/doc", - "doc.Value": "go/doc", - "draw.Draw": "image/draw", - "draw.DrawMask": "image/draw", - "draw.Drawer": "image/draw", - "draw.FloydSteinberg": "image/draw", - "draw.Image": "image/draw", - "draw.Op": "image/draw", - "draw.Over": "image/draw", - "draw.Quantizer": "image/draw", - "draw.Src": "image/draw", - "driver.Bool": "database/sql/driver", - "driver.ColumnConverter": "database/sql/driver", - "driver.Conn": "database/sql/driver", - "driver.ConnBeginTx": "database/sql/driver", - "driver.ConnPrepareContext": "database/sql/driver", - "driver.Connector": "database/sql/driver", - "driver.DefaultParameterConverter": "database/sql/driver", - "driver.Driver": "database/sql/driver", - "driver.DriverContext": "database/sql/driver", - "driver.ErrBadConn": "database/sql/driver", - "driver.ErrRemoveArgument": "database/sql/driver", - "driver.ErrSkip": "database/sql/driver", - "driver.Execer": "database/sql/driver", - "driver.ExecerContext": "database/sql/driver", - "driver.Int32": "database/sql/driver", - "driver.IsScanValue": "database/sql/driver", - "driver.IsValue": "database/sql/driver", - "driver.IsolationLevel": "database/sql/driver", - "driver.NamedValue": "database/sql/driver", - "driver.NamedValueChecker": "database/sql/driver", - "driver.NotNull": "database/sql/driver", - "driver.Null": "database/sql/driver", - "driver.Pinger": "database/sql/driver", - "driver.Queryer": "database/sql/driver", - "driver.QueryerContext": "database/sql/driver", - "driver.Result": "database/sql/driver", - "driver.ResultNoRows": "database/sql/driver", - "driver.Rows": "database/sql/driver", - "driver.RowsAffected": "database/sql/driver", - "driver.RowsColumnTypeDatabaseTypeName": "database/sql/driver", - "driver.RowsColumnTypeLength": "database/sql/driver", - "driver.RowsColumnTypeNullable": "database/sql/driver", - "driver.RowsColumnTypePrecisionScale": "database/sql/driver", - "driver.RowsColumnTypeScanType": "database/sql/driver", - "driver.RowsNextResultSet": "database/sql/driver", - "driver.SessionResetter": "database/sql/driver", - "driver.Stmt": "database/sql/driver", - "driver.StmtExecContext": "database/sql/driver", - "driver.StmtQueryContext": "database/sql/driver", - "driver.String": "database/sql/driver", - "driver.Tx": "database/sql/driver", - "driver.TxOptions": "database/sql/driver", - "driver.Value": "database/sql/driver", - "driver.ValueConverter": "database/sql/driver", - "driver.Valuer": "database/sql/driver", - "dsa.ErrInvalidPublicKey": "crypto/dsa", - "dsa.GenerateKey": "crypto/dsa", - "dsa.GenerateParameters": "crypto/dsa", - "dsa.L1024N160": "crypto/dsa", - "dsa.L2048N224": "crypto/dsa", - "dsa.L2048N256": "crypto/dsa", - "dsa.L3072N256": "crypto/dsa", - "dsa.ParameterSizes": "crypto/dsa", - "dsa.Parameters": "crypto/dsa", - "dsa.PrivateKey": "crypto/dsa", - "dsa.PublicKey": "crypto/dsa", - "dsa.Sign": "crypto/dsa", - "dsa.Verify": "crypto/dsa", - "dwarf.AddrType": "debug/dwarf", - "dwarf.ArrayType": "debug/dwarf", - "dwarf.Attr": "debug/dwarf", - "dwarf.AttrAbstractOrigin": "debug/dwarf", - "dwarf.AttrAccessibility": "debug/dwarf", - "dwarf.AttrAddrBase": "debug/dwarf", - "dwarf.AttrAddrClass": "debug/dwarf", - "dwarf.AttrAlignment": "debug/dwarf", - "dwarf.AttrAllocated": "debug/dwarf", - "dwarf.AttrArtificial": "debug/dwarf", - "dwarf.AttrAssociated": "debug/dwarf", - "dwarf.AttrBaseTypes": "debug/dwarf", - "dwarf.AttrBinaryScale": "debug/dwarf", - "dwarf.AttrBitOffset": "debug/dwarf", - "dwarf.AttrBitSize": "debug/dwarf", - "dwarf.AttrByteSize": "debug/dwarf", - "dwarf.AttrCallAllCalls": "debug/dwarf", - "dwarf.AttrCallAllSourceCalls": "debug/dwarf", - "dwarf.AttrCallAllTailCalls": "debug/dwarf", - "dwarf.AttrCallColumn": "debug/dwarf", - "dwarf.AttrCallDataLocation": "debug/dwarf", - "dwarf.AttrCallDataValue": "debug/dwarf", - "dwarf.AttrCallFile": "debug/dwarf", - "dwarf.AttrCallLine": "debug/dwarf", - "dwarf.AttrCallOrigin": "debug/dwarf", - "dwarf.AttrCallPC": "debug/dwarf", - "dwarf.AttrCallParameter": "debug/dwarf", - "dwarf.AttrCallReturnPC": "debug/dwarf", - "dwarf.AttrCallTailCall": "debug/dwarf", - "dwarf.AttrCallTarget": "debug/dwarf", - "dwarf.AttrCallTargetClobbered": "debug/dwarf", - "dwarf.AttrCallValue": "debug/dwarf", - "dwarf.AttrCalling": "debug/dwarf", - "dwarf.AttrCommonRef": "debug/dwarf", - "dwarf.AttrCompDir": "debug/dwarf", - "dwarf.AttrConstExpr": "debug/dwarf", - "dwarf.AttrConstValue": "debug/dwarf", - "dwarf.AttrContainingType": "debug/dwarf", - "dwarf.AttrCount": "debug/dwarf", - "dwarf.AttrDataBitOffset": "debug/dwarf", - "dwarf.AttrDataLocation": "debug/dwarf", - "dwarf.AttrDataMemberLoc": "debug/dwarf", - "dwarf.AttrDecimalScale": "debug/dwarf", - "dwarf.AttrDecimalSign": "debug/dwarf", - "dwarf.AttrDeclColumn": "debug/dwarf", - "dwarf.AttrDeclFile": "debug/dwarf", - "dwarf.AttrDeclLine": "debug/dwarf", - "dwarf.AttrDeclaration": "debug/dwarf", - "dwarf.AttrDefaultValue": "debug/dwarf", - "dwarf.AttrDefaulted": "debug/dwarf", - "dwarf.AttrDeleted": "debug/dwarf", - "dwarf.AttrDescription": "debug/dwarf", - "dwarf.AttrDigitCount": "debug/dwarf", - "dwarf.AttrDiscr": "debug/dwarf", - "dwarf.AttrDiscrList": "debug/dwarf", - "dwarf.AttrDiscrValue": "debug/dwarf", - "dwarf.AttrDwoName": "debug/dwarf", - "dwarf.AttrElemental": "debug/dwarf", - "dwarf.AttrEncoding": "debug/dwarf", - "dwarf.AttrEndianity": "debug/dwarf", - "dwarf.AttrEntrypc": "debug/dwarf", - "dwarf.AttrEnumClass": "debug/dwarf", - "dwarf.AttrExplicit": "debug/dwarf", - "dwarf.AttrExportSymbols": "debug/dwarf", - "dwarf.AttrExtension": "debug/dwarf", - "dwarf.AttrExternal": "debug/dwarf", - "dwarf.AttrFrameBase": "debug/dwarf", - "dwarf.AttrFriend": "debug/dwarf", - "dwarf.AttrHighpc": "debug/dwarf", - "dwarf.AttrIdentifierCase": "debug/dwarf", - "dwarf.AttrImport": "debug/dwarf", - "dwarf.AttrInline": "debug/dwarf", - "dwarf.AttrIsOptional": "debug/dwarf", - "dwarf.AttrLanguage": "debug/dwarf", - "dwarf.AttrLinkageName": "debug/dwarf", - "dwarf.AttrLocation": "debug/dwarf", - "dwarf.AttrLoclistsBase": "debug/dwarf", - "dwarf.AttrLowerBound": "debug/dwarf", - "dwarf.AttrLowpc": "debug/dwarf", - "dwarf.AttrMacroInfo": "debug/dwarf", - "dwarf.AttrMacros": "debug/dwarf", - "dwarf.AttrMainSubprogram": "debug/dwarf", - "dwarf.AttrMutable": "debug/dwarf", - "dwarf.AttrName": "debug/dwarf", - "dwarf.AttrNamelistItem": "debug/dwarf", - "dwarf.AttrNoreturn": "debug/dwarf", - "dwarf.AttrObjectPointer": "debug/dwarf", - "dwarf.AttrOrdering": "debug/dwarf", - "dwarf.AttrPictureString": "debug/dwarf", - "dwarf.AttrPriority": "debug/dwarf", - "dwarf.AttrProducer": "debug/dwarf", - "dwarf.AttrPrototyped": "debug/dwarf", - "dwarf.AttrPure": "debug/dwarf", - "dwarf.AttrRanges": "debug/dwarf", - "dwarf.AttrRank": "debug/dwarf", - "dwarf.AttrRecursive": "debug/dwarf", - "dwarf.AttrReference": "debug/dwarf", - "dwarf.AttrReturnAddr": "debug/dwarf", - "dwarf.AttrRnglistsBase": "debug/dwarf", - "dwarf.AttrRvalueReference": "debug/dwarf", - "dwarf.AttrSegment": "debug/dwarf", - "dwarf.AttrSibling": "debug/dwarf", - "dwarf.AttrSignature": "debug/dwarf", - "dwarf.AttrSmall": "debug/dwarf", - "dwarf.AttrSpecification": "debug/dwarf", - "dwarf.AttrStartScope": "debug/dwarf", - "dwarf.AttrStaticLink": "debug/dwarf", - "dwarf.AttrStmtList": "debug/dwarf", - "dwarf.AttrStrOffsetsBase": "debug/dwarf", - "dwarf.AttrStride": "debug/dwarf", - "dwarf.AttrStrideSize": "debug/dwarf", - "dwarf.AttrStringLength": "debug/dwarf", - "dwarf.AttrStringLengthBitSize": "debug/dwarf", - "dwarf.AttrStringLengthByteSize": "debug/dwarf", - "dwarf.AttrThreadsScaled": "debug/dwarf", - "dwarf.AttrTrampoline": "debug/dwarf", - "dwarf.AttrType": "debug/dwarf", - "dwarf.AttrUpperBound": "debug/dwarf", - "dwarf.AttrUseLocation": "debug/dwarf", - "dwarf.AttrUseUTF8": "debug/dwarf", - "dwarf.AttrVarParam": "debug/dwarf", - "dwarf.AttrVirtuality": "debug/dwarf", - "dwarf.AttrVisibility": "debug/dwarf", - "dwarf.AttrVtableElemLoc": "debug/dwarf", - "dwarf.BasicType": "debug/dwarf", - "dwarf.BoolType": "debug/dwarf", - "dwarf.CharType": "debug/dwarf", - "dwarf.Class": "debug/dwarf", - "dwarf.ClassAddrPtr": "debug/dwarf", - "dwarf.ClassAddress": "debug/dwarf", - "dwarf.ClassBlock": "debug/dwarf", - "dwarf.ClassConstant": "debug/dwarf", - "dwarf.ClassExprLoc": "debug/dwarf", - "dwarf.ClassFlag": "debug/dwarf", - "dwarf.ClassLinePtr": "debug/dwarf", - "dwarf.ClassLocList": "debug/dwarf", - "dwarf.ClassLocListPtr": "debug/dwarf", - "dwarf.ClassMacPtr": "debug/dwarf", - "dwarf.ClassRangeListPtr": "debug/dwarf", - "dwarf.ClassReference": "debug/dwarf", - "dwarf.ClassReferenceAlt": "debug/dwarf", - "dwarf.ClassReferenceSig": "debug/dwarf", - "dwarf.ClassRngList": "debug/dwarf", - "dwarf.ClassRngListsPtr": "debug/dwarf", - "dwarf.ClassStrOffsetsPtr": "debug/dwarf", - "dwarf.ClassString": "debug/dwarf", - "dwarf.ClassStringAlt": "debug/dwarf", - "dwarf.ClassUnknown": "debug/dwarf", - "dwarf.CommonType": "debug/dwarf", - "dwarf.ComplexType": "debug/dwarf", - "dwarf.Data": "debug/dwarf", - "dwarf.DecodeError": "debug/dwarf", - "dwarf.DotDotDotType": "debug/dwarf", - "dwarf.Entry": "debug/dwarf", - "dwarf.EnumType": "debug/dwarf", - "dwarf.EnumValue": "debug/dwarf", - "dwarf.ErrUnknownPC": "debug/dwarf", - "dwarf.Field": "debug/dwarf", - "dwarf.FloatType": "debug/dwarf", - "dwarf.FuncType": "debug/dwarf", - "dwarf.IntType": "debug/dwarf", - "dwarf.LineEntry": "debug/dwarf", - "dwarf.LineFile": "debug/dwarf", - "dwarf.LineReader": "debug/dwarf", - "dwarf.LineReaderPos": "debug/dwarf", - "dwarf.New": "debug/dwarf", - "dwarf.Offset": "debug/dwarf", - "dwarf.PtrType": "debug/dwarf", - "dwarf.QualType": "debug/dwarf", - "dwarf.Reader": "debug/dwarf", - "dwarf.StructField": "debug/dwarf", - "dwarf.StructType": "debug/dwarf", - "dwarf.Tag": "debug/dwarf", - "dwarf.TagAccessDeclaration": "debug/dwarf", - "dwarf.TagArrayType": "debug/dwarf", - "dwarf.TagAtomicType": "debug/dwarf", - "dwarf.TagBaseType": "debug/dwarf", - "dwarf.TagCallSite": "debug/dwarf", - "dwarf.TagCallSiteParameter": "debug/dwarf", - "dwarf.TagCatchDwarfBlock": "debug/dwarf", - "dwarf.TagClassType": "debug/dwarf", - "dwarf.TagCoarrayType": "debug/dwarf", - "dwarf.TagCommonDwarfBlock": "debug/dwarf", - "dwarf.TagCommonInclusion": "debug/dwarf", - "dwarf.TagCompileUnit": "debug/dwarf", - "dwarf.TagCondition": "debug/dwarf", - "dwarf.TagConstType": "debug/dwarf", - "dwarf.TagConstant": "debug/dwarf", - "dwarf.TagDwarfProcedure": "debug/dwarf", - "dwarf.TagDynamicType": "debug/dwarf", - "dwarf.TagEntryPoint": "debug/dwarf", - "dwarf.TagEnumerationType": "debug/dwarf", - "dwarf.TagEnumerator": "debug/dwarf", - "dwarf.TagFileType": "debug/dwarf", - "dwarf.TagFormalParameter": "debug/dwarf", - "dwarf.TagFriend": "debug/dwarf", - "dwarf.TagGenericSubrange": "debug/dwarf", - "dwarf.TagImmutableType": "debug/dwarf", - "dwarf.TagImportedDeclaration": "debug/dwarf", - "dwarf.TagImportedModule": "debug/dwarf", - "dwarf.TagImportedUnit": "debug/dwarf", - "dwarf.TagInheritance": "debug/dwarf", - "dwarf.TagInlinedSubroutine": "debug/dwarf", - "dwarf.TagInterfaceType": "debug/dwarf", - "dwarf.TagLabel": "debug/dwarf", - "dwarf.TagLexDwarfBlock": "debug/dwarf", - "dwarf.TagMember": "debug/dwarf", - "dwarf.TagModule": "debug/dwarf", - "dwarf.TagMutableType": "debug/dwarf", - "dwarf.TagNamelist": "debug/dwarf", - "dwarf.TagNamelistItem": "debug/dwarf", - "dwarf.TagNamespace": "debug/dwarf", - "dwarf.TagPackedType": "debug/dwarf", - "dwarf.TagPartialUnit": "debug/dwarf", - "dwarf.TagPointerType": "debug/dwarf", - "dwarf.TagPtrToMemberType": "debug/dwarf", - "dwarf.TagReferenceType": "debug/dwarf", - "dwarf.TagRestrictType": "debug/dwarf", - "dwarf.TagRvalueReferenceType": "debug/dwarf", - "dwarf.TagSetType": "debug/dwarf", - "dwarf.TagSharedType": "debug/dwarf", - "dwarf.TagSkeletonUnit": "debug/dwarf", - "dwarf.TagStringType": "debug/dwarf", - "dwarf.TagStructType": "debug/dwarf", - "dwarf.TagSubprogram": "debug/dwarf", - "dwarf.TagSubrangeType": "debug/dwarf", - "dwarf.TagSubroutineType": "debug/dwarf", - "dwarf.TagTemplateAlias": "debug/dwarf", - "dwarf.TagTemplateTypeParameter": "debug/dwarf", - "dwarf.TagTemplateValueParameter": "debug/dwarf", - "dwarf.TagThrownType": "debug/dwarf", - "dwarf.TagTryDwarfBlock": "debug/dwarf", - "dwarf.TagTypeUnit": "debug/dwarf", - "dwarf.TagTypedef": "debug/dwarf", - "dwarf.TagUnionType": "debug/dwarf", - "dwarf.TagUnspecifiedParameters": "debug/dwarf", - "dwarf.TagUnspecifiedType": "debug/dwarf", - "dwarf.TagVariable": "debug/dwarf", - "dwarf.TagVariant": "debug/dwarf", - "dwarf.TagVariantPart": "debug/dwarf", - "dwarf.TagVolatileType": "debug/dwarf", - "dwarf.TagWithStmt": "debug/dwarf", - "dwarf.Type": "debug/dwarf", - "dwarf.TypedefType": "debug/dwarf", - "dwarf.UcharType": "debug/dwarf", - "dwarf.UintType": "debug/dwarf", - "dwarf.UnspecifiedType": "debug/dwarf", - "dwarf.UnsupportedType": "debug/dwarf", - "dwarf.VoidType": "debug/dwarf", - "ecdsa.GenerateKey": "crypto/ecdsa", - "ecdsa.PrivateKey": "crypto/ecdsa", - "ecdsa.PublicKey": "crypto/ecdsa", - "ecdsa.Sign": "crypto/ecdsa", - "ecdsa.Verify": "crypto/ecdsa", - "ed25519.GenerateKey": "crypto/ed25519", - "ed25519.NewKeyFromSeed": "crypto/ed25519", - "ed25519.PrivateKey": "crypto/ed25519", - "ed25519.PrivateKeySize": "crypto/ed25519", - "ed25519.PublicKey": "crypto/ed25519", - "ed25519.PublicKeySize": "crypto/ed25519", - "ed25519.SeedSize": "crypto/ed25519", - "ed25519.Sign": "crypto/ed25519", - "ed25519.SignatureSize": "crypto/ed25519", - "ed25519.Verify": "crypto/ed25519", - "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf", - "elf.COMPRESS_HIOS": "debug/elf", - "elf.COMPRESS_HIPROC": "debug/elf", - "elf.COMPRESS_LOOS": "debug/elf", - "elf.COMPRESS_LOPROC": "debug/elf", - "elf.COMPRESS_ZLIB": "debug/elf", - "elf.Chdr32": "debug/elf", - "elf.Chdr64": "debug/elf", - "elf.Class": "debug/elf", - "elf.CompressionType": "debug/elf", - "elf.DF_BIND_NOW": "debug/elf", - "elf.DF_ORIGIN": "debug/elf", - "elf.DF_STATIC_TLS": "debug/elf", - "elf.DF_SYMBOLIC": "debug/elf", - "elf.DF_TEXTREL": "debug/elf", - "elf.DT_BIND_NOW": "debug/elf", - "elf.DT_DEBUG": "debug/elf", - "elf.DT_ENCODING": "debug/elf", - "elf.DT_FINI": "debug/elf", - "elf.DT_FINI_ARRAY": "debug/elf", - "elf.DT_FINI_ARRAYSZ": "debug/elf", - "elf.DT_FLAGS": "debug/elf", - "elf.DT_HASH": "debug/elf", - "elf.DT_HIOS": "debug/elf", - "elf.DT_HIPROC": "debug/elf", - "elf.DT_INIT": "debug/elf", - "elf.DT_INIT_ARRAY": "debug/elf", - "elf.DT_INIT_ARRAYSZ": "debug/elf", - "elf.DT_JMPREL": "debug/elf", - "elf.DT_LOOS": "debug/elf", - "elf.DT_LOPROC": "debug/elf", - "elf.DT_NEEDED": "debug/elf", - "elf.DT_NULL": "debug/elf", - "elf.DT_PLTGOT": "debug/elf", - "elf.DT_PLTREL": "debug/elf", - "elf.DT_PLTRELSZ": "debug/elf", - "elf.DT_PREINIT_ARRAY": "debug/elf", - "elf.DT_PREINIT_ARRAYSZ": "debug/elf", - "elf.DT_REL": "debug/elf", - "elf.DT_RELA": "debug/elf", - "elf.DT_RELAENT": "debug/elf", - "elf.DT_RELASZ": "debug/elf", - "elf.DT_RELENT": "debug/elf", - "elf.DT_RELSZ": "debug/elf", - "elf.DT_RPATH": "debug/elf", - "elf.DT_RUNPATH": "debug/elf", - "elf.DT_SONAME": "debug/elf", - "elf.DT_STRSZ": "debug/elf", - "elf.DT_STRTAB": "debug/elf", - "elf.DT_SYMBOLIC": "debug/elf", - "elf.DT_SYMENT": "debug/elf", - "elf.DT_SYMTAB": "debug/elf", - "elf.DT_TEXTREL": "debug/elf", - "elf.DT_VERNEED": "debug/elf", - "elf.DT_VERNEEDNUM": "debug/elf", - "elf.DT_VERSYM": "debug/elf", - "elf.Data": "debug/elf", - "elf.Dyn32": "debug/elf", - "elf.Dyn64": "debug/elf", - "elf.DynFlag": "debug/elf", - "elf.DynTag": "debug/elf", - "elf.EI_ABIVERSION": "debug/elf", - "elf.EI_CLASS": "debug/elf", - "elf.EI_DATA": "debug/elf", - "elf.EI_NIDENT": "debug/elf", - "elf.EI_OSABI": "debug/elf", - "elf.EI_PAD": "debug/elf", - "elf.EI_VERSION": "debug/elf", - "elf.ELFCLASS32": "debug/elf", - "elf.ELFCLASS64": "debug/elf", - "elf.ELFCLASSNONE": "debug/elf", - "elf.ELFDATA2LSB": "debug/elf", - "elf.ELFDATA2MSB": "debug/elf", - "elf.ELFDATANONE": "debug/elf", - "elf.ELFMAG": "debug/elf", - "elf.ELFOSABI_86OPEN": "debug/elf", - "elf.ELFOSABI_AIX": "debug/elf", - "elf.ELFOSABI_ARM": "debug/elf", - "elf.ELFOSABI_AROS": "debug/elf", - "elf.ELFOSABI_CLOUDABI": "debug/elf", - "elf.ELFOSABI_FENIXOS": "debug/elf", - "elf.ELFOSABI_FREEBSD": "debug/elf", - "elf.ELFOSABI_HPUX": "debug/elf", - "elf.ELFOSABI_HURD": "debug/elf", - "elf.ELFOSABI_IRIX": "debug/elf", - "elf.ELFOSABI_LINUX": "debug/elf", - "elf.ELFOSABI_MODESTO": "debug/elf", - "elf.ELFOSABI_NETBSD": "debug/elf", - "elf.ELFOSABI_NONE": "debug/elf", - "elf.ELFOSABI_NSK": "debug/elf", - "elf.ELFOSABI_OPENBSD": "debug/elf", - "elf.ELFOSABI_OPENVMS": "debug/elf", - "elf.ELFOSABI_SOLARIS": "debug/elf", - "elf.ELFOSABI_STANDALONE": "debug/elf", - "elf.ELFOSABI_TRU64": "debug/elf", - "elf.EM_386": "debug/elf", - "elf.EM_486": "debug/elf", - "elf.EM_56800EX": "debug/elf", - "elf.EM_68HC05": "debug/elf", - "elf.EM_68HC08": "debug/elf", - "elf.EM_68HC11": "debug/elf", - "elf.EM_68HC12": "debug/elf", - "elf.EM_68HC16": "debug/elf", - "elf.EM_68K": "debug/elf", - "elf.EM_78KOR": "debug/elf", - "elf.EM_8051": "debug/elf", - "elf.EM_860": "debug/elf", - "elf.EM_88K": "debug/elf", - "elf.EM_960": "debug/elf", - "elf.EM_AARCH64": "debug/elf", - "elf.EM_ALPHA": "debug/elf", - "elf.EM_ALPHA_STD": "debug/elf", - "elf.EM_ALTERA_NIOS2": "debug/elf", - "elf.EM_AMDGPU": "debug/elf", - "elf.EM_ARC": "debug/elf", - "elf.EM_ARCA": "debug/elf", - "elf.EM_ARC_COMPACT": "debug/elf", - "elf.EM_ARC_COMPACT2": "debug/elf", - "elf.EM_ARM": "debug/elf", - "elf.EM_AVR": "debug/elf", - "elf.EM_AVR32": "debug/elf", - "elf.EM_BA1": "debug/elf", - "elf.EM_BA2": "debug/elf", - "elf.EM_BLACKFIN": "debug/elf", - "elf.EM_BPF": "debug/elf", - "elf.EM_C166": "debug/elf", - "elf.EM_CDP": "debug/elf", - "elf.EM_CE": "debug/elf", - "elf.EM_CLOUDSHIELD": "debug/elf", - "elf.EM_COGE": "debug/elf", - "elf.EM_COLDFIRE": "debug/elf", - "elf.EM_COOL": "debug/elf", - "elf.EM_COREA_1ST": "debug/elf", - "elf.EM_COREA_2ND": "debug/elf", - "elf.EM_CR": "debug/elf", - "elf.EM_CR16": "debug/elf", - "elf.EM_CRAYNV2": "debug/elf", - "elf.EM_CRIS": "debug/elf", - "elf.EM_CRX": "debug/elf", - "elf.EM_CSR_KALIMBA": "debug/elf", - "elf.EM_CUDA": "debug/elf", - "elf.EM_CYPRESS_M8C": "debug/elf", - "elf.EM_D10V": "debug/elf", - "elf.EM_D30V": "debug/elf", - "elf.EM_DSP24": "debug/elf", - "elf.EM_DSPIC30F": "debug/elf", - "elf.EM_DXP": "debug/elf", - "elf.EM_ECOG1": "debug/elf", - "elf.EM_ECOG16": "debug/elf", - "elf.EM_ECOG1X": "debug/elf", - "elf.EM_ECOG2": "debug/elf", - "elf.EM_ETPU": "debug/elf", - "elf.EM_EXCESS": "debug/elf", - "elf.EM_F2MC16": "debug/elf", - "elf.EM_FIREPATH": "debug/elf", - "elf.EM_FR20": "debug/elf", - "elf.EM_FR30": "debug/elf", - "elf.EM_FT32": "debug/elf", - "elf.EM_FX66": "debug/elf", - "elf.EM_H8S": "debug/elf", - "elf.EM_H8_300": "debug/elf", - "elf.EM_H8_300H": "debug/elf", - "elf.EM_H8_500": "debug/elf", - "elf.EM_HUANY": "debug/elf", - "elf.EM_IA_64": "debug/elf", - "elf.EM_INTEL205": "debug/elf", - "elf.EM_INTEL206": "debug/elf", - "elf.EM_INTEL207": "debug/elf", - "elf.EM_INTEL208": "debug/elf", - "elf.EM_INTEL209": "debug/elf", - "elf.EM_IP2K": "debug/elf", - "elf.EM_JAVELIN": "debug/elf", - "elf.EM_K10M": "debug/elf", - "elf.EM_KM32": "debug/elf", - "elf.EM_KMX16": "debug/elf", - "elf.EM_KMX32": "debug/elf", - "elf.EM_KMX8": "debug/elf", - "elf.EM_KVARC": "debug/elf", - "elf.EM_L10M": "debug/elf", - "elf.EM_LANAI": "debug/elf", - "elf.EM_LATTICEMICO32": "debug/elf", - "elf.EM_M16C": "debug/elf", - "elf.EM_M32": "debug/elf", - "elf.EM_M32C": "debug/elf", - "elf.EM_M32R": "debug/elf", - "elf.EM_MANIK": "debug/elf", - "elf.EM_MAX": "debug/elf", - "elf.EM_MAXQ30": "debug/elf", - "elf.EM_MCHP_PIC": "debug/elf", - "elf.EM_MCST_ELBRUS": "debug/elf", - "elf.EM_ME16": "debug/elf", - "elf.EM_METAG": "debug/elf", - "elf.EM_MICROBLAZE": "debug/elf", - "elf.EM_MIPS": "debug/elf", - "elf.EM_MIPS_RS3_LE": "debug/elf", - "elf.EM_MIPS_RS4_BE": "debug/elf", - "elf.EM_MIPS_X": "debug/elf", - "elf.EM_MMA": "debug/elf", - "elf.EM_MMDSP_PLUS": "debug/elf", - "elf.EM_MMIX": "debug/elf", - "elf.EM_MN10200": "debug/elf", - "elf.EM_MN10300": "debug/elf", - "elf.EM_MOXIE": "debug/elf", - "elf.EM_MSP430": "debug/elf", - "elf.EM_NCPU": "debug/elf", - "elf.EM_NDR1": "debug/elf", - "elf.EM_NDS32": "debug/elf", - "elf.EM_NONE": "debug/elf", - "elf.EM_NORC": "debug/elf", - "elf.EM_NS32K": "debug/elf", - "elf.EM_OPEN8": "debug/elf", - "elf.EM_OPENRISC": "debug/elf", - "elf.EM_PARISC": "debug/elf", - "elf.EM_PCP": "debug/elf", - "elf.EM_PDP10": "debug/elf", - "elf.EM_PDP11": "debug/elf", - "elf.EM_PDSP": "debug/elf", - "elf.EM_PJ": "debug/elf", - "elf.EM_PPC": "debug/elf", - "elf.EM_PPC64": "debug/elf", - "elf.EM_PRISM": "debug/elf", - "elf.EM_QDSP6": "debug/elf", - "elf.EM_R32C": "debug/elf", - "elf.EM_RCE": "debug/elf", - "elf.EM_RH32": "debug/elf", - "elf.EM_RISCV": "debug/elf", - "elf.EM_RL78": "debug/elf", - "elf.EM_RS08": "debug/elf", - "elf.EM_RX": "debug/elf", - "elf.EM_S370": "debug/elf", - "elf.EM_S390": "debug/elf", - "elf.EM_SCORE7": "debug/elf", - "elf.EM_SEP": "debug/elf", - "elf.EM_SE_C17": "debug/elf", - "elf.EM_SE_C33": "debug/elf", - "elf.EM_SH": "debug/elf", - "elf.EM_SHARC": "debug/elf", - "elf.EM_SLE9X": "debug/elf", - "elf.EM_SNP1K": "debug/elf", - "elf.EM_SPARC": "debug/elf", - "elf.EM_SPARC32PLUS": "debug/elf", - "elf.EM_SPARCV9": "debug/elf", - "elf.EM_ST100": "debug/elf", - "elf.EM_ST19": "debug/elf", - "elf.EM_ST200": "debug/elf", - "elf.EM_ST7": "debug/elf", - "elf.EM_ST9PLUS": "debug/elf", - "elf.EM_STARCORE": "debug/elf", - "elf.EM_STM8": "debug/elf", - "elf.EM_STXP7X": "debug/elf", - "elf.EM_SVX": "debug/elf", - "elf.EM_TILE64": "debug/elf", - "elf.EM_TILEGX": "debug/elf", - "elf.EM_TILEPRO": "debug/elf", - "elf.EM_TINYJ": "debug/elf", - "elf.EM_TI_ARP32": "debug/elf", - "elf.EM_TI_C2000": "debug/elf", - "elf.EM_TI_C5500": "debug/elf", - "elf.EM_TI_C6000": "debug/elf", - "elf.EM_TI_PRU": "debug/elf", - "elf.EM_TMM_GPP": "debug/elf", - "elf.EM_TPC": "debug/elf", - "elf.EM_TRICORE": "debug/elf", - "elf.EM_TRIMEDIA": "debug/elf", - "elf.EM_TSK3000": "debug/elf", - "elf.EM_UNICORE": "debug/elf", - "elf.EM_V800": "debug/elf", - "elf.EM_V850": "debug/elf", - "elf.EM_VAX": "debug/elf", - "elf.EM_VIDEOCORE": "debug/elf", - "elf.EM_VIDEOCORE3": "debug/elf", - "elf.EM_VIDEOCORE5": "debug/elf", - "elf.EM_VISIUM": "debug/elf", - "elf.EM_VPP500": "debug/elf", - "elf.EM_X86_64": "debug/elf", - "elf.EM_XCORE": "debug/elf", - "elf.EM_XGATE": "debug/elf", - "elf.EM_XIMO16": "debug/elf", - "elf.EM_XTENSA": "debug/elf", - "elf.EM_Z80": "debug/elf", - "elf.EM_ZSP": "debug/elf", - "elf.ET_CORE": "debug/elf", - "elf.ET_DYN": "debug/elf", - "elf.ET_EXEC": "debug/elf", - "elf.ET_HIOS": "debug/elf", - "elf.ET_HIPROC": "debug/elf", - "elf.ET_LOOS": "debug/elf", - "elf.ET_LOPROC": "debug/elf", - "elf.ET_NONE": "debug/elf", - "elf.ET_REL": "debug/elf", - "elf.EV_CURRENT": "debug/elf", - "elf.EV_NONE": "debug/elf", - "elf.ErrNoSymbols": "debug/elf", - "elf.File": "debug/elf", - "elf.FileHeader": "debug/elf", - "elf.FormatError": "debug/elf", - "elf.Header32": "debug/elf", - "elf.Header64": "debug/elf", - "elf.ImportedSymbol": "debug/elf", - "elf.Machine": "debug/elf", - "elf.NT_FPREGSET": "debug/elf", - "elf.NT_PRPSINFO": "debug/elf", - "elf.NT_PRSTATUS": "debug/elf", - "elf.NType": "debug/elf", - "elf.NewFile": "debug/elf", - "elf.OSABI": "debug/elf", - "elf.Open": "debug/elf", - "elf.PF_MASKOS": "debug/elf", - "elf.PF_MASKPROC": "debug/elf", - "elf.PF_R": "debug/elf", - "elf.PF_W": "debug/elf", - "elf.PF_X": "debug/elf", - "elf.PT_DYNAMIC": "debug/elf", - "elf.PT_HIOS": "debug/elf", - "elf.PT_HIPROC": "debug/elf", - "elf.PT_INTERP": "debug/elf", - "elf.PT_LOAD": "debug/elf", - "elf.PT_LOOS": "debug/elf", - "elf.PT_LOPROC": "debug/elf", - "elf.PT_NOTE": "debug/elf", - "elf.PT_NULL": "debug/elf", - "elf.PT_PHDR": "debug/elf", - "elf.PT_SHLIB": "debug/elf", - "elf.PT_TLS": "debug/elf", - "elf.Prog": "debug/elf", - "elf.Prog32": "debug/elf", - "elf.Prog64": "debug/elf", - "elf.ProgFlag": "debug/elf", - "elf.ProgHeader": "debug/elf", - "elf.ProgType": "debug/elf", - "elf.R_386": "debug/elf", - "elf.R_386_16": "debug/elf", - "elf.R_386_32": "debug/elf", - "elf.R_386_32PLT": "debug/elf", - "elf.R_386_8": "debug/elf", - "elf.R_386_COPY": "debug/elf", - "elf.R_386_GLOB_DAT": "debug/elf", - "elf.R_386_GOT32": "debug/elf", - "elf.R_386_GOT32X": "debug/elf", - "elf.R_386_GOTOFF": "debug/elf", - "elf.R_386_GOTPC": "debug/elf", - "elf.R_386_IRELATIVE": "debug/elf", - "elf.R_386_JMP_SLOT": "debug/elf", - "elf.R_386_NONE": "debug/elf", - "elf.R_386_PC16": "debug/elf", - "elf.R_386_PC32": "debug/elf", - "elf.R_386_PC8": "debug/elf", - "elf.R_386_PLT32": "debug/elf", - "elf.R_386_RELATIVE": "debug/elf", - "elf.R_386_SIZE32": "debug/elf", - "elf.R_386_TLS_DESC": "debug/elf", - "elf.R_386_TLS_DESC_CALL": "debug/elf", - "elf.R_386_TLS_DTPMOD32": "debug/elf", - "elf.R_386_TLS_DTPOFF32": "debug/elf", - "elf.R_386_TLS_GD": "debug/elf", - "elf.R_386_TLS_GD_32": "debug/elf", - "elf.R_386_TLS_GD_CALL": "debug/elf", - "elf.R_386_TLS_GD_POP": "debug/elf", - "elf.R_386_TLS_GD_PUSH": "debug/elf", - "elf.R_386_TLS_GOTDESC": "debug/elf", - "elf.R_386_TLS_GOTIE": "debug/elf", - "elf.R_386_TLS_IE": "debug/elf", - "elf.R_386_TLS_IE_32": "debug/elf", - "elf.R_386_TLS_LDM": "debug/elf", - "elf.R_386_TLS_LDM_32": "debug/elf", - "elf.R_386_TLS_LDM_CALL": "debug/elf", - "elf.R_386_TLS_LDM_POP": "debug/elf", - "elf.R_386_TLS_LDM_PUSH": "debug/elf", - "elf.R_386_TLS_LDO_32": "debug/elf", - "elf.R_386_TLS_LE": "debug/elf", - "elf.R_386_TLS_LE_32": "debug/elf", - "elf.R_386_TLS_TPOFF": "debug/elf", - "elf.R_386_TLS_TPOFF32": "debug/elf", - "elf.R_390": "debug/elf", - "elf.R_390_12": "debug/elf", - "elf.R_390_16": "debug/elf", - "elf.R_390_20": "debug/elf", - "elf.R_390_32": "debug/elf", - "elf.R_390_64": "debug/elf", - "elf.R_390_8": "debug/elf", - "elf.R_390_COPY": "debug/elf", - "elf.R_390_GLOB_DAT": "debug/elf", - "elf.R_390_GOT12": "debug/elf", - "elf.R_390_GOT16": "debug/elf", - "elf.R_390_GOT20": "debug/elf", - "elf.R_390_GOT32": "debug/elf", - "elf.R_390_GOT64": "debug/elf", - "elf.R_390_GOTENT": "debug/elf", - "elf.R_390_GOTOFF": "debug/elf", - "elf.R_390_GOTOFF16": "debug/elf", - "elf.R_390_GOTOFF64": "debug/elf", - "elf.R_390_GOTPC": "debug/elf", - "elf.R_390_GOTPCDBL": "debug/elf", - "elf.R_390_GOTPLT12": "debug/elf", - "elf.R_390_GOTPLT16": "debug/elf", - "elf.R_390_GOTPLT20": "debug/elf", - "elf.R_390_GOTPLT32": "debug/elf", - "elf.R_390_GOTPLT64": "debug/elf", - "elf.R_390_GOTPLTENT": "debug/elf", - "elf.R_390_GOTPLTOFF16": "debug/elf", - "elf.R_390_GOTPLTOFF32": "debug/elf", - "elf.R_390_GOTPLTOFF64": "debug/elf", - "elf.R_390_JMP_SLOT": "debug/elf", - "elf.R_390_NONE": "debug/elf", - "elf.R_390_PC16": "debug/elf", - "elf.R_390_PC16DBL": "debug/elf", - "elf.R_390_PC32": "debug/elf", - "elf.R_390_PC32DBL": "debug/elf", - "elf.R_390_PC64": "debug/elf", - "elf.R_390_PLT16DBL": "debug/elf", - "elf.R_390_PLT32": "debug/elf", - "elf.R_390_PLT32DBL": "debug/elf", - "elf.R_390_PLT64": "debug/elf", - "elf.R_390_RELATIVE": "debug/elf", - "elf.R_390_TLS_DTPMOD": "debug/elf", - "elf.R_390_TLS_DTPOFF": "debug/elf", - "elf.R_390_TLS_GD32": "debug/elf", - "elf.R_390_TLS_GD64": "debug/elf", - "elf.R_390_TLS_GDCALL": "debug/elf", - "elf.R_390_TLS_GOTIE12": "debug/elf", - "elf.R_390_TLS_GOTIE20": "debug/elf", - "elf.R_390_TLS_GOTIE32": "debug/elf", - "elf.R_390_TLS_GOTIE64": "debug/elf", - "elf.R_390_TLS_IE32": "debug/elf", - "elf.R_390_TLS_IE64": "debug/elf", - "elf.R_390_TLS_IEENT": "debug/elf", - "elf.R_390_TLS_LDCALL": "debug/elf", - "elf.R_390_TLS_LDM32": "debug/elf", - "elf.R_390_TLS_LDM64": "debug/elf", - "elf.R_390_TLS_LDO32": "debug/elf", - "elf.R_390_TLS_LDO64": "debug/elf", - "elf.R_390_TLS_LE32": "debug/elf", - "elf.R_390_TLS_LE64": "debug/elf", - "elf.R_390_TLS_LOAD": "debug/elf", - "elf.R_390_TLS_TPOFF": "debug/elf", - "elf.R_AARCH64": "debug/elf", - "elf.R_AARCH64_ABS16": "debug/elf", - "elf.R_AARCH64_ABS32": "debug/elf", - "elf.R_AARCH64_ABS64": "debug/elf", - "elf.R_AARCH64_ADD_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_ADR_GOT_PAGE": "debug/elf", - "elf.R_AARCH64_ADR_PREL_LO21": "debug/elf", - "elf.R_AARCH64_ADR_PREL_PG_HI21": "debug/elf", - "elf.R_AARCH64_ADR_PREL_PG_HI21_NC": "debug/elf", - "elf.R_AARCH64_CALL26": "debug/elf", - "elf.R_AARCH64_CONDBR19": "debug/elf", - "elf.R_AARCH64_COPY": "debug/elf", - "elf.R_AARCH64_GLOB_DAT": "debug/elf", - "elf.R_AARCH64_GOT_LD_PREL19": "debug/elf", - "elf.R_AARCH64_IRELATIVE": "debug/elf", - "elf.R_AARCH64_JUMP26": "debug/elf", - "elf.R_AARCH64_JUMP_SLOT": "debug/elf", - "elf.R_AARCH64_LD64_GOTOFF_LO15": "debug/elf", - "elf.R_AARCH64_LD64_GOTPAGE_LO15": "debug/elf", - "elf.R_AARCH64_LD64_GOT_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST128_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST16_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST32_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST64_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LDST8_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_LD_PREL_LO19": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G0": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G1": "debug/elf", - "elf.R_AARCH64_MOVW_SABS_G2": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G0": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G0_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G1": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G1_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G2": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G2_NC": "debug/elf", - "elf.R_AARCH64_MOVW_UABS_G3": "debug/elf", - "elf.R_AARCH64_NONE": "debug/elf", - "elf.R_AARCH64_NULL": "debug/elf", - "elf.R_AARCH64_P32_ABS16": "debug/elf", - "elf.R_AARCH64_P32_ABS32": "debug/elf", - "elf.R_AARCH64_P32_ADD_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_ADR_GOT_PAGE": "debug/elf", - "elf.R_AARCH64_P32_ADR_PREL_LO21": "debug/elf", - "elf.R_AARCH64_P32_ADR_PREL_PG_HI21": "debug/elf", - "elf.R_AARCH64_P32_CALL26": "debug/elf", - "elf.R_AARCH64_P32_CONDBR19": "debug/elf", - "elf.R_AARCH64_P32_COPY": "debug/elf", - "elf.R_AARCH64_P32_GLOB_DAT": "debug/elf", - "elf.R_AARCH64_P32_GOT_LD_PREL19": "debug/elf", - "elf.R_AARCH64_P32_IRELATIVE": "debug/elf", - "elf.R_AARCH64_P32_JUMP26": "debug/elf", - "elf.R_AARCH64_P32_JUMP_SLOT": "debug/elf", - "elf.R_AARCH64_P32_LD32_GOT_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST128_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST16_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST32_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST64_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LDST8_ABS_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_LD_PREL_LO19": "debug/elf", - "elf.R_AARCH64_P32_MOVW_SABS_G0": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G0": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G0_NC": "debug/elf", - "elf.R_AARCH64_P32_MOVW_UABS_G1": "debug/elf", - "elf.R_AARCH64_P32_PREL16": "debug/elf", - "elf.R_AARCH64_P32_PREL32": "debug/elf", - "elf.R_AARCH64_P32_RELATIVE": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_ADR_PREL21": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_CALL": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_LD32_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSDESC_LD_PREL19": "debug/elf", - "elf.R_AARCH64_P32_TLSGD_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSGD_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", - "elf.R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_HI12": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_LO12": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G0": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC": "debug/elf", - "elf.R_AARCH64_P32_TLSLE_MOVW_TPREL_G1": "debug/elf", - "elf.R_AARCH64_P32_TLS_DTPMOD": "debug/elf", - "elf.R_AARCH64_P32_TLS_DTPREL": "debug/elf", - "elf.R_AARCH64_P32_TLS_TPREL": "debug/elf", - "elf.R_AARCH64_P32_TSTBR14": "debug/elf", - "elf.R_AARCH64_PREL16": "debug/elf", - "elf.R_AARCH64_PREL32": "debug/elf", - "elf.R_AARCH64_PREL64": "debug/elf", - "elf.R_AARCH64_RELATIVE": "debug/elf", - "elf.R_AARCH64_TLSDESC": "debug/elf", - "elf.R_AARCH64_TLSDESC_ADD": "debug/elf", - "elf.R_AARCH64_TLSDESC_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSDESC_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_TLSDESC_ADR_PREL21": "debug/elf", - "elf.R_AARCH64_TLSDESC_CALL": "debug/elf", - "elf.R_AARCH64_TLSDESC_LD64_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSDESC_LDR": "debug/elf", - "elf.R_AARCH64_TLSDESC_LD_PREL19": "debug/elf", - "elf.R_AARCH64_TLSDESC_OFF_G0_NC": "debug/elf", - "elf.R_AARCH64_TLSDESC_OFF_G1": "debug/elf", - "elf.R_AARCH64_TLSGD_ADD_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSGD_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_TLSGD_ADR_PREL21": "debug/elf", - "elf.R_AARCH64_TLSGD_MOVW_G0_NC": "debug/elf", - "elf.R_AARCH64_TLSGD_MOVW_G1": "debug/elf", - "elf.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21": "debug/elf", - "elf.R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSIE_LD_GOTTPREL_PREL19": "debug/elf", - "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC": "debug/elf", - "elf.R_AARCH64_TLSIE_MOVW_GOTTPREL_G1": "debug/elf", - "elf.R_AARCH64_TLSLD_ADR_PAGE21": "debug/elf", - "elf.R_AARCH64_TLSLD_ADR_PREL21": "debug/elf", - "elf.R_AARCH64_TLSLD_LDST128_DTPREL_LO12": "debug/elf", - "elf.R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSLE_ADD_TPREL_HI12": "debug/elf", - "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12": "debug/elf", - "elf.R_AARCH64_TLSLE_ADD_TPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSLE_LDST128_TPREL_LO12": "debug/elf", - "elf.R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC": "debug/elf", - "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0": "debug/elf", - "elf.R_AARCH64_TLSLE_MOVW_TPREL_G0_NC": "debug/elf", - "elf.R_AARCH64_TLSLE_MOVW_TPREL_G1": "debug/elf", - "elf.R_AARCH64_TLSLE_MOVW_TPREL_G1_NC": "debug/elf", - "elf.R_AARCH64_TLSLE_MOVW_TPREL_G2": "debug/elf", - "elf.R_AARCH64_TLS_DTPMOD64": "debug/elf", - "elf.R_AARCH64_TLS_DTPREL64": "debug/elf", - "elf.R_AARCH64_TLS_TPREL64": "debug/elf", - "elf.R_AARCH64_TSTBR14": "debug/elf", - "elf.R_ALPHA": "debug/elf", - "elf.R_ALPHA_BRADDR": "debug/elf", - "elf.R_ALPHA_COPY": "debug/elf", - "elf.R_ALPHA_GLOB_DAT": "debug/elf", - "elf.R_ALPHA_GPDISP": "debug/elf", - "elf.R_ALPHA_GPREL32": "debug/elf", - "elf.R_ALPHA_GPRELHIGH": "debug/elf", - "elf.R_ALPHA_GPRELLOW": "debug/elf", - "elf.R_ALPHA_GPVALUE": "debug/elf", - "elf.R_ALPHA_HINT": "debug/elf", - "elf.R_ALPHA_IMMED_BR_HI32": "debug/elf", - "elf.R_ALPHA_IMMED_GP_16": "debug/elf", - "elf.R_ALPHA_IMMED_GP_HI32": "debug/elf", - "elf.R_ALPHA_IMMED_LO32": "debug/elf", - "elf.R_ALPHA_IMMED_SCN_HI32": "debug/elf", - "elf.R_ALPHA_JMP_SLOT": "debug/elf", - "elf.R_ALPHA_LITERAL": "debug/elf", - "elf.R_ALPHA_LITUSE": "debug/elf", - "elf.R_ALPHA_NONE": "debug/elf", - "elf.R_ALPHA_OP_PRSHIFT": "debug/elf", - "elf.R_ALPHA_OP_PSUB": "debug/elf", - "elf.R_ALPHA_OP_PUSH": "debug/elf", - "elf.R_ALPHA_OP_STORE": "debug/elf", - "elf.R_ALPHA_REFLONG": "debug/elf", - "elf.R_ALPHA_REFQUAD": "debug/elf", - "elf.R_ALPHA_RELATIVE": "debug/elf", - "elf.R_ALPHA_SREL16": "debug/elf", - "elf.R_ALPHA_SREL32": "debug/elf", - "elf.R_ALPHA_SREL64": "debug/elf", - "elf.R_ARM": "debug/elf", - "elf.R_ARM_ABS12": "debug/elf", - "elf.R_ARM_ABS16": "debug/elf", - "elf.R_ARM_ABS32": "debug/elf", - "elf.R_ARM_ABS32_NOI": "debug/elf", - "elf.R_ARM_ABS8": "debug/elf", - "elf.R_ARM_ALU_PCREL_15_8": "debug/elf", - "elf.R_ARM_ALU_PCREL_23_15": "debug/elf", - "elf.R_ARM_ALU_PCREL_7_0": "debug/elf", - "elf.R_ARM_ALU_PC_G0": "debug/elf", - "elf.R_ARM_ALU_PC_G0_NC": "debug/elf", - "elf.R_ARM_ALU_PC_G1": "debug/elf", - "elf.R_ARM_ALU_PC_G1_NC": "debug/elf", - "elf.R_ARM_ALU_PC_G2": "debug/elf", - "elf.R_ARM_ALU_SBREL_19_12_NC": "debug/elf", - "elf.R_ARM_ALU_SBREL_27_20_CK": "debug/elf", - "elf.R_ARM_ALU_SB_G0": "debug/elf", - "elf.R_ARM_ALU_SB_G0_NC": "debug/elf", - "elf.R_ARM_ALU_SB_G1": "debug/elf", - "elf.R_ARM_ALU_SB_G1_NC": "debug/elf", - "elf.R_ARM_ALU_SB_G2": "debug/elf", - "elf.R_ARM_AMP_VCALL9": "debug/elf", - "elf.R_ARM_BASE_ABS": "debug/elf", - "elf.R_ARM_CALL": "debug/elf", - "elf.R_ARM_COPY": "debug/elf", - "elf.R_ARM_GLOB_DAT": "debug/elf", - "elf.R_ARM_GNU_VTENTRY": "debug/elf", - "elf.R_ARM_GNU_VTINHERIT": "debug/elf", - "elf.R_ARM_GOT32": "debug/elf", - "elf.R_ARM_GOTOFF": "debug/elf", - "elf.R_ARM_GOTOFF12": "debug/elf", - "elf.R_ARM_GOTPC": "debug/elf", - "elf.R_ARM_GOTRELAX": "debug/elf", - "elf.R_ARM_GOT_ABS": "debug/elf", - "elf.R_ARM_GOT_BREL12": "debug/elf", - "elf.R_ARM_GOT_PREL": "debug/elf", - "elf.R_ARM_IRELATIVE": "debug/elf", - "elf.R_ARM_JUMP24": "debug/elf", - "elf.R_ARM_JUMP_SLOT": "debug/elf", - "elf.R_ARM_LDC_PC_G0": "debug/elf", - "elf.R_ARM_LDC_PC_G1": "debug/elf", - "elf.R_ARM_LDC_PC_G2": "debug/elf", - "elf.R_ARM_LDC_SB_G0": "debug/elf", - "elf.R_ARM_LDC_SB_G1": "debug/elf", - "elf.R_ARM_LDC_SB_G2": "debug/elf", - "elf.R_ARM_LDRS_PC_G0": "debug/elf", - "elf.R_ARM_LDRS_PC_G1": "debug/elf", - "elf.R_ARM_LDRS_PC_G2": "debug/elf", - "elf.R_ARM_LDRS_SB_G0": "debug/elf", - "elf.R_ARM_LDRS_SB_G1": "debug/elf", - "elf.R_ARM_LDRS_SB_G2": "debug/elf", - "elf.R_ARM_LDR_PC_G1": "debug/elf", - "elf.R_ARM_LDR_PC_G2": "debug/elf", - "elf.R_ARM_LDR_SBREL_11_10_NC": "debug/elf", - "elf.R_ARM_LDR_SB_G0": "debug/elf", - "elf.R_ARM_LDR_SB_G1": "debug/elf", - "elf.R_ARM_LDR_SB_G2": "debug/elf", - "elf.R_ARM_ME_TOO": "debug/elf", - "elf.R_ARM_MOVT_ABS": "debug/elf", - "elf.R_ARM_MOVT_BREL": "debug/elf", - "elf.R_ARM_MOVT_PREL": "debug/elf", - "elf.R_ARM_MOVW_ABS_NC": "debug/elf", - "elf.R_ARM_MOVW_BREL": "debug/elf", - "elf.R_ARM_MOVW_BREL_NC": "debug/elf", - "elf.R_ARM_MOVW_PREL_NC": "debug/elf", - "elf.R_ARM_NONE": "debug/elf", - "elf.R_ARM_PC13": "debug/elf", - "elf.R_ARM_PC24": "debug/elf", - "elf.R_ARM_PLT32": "debug/elf", - "elf.R_ARM_PLT32_ABS": "debug/elf", - "elf.R_ARM_PREL31": "debug/elf", - "elf.R_ARM_PRIVATE_0": "debug/elf", - "elf.R_ARM_PRIVATE_1": "debug/elf", - "elf.R_ARM_PRIVATE_10": "debug/elf", - "elf.R_ARM_PRIVATE_11": "debug/elf", - "elf.R_ARM_PRIVATE_12": "debug/elf", - "elf.R_ARM_PRIVATE_13": "debug/elf", - "elf.R_ARM_PRIVATE_14": "debug/elf", - "elf.R_ARM_PRIVATE_15": "debug/elf", - "elf.R_ARM_PRIVATE_2": "debug/elf", - "elf.R_ARM_PRIVATE_3": "debug/elf", - "elf.R_ARM_PRIVATE_4": "debug/elf", - "elf.R_ARM_PRIVATE_5": "debug/elf", - "elf.R_ARM_PRIVATE_6": "debug/elf", - "elf.R_ARM_PRIVATE_7": "debug/elf", - "elf.R_ARM_PRIVATE_8": "debug/elf", - "elf.R_ARM_PRIVATE_9": "debug/elf", - "elf.R_ARM_RABS32": "debug/elf", - "elf.R_ARM_RBASE": "debug/elf", - "elf.R_ARM_REL32": "debug/elf", - "elf.R_ARM_REL32_NOI": "debug/elf", - "elf.R_ARM_RELATIVE": "debug/elf", - "elf.R_ARM_RPC24": "debug/elf", - "elf.R_ARM_RREL32": "debug/elf", - "elf.R_ARM_RSBREL32": "debug/elf", - "elf.R_ARM_RXPC25": "debug/elf", - "elf.R_ARM_SBREL31": "debug/elf", - "elf.R_ARM_SBREL32": "debug/elf", - "elf.R_ARM_SWI24": "debug/elf", - "elf.R_ARM_TARGET1": "debug/elf", - "elf.R_ARM_TARGET2": "debug/elf", - "elf.R_ARM_THM_ABS5": "debug/elf", - "elf.R_ARM_THM_ALU_ABS_G0_NC": "debug/elf", - "elf.R_ARM_THM_ALU_ABS_G1_NC": "debug/elf", - "elf.R_ARM_THM_ALU_ABS_G2_NC": "debug/elf", - "elf.R_ARM_THM_ALU_ABS_G3": "debug/elf", - "elf.R_ARM_THM_ALU_PREL_11_0": "debug/elf", - "elf.R_ARM_THM_GOT_BREL12": "debug/elf", - "elf.R_ARM_THM_JUMP11": "debug/elf", - "elf.R_ARM_THM_JUMP19": "debug/elf", - "elf.R_ARM_THM_JUMP24": "debug/elf", - "elf.R_ARM_THM_JUMP6": "debug/elf", - "elf.R_ARM_THM_JUMP8": "debug/elf", - "elf.R_ARM_THM_MOVT_ABS": "debug/elf", - "elf.R_ARM_THM_MOVT_BREL": "debug/elf", - "elf.R_ARM_THM_MOVT_PREL": "debug/elf", - "elf.R_ARM_THM_MOVW_ABS_NC": "debug/elf", - "elf.R_ARM_THM_MOVW_BREL": "debug/elf", - "elf.R_ARM_THM_MOVW_BREL_NC": "debug/elf", - "elf.R_ARM_THM_MOVW_PREL_NC": "debug/elf", - "elf.R_ARM_THM_PC12": "debug/elf", - "elf.R_ARM_THM_PC22": "debug/elf", - "elf.R_ARM_THM_PC8": "debug/elf", - "elf.R_ARM_THM_RPC22": "debug/elf", - "elf.R_ARM_THM_SWI8": "debug/elf", - "elf.R_ARM_THM_TLS_CALL": "debug/elf", - "elf.R_ARM_THM_TLS_DESCSEQ16": "debug/elf", - "elf.R_ARM_THM_TLS_DESCSEQ32": "debug/elf", - "elf.R_ARM_THM_XPC22": "debug/elf", - "elf.R_ARM_TLS_CALL": "debug/elf", - "elf.R_ARM_TLS_DESCSEQ": "debug/elf", - "elf.R_ARM_TLS_DTPMOD32": "debug/elf", - "elf.R_ARM_TLS_DTPOFF32": "debug/elf", - "elf.R_ARM_TLS_GD32": "debug/elf", - "elf.R_ARM_TLS_GOTDESC": "debug/elf", - "elf.R_ARM_TLS_IE12GP": "debug/elf", - "elf.R_ARM_TLS_IE32": "debug/elf", - "elf.R_ARM_TLS_LDM32": "debug/elf", - "elf.R_ARM_TLS_LDO12": "debug/elf", - "elf.R_ARM_TLS_LDO32": "debug/elf", - "elf.R_ARM_TLS_LE12": "debug/elf", - "elf.R_ARM_TLS_LE32": "debug/elf", - "elf.R_ARM_TLS_TPOFF32": "debug/elf", - "elf.R_ARM_V4BX": "debug/elf", - "elf.R_ARM_XPC25": "debug/elf", - "elf.R_INFO": "debug/elf", - "elf.R_INFO32": "debug/elf", - "elf.R_MIPS": "debug/elf", - "elf.R_MIPS_16": "debug/elf", - "elf.R_MIPS_26": "debug/elf", - "elf.R_MIPS_32": "debug/elf", - "elf.R_MIPS_64": "debug/elf", - "elf.R_MIPS_ADD_IMMEDIATE": "debug/elf", - "elf.R_MIPS_CALL16": "debug/elf", - "elf.R_MIPS_CALL_HI16": "debug/elf", - "elf.R_MIPS_CALL_LO16": "debug/elf", - "elf.R_MIPS_DELETE": "debug/elf", - "elf.R_MIPS_GOT16": "debug/elf", - "elf.R_MIPS_GOT_DISP": "debug/elf", - "elf.R_MIPS_GOT_HI16": "debug/elf", - "elf.R_MIPS_GOT_LO16": "debug/elf", - "elf.R_MIPS_GOT_OFST": "debug/elf", - "elf.R_MIPS_GOT_PAGE": "debug/elf", - "elf.R_MIPS_GPREL16": "debug/elf", - "elf.R_MIPS_GPREL32": "debug/elf", - "elf.R_MIPS_HI16": "debug/elf", - "elf.R_MIPS_HIGHER": "debug/elf", - "elf.R_MIPS_HIGHEST": "debug/elf", - "elf.R_MIPS_INSERT_A": "debug/elf", - "elf.R_MIPS_INSERT_B": "debug/elf", - "elf.R_MIPS_JALR": "debug/elf", - "elf.R_MIPS_LITERAL": "debug/elf", - "elf.R_MIPS_LO16": "debug/elf", - "elf.R_MIPS_NONE": "debug/elf", - "elf.R_MIPS_PC16": "debug/elf", - "elf.R_MIPS_PJUMP": "debug/elf", - "elf.R_MIPS_REL16": "debug/elf", - "elf.R_MIPS_REL32": "debug/elf", - "elf.R_MIPS_RELGOT": "debug/elf", - "elf.R_MIPS_SCN_DISP": "debug/elf", - "elf.R_MIPS_SHIFT5": "debug/elf", - "elf.R_MIPS_SHIFT6": "debug/elf", - "elf.R_MIPS_SUB": "debug/elf", - "elf.R_MIPS_TLS_DTPMOD32": "debug/elf", - "elf.R_MIPS_TLS_DTPMOD64": "debug/elf", - "elf.R_MIPS_TLS_DTPREL32": "debug/elf", - "elf.R_MIPS_TLS_DTPREL64": "debug/elf", - "elf.R_MIPS_TLS_DTPREL_HI16": "debug/elf", - "elf.R_MIPS_TLS_DTPREL_LO16": "debug/elf", - "elf.R_MIPS_TLS_GD": "debug/elf", - "elf.R_MIPS_TLS_GOTTPREL": "debug/elf", - "elf.R_MIPS_TLS_LDM": "debug/elf", - "elf.R_MIPS_TLS_TPREL32": "debug/elf", - "elf.R_MIPS_TLS_TPREL64": "debug/elf", - "elf.R_MIPS_TLS_TPREL_HI16": "debug/elf", - "elf.R_MIPS_TLS_TPREL_LO16": "debug/elf", - "elf.R_PPC": "debug/elf", - "elf.R_PPC64": "debug/elf", - "elf.R_PPC64_ADDR14": "debug/elf", - "elf.R_PPC64_ADDR14_BRNTAKEN": "debug/elf", - "elf.R_PPC64_ADDR14_BRTAKEN": "debug/elf", - "elf.R_PPC64_ADDR16": "debug/elf", - "elf.R_PPC64_ADDR16_DS": "debug/elf", - "elf.R_PPC64_ADDR16_HA": "debug/elf", - "elf.R_PPC64_ADDR16_HI": "debug/elf", - "elf.R_PPC64_ADDR16_HIGH": "debug/elf", - "elf.R_PPC64_ADDR16_HIGHA": "debug/elf", - "elf.R_PPC64_ADDR16_HIGHER": "debug/elf", - "elf.R_PPC64_ADDR16_HIGHERA": "debug/elf", - "elf.R_PPC64_ADDR16_HIGHEST": "debug/elf", - "elf.R_PPC64_ADDR16_HIGHESTA": "debug/elf", - "elf.R_PPC64_ADDR16_LO": "debug/elf", - "elf.R_PPC64_ADDR16_LO_DS": "debug/elf", - "elf.R_PPC64_ADDR24": "debug/elf", - "elf.R_PPC64_ADDR32": "debug/elf", - "elf.R_PPC64_ADDR64": "debug/elf", - "elf.R_PPC64_ADDR64_LOCAL": "debug/elf", - "elf.R_PPC64_DTPMOD64": "debug/elf", - "elf.R_PPC64_DTPREL16": "debug/elf", - "elf.R_PPC64_DTPREL16_DS": "debug/elf", - "elf.R_PPC64_DTPREL16_HA": "debug/elf", - "elf.R_PPC64_DTPREL16_HI": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGH": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGHA": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGHER": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGHERA": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGHEST": "debug/elf", - "elf.R_PPC64_DTPREL16_HIGHESTA": "debug/elf", - "elf.R_PPC64_DTPREL16_LO": "debug/elf", - "elf.R_PPC64_DTPREL16_LO_DS": "debug/elf", - "elf.R_PPC64_DTPREL64": "debug/elf", - "elf.R_PPC64_ENTRY": "debug/elf", - "elf.R_PPC64_GOT16": "debug/elf", - "elf.R_PPC64_GOT16_DS": "debug/elf", - "elf.R_PPC64_GOT16_HA": "debug/elf", - "elf.R_PPC64_GOT16_HI": "debug/elf", - "elf.R_PPC64_GOT16_LO": "debug/elf", - "elf.R_PPC64_GOT16_LO_DS": "debug/elf", - "elf.R_PPC64_GOT_DTPREL16_DS": "debug/elf", - "elf.R_PPC64_GOT_DTPREL16_HA": "debug/elf", - "elf.R_PPC64_GOT_DTPREL16_HI": "debug/elf", - "elf.R_PPC64_GOT_DTPREL16_LO_DS": "debug/elf", - "elf.R_PPC64_GOT_TLSGD16": "debug/elf", - "elf.R_PPC64_GOT_TLSGD16_HA": "debug/elf", - "elf.R_PPC64_GOT_TLSGD16_HI": "debug/elf", - "elf.R_PPC64_GOT_TLSGD16_LO": "debug/elf", - "elf.R_PPC64_GOT_TLSLD16": "debug/elf", - "elf.R_PPC64_GOT_TLSLD16_HA": "debug/elf", - "elf.R_PPC64_GOT_TLSLD16_HI": "debug/elf", - "elf.R_PPC64_GOT_TLSLD16_LO": "debug/elf", - "elf.R_PPC64_GOT_TPREL16_DS": "debug/elf", - "elf.R_PPC64_GOT_TPREL16_HA": "debug/elf", - "elf.R_PPC64_GOT_TPREL16_HI": "debug/elf", - "elf.R_PPC64_GOT_TPREL16_LO_DS": "debug/elf", - "elf.R_PPC64_IRELATIVE": "debug/elf", - "elf.R_PPC64_JMP_IREL": "debug/elf", - "elf.R_PPC64_JMP_SLOT": "debug/elf", - "elf.R_PPC64_NONE": "debug/elf", - "elf.R_PPC64_PLT16_LO_DS": "debug/elf", - "elf.R_PPC64_PLTGOT16": "debug/elf", - "elf.R_PPC64_PLTGOT16_DS": "debug/elf", - "elf.R_PPC64_PLTGOT16_HA": "debug/elf", - "elf.R_PPC64_PLTGOT16_HI": "debug/elf", - "elf.R_PPC64_PLTGOT16_LO": "debug/elf", - "elf.R_PPC64_PLTGOT_LO_DS": "debug/elf", - "elf.R_PPC64_REL14": "debug/elf", - "elf.R_PPC64_REL14_BRNTAKEN": "debug/elf", - "elf.R_PPC64_REL14_BRTAKEN": "debug/elf", - "elf.R_PPC64_REL16": "debug/elf", - "elf.R_PPC64_REL16DX_HA": "debug/elf", - "elf.R_PPC64_REL16_HA": "debug/elf", - "elf.R_PPC64_REL16_HI": "debug/elf", - "elf.R_PPC64_REL16_LO": "debug/elf", - "elf.R_PPC64_REL24": "debug/elf", - "elf.R_PPC64_REL24_NOTOC": "debug/elf", - "elf.R_PPC64_REL32": "debug/elf", - "elf.R_PPC64_REL64": "debug/elf", - "elf.R_PPC64_SECTOFF_DS": "debug/elf", - "elf.R_PPC64_SECTOFF_LO_DS": "debug/elf", - "elf.R_PPC64_TLS": "debug/elf", - "elf.R_PPC64_TLSGD": "debug/elf", - "elf.R_PPC64_TLSLD": "debug/elf", - "elf.R_PPC64_TOC": "debug/elf", - "elf.R_PPC64_TOC16": "debug/elf", - "elf.R_PPC64_TOC16_DS": "debug/elf", - "elf.R_PPC64_TOC16_HA": "debug/elf", - "elf.R_PPC64_TOC16_HI": "debug/elf", - "elf.R_PPC64_TOC16_LO": "debug/elf", - "elf.R_PPC64_TOC16_LO_DS": "debug/elf", - "elf.R_PPC64_TOCSAVE": "debug/elf", - "elf.R_PPC64_TPREL16": "debug/elf", - "elf.R_PPC64_TPREL16_DS": "debug/elf", - "elf.R_PPC64_TPREL16_HA": "debug/elf", - "elf.R_PPC64_TPREL16_HI": "debug/elf", - "elf.R_PPC64_TPREL16_HIGH": "debug/elf", - "elf.R_PPC64_TPREL16_HIGHA": "debug/elf", - "elf.R_PPC64_TPREL16_HIGHER": "debug/elf", - "elf.R_PPC64_TPREL16_HIGHERA": "debug/elf", - "elf.R_PPC64_TPREL16_HIGHEST": "debug/elf", - "elf.R_PPC64_TPREL16_HIGHESTA": "debug/elf", - "elf.R_PPC64_TPREL16_LO": "debug/elf", - "elf.R_PPC64_TPREL16_LO_DS": "debug/elf", - "elf.R_PPC64_TPREL64": "debug/elf", - "elf.R_PPC_ADDR14": "debug/elf", - "elf.R_PPC_ADDR14_BRNTAKEN": "debug/elf", - "elf.R_PPC_ADDR14_BRTAKEN": "debug/elf", - "elf.R_PPC_ADDR16": "debug/elf", - "elf.R_PPC_ADDR16_HA": "debug/elf", - "elf.R_PPC_ADDR16_HI": "debug/elf", - "elf.R_PPC_ADDR16_LO": "debug/elf", - "elf.R_PPC_ADDR24": "debug/elf", - "elf.R_PPC_ADDR32": "debug/elf", - "elf.R_PPC_COPY": "debug/elf", - "elf.R_PPC_DTPMOD32": "debug/elf", - "elf.R_PPC_DTPREL16": "debug/elf", - "elf.R_PPC_DTPREL16_HA": "debug/elf", - "elf.R_PPC_DTPREL16_HI": "debug/elf", - "elf.R_PPC_DTPREL16_LO": "debug/elf", - "elf.R_PPC_DTPREL32": "debug/elf", - "elf.R_PPC_EMB_BIT_FLD": "debug/elf", - "elf.R_PPC_EMB_MRKREF": "debug/elf", - "elf.R_PPC_EMB_NADDR16": "debug/elf", - "elf.R_PPC_EMB_NADDR16_HA": "debug/elf", - "elf.R_PPC_EMB_NADDR16_HI": "debug/elf", - "elf.R_PPC_EMB_NADDR16_LO": "debug/elf", - "elf.R_PPC_EMB_NADDR32": "debug/elf", - "elf.R_PPC_EMB_RELSDA": "debug/elf", - "elf.R_PPC_EMB_RELSEC16": "debug/elf", - "elf.R_PPC_EMB_RELST_HA": "debug/elf", - "elf.R_PPC_EMB_RELST_HI": "debug/elf", - "elf.R_PPC_EMB_RELST_LO": "debug/elf", - "elf.R_PPC_EMB_SDA21": "debug/elf", - "elf.R_PPC_EMB_SDA2I16": "debug/elf", - "elf.R_PPC_EMB_SDA2REL": "debug/elf", - "elf.R_PPC_EMB_SDAI16": "debug/elf", - "elf.R_PPC_GLOB_DAT": "debug/elf", - "elf.R_PPC_GOT16": "debug/elf", - "elf.R_PPC_GOT16_HA": "debug/elf", - "elf.R_PPC_GOT16_HI": "debug/elf", - "elf.R_PPC_GOT16_LO": "debug/elf", - "elf.R_PPC_GOT_TLSGD16": "debug/elf", - "elf.R_PPC_GOT_TLSGD16_HA": "debug/elf", - "elf.R_PPC_GOT_TLSGD16_HI": "debug/elf", - "elf.R_PPC_GOT_TLSGD16_LO": "debug/elf", - "elf.R_PPC_GOT_TLSLD16": "debug/elf", - "elf.R_PPC_GOT_TLSLD16_HA": "debug/elf", - "elf.R_PPC_GOT_TLSLD16_HI": "debug/elf", - "elf.R_PPC_GOT_TLSLD16_LO": "debug/elf", - "elf.R_PPC_GOT_TPREL16": "debug/elf", - "elf.R_PPC_GOT_TPREL16_HA": "debug/elf", - "elf.R_PPC_GOT_TPREL16_HI": "debug/elf", - "elf.R_PPC_GOT_TPREL16_LO": "debug/elf", - "elf.R_PPC_JMP_SLOT": "debug/elf", - "elf.R_PPC_LOCAL24PC": "debug/elf", - "elf.R_PPC_NONE": "debug/elf", - "elf.R_PPC_PLT16_HA": "debug/elf", - "elf.R_PPC_PLT16_HI": "debug/elf", - "elf.R_PPC_PLT16_LO": "debug/elf", - "elf.R_PPC_PLT32": "debug/elf", - "elf.R_PPC_PLTREL24": "debug/elf", - "elf.R_PPC_PLTREL32": "debug/elf", - "elf.R_PPC_REL14": "debug/elf", - "elf.R_PPC_REL14_BRNTAKEN": "debug/elf", - "elf.R_PPC_REL14_BRTAKEN": "debug/elf", - "elf.R_PPC_REL24": "debug/elf", - "elf.R_PPC_REL32": "debug/elf", - "elf.R_PPC_RELATIVE": "debug/elf", - "elf.R_PPC_SDAREL16": "debug/elf", - "elf.R_PPC_SECTOFF": "debug/elf", - "elf.R_PPC_SECTOFF_HA": "debug/elf", - "elf.R_PPC_SECTOFF_HI": "debug/elf", - "elf.R_PPC_SECTOFF_LO": "debug/elf", - "elf.R_PPC_TLS": "debug/elf", - "elf.R_PPC_TPREL16": "debug/elf", - "elf.R_PPC_TPREL16_HA": "debug/elf", - "elf.R_PPC_TPREL16_HI": "debug/elf", - "elf.R_PPC_TPREL16_LO": "debug/elf", - "elf.R_PPC_TPREL32": "debug/elf", - "elf.R_PPC_UADDR16": "debug/elf", - "elf.R_PPC_UADDR32": "debug/elf", - "elf.R_RISCV": "debug/elf", - "elf.R_RISCV_32": "debug/elf", - "elf.R_RISCV_32_PCREL": "debug/elf", - "elf.R_RISCV_64": "debug/elf", - "elf.R_RISCV_ADD16": "debug/elf", - "elf.R_RISCV_ADD32": "debug/elf", - "elf.R_RISCV_ADD64": "debug/elf", - "elf.R_RISCV_ADD8": "debug/elf", - "elf.R_RISCV_ALIGN": "debug/elf", - "elf.R_RISCV_BRANCH": "debug/elf", - "elf.R_RISCV_CALL": "debug/elf", - "elf.R_RISCV_CALL_PLT": "debug/elf", - "elf.R_RISCV_COPY": "debug/elf", - "elf.R_RISCV_GNU_VTENTRY": "debug/elf", - "elf.R_RISCV_GNU_VTINHERIT": "debug/elf", - "elf.R_RISCV_GOT_HI20": "debug/elf", - "elf.R_RISCV_GPREL_I": "debug/elf", - "elf.R_RISCV_GPREL_S": "debug/elf", - "elf.R_RISCV_HI20": "debug/elf", - "elf.R_RISCV_JAL": "debug/elf", - "elf.R_RISCV_JUMP_SLOT": "debug/elf", - "elf.R_RISCV_LO12_I": "debug/elf", - "elf.R_RISCV_LO12_S": "debug/elf", - "elf.R_RISCV_NONE": "debug/elf", - "elf.R_RISCV_PCREL_HI20": "debug/elf", - "elf.R_RISCV_PCREL_LO12_I": "debug/elf", - "elf.R_RISCV_PCREL_LO12_S": "debug/elf", - "elf.R_RISCV_RELATIVE": "debug/elf", - "elf.R_RISCV_RELAX": "debug/elf", - "elf.R_RISCV_RVC_BRANCH": "debug/elf", - "elf.R_RISCV_RVC_JUMP": "debug/elf", - "elf.R_RISCV_RVC_LUI": "debug/elf", - "elf.R_RISCV_SET16": "debug/elf", - "elf.R_RISCV_SET32": "debug/elf", - "elf.R_RISCV_SET6": "debug/elf", - "elf.R_RISCV_SET8": "debug/elf", - "elf.R_RISCV_SUB16": "debug/elf", - "elf.R_RISCV_SUB32": "debug/elf", - "elf.R_RISCV_SUB6": "debug/elf", - "elf.R_RISCV_SUB64": "debug/elf", - "elf.R_RISCV_SUB8": "debug/elf", - "elf.R_RISCV_TLS_DTPMOD32": "debug/elf", - "elf.R_RISCV_TLS_DTPMOD64": "debug/elf", - "elf.R_RISCV_TLS_DTPREL32": "debug/elf", - "elf.R_RISCV_TLS_DTPREL64": "debug/elf", - "elf.R_RISCV_TLS_GD_HI20": "debug/elf", - "elf.R_RISCV_TLS_GOT_HI20": "debug/elf", - "elf.R_RISCV_TLS_TPREL32": "debug/elf", - "elf.R_RISCV_TLS_TPREL64": "debug/elf", - "elf.R_RISCV_TPREL_ADD": "debug/elf", - "elf.R_RISCV_TPREL_HI20": "debug/elf", - "elf.R_RISCV_TPREL_I": "debug/elf", - "elf.R_RISCV_TPREL_LO12_I": "debug/elf", - "elf.R_RISCV_TPREL_LO12_S": "debug/elf", - "elf.R_RISCV_TPREL_S": "debug/elf", - "elf.R_SPARC": "debug/elf", - "elf.R_SPARC_10": "debug/elf", - "elf.R_SPARC_11": "debug/elf", - "elf.R_SPARC_13": "debug/elf", - "elf.R_SPARC_16": "debug/elf", - "elf.R_SPARC_22": "debug/elf", - "elf.R_SPARC_32": "debug/elf", - "elf.R_SPARC_5": "debug/elf", - "elf.R_SPARC_6": "debug/elf", - "elf.R_SPARC_64": "debug/elf", - "elf.R_SPARC_7": "debug/elf", - "elf.R_SPARC_8": "debug/elf", - "elf.R_SPARC_COPY": "debug/elf", - "elf.R_SPARC_DISP16": "debug/elf", - "elf.R_SPARC_DISP32": "debug/elf", - "elf.R_SPARC_DISP64": "debug/elf", - "elf.R_SPARC_DISP8": "debug/elf", - "elf.R_SPARC_GLOB_DAT": "debug/elf", - "elf.R_SPARC_GLOB_JMP": "debug/elf", - "elf.R_SPARC_GOT10": "debug/elf", - "elf.R_SPARC_GOT13": "debug/elf", - "elf.R_SPARC_GOT22": "debug/elf", - "elf.R_SPARC_H44": "debug/elf", - "elf.R_SPARC_HH22": "debug/elf", - "elf.R_SPARC_HI22": "debug/elf", - "elf.R_SPARC_HIPLT22": "debug/elf", - "elf.R_SPARC_HIX22": "debug/elf", - "elf.R_SPARC_HM10": "debug/elf", - "elf.R_SPARC_JMP_SLOT": "debug/elf", - "elf.R_SPARC_L44": "debug/elf", - "elf.R_SPARC_LM22": "debug/elf", - "elf.R_SPARC_LO10": "debug/elf", - "elf.R_SPARC_LOPLT10": "debug/elf", - "elf.R_SPARC_LOX10": "debug/elf", - "elf.R_SPARC_M44": "debug/elf", - "elf.R_SPARC_NONE": "debug/elf", - "elf.R_SPARC_OLO10": "debug/elf", - "elf.R_SPARC_PC10": "debug/elf", - "elf.R_SPARC_PC22": "debug/elf", - "elf.R_SPARC_PCPLT10": "debug/elf", - "elf.R_SPARC_PCPLT22": "debug/elf", - "elf.R_SPARC_PCPLT32": "debug/elf", - "elf.R_SPARC_PC_HH22": "debug/elf", - "elf.R_SPARC_PC_HM10": "debug/elf", - "elf.R_SPARC_PC_LM22": "debug/elf", - "elf.R_SPARC_PLT32": "debug/elf", - "elf.R_SPARC_PLT64": "debug/elf", - "elf.R_SPARC_REGISTER": "debug/elf", - "elf.R_SPARC_RELATIVE": "debug/elf", - "elf.R_SPARC_UA16": "debug/elf", - "elf.R_SPARC_UA32": "debug/elf", - "elf.R_SPARC_UA64": "debug/elf", - "elf.R_SPARC_WDISP16": "debug/elf", - "elf.R_SPARC_WDISP19": "debug/elf", - "elf.R_SPARC_WDISP22": "debug/elf", - "elf.R_SPARC_WDISP30": "debug/elf", - "elf.R_SPARC_WPLT30": "debug/elf", - "elf.R_SYM32": "debug/elf", - "elf.R_SYM64": "debug/elf", - "elf.R_TYPE32": "debug/elf", - "elf.R_TYPE64": "debug/elf", - "elf.R_X86_64": "debug/elf", - "elf.R_X86_64_16": "debug/elf", - "elf.R_X86_64_32": "debug/elf", - "elf.R_X86_64_32S": "debug/elf", - "elf.R_X86_64_64": "debug/elf", - "elf.R_X86_64_8": "debug/elf", - "elf.R_X86_64_COPY": "debug/elf", - "elf.R_X86_64_DTPMOD64": "debug/elf", - "elf.R_X86_64_DTPOFF32": "debug/elf", - "elf.R_X86_64_DTPOFF64": "debug/elf", - "elf.R_X86_64_GLOB_DAT": "debug/elf", - "elf.R_X86_64_GOT32": "debug/elf", - "elf.R_X86_64_GOT64": "debug/elf", - "elf.R_X86_64_GOTOFF64": "debug/elf", - "elf.R_X86_64_GOTPC32": "debug/elf", - "elf.R_X86_64_GOTPC32_TLSDESC": "debug/elf", - "elf.R_X86_64_GOTPC64": "debug/elf", - "elf.R_X86_64_GOTPCREL": "debug/elf", - "elf.R_X86_64_GOTPCREL64": "debug/elf", - "elf.R_X86_64_GOTPCRELX": "debug/elf", - "elf.R_X86_64_GOTPLT64": "debug/elf", - "elf.R_X86_64_GOTTPOFF": "debug/elf", - "elf.R_X86_64_IRELATIVE": "debug/elf", - "elf.R_X86_64_JMP_SLOT": "debug/elf", - "elf.R_X86_64_NONE": "debug/elf", - "elf.R_X86_64_PC16": "debug/elf", - "elf.R_X86_64_PC32": "debug/elf", - "elf.R_X86_64_PC32_BND": "debug/elf", - "elf.R_X86_64_PC64": "debug/elf", - "elf.R_X86_64_PC8": "debug/elf", - "elf.R_X86_64_PLT32": "debug/elf", - "elf.R_X86_64_PLT32_BND": "debug/elf", - "elf.R_X86_64_PLTOFF64": "debug/elf", - "elf.R_X86_64_RELATIVE": "debug/elf", - "elf.R_X86_64_RELATIVE64": "debug/elf", - "elf.R_X86_64_REX_GOTPCRELX": "debug/elf", - "elf.R_X86_64_SIZE32": "debug/elf", - "elf.R_X86_64_SIZE64": "debug/elf", - "elf.R_X86_64_TLSDESC": "debug/elf", - "elf.R_X86_64_TLSDESC_CALL": "debug/elf", - "elf.R_X86_64_TLSGD": "debug/elf", - "elf.R_X86_64_TLSLD": "debug/elf", - "elf.R_X86_64_TPOFF32": "debug/elf", - "elf.R_X86_64_TPOFF64": "debug/elf", - "elf.Rel32": "debug/elf", - "elf.Rel64": "debug/elf", - "elf.Rela32": "debug/elf", - "elf.Rela64": "debug/elf", - "elf.SHF_ALLOC": "debug/elf", - "elf.SHF_COMPRESSED": "debug/elf", - "elf.SHF_EXECINSTR": "debug/elf", - "elf.SHF_GROUP": "debug/elf", - "elf.SHF_INFO_LINK": "debug/elf", - "elf.SHF_LINK_ORDER": "debug/elf", - "elf.SHF_MASKOS": "debug/elf", - "elf.SHF_MASKPROC": "debug/elf", - "elf.SHF_MERGE": "debug/elf", - "elf.SHF_OS_NONCONFORMING": "debug/elf", - "elf.SHF_STRINGS": "debug/elf", - "elf.SHF_TLS": "debug/elf", - "elf.SHF_WRITE": "debug/elf", - "elf.SHN_ABS": "debug/elf", - "elf.SHN_COMMON": "debug/elf", - "elf.SHN_HIOS": "debug/elf", - "elf.SHN_HIPROC": "debug/elf", - "elf.SHN_HIRESERVE": "debug/elf", - "elf.SHN_LOOS": "debug/elf", - "elf.SHN_LOPROC": "debug/elf", - "elf.SHN_LORESERVE": "debug/elf", - "elf.SHN_UNDEF": "debug/elf", - "elf.SHN_XINDEX": "debug/elf", - "elf.SHT_DYNAMIC": "debug/elf", - "elf.SHT_DYNSYM": "debug/elf", - "elf.SHT_FINI_ARRAY": "debug/elf", - "elf.SHT_GNU_ATTRIBUTES": "debug/elf", - "elf.SHT_GNU_HASH": "debug/elf", - "elf.SHT_GNU_LIBLIST": "debug/elf", - "elf.SHT_GNU_VERDEF": "debug/elf", - "elf.SHT_GNU_VERNEED": "debug/elf", - "elf.SHT_GNU_VERSYM": "debug/elf", - "elf.SHT_GROUP": "debug/elf", - "elf.SHT_HASH": "debug/elf", - "elf.SHT_HIOS": "debug/elf", - "elf.SHT_HIPROC": "debug/elf", - "elf.SHT_HIUSER": "debug/elf", - "elf.SHT_INIT_ARRAY": "debug/elf", - "elf.SHT_LOOS": "debug/elf", - "elf.SHT_LOPROC": "debug/elf", - "elf.SHT_LOUSER": "debug/elf", - "elf.SHT_NOBITS": "debug/elf", - "elf.SHT_NOTE": "debug/elf", - "elf.SHT_NULL": "debug/elf", - "elf.SHT_PREINIT_ARRAY": "debug/elf", - "elf.SHT_PROGBITS": "debug/elf", - "elf.SHT_REL": "debug/elf", - "elf.SHT_RELA": "debug/elf", - "elf.SHT_SHLIB": "debug/elf", - "elf.SHT_STRTAB": "debug/elf", - "elf.SHT_SYMTAB": "debug/elf", - "elf.SHT_SYMTAB_SHNDX": "debug/elf", - "elf.STB_GLOBAL": "debug/elf", - "elf.STB_HIOS": "debug/elf", - "elf.STB_HIPROC": "debug/elf", - "elf.STB_LOCAL": "debug/elf", - "elf.STB_LOOS": "debug/elf", - "elf.STB_LOPROC": "debug/elf", - "elf.STB_WEAK": "debug/elf", - "elf.STT_COMMON": "debug/elf", - "elf.STT_FILE": "debug/elf", - "elf.STT_FUNC": "debug/elf", - "elf.STT_HIOS": "debug/elf", - "elf.STT_HIPROC": "debug/elf", - "elf.STT_LOOS": "debug/elf", - "elf.STT_LOPROC": "debug/elf", - "elf.STT_NOTYPE": "debug/elf", - "elf.STT_OBJECT": "debug/elf", - "elf.STT_SECTION": "debug/elf", - "elf.STT_TLS": "debug/elf", - "elf.STV_DEFAULT": "debug/elf", - "elf.STV_HIDDEN": "debug/elf", - "elf.STV_INTERNAL": "debug/elf", - "elf.STV_PROTECTED": "debug/elf", - "elf.ST_BIND": "debug/elf", - "elf.ST_INFO": "debug/elf", - "elf.ST_TYPE": "debug/elf", - "elf.ST_VISIBILITY": "debug/elf", - "elf.Section": "debug/elf", - "elf.Section32": "debug/elf", - "elf.Section64": "debug/elf", - "elf.SectionFlag": "debug/elf", - "elf.SectionHeader": "debug/elf", - "elf.SectionIndex": "debug/elf", - "elf.SectionType": "debug/elf", - "elf.Sym32": "debug/elf", - "elf.Sym32Size": "debug/elf", - "elf.Sym64": "debug/elf", - "elf.Sym64Size": "debug/elf", - "elf.SymBind": "debug/elf", - "elf.SymType": "debug/elf", - "elf.SymVis": "debug/elf", - "elf.Symbol": "debug/elf", - "elf.Type": "debug/elf", - "elf.Version": "debug/elf", - "elliptic.Curve": "crypto/elliptic", - "elliptic.CurveParams": "crypto/elliptic", - "elliptic.GenerateKey": "crypto/elliptic", - "elliptic.Marshal": "crypto/elliptic", - "elliptic.P224": "crypto/elliptic", - "elliptic.P256": "crypto/elliptic", - "elliptic.P384": "crypto/elliptic", - "elliptic.P521": "crypto/elliptic", - "elliptic.Unmarshal": "crypto/elliptic", - "encoding.BinaryMarshaler": "encoding", - "encoding.BinaryUnmarshaler": "encoding", - "encoding.TextMarshaler": "encoding", - "encoding.TextUnmarshaler": "encoding", - "errors.As": "errors", - "errors.Is": "errors", - "errors.New": "errors", - "errors.Unwrap": "errors", - "exec.Cmd": "os/exec", - "exec.Command": "os/exec", - "exec.CommandContext": "os/exec", - "exec.ErrNotFound": "os/exec", - "exec.Error": "os/exec", - "exec.ExitError": "os/exec", - "exec.LookPath": "os/exec", - "expvar.Do": "expvar", - "expvar.Float": "expvar", - "expvar.Func": "expvar", - "expvar.Get": "expvar", - "expvar.Handler": "expvar", - "expvar.Int": "expvar", - "expvar.KeyValue": "expvar", - "expvar.Map": "expvar", - "expvar.NewFloat": "expvar", - "expvar.NewInt": "expvar", - "expvar.NewMap": "expvar", - "expvar.NewString": "expvar", - "expvar.Publish": "expvar", - "expvar.String": "expvar", - "expvar.Var": "expvar", - "fcgi.ErrConnClosed": "net/http/fcgi", - "fcgi.ErrRequestAborted": "net/http/fcgi", - "fcgi.ProcessEnv": "net/http/fcgi", - "fcgi.Serve": "net/http/fcgi", - "filepath.Abs": "path/filepath", - "filepath.Base": "path/filepath", - "filepath.Clean": "path/filepath", - "filepath.Dir": "path/filepath", - "filepath.ErrBadPattern": "path/filepath", - "filepath.EvalSymlinks": "path/filepath", - "filepath.Ext": "path/filepath", - "filepath.FromSlash": "path/filepath", - "filepath.Glob": "path/filepath", - "filepath.HasPrefix": "path/filepath", - "filepath.IsAbs": "path/filepath", - "filepath.Join": "path/filepath", - "filepath.ListSeparator": "path/filepath", - "filepath.Match": "path/filepath", - "filepath.Rel": "path/filepath", - "filepath.Separator": "path/filepath", - "filepath.SkipDir": "path/filepath", - "filepath.Split": "path/filepath", - "filepath.SplitList": "path/filepath", - "filepath.ToSlash": "path/filepath", - "filepath.VolumeName": "path/filepath", - "filepath.Walk": "path/filepath", - "filepath.WalkFunc": "path/filepath", - "flag.Arg": "flag", - "flag.Args": "flag", - "flag.Bool": "flag", - "flag.BoolVar": "flag", - "flag.CommandLine": "flag", - "flag.ContinueOnError": "flag", - "flag.Duration": "flag", - "flag.DurationVar": "flag", - "flag.ErrHelp": "flag", - "flag.ErrorHandling": "flag", - "flag.ExitOnError": "flag", - "flag.Flag": "flag", - "flag.FlagSet": "flag", - "flag.Float64": "flag", - "flag.Float64Var": "flag", - "flag.Getter": "flag", - "flag.Int": "flag", - "flag.Int64": "flag", - "flag.Int64Var": "flag", - "flag.IntVar": "flag", - "flag.Lookup": "flag", - "flag.NArg": "flag", - "flag.NFlag": "flag", - "flag.NewFlagSet": "flag", - "flag.PanicOnError": "flag", - "flag.Parse": "flag", - "flag.Parsed": "flag", - "flag.PrintDefaults": "flag", - "flag.Set": "flag", - "flag.String": "flag", - "flag.StringVar": "flag", - "flag.Uint": "flag", - "flag.Uint64": "flag", - "flag.Uint64Var": "flag", - "flag.UintVar": "flag", - "flag.UnquoteUsage": "flag", - "flag.Usage": "flag", - "flag.Value": "flag", - "flag.Var": "flag", - "flag.Visit": "flag", - "flag.VisitAll": "flag", - "flate.BestCompression": "compress/flate", - "flate.BestSpeed": "compress/flate", - "flate.CorruptInputError": "compress/flate", - "flate.DefaultCompression": "compress/flate", - "flate.HuffmanOnly": "compress/flate", - "flate.InternalError": "compress/flate", - "flate.NewReader": "compress/flate", - "flate.NewReaderDict": "compress/flate", - "flate.NewWriter": "compress/flate", - "flate.NewWriterDict": "compress/flate", - "flate.NoCompression": "compress/flate", - "flate.ReadError": "compress/flate", - "flate.Reader": "compress/flate", - "flate.Resetter": "compress/flate", - "flate.WriteError": "compress/flate", - "flate.Writer": "compress/flate", - "fmt.Errorf": "fmt", - "fmt.Formatter": "fmt", - "fmt.Fprint": "fmt", - "fmt.Fprintf": "fmt", - "fmt.Fprintln": "fmt", - "fmt.Fscan": "fmt", - "fmt.Fscanf": "fmt", - "fmt.Fscanln": "fmt", - "fmt.GoStringer": "fmt", - "fmt.Print": "fmt", - "fmt.Printf": "fmt", - "fmt.Println": "fmt", - "fmt.Scan": "fmt", - "fmt.ScanState": "fmt", - "fmt.Scanf": "fmt", - "fmt.Scanln": "fmt", - "fmt.Scanner": "fmt", - "fmt.Sprint": "fmt", - "fmt.Sprintf": "fmt", - "fmt.Sprintln": "fmt", - "fmt.Sscan": "fmt", - "fmt.Sscanf": "fmt", - "fmt.Sscanln": "fmt", - "fmt.State": "fmt", - "fmt.Stringer": "fmt", - "fnv.New128": "hash/fnv", - "fnv.New128a": "hash/fnv", - "fnv.New32": "hash/fnv", - "fnv.New32a": "hash/fnv", - "fnv.New64": "hash/fnv", - "fnv.New64a": "hash/fnv", - "format.Node": "go/format", - "format.Source": "go/format", - "gif.Decode": "image/gif", - "gif.DecodeAll": "image/gif", - "gif.DecodeConfig": "image/gif", - "gif.DisposalBackground": "image/gif", - "gif.DisposalNone": "image/gif", - "gif.DisposalPrevious": "image/gif", - "gif.Encode": "image/gif", - "gif.EncodeAll": "image/gif", - "gif.GIF": "image/gif", - "gif.Options": "image/gif", - "gob.CommonType": "encoding/gob", - "gob.Decoder": "encoding/gob", - "gob.Encoder": "encoding/gob", - "gob.GobDecoder": "encoding/gob", - "gob.GobEncoder": "encoding/gob", - "gob.NewDecoder": "encoding/gob", - "gob.NewEncoder": "encoding/gob", - "gob.Register": "encoding/gob", - "gob.RegisterName": "encoding/gob", - "gosym.DecodingError": "debug/gosym", - "gosym.Func": "debug/gosym", - "gosym.LineTable": "debug/gosym", - "gosym.NewLineTable": "debug/gosym", - "gosym.NewTable": "debug/gosym", - "gosym.Obj": "debug/gosym", - "gosym.Sym": "debug/gosym", - "gosym.Table": "debug/gosym", - "gosym.UnknownFileError": "debug/gosym", - "gosym.UnknownLineError": "debug/gosym", - "gzip.BestCompression": "compress/gzip", - "gzip.BestSpeed": "compress/gzip", - "gzip.DefaultCompression": "compress/gzip", - "gzip.ErrChecksum": "compress/gzip", - "gzip.ErrHeader": "compress/gzip", - "gzip.Header": "compress/gzip", - "gzip.HuffmanOnly": "compress/gzip", - "gzip.NewReader": "compress/gzip", - "gzip.NewWriter": "compress/gzip", - "gzip.NewWriterLevel": "compress/gzip", - "gzip.NoCompression": "compress/gzip", - "gzip.Reader": "compress/gzip", - "gzip.Writer": "compress/gzip", - "hash.Hash": "hash", - "hash.Hash32": "hash", - "hash.Hash64": "hash", - "heap.Fix": "container/heap", - "heap.Init": "container/heap", - "heap.Interface": "container/heap", - "heap.Pop": "container/heap", - "heap.Push": "container/heap", - "heap.Remove": "container/heap", - "hex.Decode": "encoding/hex", - "hex.DecodeString": "encoding/hex", - "hex.DecodedLen": "encoding/hex", - "hex.Dump": "encoding/hex", - "hex.Dumper": "encoding/hex", - "hex.Encode": "encoding/hex", - "hex.EncodeToString": "encoding/hex", - "hex.EncodedLen": "encoding/hex", - "hex.ErrLength": "encoding/hex", - "hex.InvalidByteError": "encoding/hex", - "hex.NewDecoder": "encoding/hex", - "hex.NewEncoder": "encoding/hex", - "hmac.Equal": "crypto/hmac", - "hmac.New": "crypto/hmac", - "html.EscapeString": "html", - "html.UnescapeString": "html", - "http.CanonicalHeaderKey": "net/http", - "http.Client": "net/http", - "http.CloseNotifier": "net/http", - "http.ConnState": "net/http", - "http.Cookie": "net/http", - "http.CookieJar": "net/http", - "http.DefaultClient": "net/http", - "http.DefaultMaxHeaderBytes": "net/http", - "http.DefaultMaxIdleConnsPerHost": "net/http", - "http.DefaultServeMux": "net/http", - "http.DefaultTransport": "net/http", - "http.DetectContentType": "net/http", - "http.Dir": "net/http", - "http.ErrAbortHandler": "net/http", - "http.ErrBodyNotAllowed": "net/http", - "http.ErrBodyReadAfterClose": "net/http", - "http.ErrContentLength": "net/http", - "http.ErrHandlerTimeout": "net/http", - "http.ErrHeaderTooLong": "net/http", - "http.ErrHijacked": "net/http", - "http.ErrLineTooLong": "net/http", - "http.ErrMissingBoundary": "net/http", - "http.ErrMissingContentLength": "net/http", - "http.ErrMissingFile": "net/http", - "http.ErrNoCookie": "net/http", - "http.ErrNoLocation": "net/http", - "http.ErrNotMultipart": "net/http", - "http.ErrNotSupported": "net/http", - "http.ErrServerClosed": "net/http", - "http.ErrShortBody": "net/http", - "http.ErrSkipAltProtocol": "net/http", - "http.ErrUnexpectedTrailer": "net/http", - "http.ErrUseLastResponse": "net/http", - "http.ErrWriteAfterFlush": "net/http", - "http.Error": "net/http", - "http.File": "net/http", - "http.FileServer": "net/http", - "http.FileSystem": "net/http", - "http.Flusher": "net/http", - "http.Get": "net/http", - "http.Handle": "net/http", - "http.HandleFunc": "net/http", - "http.Handler": "net/http", - "http.HandlerFunc": "net/http", - "http.Head": "net/http", - "http.Header": "net/http", - "http.Hijacker": "net/http", - "http.ListenAndServe": "net/http", - "http.ListenAndServeTLS": "net/http", - "http.LocalAddrContextKey": "net/http", - "http.MaxBytesReader": "net/http", - "http.MethodConnect": "net/http", - "http.MethodDelete": "net/http", - "http.MethodGet": "net/http", - "http.MethodHead": "net/http", - "http.MethodOptions": "net/http", - "http.MethodPatch": "net/http", - "http.MethodPost": "net/http", - "http.MethodPut": "net/http", - "http.MethodTrace": "net/http", - "http.NewFileTransport": "net/http", - "http.NewRequest": "net/http", - "http.NewRequestWithContext": "net/http", - "http.NewServeMux": "net/http", - "http.NoBody": "net/http", - "http.NotFound": "net/http", - "http.NotFoundHandler": "net/http", - "http.ParseHTTPVersion": "net/http", - "http.ParseTime": "net/http", - "http.Post": "net/http", - "http.PostForm": "net/http", - "http.ProtocolError": "net/http", - "http.ProxyFromEnvironment": "net/http", - "http.ProxyURL": "net/http", - "http.PushOptions": "net/http", - "http.Pusher": "net/http", - "http.ReadRequest": "net/http", - "http.ReadResponse": "net/http", - "http.Redirect": "net/http", - "http.RedirectHandler": "net/http", - "http.Request": "net/http", - "http.Response": "net/http", - "http.ResponseWriter": "net/http", - "http.RoundTripper": "net/http", - "http.SameSite": "net/http", - "http.SameSiteDefaultMode": "net/http", - "http.SameSiteLaxMode": "net/http", - "http.SameSiteNoneMode": "net/http", - "http.SameSiteStrictMode": "net/http", - "http.Serve": "net/http", - "http.ServeContent": "net/http", - "http.ServeFile": "net/http", - "http.ServeMux": "net/http", - "http.ServeTLS": "net/http", - "http.Server": "net/http", - "http.ServerContextKey": "net/http", - "http.SetCookie": "net/http", - "http.StateActive": "net/http", - "http.StateClosed": "net/http", - "http.StateHijacked": "net/http", - "http.StateIdle": "net/http", - "http.StateNew": "net/http", - "http.StatusAccepted": "net/http", - "http.StatusAlreadyReported": "net/http", - "http.StatusBadGateway": "net/http", - "http.StatusBadRequest": "net/http", - "http.StatusConflict": "net/http", - "http.StatusContinue": "net/http", - "http.StatusCreated": "net/http", - "http.StatusEarlyHints": "net/http", - "http.StatusExpectationFailed": "net/http", - "http.StatusFailedDependency": "net/http", - "http.StatusForbidden": "net/http", - "http.StatusFound": "net/http", - "http.StatusGatewayTimeout": "net/http", - "http.StatusGone": "net/http", - "http.StatusHTTPVersionNotSupported": "net/http", - "http.StatusIMUsed": "net/http", - "http.StatusInsufficientStorage": "net/http", - "http.StatusInternalServerError": "net/http", - "http.StatusLengthRequired": "net/http", - "http.StatusLocked": "net/http", - "http.StatusLoopDetected": "net/http", - "http.StatusMethodNotAllowed": "net/http", - "http.StatusMisdirectedRequest": "net/http", - "http.StatusMovedPermanently": "net/http", - "http.StatusMultiStatus": "net/http", - "http.StatusMultipleChoices": "net/http", - "http.StatusNetworkAuthenticationRequired": "net/http", - "http.StatusNoContent": "net/http", - "http.StatusNonAuthoritativeInfo": "net/http", - "http.StatusNotAcceptable": "net/http", - "http.StatusNotExtended": "net/http", - "http.StatusNotFound": "net/http", - "http.StatusNotImplemented": "net/http", - "http.StatusNotModified": "net/http", - "http.StatusOK": "net/http", - "http.StatusPartialContent": "net/http", - "http.StatusPaymentRequired": "net/http", - "http.StatusPermanentRedirect": "net/http", - "http.StatusPreconditionFailed": "net/http", - "http.StatusPreconditionRequired": "net/http", - "http.StatusProcessing": "net/http", - "http.StatusProxyAuthRequired": "net/http", - "http.StatusRequestEntityTooLarge": "net/http", - "http.StatusRequestHeaderFieldsTooLarge": "net/http", - "http.StatusRequestTimeout": "net/http", - "http.StatusRequestURITooLong": "net/http", - "http.StatusRequestedRangeNotSatisfiable": "net/http", - "http.StatusResetContent": "net/http", - "http.StatusSeeOther": "net/http", - "http.StatusServiceUnavailable": "net/http", - "http.StatusSwitchingProtocols": "net/http", - "http.StatusTeapot": "net/http", - "http.StatusTemporaryRedirect": "net/http", - "http.StatusText": "net/http", - "http.StatusTooEarly": "net/http", - "http.StatusTooManyRequests": "net/http", - "http.StatusUnauthorized": "net/http", - "http.StatusUnavailableForLegalReasons": "net/http", - "http.StatusUnprocessableEntity": "net/http", - "http.StatusUnsupportedMediaType": "net/http", - "http.StatusUpgradeRequired": "net/http", - "http.StatusUseProxy": "net/http", - "http.StatusVariantAlsoNegotiates": "net/http", - "http.StripPrefix": "net/http", - "http.TimeFormat": "net/http", - "http.TimeoutHandler": "net/http", - "http.TrailerPrefix": "net/http", - "http.Transport": "net/http", - "httptest.DefaultRemoteAddr": "net/http/httptest", - "httptest.NewRecorder": "net/http/httptest", - "httptest.NewRequest": "net/http/httptest", - "httptest.NewServer": "net/http/httptest", - "httptest.NewTLSServer": "net/http/httptest", - "httptest.NewUnstartedServer": "net/http/httptest", - "httptest.ResponseRecorder": "net/http/httptest", - "httptest.Server": "net/http/httptest", - "httptrace.ClientTrace": "net/http/httptrace", - "httptrace.ContextClientTrace": "net/http/httptrace", - "httptrace.DNSDoneInfo": "net/http/httptrace", - "httptrace.DNSStartInfo": "net/http/httptrace", - "httptrace.GotConnInfo": "net/http/httptrace", - "httptrace.WithClientTrace": "net/http/httptrace", - "httptrace.WroteRequestInfo": "net/http/httptrace", - "httputil.BufferPool": "net/http/httputil", - "httputil.ClientConn": "net/http/httputil", - "httputil.DumpRequest": "net/http/httputil", - "httputil.DumpRequestOut": "net/http/httputil", - "httputil.DumpResponse": "net/http/httputil", - "httputil.ErrClosed": "net/http/httputil", - "httputil.ErrLineTooLong": "net/http/httputil", - "httputil.ErrPersistEOF": "net/http/httputil", - "httputil.ErrPipeline": "net/http/httputil", - "httputil.NewChunkedReader": "net/http/httputil", - "httputil.NewChunkedWriter": "net/http/httputil", - "httputil.NewClientConn": "net/http/httputil", - "httputil.NewProxyClientConn": "net/http/httputil", - "httputil.NewServerConn": "net/http/httputil", - "httputil.NewSingleHostReverseProxy": "net/http/httputil", - "httputil.ReverseProxy": "net/http/httputil", - "httputil.ServerConn": "net/http/httputil", - "image.Alpha": "image", - "image.Alpha16": "image", - "image.Black": "image", - "image.CMYK": "image", - "image.Config": "image", - "image.Decode": "image", - "image.DecodeConfig": "image", - "image.ErrFormat": "image", - "image.Gray": "image", - "image.Gray16": "image", - "image.Image": "image", - "image.NRGBA": "image", - "image.NRGBA64": "image", - "image.NYCbCrA": "image", - "image.NewAlpha": "image", - "image.NewAlpha16": "image", - "image.NewCMYK": "image", - "image.NewGray": "image", - "image.NewGray16": "image", - "image.NewNRGBA": "image", - "image.NewNRGBA64": "image", - "image.NewNYCbCrA": "image", - "image.NewPaletted": "image", - "image.NewRGBA": "image", - "image.NewRGBA64": "image", - "image.NewUniform": "image", - "image.NewYCbCr": "image", - "image.Opaque": "image", - "image.Paletted": "image", - "image.PalettedImage": "image", - "image.Point": "image", - "image.Pt": "image", - "image.RGBA": "image", - "image.RGBA64": "image", - "image.Rect": "image", - "image.Rectangle": "image", - "image.RegisterFormat": "image", - "image.Transparent": "image", - "image.Uniform": "image", - "image.White": "image", - "image.YCbCr": "image", - "image.YCbCrSubsampleRatio": "image", - "image.YCbCrSubsampleRatio410": "image", - "image.YCbCrSubsampleRatio411": "image", - "image.YCbCrSubsampleRatio420": "image", - "image.YCbCrSubsampleRatio422": "image", - "image.YCbCrSubsampleRatio440": "image", - "image.YCbCrSubsampleRatio444": "image", - "image.ZP": "image", - "image.ZR": "image", - "importer.Default": "go/importer", - "importer.For": "go/importer", - "importer.ForCompiler": "go/importer", - "importer.Lookup": "go/importer", - "io.ByteReader": "io", - "io.ByteScanner": "io", - "io.ByteWriter": "io", - "io.Closer": "io", - "io.Copy": "io", - "io.CopyBuffer": "io", - "io.CopyN": "io", - "io.EOF": "io", - "io.ErrClosedPipe": "io", - "io.ErrNoProgress": "io", - "io.ErrShortBuffer": "io", - "io.ErrShortWrite": "io", - "io.ErrUnexpectedEOF": "io", - "io.LimitReader": "io", - "io.LimitedReader": "io", - "io.MultiReader": "io", - "io.MultiWriter": "io", - "io.NewSectionReader": "io", - "io.Pipe": "io", - "io.PipeReader": "io", - "io.PipeWriter": "io", - "io.ReadAtLeast": "io", - "io.ReadCloser": "io", - "io.ReadFull": "io", - "io.ReadSeeker": "io", - "io.ReadWriteCloser": "io", - "io.ReadWriteSeeker": "io", - "io.ReadWriter": "io", - "io.Reader": "io", - "io.ReaderAt": "io", - "io.ReaderFrom": "io", - "io.RuneReader": "io", - "io.RuneScanner": "io", - "io.SectionReader": "io", - "io.SeekCurrent": "io", - "io.SeekEnd": "io", - "io.SeekStart": "io", - "io.Seeker": "io", - "io.StringWriter": "io", - "io.TeeReader": "io", - "io.WriteCloser": "io", - "io.WriteSeeker": "io", - "io.WriteString": "io", - "io.Writer": "io", - "io.WriterAt": "io", - "io.WriterTo": "io", - "iotest.DataErrReader": "testing/iotest", - "iotest.ErrTimeout": "testing/iotest", - "iotest.HalfReader": "testing/iotest", - "iotest.NewReadLogger": "testing/iotest", - "iotest.NewWriteLogger": "testing/iotest", - "iotest.OneByteReader": "testing/iotest", - "iotest.TimeoutReader": "testing/iotest", - "iotest.TruncateWriter": "testing/iotest", - "ioutil.Discard": "io/ioutil", - "ioutil.NopCloser": "io/ioutil", - "ioutil.ReadAll": "io/ioutil", - "ioutil.ReadDir": "io/ioutil", - "ioutil.ReadFile": "io/ioutil", - "ioutil.TempDir": "io/ioutil", - "ioutil.TempFile": "io/ioutil", - "ioutil.WriteFile": "io/ioutil", - "jpeg.Decode": "image/jpeg", - "jpeg.DecodeConfig": "image/jpeg", - "jpeg.DefaultQuality": "image/jpeg", - "jpeg.Encode": "image/jpeg", - "jpeg.FormatError": "image/jpeg", - "jpeg.Options": "image/jpeg", - "jpeg.Reader": "image/jpeg", - "jpeg.UnsupportedError": "image/jpeg", - "json.Compact": "encoding/json", - "json.Decoder": "encoding/json", - "json.Delim": "encoding/json", - "json.Encoder": "encoding/json", - "json.HTMLEscape": "encoding/json", - "json.Indent": "encoding/json", - "json.InvalidUTF8Error": "encoding/json", - "json.InvalidUnmarshalError": "encoding/json", - "json.Marshal": "encoding/json", - "json.MarshalIndent": "encoding/json", - "json.Marshaler": "encoding/json", - "json.MarshalerError": "encoding/json", - "json.NewDecoder": "encoding/json", - "json.NewEncoder": "encoding/json", - "json.Number": "encoding/json", - "json.RawMessage": "encoding/json", - "json.SyntaxError": "encoding/json", - "json.Token": "encoding/json", - "json.Unmarshal": "encoding/json", - "json.UnmarshalFieldError": "encoding/json", - "json.UnmarshalTypeError": "encoding/json", - "json.Unmarshaler": "encoding/json", - "json.UnsupportedTypeError": "encoding/json", - "json.UnsupportedValueError": "encoding/json", - "json.Valid": "encoding/json", - "jsonrpc.Dial": "net/rpc/jsonrpc", - "jsonrpc.NewClient": "net/rpc/jsonrpc", - "jsonrpc.NewClientCodec": "net/rpc/jsonrpc", - "jsonrpc.NewServerCodec": "net/rpc/jsonrpc", - "jsonrpc.ServeConn": "net/rpc/jsonrpc", - "list.Element": "container/list", - "list.List": "container/list", - "list.New": "container/list", - "log.Fatal": "log", - "log.Fatalf": "log", - "log.Fatalln": "log", - "log.Flags": "log", - "log.LUTC": "log", - "log.Ldate": "log", - "log.Llongfile": "log", - "log.Lmicroseconds": "log", - "log.Lmsgprefix": "log", - "log.Logger": "log", - "log.Lshortfile": "log", - "log.LstdFlags": "log", - "log.Ltime": "log", - "log.New": "log", - "log.Output": "log", - "log.Panic": "log", - "log.Panicf": "log", - "log.Panicln": "log", - "log.Prefix": "log", - "log.Print": "log", - "log.Printf": "log", - "log.Println": "log", - "log.SetFlags": "log", - "log.SetOutput": "log", - "log.SetPrefix": "log", - "log.Writer": "log", - "lzw.LSB": "compress/lzw", - "lzw.MSB": "compress/lzw", - "lzw.NewReader": "compress/lzw", - "lzw.NewWriter": "compress/lzw", - "lzw.Order": "compress/lzw", - "macho.ARM64_RELOC_ADDEND": "debug/macho", - "macho.ARM64_RELOC_BRANCH26": "debug/macho", - "macho.ARM64_RELOC_GOT_LOAD_PAGE21": "debug/macho", - "macho.ARM64_RELOC_GOT_LOAD_PAGEOFF12": "debug/macho", - "macho.ARM64_RELOC_PAGE21": "debug/macho", - "macho.ARM64_RELOC_PAGEOFF12": "debug/macho", - "macho.ARM64_RELOC_POINTER_TO_GOT": "debug/macho", - "macho.ARM64_RELOC_SUBTRACTOR": "debug/macho", - "macho.ARM64_RELOC_TLVP_LOAD_PAGE21": "debug/macho", - "macho.ARM64_RELOC_TLVP_LOAD_PAGEOFF12": "debug/macho", - "macho.ARM64_RELOC_UNSIGNED": "debug/macho", - "macho.ARM_RELOC_BR24": "debug/macho", - "macho.ARM_RELOC_HALF": "debug/macho", - "macho.ARM_RELOC_HALF_SECTDIFF": "debug/macho", - "macho.ARM_RELOC_LOCAL_SECTDIFF": "debug/macho", - "macho.ARM_RELOC_PAIR": "debug/macho", - "macho.ARM_RELOC_PB_LA_PTR": "debug/macho", - "macho.ARM_RELOC_SECTDIFF": "debug/macho", - "macho.ARM_RELOC_VANILLA": "debug/macho", - "macho.ARM_THUMB_32BIT_BRANCH": "debug/macho", - "macho.ARM_THUMB_RELOC_BR22": "debug/macho", - "macho.Cpu": "debug/macho", - "macho.Cpu386": "debug/macho", - "macho.CpuAmd64": "debug/macho", - "macho.CpuArm": "debug/macho", - "macho.CpuArm64": "debug/macho", - "macho.CpuPpc": "debug/macho", - "macho.CpuPpc64": "debug/macho", - "macho.Dylib": "debug/macho", - "macho.DylibCmd": "debug/macho", - "macho.Dysymtab": "debug/macho", - "macho.DysymtabCmd": "debug/macho", - "macho.ErrNotFat": "debug/macho", - "macho.FatArch": "debug/macho", - "macho.FatArchHeader": "debug/macho", - "macho.FatFile": "debug/macho", - "macho.File": "debug/macho", - "macho.FileHeader": "debug/macho", - "macho.FlagAllModsBound": "debug/macho", - "macho.FlagAllowStackExecution": "debug/macho", - "macho.FlagAppExtensionSafe": "debug/macho", - "macho.FlagBindAtLoad": "debug/macho", - "macho.FlagBindsToWeak": "debug/macho", - "macho.FlagCanonical": "debug/macho", - "macho.FlagDeadStrippableDylib": "debug/macho", - "macho.FlagDyldLink": "debug/macho", - "macho.FlagForceFlat": "debug/macho", - "macho.FlagHasTLVDescriptors": "debug/macho", - "macho.FlagIncrLink": "debug/macho", - "macho.FlagLazyInit": "debug/macho", - "macho.FlagNoFixPrebinding": "debug/macho", - "macho.FlagNoHeapExecution": "debug/macho", - "macho.FlagNoMultiDefs": "debug/macho", - "macho.FlagNoReexportedDylibs": "debug/macho", - "macho.FlagNoUndefs": "debug/macho", - "macho.FlagPIE": "debug/macho", - "macho.FlagPrebindable": "debug/macho", - "macho.FlagPrebound": "debug/macho", - "macho.FlagRootSafe": "debug/macho", - "macho.FlagSetuidSafe": "debug/macho", - "macho.FlagSplitSegs": "debug/macho", - "macho.FlagSubsectionsViaSymbols": "debug/macho", - "macho.FlagTwoLevel": "debug/macho", - "macho.FlagWeakDefines": "debug/macho", - "macho.FormatError": "debug/macho", - "macho.GENERIC_RELOC_LOCAL_SECTDIFF": "debug/macho", - "macho.GENERIC_RELOC_PAIR": "debug/macho", - "macho.GENERIC_RELOC_PB_LA_PTR": "debug/macho", - "macho.GENERIC_RELOC_SECTDIFF": "debug/macho", - "macho.GENERIC_RELOC_TLV": "debug/macho", - "macho.GENERIC_RELOC_VANILLA": "debug/macho", - "macho.Load": "debug/macho", - "macho.LoadBytes": "debug/macho", - "macho.LoadCmd": "debug/macho", - "macho.LoadCmdDylib": "debug/macho", - "macho.LoadCmdDylinker": "debug/macho", - "macho.LoadCmdDysymtab": "debug/macho", - "macho.LoadCmdRpath": "debug/macho", - "macho.LoadCmdSegment": "debug/macho", - "macho.LoadCmdSegment64": "debug/macho", - "macho.LoadCmdSymtab": "debug/macho", - "macho.LoadCmdThread": "debug/macho", - "macho.LoadCmdUnixThread": "debug/macho", - "macho.Magic32": "debug/macho", - "macho.Magic64": "debug/macho", - "macho.MagicFat": "debug/macho", - "macho.NewFatFile": "debug/macho", - "macho.NewFile": "debug/macho", - "macho.Nlist32": "debug/macho", - "macho.Nlist64": "debug/macho", - "macho.Open": "debug/macho", - "macho.OpenFat": "debug/macho", - "macho.Regs386": "debug/macho", - "macho.RegsAMD64": "debug/macho", - "macho.Reloc": "debug/macho", - "macho.RelocTypeARM": "debug/macho", - "macho.RelocTypeARM64": "debug/macho", - "macho.RelocTypeGeneric": "debug/macho", - "macho.RelocTypeX86_64": "debug/macho", - "macho.Rpath": "debug/macho", - "macho.RpathCmd": "debug/macho", - "macho.Section": "debug/macho", - "macho.Section32": "debug/macho", - "macho.Section64": "debug/macho", - "macho.SectionHeader": "debug/macho", - "macho.Segment": "debug/macho", - "macho.Segment32": "debug/macho", - "macho.Segment64": "debug/macho", - "macho.SegmentHeader": "debug/macho", - "macho.Symbol": "debug/macho", - "macho.Symtab": "debug/macho", - "macho.SymtabCmd": "debug/macho", - "macho.Thread": "debug/macho", - "macho.Type": "debug/macho", - "macho.TypeBundle": "debug/macho", - "macho.TypeDylib": "debug/macho", - "macho.TypeExec": "debug/macho", - "macho.TypeObj": "debug/macho", - "macho.X86_64_RELOC_BRANCH": "debug/macho", - "macho.X86_64_RELOC_GOT": "debug/macho", - "macho.X86_64_RELOC_GOT_LOAD": "debug/macho", - "macho.X86_64_RELOC_SIGNED": "debug/macho", - "macho.X86_64_RELOC_SIGNED_1": "debug/macho", - "macho.X86_64_RELOC_SIGNED_2": "debug/macho", - "macho.X86_64_RELOC_SIGNED_4": "debug/macho", - "macho.X86_64_RELOC_SUBTRACTOR": "debug/macho", - "macho.X86_64_RELOC_TLV": "debug/macho", - "macho.X86_64_RELOC_UNSIGNED": "debug/macho", - "mail.Address": "net/mail", - "mail.AddressParser": "net/mail", - "mail.ErrHeaderNotPresent": "net/mail", - "mail.Header": "net/mail", - "mail.Message": "net/mail", - "mail.ParseAddress": "net/mail", - "mail.ParseAddressList": "net/mail", - "mail.ParseDate": "net/mail", - "mail.ReadMessage": "net/mail", - "maphash.Hash": "hash/maphash", - "maphash.MakeSeed": "hash/maphash", - "maphash.Seed": "hash/maphash", - "math.Abs": "math", - "math.Acos": "math", - "math.Acosh": "math", - "math.Asin": "math", - "math.Asinh": "math", - "math.Atan": "math", - "math.Atan2": "math", - "math.Atanh": "math", - "math.Cbrt": "math", - "math.Ceil": "math", - "math.Copysign": "math", - "math.Cos": "math", - "math.Cosh": "math", - "math.Dim": "math", - "math.E": "math", - "math.Erf": "math", - "math.Erfc": "math", - "math.Erfcinv": "math", - "math.Erfinv": "math", - "math.Exp": "math", - "math.Exp2": "math", - "math.Expm1": "math", - "math.FMA": "math", - "math.Float32bits": "math", - "math.Float32frombits": "math", - "math.Float64bits": "math", - "math.Float64frombits": "math", - "math.Floor": "math", - "math.Frexp": "math", - "math.Gamma": "math", - "math.Hypot": "math", - "math.Ilogb": "math", - "math.Inf": "math", - "math.IsInf": "math", - "math.IsNaN": "math", - "math.J0": "math", - "math.J1": "math", - "math.Jn": "math", - "math.Ldexp": "math", - "math.Lgamma": "math", - "math.Ln10": "math", - "math.Ln2": "math", - "math.Log": "math", - "math.Log10": "math", - "math.Log10E": "math", - "math.Log1p": "math", - "math.Log2": "math", - "math.Log2E": "math", - "math.Logb": "math", - "math.Max": "math", - "math.MaxFloat32": "math", - "math.MaxFloat64": "math", - "math.MaxInt16": "math", - "math.MaxInt32": "math", - "math.MaxInt64": "math", - "math.MaxInt8": "math", - "math.MaxUint16": "math", - "math.MaxUint32": "math", - "math.MaxUint64": "math", - "math.MaxUint8": "math", - "math.Min": "math", - "math.MinInt16": "math", - "math.MinInt32": "math", - "math.MinInt64": "math", - "math.MinInt8": "math", - "math.Mod": "math", - "math.Modf": "math", - "math.NaN": "math", - "math.Nextafter": "math", - "math.Nextafter32": "math", - "math.Phi": "math", - "math.Pi": "math", - "math.Pow": "math", - "math.Pow10": "math", - "math.Remainder": "math", - "math.Round": "math", - "math.RoundToEven": "math", - "math.Signbit": "math", - "math.Sin": "math", - "math.Sincos": "math", - "math.Sinh": "math", - "math.SmallestNonzeroFloat32": "math", - "math.SmallestNonzeroFloat64": "math", - "math.Sqrt": "math", - "math.Sqrt2": "math", - "math.SqrtE": "math", - "math.SqrtPhi": "math", - "math.SqrtPi": "math", - "math.Tan": "math", - "math.Tanh": "math", - "math.Trunc": "math", - "math.Y0": "math", - "math.Y1": "math", - "math.Yn": "math", - "md5.BlockSize": "crypto/md5", - "md5.New": "crypto/md5", - "md5.Size": "crypto/md5", - "md5.Sum": "crypto/md5", - "mime.AddExtensionType": "mime", - "mime.BEncoding": "mime", - "mime.ErrInvalidMediaParameter": "mime", - "mime.ExtensionsByType": "mime", - "mime.FormatMediaType": "mime", - "mime.ParseMediaType": "mime", - "mime.QEncoding": "mime", - "mime.TypeByExtension": "mime", - "mime.WordDecoder": "mime", - "mime.WordEncoder": "mime", - "multipart.ErrMessageTooLarge": "mime/multipart", - "multipart.File": "mime/multipart", - "multipart.FileHeader": "mime/multipart", - "multipart.Form": "mime/multipart", - "multipart.NewReader": "mime/multipart", - "multipart.NewWriter": "mime/multipart", - "multipart.Part": "mime/multipart", - "multipart.Reader": "mime/multipart", - "multipart.Writer": "mime/multipart", - "net.Addr": "net", - "net.AddrError": "net", - "net.Buffers": "net", - "net.CIDRMask": "net", - "net.Conn": "net", - "net.DNSConfigError": "net", - "net.DNSError": "net", - "net.DefaultResolver": "net", - "net.Dial": "net", - "net.DialIP": "net", - "net.DialTCP": "net", - "net.DialTimeout": "net", - "net.DialUDP": "net", - "net.DialUnix": "net", - "net.Dialer": "net", - "net.ErrWriteToConnected": "net", - "net.Error": "net", - "net.FileConn": "net", - "net.FileListener": "net", - "net.FilePacketConn": "net", - "net.FlagBroadcast": "net", - "net.FlagLoopback": "net", - "net.FlagMulticast": "net", - "net.FlagPointToPoint": "net", - "net.FlagUp": "net", - "net.Flags": "net", - "net.HardwareAddr": "net", - "net.IP": "net", - "net.IPAddr": "net", - "net.IPConn": "net", - "net.IPMask": "net", - "net.IPNet": "net", - "net.IPv4": "net", - "net.IPv4Mask": "net", - "net.IPv4allrouter": "net", - "net.IPv4allsys": "net", - "net.IPv4bcast": "net", - "net.IPv4len": "net", - "net.IPv4zero": "net", - "net.IPv6interfacelocalallnodes": "net", - "net.IPv6len": "net", - "net.IPv6linklocalallnodes": "net", - "net.IPv6linklocalallrouters": "net", - "net.IPv6loopback": "net", - "net.IPv6unspecified": "net", - "net.IPv6zero": "net", - "net.Interface": "net", - "net.InterfaceAddrs": "net", - "net.InterfaceByIndex": "net", - "net.InterfaceByName": "net", - "net.Interfaces": "net", - "net.InvalidAddrError": "net", - "net.JoinHostPort": "net", - "net.Listen": "net", - "net.ListenConfig": "net", - "net.ListenIP": "net", - "net.ListenMulticastUDP": "net", - "net.ListenPacket": "net", - "net.ListenTCP": "net", - "net.ListenUDP": "net", - "net.ListenUnix": "net", - "net.ListenUnixgram": "net", - "net.Listener": "net", - "net.LookupAddr": "net", - "net.LookupCNAME": "net", - "net.LookupHost": "net", - "net.LookupIP": "net", - "net.LookupMX": "net", - "net.LookupNS": "net", - "net.LookupPort": "net", - "net.LookupSRV": "net", - "net.LookupTXT": "net", - "net.MX": "net", - "net.NS": "net", - "net.OpError": "net", - "net.PacketConn": "net", - "net.ParseCIDR": "net", - "net.ParseError": "net", - "net.ParseIP": "net", - "net.ParseMAC": "net", - "net.Pipe": "net", - "net.ResolveIPAddr": "net", - "net.ResolveTCPAddr": "net", - "net.ResolveUDPAddr": "net", - "net.ResolveUnixAddr": "net", - "net.Resolver": "net", - "net.SRV": "net", - "net.SplitHostPort": "net", - "net.TCPAddr": "net", - "net.TCPConn": "net", - "net.TCPListener": "net", - "net.UDPAddr": "net", - "net.UDPConn": "net", - "net.UnixAddr": "net", - "net.UnixConn": "net", - "net.UnixListener": "net", - "net.UnknownNetworkError": "net", - "os.Args": "os", - "os.Chdir": "os", - "os.Chmod": "os", - "os.Chown": "os", - "os.Chtimes": "os", - "os.Clearenv": "os", - "os.Create": "os", - "os.DevNull": "os", - "os.Environ": "os", - "os.ErrClosed": "os", - "os.ErrExist": "os", - "os.ErrInvalid": "os", - "os.ErrNoDeadline": "os", - "os.ErrNotExist": "os", - "os.ErrPermission": "os", - "os.Executable": "os", - "os.Exit": "os", - "os.Expand": "os", - "os.ExpandEnv": "os", - "os.File": "os", - "os.FileInfo": "os", - "os.FileMode": "os", - "os.FindProcess": "os", - "os.Getegid": "os", - "os.Getenv": "os", - "os.Geteuid": "os", - "os.Getgid": "os", - "os.Getgroups": "os", - "os.Getpagesize": "os", - "os.Getpid": "os", - "os.Getppid": "os", - "os.Getuid": "os", - "os.Getwd": "os", - "os.Hostname": "os", - "os.Interrupt": "os", - "os.IsExist": "os", - "os.IsNotExist": "os", - "os.IsPathSeparator": "os", - "os.IsPermission": "os", - "os.IsTimeout": "os", - "os.Kill": "os", - "os.Lchown": "os", - "os.Link": "os", - "os.LinkError": "os", - "os.LookupEnv": "os", - "os.Lstat": "os", - "os.Mkdir": "os", - "os.MkdirAll": "os", - "os.ModeAppend": "os", - "os.ModeCharDevice": "os", - "os.ModeDevice": "os", - "os.ModeDir": "os", - "os.ModeExclusive": "os", - "os.ModeIrregular": "os", - "os.ModeNamedPipe": "os", - "os.ModePerm": "os", - "os.ModeSetgid": "os", - "os.ModeSetuid": "os", - "os.ModeSocket": "os", - "os.ModeSticky": "os", - "os.ModeSymlink": "os", - "os.ModeTemporary": "os", - "os.ModeType": "os", - "os.NewFile": "os", - "os.NewSyscallError": "os", - "os.O_APPEND": "os", - "os.O_CREATE": "os", - "os.O_EXCL": "os", - "os.O_RDONLY": "os", - "os.O_RDWR": "os", - "os.O_SYNC": "os", - "os.O_TRUNC": "os", - "os.O_WRONLY": "os", - "os.Open": "os", - "os.OpenFile": "os", - "os.PathError": "os", - "os.PathListSeparator": "os", - "os.PathSeparator": "os", - "os.Pipe": "os", - "os.ProcAttr": "os", - "os.Process": "os", - "os.ProcessState": "os", - "os.Readlink": "os", - "os.Remove": "os", - "os.RemoveAll": "os", - "os.Rename": "os", - "os.SEEK_CUR": "os", - "os.SEEK_END": "os", - "os.SEEK_SET": "os", - "os.SameFile": "os", - "os.Setenv": "os", - "os.Signal": "os", - "os.StartProcess": "os", - "os.Stat": "os", - "os.Stderr": "os", - "os.Stdin": "os", - "os.Stdout": "os", - "os.Symlink": "os", - "os.SyscallError": "os", - "os.TempDir": "os", - "os.Truncate": "os", - "os.Unsetenv": "os", - "os.UserCacheDir": "os", - "os.UserConfigDir": "os", - "os.UserHomeDir": "os", - "palette.Plan9": "image/color/palette", - "palette.WebSafe": "image/color/palette", - "parse.ActionNode": "text/template/parse", - "parse.BoolNode": "text/template/parse", - "parse.BranchNode": "text/template/parse", - "parse.ChainNode": "text/template/parse", - "parse.CommandNode": "text/template/parse", - "parse.DotNode": "text/template/parse", - "parse.FieldNode": "text/template/parse", - "parse.IdentifierNode": "text/template/parse", - "parse.IfNode": "text/template/parse", - "parse.IsEmptyTree": "text/template/parse", - "parse.ListNode": "text/template/parse", - "parse.New": "text/template/parse", - "parse.NewIdentifier": "text/template/parse", - "parse.NilNode": "text/template/parse", - "parse.Node": "text/template/parse", - "parse.NodeAction": "text/template/parse", - "parse.NodeBool": "text/template/parse", - "parse.NodeChain": "text/template/parse", - "parse.NodeCommand": "text/template/parse", - "parse.NodeDot": "text/template/parse", - "parse.NodeField": "text/template/parse", - "parse.NodeIdentifier": "text/template/parse", - "parse.NodeIf": "text/template/parse", - "parse.NodeList": "text/template/parse", - "parse.NodeNil": "text/template/parse", - "parse.NodeNumber": "text/template/parse", - "parse.NodePipe": "text/template/parse", - "parse.NodeRange": "text/template/parse", - "parse.NodeString": "text/template/parse", - "parse.NodeTemplate": "text/template/parse", - "parse.NodeText": "text/template/parse", - "parse.NodeType": "text/template/parse", - "parse.NodeVariable": "text/template/parse", - "parse.NodeWith": "text/template/parse", - "parse.NumberNode": "text/template/parse", - "parse.Parse": "text/template/parse", - "parse.PipeNode": "text/template/parse", - "parse.Pos": "text/template/parse", - "parse.RangeNode": "text/template/parse", - "parse.StringNode": "text/template/parse", - "parse.TemplateNode": "text/template/parse", - "parse.TextNode": "text/template/parse", - "parse.Tree": "text/template/parse", - "parse.VariableNode": "text/template/parse", - "parse.WithNode": "text/template/parse", - "parser.AllErrors": "go/parser", - "parser.DeclarationErrors": "go/parser", - "parser.ImportsOnly": "go/parser", - "parser.Mode": "go/parser", - "parser.PackageClauseOnly": "go/parser", - "parser.ParseComments": "go/parser", - "parser.ParseDir": "go/parser", - "parser.ParseExpr": "go/parser", - "parser.ParseExprFrom": "go/parser", - "parser.ParseFile": "go/parser", - "parser.SpuriousErrors": "go/parser", - "parser.Trace": "go/parser", - "path.Base": "path", - "path.Clean": "path", - "path.Dir": "path", - "path.ErrBadPattern": "path", - "path.Ext": "path", - "path.IsAbs": "path", - "path.Join": "path", - "path.Match": "path", - "path.Split": "path", - "pe.COFFSymbol": "debug/pe", - "pe.COFFSymbolSize": "debug/pe", - "pe.DataDirectory": "debug/pe", - "pe.File": "debug/pe", - "pe.FileHeader": "debug/pe", - "pe.FormatError": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_BASERELOC": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_DEBUG": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_EXCEPTION": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_EXPORT": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_GLOBALPTR": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_IAT": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_IMPORT": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_RESOURCE": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_SECURITY": "debug/pe", - "pe.IMAGE_DIRECTORY_ENTRY_TLS": "debug/pe", - "pe.IMAGE_FILE_MACHINE_AM33": "debug/pe", - "pe.IMAGE_FILE_MACHINE_AMD64": "debug/pe", - "pe.IMAGE_FILE_MACHINE_ARM": "debug/pe", - "pe.IMAGE_FILE_MACHINE_ARM64": "debug/pe", - "pe.IMAGE_FILE_MACHINE_ARMNT": "debug/pe", - "pe.IMAGE_FILE_MACHINE_EBC": "debug/pe", - "pe.IMAGE_FILE_MACHINE_I386": "debug/pe", - "pe.IMAGE_FILE_MACHINE_IA64": "debug/pe", - "pe.IMAGE_FILE_MACHINE_M32R": "debug/pe", - "pe.IMAGE_FILE_MACHINE_MIPS16": "debug/pe", - "pe.IMAGE_FILE_MACHINE_MIPSFPU": "debug/pe", - "pe.IMAGE_FILE_MACHINE_MIPSFPU16": "debug/pe", - "pe.IMAGE_FILE_MACHINE_POWERPC": "debug/pe", - "pe.IMAGE_FILE_MACHINE_POWERPCFP": "debug/pe", - "pe.IMAGE_FILE_MACHINE_R4000": "debug/pe", - "pe.IMAGE_FILE_MACHINE_SH3": "debug/pe", - "pe.IMAGE_FILE_MACHINE_SH3DSP": "debug/pe", - "pe.IMAGE_FILE_MACHINE_SH4": "debug/pe", - "pe.IMAGE_FILE_MACHINE_SH5": "debug/pe", - "pe.IMAGE_FILE_MACHINE_THUMB": "debug/pe", - "pe.IMAGE_FILE_MACHINE_UNKNOWN": "debug/pe", - "pe.IMAGE_FILE_MACHINE_WCEMIPSV2": "debug/pe", - "pe.ImportDirectory": "debug/pe", - "pe.NewFile": "debug/pe", - "pe.Open": "debug/pe", - "pe.OptionalHeader32": "debug/pe", - "pe.OptionalHeader64": "debug/pe", - "pe.Reloc": "debug/pe", - "pe.Section": "debug/pe", - "pe.SectionHeader": "debug/pe", - "pe.SectionHeader32": "debug/pe", - "pe.StringTable": "debug/pe", - "pe.Symbol": "debug/pe", - "pem.Block": "encoding/pem", - "pem.Decode": "encoding/pem", - "pem.Encode": "encoding/pem", - "pem.EncodeToMemory": "encoding/pem", - "pkix.AlgorithmIdentifier": "crypto/x509/pkix", - "pkix.AttributeTypeAndValue": "crypto/x509/pkix", - "pkix.AttributeTypeAndValueSET": "crypto/x509/pkix", - "pkix.CertificateList": "crypto/x509/pkix", - "pkix.Extension": "crypto/x509/pkix", - "pkix.Name": "crypto/x509/pkix", - "pkix.RDNSequence": "crypto/x509/pkix", - "pkix.RelativeDistinguishedNameSET": "crypto/x509/pkix", - "pkix.RevokedCertificate": "crypto/x509/pkix", - "pkix.TBSCertificateList": "crypto/x509/pkix", - "plan9obj.File": "debug/plan9obj", - "plan9obj.FileHeader": "debug/plan9obj", - "plan9obj.Magic386": "debug/plan9obj", - "plan9obj.Magic64": "debug/plan9obj", - "plan9obj.MagicAMD64": "debug/plan9obj", - "plan9obj.MagicARM": "debug/plan9obj", - "plan9obj.NewFile": "debug/plan9obj", - "plan9obj.Open": "debug/plan9obj", - "plan9obj.Section": "debug/plan9obj", - "plan9obj.SectionHeader": "debug/plan9obj", - "plan9obj.Sym": "debug/plan9obj", - "plugin.Open": "plugin", - "plugin.Plugin": "plugin", - "plugin.Symbol": "plugin", - "png.BestCompression": "image/png", - "png.BestSpeed": "image/png", - "png.CompressionLevel": "image/png", - "png.Decode": "image/png", - "png.DecodeConfig": "image/png", - "png.DefaultCompression": "image/png", - "png.Encode": "image/png", - "png.Encoder": "image/png", - "png.EncoderBuffer": "image/png", - "png.EncoderBufferPool": "image/png", - "png.FormatError": "image/png", - "png.NoCompression": "image/png", - "png.UnsupportedError": "image/png", - "pprof.Cmdline": "net/http/pprof", - "pprof.Do": "runtime/pprof", - "pprof.ForLabels": "runtime/pprof", - "pprof.Handler": "net/http/pprof", - "pprof.Index": "net/http/pprof", - "pprof.Label": "runtime/pprof", - "pprof.LabelSet": "runtime/pprof", - "pprof.Labels": "runtime/pprof", - "pprof.Lookup": "runtime/pprof", - "pprof.NewProfile": "runtime/pprof", - // "pprof.Profile" is ambiguous - "pprof.Profiles": "runtime/pprof", - "pprof.SetGoroutineLabels": "runtime/pprof", - "pprof.StartCPUProfile": "runtime/pprof", - "pprof.StopCPUProfile": "runtime/pprof", - "pprof.Symbol": "net/http/pprof", - "pprof.Trace": "net/http/pprof", - "pprof.WithLabels": "runtime/pprof", - "pprof.WriteHeapProfile": "runtime/pprof", - "printer.CommentedNode": "go/printer", - "printer.Config": "go/printer", - "printer.Fprint": "go/printer", - "printer.Mode": "go/printer", - "printer.RawFormat": "go/printer", - "printer.SourcePos": "go/printer", - "printer.TabIndent": "go/printer", - "printer.UseSpaces": "go/printer", - "quick.Check": "testing/quick", - "quick.CheckEqual": "testing/quick", - "quick.CheckEqualError": "testing/quick", - "quick.CheckError": "testing/quick", - "quick.Config": "testing/quick", - "quick.Generator": "testing/quick", - "quick.SetupError": "testing/quick", - "quick.Value": "testing/quick", - "quotedprintable.NewReader": "mime/quotedprintable", - "quotedprintable.NewWriter": "mime/quotedprintable", - "quotedprintable.Reader": "mime/quotedprintable", - "quotedprintable.Writer": "mime/quotedprintable", - "rand.ExpFloat64": "math/rand", - "rand.Float32": "math/rand", - "rand.Float64": "math/rand", - // "rand.Int" is ambiguous - "rand.Int31": "math/rand", - "rand.Int31n": "math/rand", - "rand.Int63": "math/rand", - "rand.Int63n": "math/rand", - "rand.Intn": "math/rand", - "rand.New": "math/rand", - "rand.NewSource": "math/rand", - "rand.NewZipf": "math/rand", - "rand.NormFloat64": "math/rand", - "rand.Perm": "math/rand", - "rand.Prime": "crypto/rand", - "rand.Rand": "math/rand", - // "rand.Read" is ambiguous - "rand.Reader": "crypto/rand", - "rand.Seed": "math/rand", - "rand.Shuffle": "math/rand", - "rand.Source": "math/rand", - "rand.Source64": "math/rand", - "rand.Uint32": "math/rand", - "rand.Uint64": "math/rand", - "rand.Zipf": "math/rand", - "rc4.Cipher": "crypto/rc4", - "rc4.KeySizeError": "crypto/rc4", - "rc4.NewCipher": "crypto/rc4", - "reflect.Append": "reflect", - "reflect.AppendSlice": "reflect", - "reflect.Array": "reflect", - "reflect.ArrayOf": "reflect", - "reflect.Bool": "reflect", - "reflect.BothDir": "reflect", - "reflect.Chan": "reflect", - "reflect.ChanDir": "reflect", - "reflect.ChanOf": "reflect", - "reflect.Complex128": "reflect", - "reflect.Complex64": "reflect", - "reflect.Copy": "reflect", - "reflect.DeepEqual": "reflect", - "reflect.Float32": "reflect", - "reflect.Float64": "reflect", - "reflect.Func": "reflect", - "reflect.FuncOf": "reflect", - "reflect.Indirect": "reflect", - "reflect.Int": "reflect", - "reflect.Int16": "reflect", - "reflect.Int32": "reflect", - "reflect.Int64": "reflect", - "reflect.Int8": "reflect", - "reflect.Interface": "reflect", - "reflect.Invalid": "reflect", - "reflect.Kind": "reflect", - "reflect.MakeChan": "reflect", - "reflect.MakeFunc": "reflect", - "reflect.MakeMap": "reflect", - "reflect.MakeMapWithSize": "reflect", - "reflect.MakeSlice": "reflect", - "reflect.Map": "reflect", - "reflect.MapIter": "reflect", - "reflect.MapOf": "reflect", - "reflect.Method": "reflect", - "reflect.New": "reflect", - "reflect.NewAt": "reflect", - "reflect.Ptr": "reflect", - "reflect.PtrTo": "reflect", - "reflect.RecvDir": "reflect", - "reflect.Select": "reflect", - "reflect.SelectCase": "reflect", - "reflect.SelectDefault": "reflect", - "reflect.SelectDir": "reflect", - "reflect.SelectRecv": "reflect", - "reflect.SelectSend": "reflect", - "reflect.SendDir": "reflect", - "reflect.Slice": "reflect", - "reflect.SliceHeader": "reflect", - "reflect.SliceOf": "reflect", - "reflect.String": "reflect", - "reflect.StringHeader": "reflect", - "reflect.Struct": "reflect", - "reflect.StructField": "reflect", - "reflect.StructOf": "reflect", - "reflect.StructTag": "reflect", - "reflect.Swapper": "reflect", - "reflect.TypeOf": "reflect", - "reflect.Uint": "reflect", - "reflect.Uint16": "reflect", - "reflect.Uint32": "reflect", - "reflect.Uint64": "reflect", - "reflect.Uint8": "reflect", - "reflect.Uintptr": "reflect", - "reflect.UnsafePointer": "reflect", - "reflect.Value": "reflect", - "reflect.ValueError": "reflect", - "reflect.ValueOf": "reflect", - "reflect.Zero": "reflect", - "regexp.Compile": "regexp", - "regexp.CompilePOSIX": "regexp", - "regexp.Match": "regexp", - "regexp.MatchReader": "regexp", - "regexp.MatchString": "regexp", - "regexp.MustCompile": "regexp", - "regexp.MustCompilePOSIX": "regexp", - "regexp.QuoteMeta": "regexp", - "regexp.Regexp": "regexp", - "ring.New": "container/ring", - "ring.Ring": "container/ring", - "rpc.Accept": "net/rpc", - "rpc.Call": "net/rpc", - "rpc.Client": "net/rpc", - "rpc.ClientCodec": "net/rpc", - "rpc.DefaultDebugPath": "net/rpc", - "rpc.DefaultRPCPath": "net/rpc", - "rpc.DefaultServer": "net/rpc", - "rpc.Dial": "net/rpc", - "rpc.DialHTTP": "net/rpc", - "rpc.DialHTTPPath": "net/rpc", - "rpc.ErrShutdown": "net/rpc", - "rpc.HandleHTTP": "net/rpc", - "rpc.NewClient": "net/rpc", - "rpc.NewClientWithCodec": "net/rpc", - "rpc.NewServer": "net/rpc", - "rpc.Register": "net/rpc", - "rpc.RegisterName": "net/rpc", - "rpc.Request": "net/rpc", - "rpc.Response": "net/rpc", - "rpc.ServeCodec": "net/rpc", - "rpc.ServeConn": "net/rpc", - "rpc.ServeRequest": "net/rpc", - "rpc.Server": "net/rpc", - "rpc.ServerCodec": "net/rpc", - "rpc.ServerError": "net/rpc", - "rsa.CRTValue": "crypto/rsa", - "rsa.DecryptOAEP": "crypto/rsa", - "rsa.DecryptPKCS1v15": "crypto/rsa", - "rsa.DecryptPKCS1v15SessionKey": "crypto/rsa", - "rsa.EncryptOAEP": "crypto/rsa", - "rsa.EncryptPKCS1v15": "crypto/rsa", - "rsa.ErrDecryption": "crypto/rsa", - "rsa.ErrMessageTooLong": "crypto/rsa", - "rsa.ErrVerification": "crypto/rsa", - "rsa.GenerateKey": "crypto/rsa", - "rsa.GenerateMultiPrimeKey": "crypto/rsa", - "rsa.OAEPOptions": "crypto/rsa", - "rsa.PKCS1v15DecryptOptions": "crypto/rsa", - "rsa.PSSOptions": "crypto/rsa", - "rsa.PSSSaltLengthAuto": "crypto/rsa", - "rsa.PSSSaltLengthEqualsHash": "crypto/rsa", - "rsa.PrecomputedValues": "crypto/rsa", - "rsa.PrivateKey": "crypto/rsa", - "rsa.PublicKey": "crypto/rsa", - "rsa.SignPKCS1v15": "crypto/rsa", - "rsa.SignPSS": "crypto/rsa", - "rsa.VerifyPKCS1v15": "crypto/rsa", - "rsa.VerifyPSS": "crypto/rsa", - "runtime.BlockProfile": "runtime", - "runtime.BlockProfileRecord": "runtime", - "runtime.Breakpoint": "runtime", - "runtime.CPUProfile": "runtime", - "runtime.Caller": "runtime", - "runtime.Callers": "runtime", - "runtime.CallersFrames": "runtime", - "runtime.Compiler": "runtime", - "runtime.Error": "runtime", - "runtime.Frame": "runtime", - "runtime.Frames": "runtime", - "runtime.Func": "runtime", - "runtime.FuncForPC": "runtime", - "runtime.GC": "runtime", - "runtime.GOARCH": "runtime", - "runtime.GOMAXPROCS": "runtime", - "runtime.GOOS": "runtime", - "runtime.GOROOT": "runtime", - "runtime.Goexit": "runtime", - "runtime.GoroutineProfile": "runtime", - "runtime.Gosched": "runtime", - "runtime.KeepAlive": "runtime", - "runtime.LockOSThread": "runtime", - "runtime.MemProfile": "runtime", - "runtime.MemProfileRate": "runtime", - "runtime.MemProfileRecord": "runtime", - "runtime.MemStats": "runtime", - "runtime.MutexProfile": "runtime", - "runtime.NumCPU": "runtime", - "runtime.NumCgoCall": "runtime", - "runtime.NumGoroutine": "runtime", - "runtime.ReadMemStats": "runtime", - "runtime.ReadTrace": "runtime", - "runtime.SetBlockProfileRate": "runtime", - "runtime.SetCPUProfileRate": "runtime", - "runtime.SetCgoTraceback": "runtime", - "runtime.SetFinalizer": "runtime", - "runtime.SetMutexProfileFraction": "runtime", - "runtime.Stack": "runtime", - "runtime.StackRecord": "runtime", - "runtime.StartTrace": "runtime", - "runtime.StopTrace": "runtime", - "runtime.ThreadCreateProfile": "runtime", - "runtime.TypeAssertionError": "runtime", - "runtime.UnlockOSThread": "runtime", - "runtime.Version": "runtime", - "scanner.Char": "text/scanner", - "scanner.Comment": "text/scanner", - "scanner.EOF": "text/scanner", - "scanner.Error": "go/scanner", - "scanner.ErrorHandler": "go/scanner", - "scanner.ErrorList": "go/scanner", - "scanner.Float": "text/scanner", - "scanner.GoTokens": "text/scanner", - "scanner.GoWhitespace": "text/scanner", - "scanner.Ident": "text/scanner", - "scanner.Int": "text/scanner", - "scanner.Mode": "go/scanner", - "scanner.Position": "text/scanner", - "scanner.PrintError": "go/scanner", - "scanner.RawString": "text/scanner", - "scanner.ScanChars": "text/scanner", - // "scanner.ScanComments" is ambiguous - "scanner.ScanFloats": "text/scanner", - "scanner.ScanIdents": "text/scanner", - "scanner.ScanInts": "text/scanner", - "scanner.ScanRawStrings": "text/scanner", - "scanner.ScanStrings": "text/scanner", - // "scanner.Scanner" is ambiguous - "scanner.SkipComments": "text/scanner", - "scanner.String": "text/scanner", - "scanner.TokenString": "text/scanner", - "sha1.BlockSize": "crypto/sha1", - "sha1.New": "crypto/sha1", - "sha1.Size": "crypto/sha1", - "sha1.Sum": "crypto/sha1", - "sha256.BlockSize": "crypto/sha256", - "sha256.New": "crypto/sha256", - "sha256.New224": "crypto/sha256", - "sha256.Size": "crypto/sha256", - "sha256.Size224": "crypto/sha256", - "sha256.Sum224": "crypto/sha256", - "sha256.Sum256": "crypto/sha256", - "sha512.BlockSize": "crypto/sha512", - "sha512.New": "crypto/sha512", - "sha512.New384": "crypto/sha512", - "sha512.New512_224": "crypto/sha512", - "sha512.New512_256": "crypto/sha512", - "sha512.Size": "crypto/sha512", - "sha512.Size224": "crypto/sha512", - "sha512.Size256": "crypto/sha512", - "sha512.Size384": "crypto/sha512", - "sha512.Sum384": "crypto/sha512", - "sha512.Sum512": "crypto/sha512", - "sha512.Sum512_224": "crypto/sha512", - "sha512.Sum512_256": "crypto/sha512", - "signal.Ignore": "os/signal", - "signal.Ignored": "os/signal", - "signal.Notify": "os/signal", - "signal.Reset": "os/signal", - "signal.Stop": "os/signal", - "smtp.Auth": "net/smtp", - "smtp.CRAMMD5Auth": "net/smtp", - "smtp.Client": "net/smtp", - "smtp.Dial": "net/smtp", - "smtp.NewClient": "net/smtp", - "smtp.PlainAuth": "net/smtp", - "smtp.SendMail": "net/smtp", - "smtp.ServerInfo": "net/smtp", - "sort.Float64Slice": "sort", - "sort.Float64s": "sort", - "sort.Float64sAreSorted": "sort", - "sort.IntSlice": "sort", - "sort.Interface": "sort", - "sort.Ints": "sort", - "sort.IntsAreSorted": "sort", - "sort.IsSorted": "sort", - "sort.Reverse": "sort", - "sort.Search": "sort", - "sort.SearchFloat64s": "sort", - "sort.SearchInts": "sort", - "sort.SearchStrings": "sort", - "sort.Slice": "sort", - "sort.SliceIsSorted": "sort", - "sort.SliceStable": "sort", - "sort.Sort": "sort", - "sort.Stable": "sort", - "sort.StringSlice": "sort", - "sort.Strings": "sort", - "sort.StringsAreSorted": "sort", - "sql.ColumnType": "database/sql", - "sql.Conn": "database/sql", - "sql.DB": "database/sql", - "sql.DBStats": "database/sql", - "sql.Drivers": "database/sql", - "sql.ErrConnDone": "database/sql", - "sql.ErrNoRows": "database/sql", - "sql.ErrTxDone": "database/sql", - "sql.IsolationLevel": "database/sql", - "sql.LevelDefault": "database/sql", - "sql.LevelLinearizable": "database/sql", - "sql.LevelReadCommitted": "database/sql", - "sql.LevelReadUncommitted": "database/sql", - "sql.LevelRepeatableRead": "database/sql", - "sql.LevelSerializable": "database/sql", - "sql.LevelSnapshot": "database/sql", - "sql.LevelWriteCommitted": "database/sql", - "sql.Named": "database/sql", - "sql.NamedArg": "database/sql", - "sql.NullBool": "database/sql", - "sql.NullFloat64": "database/sql", - "sql.NullInt32": "database/sql", - "sql.NullInt64": "database/sql", - "sql.NullString": "database/sql", - "sql.NullTime": "database/sql", - "sql.Open": "database/sql", - "sql.OpenDB": "database/sql", - "sql.Out": "database/sql", - "sql.RawBytes": "database/sql", - "sql.Register": "database/sql", - "sql.Result": "database/sql", - "sql.Row": "database/sql", - "sql.Rows": "database/sql", - "sql.Scanner": "database/sql", - "sql.Stmt": "database/sql", - "sql.Tx": "database/sql", - "sql.TxOptions": "database/sql", - "strconv.AppendBool": "strconv", - "strconv.AppendFloat": "strconv", - "strconv.AppendInt": "strconv", - "strconv.AppendQuote": "strconv", - "strconv.AppendQuoteRune": "strconv", - "strconv.AppendQuoteRuneToASCII": "strconv", - "strconv.AppendQuoteRuneToGraphic": "strconv", - "strconv.AppendQuoteToASCII": "strconv", - "strconv.AppendQuoteToGraphic": "strconv", - "strconv.AppendUint": "strconv", - "strconv.Atoi": "strconv", - "strconv.CanBackquote": "strconv", - "strconv.ErrRange": "strconv", - "strconv.ErrSyntax": "strconv", - "strconv.FormatBool": "strconv", - "strconv.FormatFloat": "strconv", - "strconv.FormatInt": "strconv", - "strconv.FormatUint": "strconv", - "strconv.IntSize": "strconv", - "strconv.IsGraphic": "strconv", - "strconv.IsPrint": "strconv", - "strconv.Itoa": "strconv", - "strconv.NumError": "strconv", - "strconv.ParseBool": "strconv", - "strconv.ParseFloat": "strconv", - "strconv.ParseInt": "strconv", - "strconv.ParseUint": "strconv", - "strconv.Quote": "strconv", - "strconv.QuoteRune": "strconv", - "strconv.QuoteRuneToASCII": "strconv", - "strconv.QuoteRuneToGraphic": "strconv", - "strconv.QuoteToASCII": "strconv", - "strconv.QuoteToGraphic": "strconv", - "strconv.Unquote": "strconv", - "strconv.UnquoteChar": "strconv", - "strings.Builder": "strings", - "strings.Compare": "strings", - "strings.Contains": "strings", - "strings.ContainsAny": "strings", - "strings.ContainsRune": "strings", - "strings.Count": "strings", - "strings.EqualFold": "strings", - "strings.Fields": "strings", - "strings.FieldsFunc": "strings", - "strings.HasPrefix": "strings", - "strings.HasSuffix": "strings", - "strings.Index": "strings", - "strings.IndexAny": "strings", - "strings.IndexByte": "strings", - "strings.IndexFunc": "strings", - "strings.IndexRune": "strings", - "strings.Join": "strings", - "strings.LastIndex": "strings", - "strings.LastIndexAny": "strings", - "strings.LastIndexByte": "strings", - "strings.LastIndexFunc": "strings", - "strings.Map": "strings", - "strings.NewReader": "strings", - "strings.NewReplacer": "strings", - "strings.Reader": "strings", - "strings.Repeat": "strings", - "strings.Replace": "strings", - "strings.ReplaceAll": "strings", - "strings.Replacer": "strings", - "strings.Split": "strings", - "strings.SplitAfter": "strings", - "strings.SplitAfterN": "strings", - "strings.SplitN": "strings", - "strings.Title": "strings", - "strings.ToLower": "strings", - "strings.ToLowerSpecial": "strings", - "strings.ToTitle": "strings", - "strings.ToTitleSpecial": "strings", - "strings.ToUpper": "strings", - "strings.ToUpperSpecial": "strings", - "strings.ToValidUTF8": "strings", - "strings.Trim": "strings", - "strings.TrimFunc": "strings", - "strings.TrimLeft": "strings", - "strings.TrimLeftFunc": "strings", - "strings.TrimPrefix": "strings", - "strings.TrimRight": "strings", - "strings.TrimRightFunc": "strings", - "strings.TrimSpace": "strings", - "strings.TrimSuffix": "strings", - "subtle.ConstantTimeByteEq": "crypto/subtle", - "subtle.ConstantTimeCompare": "crypto/subtle", - "subtle.ConstantTimeCopy": "crypto/subtle", - "subtle.ConstantTimeEq": "crypto/subtle", - "subtle.ConstantTimeLessOrEq": "crypto/subtle", - "subtle.ConstantTimeSelect": "crypto/subtle", - "suffixarray.Index": "index/suffixarray", - "suffixarray.New": "index/suffixarray", - "sync.Cond": "sync", - "sync.Locker": "sync", - "sync.Map": "sync", - "sync.Mutex": "sync", - "sync.NewCond": "sync", - "sync.Once": "sync", - "sync.Pool": "sync", - "sync.RWMutex": "sync", - "sync.WaitGroup": "sync", - "syntax.ClassNL": "regexp/syntax", - "syntax.Compile": "regexp/syntax", - "syntax.DotNL": "regexp/syntax", - "syntax.EmptyBeginLine": "regexp/syntax", - "syntax.EmptyBeginText": "regexp/syntax", - "syntax.EmptyEndLine": "regexp/syntax", - "syntax.EmptyEndText": "regexp/syntax", - "syntax.EmptyNoWordBoundary": "regexp/syntax", - "syntax.EmptyOp": "regexp/syntax", - "syntax.EmptyOpContext": "regexp/syntax", - "syntax.EmptyWordBoundary": "regexp/syntax", - "syntax.ErrInternalError": "regexp/syntax", - "syntax.ErrInvalidCharClass": "regexp/syntax", - "syntax.ErrInvalidCharRange": "regexp/syntax", - "syntax.ErrInvalidEscape": "regexp/syntax", - "syntax.ErrInvalidNamedCapture": "regexp/syntax", - "syntax.ErrInvalidPerlOp": "regexp/syntax", - "syntax.ErrInvalidRepeatOp": "regexp/syntax", - "syntax.ErrInvalidRepeatSize": "regexp/syntax", - "syntax.ErrInvalidUTF8": "regexp/syntax", - "syntax.ErrMissingBracket": "regexp/syntax", - "syntax.ErrMissingParen": "regexp/syntax", - "syntax.ErrMissingRepeatArgument": "regexp/syntax", - "syntax.ErrTrailingBackslash": "regexp/syntax", - "syntax.ErrUnexpectedParen": "regexp/syntax", - "syntax.Error": "regexp/syntax", - "syntax.ErrorCode": "regexp/syntax", - "syntax.Flags": "regexp/syntax", - "syntax.FoldCase": "regexp/syntax", - "syntax.Inst": "regexp/syntax", - "syntax.InstAlt": "regexp/syntax", - "syntax.InstAltMatch": "regexp/syntax", - "syntax.InstCapture": "regexp/syntax", - "syntax.InstEmptyWidth": "regexp/syntax", - "syntax.InstFail": "regexp/syntax", - "syntax.InstMatch": "regexp/syntax", - "syntax.InstNop": "regexp/syntax", - "syntax.InstOp": "regexp/syntax", - "syntax.InstRune": "regexp/syntax", - "syntax.InstRune1": "regexp/syntax", - "syntax.InstRuneAny": "regexp/syntax", - "syntax.InstRuneAnyNotNL": "regexp/syntax", - "syntax.IsWordChar": "regexp/syntax", - "syntax.Literal": "regexp/syntax", - "syntax.MatchNL": "regexp/syntax", - "syntax.NonGreedy": "regexp/syntax", - "syntax.OneLine": "regexp/syntax", - "syntax.Op": "regexp/syntax", - "syntax.OpAlternate": "regexp/syntax", - "syntax.OpAnyChar": "regexp/syntax", - "syntax.OpAnyCharNotNL": "regexp/syntax", - "syntax.OpBeginLine": "regexp/syntax", - "syntax.OpBeginText": "regexp/syntax", - "syntax.OpCapture": "regexp/syntax", - "syntax.OpCharClass": "regexp/syntax", - "syntax.OpConcat": "regexp/syntax", - "syntax.OpEmptyMatch": "regexp/syntax", - "syntax.OpEndLine": "regexp/syntax", - "syntax.OpEndText": "regexp/syntax", - "syntax.OpLiteral": "regexp/syntax", - "syntax.OpNoMatch": "regexp/syntax", - "syntax.OpNoWordBoundary": "regexp/syntax", - "syntax.OpPlus": "regexp/syntax", - "syntax.OpQuest": "regexp/syntax", - "syntax.OpRepeat": "regexp/syntax", - "syntax.OpStar": "regexp/syntax", - "syntax.OpWordBoundary": "regexp/syntax", - "syntax.POSIX": "regexp/syntax", - "syntax.Parse": "regexp/syntax", - "syntax.Perl": "regexp/syntax", - "syntax.PerlX": "regexp/syntax", - "syntax.Prog": "regexp/syntax", - "syntax.Regexp": "regexp/syntax", - "syntax.Simple": "regexp/syntax", - "syntax.UnicodeGroups": "regexp/syntax", - "syntax.WasDollar": "regexp/syntax", - "syscall.AF_ALG": "syscall", - "syscall.AF_APPLETALK": "syscall", - "syscall.AF_ARP": "syscall", - "syscall.AF_ASH": "syscall", - "syscall.AF_ATM": "syscall", - "syscall.AF_ATMPVC": "syscall", - "syscall.AF_ATMSVC": "syscall", - "syscall.AF_AX25": "syscall", - "syscall.AF_BLUETOOTH": "syscall", - "syscall.AF_BRIDGE": "syscall", - "syscall.AF_CAIF": "syscall", - "syscall.AF_CAN": "syscall", - "syscall.AF_CCITT": "syscall", - "syscall.AF_CHAOS": "syscall", - "syscall.AF_CNT": "syscall", - "syscall.AF_COIP": "syscall", - "syscall.AF_DATAKIT": "syscall", - "syscall.AF_DECnet": "syscall", - "syscall.AF_DLI": "syscall", - "syscall.AF_E164": "syscall", - "syscall.AF_ECMA": "syscall", - "syscall.AF_ECONET": "syscall", - "syscall.AF_ENCAP": "syscall", - "syscall.AF_FILE": "syscall", - "syscall.AF_HYLINK": "syscall", - "syscall.AF_IEEE80211": "syscall", - "syscall.AF_IEEE802154": "syscall", - "syscall.AF_IMPLINK": "syscall", - "syscall.AF_INET": "syscall", - "syscall.AF_INET6": "syscall", - "syscall.AF_INET6_SDP": "syscall", - "syscall.AF_INET_SDP": "syscall", - "syscall.AF_IPX": "syscall", - "syscall.AF_IRDA": "syscall", - "syscall.AF_ISDN": "syscall", - "syscall.AF_ISO": "syscall", - "syscall.AF_IUCV": "syscall", - "syscall.AF_KEY": "syscall", - "syscall.AF_LAT": "syscall", - "syscall.AF_LINK": "syscall", - "syscall.AF_LLC": "syscall", - "syscall.AF_LOCAL": "syscall", - "syscall.AF_MAX": "syscall", - "syscall.AF_MPLS": "syscall", - "syscall.AF_NATM": "syscall", - "syscall.AF_NDRV": "syscall", - "syscall.AF_NETBEUI": "syscall", - "syscall.AF_NETBIOS": "syscall", - "syscall.AF_NETGRAPH": "syscall", - "syscall.AF_NETLINK": "syscall", - "syscall.AF_NETROM": "syscall", - "syscall.AF_NS": "syscall", - "syscall.AF_OROUTE": "syscall", - "syscall.AF_OSI": "syscall", - "syscall.AF_PACKET": "syscall", - "syscall.AF_PHONET": "syscall", - "syscall.AF_PPP": "syscall", - "syscall.AF_PPPOX": "syscall", - "syscall.AF_PUP": "syscall", - "syscall.AF_RDS": "syscall", - "syscall.AF_RESERVED_36": "syscall", - "syscall.AF_ROSE": "syscall", - "syscall.AF_ROUTE": "syscall", - "syscall.AF_RXRPC": "syscall", - "syscall.AF_SCLUSTER": "syscall", - "syscall.AF_SECURITY": "syscall", - "syscall.AF_SIP": "syscall", - "syscall.AF_SLOW": "syscall", - "syscall.AF_SNA": "syscall", - "syscall.AF_SYSTEM": "syscall", - "syscall.AF_TIPC": "syscall", - "syscall.AF_UNIX": "syscall", - "syscall.AF_UNSPEC": "syscall", - "syscall.AF_VENDOR00": "syscall", - "syscall.AF_VENDOR01": "syscall", - "syscall.AF_VENDOR02": "syscall", - "syscall.AF_VENDOR03": "syscall", - "syscall.AF_VENDOR04": "syscall", - "syscall.AF_VENDOR05": "syscall", - "syscall.AF_VENDOR06": "syscall", - "syscall.AF_VENDOR07": "syscall", - "syscall.AF_VENDOR08": "syscall", - "syscall.AF_VENDOR09": "syscall", - "syscall.AF_VENDOR10": "syscall", - "syscall.AF_VENDOR11": "syscall", - "syscall.AF_VENDOR12": "syscall", - "syscall.AF_VENDOR13": "syscall", - "syscall.AF_VENDOR14": "syscall", - "syscall.AF_VENDOR15": "syscall", - "syscall.AF_VENDOR16": "syscall", - "syscall.AF_VENDOR17": "syscall", - "syscall.AF_VENDOR18": "syscall", - "syscall.AF_VENDOR19": "syscall", - "syscall.AF_VENDOR20": "syscall", - "syscall.AF_VENDOR21": "syscall", - "syscall.AF_VENDOR22": "syscall", - "syscall.AF_VENDOR23": "syscall", - "syscall.AF_VENDOR24": "syscall", - "syscall.AF_VENDOR25": "syscall", - "syscall.AF_VENDOR26": "syscall", - "syscall.AF_VENDOR27": "syscall", - "syscall.AF_VENDOR28": "syscall", - "syscall.AF_VENDOR29": "syscall", - "syscall.AF_VENDOR30": "syscall", - "syscall.AF_VENDOR31": "syscall", - "syscall.AF_VENDOR32": "syscall", - "syscall.AF_VENDOR33": "syscall", - "syscall.AF_VENDOR34": "syscall", - "syscall.AF_VENDOR35": "syscall", - "syscall.AF_VENDOR36": "syscall", - "syscall.AF_VENDOR37": "syscall", - "syscall.AF_VENDOR38": "syscall", - "syscall.AF_VENDOR39": "syscall", - "syscall.AF_VENDOR40": "syscall", - "syscall.AF_VENDOR41": "syscall", - "syscall.AF_VENDOR42": "syscall", - "syscall.AF_VENDOR43": "syscall", - "syscall.AF_VENDOR44": "syscall", - "syscall.AF_VENDOR45": "syscall", - "syscall.AF_VENDOR46": "syscall", - "syscall.AF_VENDOR47": "syscall", - "syscall.AF_WANPIPE": "syscall", - "syscall.AF_X25": "syscall", - "syscall.AI_CANONNAME": "syscall", - "syscall.AI_NUMERICHOST": "syscall", - "syscall.AI_PASSIVE": "syscall", - "syscall.APPLICATION_ERROR": "syscall", - "syscall.ARPHRD_ADAPT": "syscall", - "syscall.ARPHRD_APPLETLK": "syscall", - "syscall.ARPHRD_ARCNET": "syscall", - "syscall.ARPHRD_ASH": "syscall", - "syscall.ARPHRD_ATM": "syscall", - "syscall.ARPHRD_AX25": "syscall", - "syscall.ARPHRD_BIF": "syscall", - "syscall.ARPHRD_CHAOS": "syscall", - "syscall.ARPHRD_CISCO": "syscall", - "syscall.ARPHRD_CSLIP": "syscall", - "syscall.ARPHRD_CSLIP6": "syscall", - "syscall.ARPHRD_DDCMP": "syscall", - "syscall.ARPHRD_DLCI": "syscall", - "syscall.ARPHRD_ECONET": "syscall", - "syscall.ARPHRD_EETHER": "syscall", - "syscall.ARPHRD_ETHER": "syscall", - "syscall.ARPHRD_EUI64": "syscall", - "syscall.ARPHRD_FCAL": "syscall", - "syscall.ARPHRD_FCFABRIC": "syscall", - "syscall.ARPHRD_FCPL": "syscall", - "syscall.ARPHRD_FCPP": "syscall", - "syscall.ARPHRD_FDDI": "syscall", - "syscall.ARPHRD_FRAD": "syscall", - "syscall.ARPHRD_FRELAY": "syscall", - "syscall.ARPHRD_HDLC": "syscall", - "syscall.ARPHRD_HIPPI": "syscall", - "syscall.ARPHRD_HWX25": "syscall", - "syscall.ARPHRD_IEEE1394": "syscall", - "syscall.ARPHRD_IEEE802": "syscall", - "syscall.ARPHRD_IEEE80211": "syscall", - "syscall.ARPHRD_IEEE80211_PRISM": "syscall", - "syscall.ARPHRD_IEEE80211_RADIOTAP": "syscall", - "syscall.ARPHRD_IEEE802154": "syscall", - "syscall.ARPHRD_IEEE802154_PHY": "syscall", - "syscall.ARPHRD_IEEE802_TR": "syscall", - "syscall.ARPHRD_INFINIBAND": "syscall", - "syscall.ARPHRD_IPDDP": "syscall", - "syscall.ARPHRD_IPGRE": "syscall", - "syscall.ARPHRD_IRDA": "syscall", - "syscall.ARPHRD_LAPB": "syscall", - "syscall.ARPHRD_LOCALTLK": "syscall", - "syscall.ARPHRD_LOOPBACK": "syscall", - "syscall.ARPHRD_METRICOM": "syscall", - "syscall.ARPHRD_NETROM": "syscall", - "syscall.ARPHRD_NONE": "syscall", - "syscall.ARPHRD_PIMREG": "syscall", - "syscall.ARPHRD_PPP": "syscall", - "syscall.ARPHRD_PRONET": "syscall", - "syscall.ARPHRD_RAWHDLC": "syscall", - "syscall.ARPHRD_ROSE": "syscall", - "syscall.ARPHRD_RSRVD": "syscall", - "syscall.ARPHRD_SIT": "syscall", - "syscall.ARPHRD_SKIP": "syscall", - "syscall.ARPHRD_SLIP": "syscall", - "syscall.ARPHRD_SLIP6": "syscall", - "syscall.ARPHRD_STRIP": "syscall", - "syscall.ARPHRD_TUNNEL": "syscall", - "syscall.ARPHRD_TUNNEL6": "syscall", - "syscall.ARPHRD_VOID": "syscall", - "syscall.ARPHRD_X25": "syscall", - "syscall.AUTHTYPE_CLIENT": "syscall", - "syscall.AUTHTYPE_SERVER": "syscall", - "syscall.Accept": "syscall", - "syscall.Accept4": "syscall", - "syscall.AcceptEx": "syscall", - "syscall.Access": "syscall", - "syscall.Acct": "syscall", - "syscall.AddrinfoW": "syscall", - "syscall.Adjtime": "syscall", - "syscall.Adjtimex": "syscall", - "syscall.AttachLsf": "syscall", - "syscall.B0": "syscall", - "syscall.B1000000": "syscall", - "syscall.B110": "syscall", - "syscall.B115200": "syscall", - "syscall.B1152000": "syscall", - "syscall.B1200": "syscall", - "syscall.B134": "syscall", - "syscall.B14400": "syscall", - "syscall.B150": "syscall", - "syscall.B1500000": "syscall", - "syscall.B1800": "syscall", - "syscall.B19200": "syscall", - "syscall.B200": "syscall", - "syscall.B2000000": "syscall", - "syscall.B230400": "syscall", - "syscall.B2400": "syscall", - "syscall.B2500000": "syscall", - "syscall.B28800": "syscall", - "syscall.B300": "syscall", - "syscall.B3000000": "syscall", - "syscall.B3500000": "syscall", - "syscall.B38400": "syscall", - "syscall.B4000000": "syscall", - "syscall.B460800": "syscall", - "syscall.B4800": "syscall", - "syscall.B50": "syscall", - "syscall.B500000": "syscall", - "syscall.B57600": "syscall", - "syscall.B576000": "syscall", - "syscall.B600": "syscall", - "syscall.B7200": "syscall", - "syscall.B75": "syscall", - "syscall.B76800": "syscall", - "syscall.B921600": "syscall", - "syscall.B9600": "syscall", - "syscall.BASE_PROTOCOL": "syscall", - "syscall.BIOCFEEDBACK": "syscall", - "syscall.BIOCFLUSH": "syscall", - "syscall.BIOCGBLEN": "syscall", - "syscall.BIOCGDIRECTION": "syscall", - "syscall.BIOCGDIRFILT": "syscall", - "syscall.BIOCGDLT": "syscall", - "syscall.BIOCGDLTLIST": "syscall", - "syscall.BIOCGETBUFMODE": "syscall", - "syscall.BIOCGETIF": "syscall", - "syscall.BIOCGETZMAX": "syscall", - "syscall.BIOCGFEEDBACK": "syscall", - "syscall.BIOCGFILDROP": "syscall", - "syscall.BIOCGHDRCMPLT": "syscall", - "syscall.BIOCGRSIG": "syscall", - "syscall.BIOCGRTIMEOUT": "syscall", - "syscall.BIOCGSEESENT": "syscall", - "syscall.BIOCGSTATS": "syscall", - "syscall.BIOCGSTATSOLD": "syscall", - "syscall.BIOCGTSTAMP": "syscall", - "syscall.BIOCIMMEDIATE": "syscall", - "syscall.BIOCLOCK": "syscall", - "syscall.BIOCPROMISC": "syscall", - "syscall.BIOCROTZBUF": "syscall", - "syscall.BIOCSBLEN": "syscall", - "syscall.BIOCSDIRECTION": "syscall", - "syscall.BIOCSDIRFILT": "syscall", - "syscall.BIOCSDLT": "syscall", - "syscall.BIOCSETBUFMODE": "syscall", - "syscall.BIOCSETF": "syscall", - "syscall.BIOCSETFNR": "syscall", - "syscall.BIOCSETIF": "syscall", - "syscall.BIOCSETWF": "syscall", - "syscall.BIOCSETZBUF": "syscall", - "syscall.BIOCSFEEDBACK": "syscall", - "syscall.BIOCSFILDROP": "syscall", - "syscall.BIOCSHDRCMPLT": "syscall", - "syscall.BIOCSRSIG": "syscall", - "syscall.BIOCSRTIMEOUT": "syscall", - "syscall.BIOCSSEESENT": "syscall", - "syscall.BIOCSTCPF": "syscall", - "syscall.BIOCSTSTAMP": "syscall", - "syscall.BIOCSUDPF": "syscall", - "syscall.BIOCVERSION": "syscall", - "syscall.BPF_A": "syscall", - "syscall.BPF_ABS": "syscall", - "syscall.BPF_ADD": "syscall", - "syscall.BPF_ALIGNMENT": "syscall", - "syscall.BPF_ALIGNMENT32": "syscall", - "syscall.BPF_ALU": "syscall", - "syscall.BPF_AND": "syscall", - "syscall.BPF_B": "syscall", - "syscall.BPF_BUFMODE_BUFFER": "syscall", - "syscall.BPF_BUFMODE_ZBUF": "syscall", - "syscall.BPF_DFLTBUFSIZE": "syscall", - "syscall.BPF_DIRECTION_IN": "syscall", - "syscall.BPF_DIRECTION_OUT": "syscall", - "syscall.BPF_DIV": "syscall", - "syscall.BPF_H": "syscall", - "syscall.BPF_IMM": "syscall", - "syscall.BPF_IND": "syscall", - "syscall.BPF_JA": "syscall", - "syscall.BPF_JEQ": "syscall", - "syscall.BPF_JGE": "syscall", - "syscall.BPF_JGT": "syscall", - "syscall.BPF_JMP": "syscall", - "syscall.BPF_JSET": "syscall", - "syscall.BPF_K": "syscall", - "syscall.BPF_LD": "syscall", - "syscall.BPF_LDX": "syscall", - "syscall.BPF_LEN": "syscall", - "syscall.BPF_LSH": "syscall", - "syscall.BPF_MAJOR_VERSION": "syscall", - "syscall.BPF_MAXBUFSIZE": "syscall", - "syscall.BPF_MAXINSNS": "syscall", - "syscall.BPF_MEM": "syscall", - "syscall.BPF_MEMWORDS": "syscall", - "syscall.BPF_MINBUFSIZE": "syscall", - "syscall.BPF_MINOR_VERSION": "syscall", - "syscall.BPF_MISC": "syscall", - "syscall.BPF_MSH": "syscall", - "syscall.BPF_MUL": "syscall", - "syscall.BPF_NEG": "syscall", - "syscall.BPF_OR": "syscall", - "syscall.BPF_RELEASE": "syscall", - "syscall.BPF_RET": "syscall", - "syscall.BPF_RSH": "syscall", - "syscall.BPF_ST": "syscall", - "syscall.BPF_STX": "syscall", - "syscall.BPF_SUB": "syscall", - "syscall.BPF_TAX": "syscall", - "syscall.BPF_TXA": "syscall", - "syscall.BPF_T_BINTIME": "syscall", - "syscall.BPF_T_BINTIME_FAST": "syscall", - "syscall.BPF_T_BINTIME_MONOTONIC": "syscall", - "syscall.BPF_T_BINTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_FAST": "syscall", - "syscall.BPF_T_FLAG_MASK": "syscall", - "syscall.BPF_T_FORMAT_MASK": "syscall", - "syscall.BPF_T_MICROTIME": "syscall", - "syscall.BPF_T_MICROTIME_FAST": "syscall", - "syscall.BPF_T_MICROTIME_MONOTONIC": "syscall", - "syscall.BPF_T_MICROTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_MONOTONIC": "syscall", - "syscall.BPF_T_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_NANOTIME": "syscall", - "syscall.BPF_T_NANOTIME_FAST": "syscall", - "syscall.BPF_T_NANOTIME_MONOTONIC": "syscall", - "syscall.BPF_T_NANOTIME_MONOTONIC_FAST": "syscall", - "syscall.BPF_T_NONE": "syscall", - "syscall.BPF_T_NORMAL": "syscall", - "syscall.BPF_W": "syscall", - "syscall.BPF_X": "syscall", - "syscall.BRKINT": "syscall", - "syscall.Bind": "syscall", - "syscall.BindToDevice": "syscall", - "syscall.BpfBuflen": "syscall", - "syscall.BpfDatalink": "syscall", - "syscall.BpfHdr": "syscall", - "syscall.BpfHeadercmpl": "syscall", - "syscall.BpfInsn": "syscall", - "syscall.BpfInterface": "syscall", - "syscall.BpfJump": "syscall", - "syscall.BpfProgram": "syscall", - "syscall.BpfStat": "syscall", - "syscall.BpfStats": "syscall", - "syscall.BpfStmt": "syscall", - "syscall.BpfTimeout": "syscall", - "syscall.BpfTimeval": "syscall", - "syscall.BpfVersion": "syscall", - "syscall.BpfZbuf": "syscall", - "syscall.BpfZbufHeader": "syscall", - "syscall.ByHandleFileInformation": "syscall", - "syscall.BytePtrFromString": "syscall", - "syscall.ByteSliceFromString": "syscall", - "syscall.CCR0_FLUSH": "syscall", - "syscall.CERT_CHAIN_POLICY_AUTHENTICODE": "syscall", - "syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS": "syscall", - "syscall.CERT_CHAIN_POLICY_BASE": "syscall", - "syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "syscall", - "syscall.CERT_CHAIN_POLICY_EV": "syscall", - "syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT": "syscall", - "syscall.CERT_CHAIN_POLICY_NT_AUTH": "syscall", - "syscall.CERT_CHAIN_POLICY_SSL": "syscall", - "syscall.CERT_E_CN_NO_MATCH": "syscall", - "syscall.CERT_E_EXPIRED": "syscall", - "syscall.CERT_E_PURPOSE": "syscall", - "syscall.CERT_E_ROLE": "syscall", - "syscall.CERT_E_UNTRUSTEDROOT": "syscall", - "syscall.CERT_STORE_ADD_ALWAYS": "syscall", - "syscall.CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": "syscall", - "syscall.CERT_STORE_PROV_MEMORY": "syscall", - "syscall.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": "syscall", - "syscall.CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": "syscall", - "syscall.CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": "syscall", - "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": "syscall", - "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": "syscall", - "syscall.CERT_TRUST_INVALID_BASIC_CONSTRAINTS": "syscall", - "syscall.CERT_TRUST_INVALID_EXTENSION": "syscall", - "syscall.CERT_TRUST_INVALID_NAME_CONSTRAINTS": "syscall", - "syscall.CERT_TRUST_INVALID_POLICY_CONSTRAINTS": "syscall", - "syscall.CERT_TRUST_IS_CYCLIC": "syscall", - "syscall.CERT_TRUST_IS_EXPLICIT_DISTRUST": "syscall", - "syscall.CERT_TRUST_IS_NOT_SIGNATURE_VALID": "syscall", - "syscall.CERT_TRUST_IS_NOT_TIME_VALID": "syscall", - "syscall.CERT_TRUST_IS_NOT_VALID_FOR_USAGE": "syscall", - "syscall.CERT_TRUST_IS_OFFLINE_REVOCATION": "syscall", - "syscall.CERT_TRUST_IS_REVOKED": "syscall", - "syscall.CERT_TRUST_IS_UNTRUSTED_ROOT": "syscall", - "syscall.CERT_TRUST_NO_ERROR": "syscall", - "syscall.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": "syscall", - "syscall.CERT_TRUST_REVOCATION_STATUS_UNKNOWN": "syscall", - "syscall.CFLUSH": "syscall", - "syscall.CLOCAL": "syscall", - "syscall.CLONE_CHILD_CLEARTID": "syscall", - "syscall.CLONE_CHILD_SETTID": "syscall", - "syscall.CLONE_CSIGNAL": "syscall", - "syscall.CLONE_DETACHED": "syscall", - "syscall.CLONE_FILES": "syscall", - "syscall.CLONE_FS": "syscall", - "syscall.CLONE_IO": "syscall", - "syscall.CLONE_NEWIPC": "syscall", - "syscall.CLONE_NEWNET": "syscall", - "syscall.CLONE_NEWNS": "syscall", - "syscall.CLONE_NEWPID": "syscall", - "syscall.CLONE_NEWUSER": "syscall", - "syscall.CLONE_NEWUTS": "syscall", - "syscall.CLONE_PARENT": "syscall", - "syscall.CLONE_PARENT_SETTID": "syscall", - "syscall.CLONE_PID": "syscall", - "syscall.CLONE_PTRACE": "syscall", - "syscall.CLONE_SETTLS": "syscall", - "syscall.CLONE_SIGHAND": "syscall", - "syscall.CLONE_SYSVSEM": "syscall", - "syscall.CLONE_THREAD": "syscall", - "syscall.CLONE_UNTRACED": "syscall", - "syscall.CLONE_VFORK": "syscall", - "syscall.CLONE_VM": "syscall", - "syscall.CPUID_CFLUSH": "syscall", - "syscall.CREAD": "syscall", - "syscall.CREATE_ALWAYS": "syscall", - "syscall.CREATE_NEW": "syscall", - "syscall.CREATE_NEW_PROCESS_GROUP": "syscall", - "syscall.CREATE_UNICODE_ENVIRONMENT": "syscall", - "syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL": "syscall", - "syscall.CRYPT_DELETEKEYSET": "syscall", - "syscall.CRYPT_MACHINE_KEYSET": "syscall", - "syscall.CRYPT_NEWKEYSET": "syscall", - "syscall.CRYPT_SILENT": "syscall", - "syscall.CRYPT_VERIFYCONTEXT": "syscall", - "syscall.CS5": "syscall", - "syscall.CS6": "syscall", - "syscall.CS7": "syscall", - "syscall.CS8": "syscall", - "syscall.CSIZE": "syscall", - "syscall.CSTART": "syscall", - "syscall.CSTATUS": "syscall", - "syscall.CSTOP": "syscall", - "syscall.CSTOPB": "syscall", - "syscall.CSUSP": "syscall", - "syscall.CTL_MAXNAME": "syscall", - "syscall.CTL_NET": "syscall", - "syscall.CTL_QUERY": "syscall", - "syscall.CTRL_BREAK_EVENT": "syscall", - "syscall.CTRL_CLOSE_EVENT": "syscall", - "syscall.CTRL_C_EVENT": "syscall", - "syscall.CTRL_LOGOFF_EVENT": "syscall", - "syscall.CTRL_SHUTDOWN_EVENT": "syscall", - "syscall.CancelIo": "syscall", - "syscall.CancelIoEx": "syscall", - "syscall.CertAddCertificateContextToStore": "syscall", - "syscall.CertChainContext": "syscall", - "syscall.CertChainElement": "syscall", - "syscall.CertChainPara": "syscall", - "syscall.CertChainPolicyPara": "syscall", - "syscall.CertChainPolicyStatus": "syscall", - "syscall.CertCloseStore": "syscall", - "syscall.CertContext": "syscall", - "syscall.CertCreateCertificateContext": "syscall", - "syscall.CertEnhKeyUsage": "syscall", - "syscall.CertEnumCertificatesInStore": "syscall", - "syscall.CertFreeCertificateChain": "syscall", - "syscall.CertFreeCertificateContext": "syscall", - "syscall.CertGetCertificateChain": "syscall", - "syscall.CertInfo": "syscall", - "syscall.CertOpenStore": "syscall", - "syscall.CertOpenSystemStore": "syscall", - "syscall.CertRevocationCrlInfo": "syscall", - "syscall.CertRevocationInfo": "syscall", - "syscall.CertSimpleChain": "syscall", - "syscall.CertTrustListInfo": "syscall", - "syscall.CertTrustStatus": "syscall", - "syscall.CertUsageMatch": "syscall", - "syscall.CertVerifyCertificateChainPolicy": "syscall", - "syscall.Chdir": "syscall", - "syscall.CheckBpfVersion": "syscall", - "syscall.Chflags": "syscall", - "syscall.Chmod": "syscall", - "syscall.Chown": "syscall", - "syscall.Chroot": "syscall", - "syscall.Clearenv": "syscall", - "syscall.Close": "syscall", - "syscall.CloseHandle": "syscall", - "syscall.CloseOnExec": "syscall", - "syscall.Closesocket": "syscall", - "syscall.CmsgLen": "syscall", - "syscall.CmsgSpace": "syscall", - "syscall.Cmsghdr": "syscall", - "syscall.CommandLineToArgv": "syscall", - "syscall.ComputerName": "syscall", - "syscall.Conn": "syscall", - "syscall.Connect": "syscall", - "syscall.ConnectEx": "syscall", - "syscall.ConvertSidToStringSid": "syscall", - "syscall.ConvertStringSidToSid": "syscall", - "syscall.CopySid": "syscall", - "syscall.Creat": "syscall", - "syscall.CreateDirectory": "syscall", - "syscall.CreateFile": "syscall", - "syscall.CreateFileMapping": "syscall", - "syscall.CreateHardLink": "syscall", - "syscall.CreateIoCompletionPort": "syscall", - "syscall.CreatePipe": "syscall", - "syscall.CreateProcess": "syscall", - "syscall.CreateProcessAsUser": "syscall", - "syscall.CreateSymbolicLink": "syscall", - "syscall.CreateToolhelp32Snapshot": "syscall", - "syscall.Credential": "syscall", - "syscall.CryptAcquireContext": "syscall", - "syscall.CryptGenRandom": "syscall", - "syscall.CryptReleaseContext": "syscall", - "syscall.DIOCBSFLUSH": "syscall", - "syscall.DIOCOSFPFLUSH": "syscall", - "syscall.DLL": "syscall", - "syscall.DLLError": "syscall", - "syscall.DLT_A429": "syscall", - "syscall.DLT_A653_ICM": "syscall", - "syscall.DLT_AIRONET_HEADER": "syscall", - "syscall.DLT_AOS": "syscall", - "syscall.DLT_APPLE_IP_OVER_IEEE1394": "syscall", - "syscall.DLT_ARCNET": "syscall", - "syscall.DLT_ARCNET_LINUX": "syscall", - "syscall.DLT_ATM_CLIP": "syscall", - "syscall.DLT_ATM_RFC1483": "syscall", - "syscall.DLT_AURORA": "syscall", - "syscall.DLT_AX25": "syscall", - "syscall.DLT_AX25_KISS": "syscall", - "syscall.DLT_BACNET_MS_TP": "syscall", - "syscall.DLT_BLUETOOTH_HCI_H4": "syscall", - "syscall.DLT_BLUETOOTH_HCI_H4_WITH_PHDR": "syscall", - "syscall.DLT_CAN20B": "syscall", - "syscall.DLT_CAN_SOCKETCAN": "syscall", - "syscall.DLT_CHAOS": "syscall", - "syscall.DLT_CHDLC": "syscall", - "syscall.DLT_CISCO_IOS": "syscall", - "syscall.DLT_C_HDLC": "syscall", - "syscall.DLT_C_HDLC_WITH_DIR": "syscall", - "syscall.DLT_DBUS": "syscall", - "syscall.DLT_DECT": "syscall", - "syscall.DLT_DOCSIS": "syscall", - "syscall.DLT_DVB_CI": "syscall", - "syscall.DLT_ECONET": "syscall", - "syscall.DLT_EN10MB": "syscall", - "syscall.DLT_EN3MB": "syscall", - "syscall.DLT_ENC": "syscall", - "syscall.DLT_ERF": "syscall", - "syscall.DLT_ERF_ETH": "syscall", - "syscall.DLT_ERF_POS": "syscall", - "syscall.DLT_FC_2": "syscall", - "syscall.DLT_FC_2_WITH_FRAME_DELIMS": "syscall", - "syscall.DLT_FDDI": "syscall", - "syscall.DLT_FLEXRAY": "syscall", - "syscall.DLT_FRELAY": "syscall", - "syscall.DLT_FRELAY_WITH_DIR": "syscall", - "syscall.DLT_GCOM_SERIAL": "syscall", - "syscall.DLT_GCOM_T1E1": "syscall", - "syscall.DLT_GPF_F": "syscall", - "syscall.DLT_GPF_T": "syscall", - "syscall.DLT_GPRS_LLC": "syscall", - "syscall.DLT_GSMTAP_ABIS": "syscall", - "syscall.DLT_GSMTAP_UM": "syscall", - "syscall.DLT_HDLC": "syscall", - "syscall.DLT_HHDLC": "syscall", - "syscall.DLT_HIPPI": "syscall", - "syscall.DLT_IBM_SN": "syscall", - "syscall.DLT_IBM_SP": "syscall", - "syscall.DLT_IEEE802": "syscall", - "syscall.DLT_IEEE802_11": "syscall", - "syscall.DLT_IEEE802_11_RADIO": "syscall", - "syscall.DLT_IEEE802_11_RADIO_AVS": "syscall", - "syscall.DLT_IEEE802_15_4": "syscall", - "syscall.DLT_IEEE802_15_4_LINUX": "syscall", - "syscall.DLT_IEEE802_15_4_NOFCS": "syscall", - "syscall.DLT_IEEE802_15_4_NONASK_PHY": "syscall", - "syscall.DLT_IEEE802_16_MAC_CPS": "syscall", - "syscall.DLT_IEEE802_16_MAC_CPS_RADIO": "syscall", - "syscall.DLT_IPFILTER": "syscall", - "syscall.DLT_IPMB": "syscall", - "syscall.DLT_IPMB_LINUX": "syscall", - "syscall.DLT_IPNET": "syscall", - "syscall.DLT_IPOIB": "syscall", - "syscall.DLT_IPV4": "syscall", - "syscall.DLT_IPV6": "syscall", - "syscall.DLT_IP_OVER_FC": "syscall", - "syscall.DLT_JUNIPER_ATM1": "syscall", - "syscall.DLT_JUNIPER_ATM2": "syscall", - "syscall.DLT_JUNIPER_ATM_CEMIC": "syscall", - "syscall.DLT_JUNIPER_CHDLC": "syscall", - "syscall.DLT_JUNIPER_ES": "syscall", - "syscall.DLT_JUNIPER_ETHER": "syscall", - "syscall.DLT_JUNIPER_FIBRECHANNEL": "syscall", - "syscall.DLT_JUNIPER_FRELAY": "syscall", - "syscall.DLT_JUNIPER_GGSN": "syscall", - "syscall.DLT_JUNIPER_ISM": "syscall", - "syscall.DLT_JUNIPER_MFR": "syscall", - "syscall.DLT_JUNIPER_MLFR": "syscall", - "syscall.DLT_JUNIPER_MLPPP": "syscall", - "syscall.DLT_JUNIPER_MONITOR": "syscall", - "syscall.DLT_JUNIPER_PIC_PEER": "syscall", - "syscall.DLT_JUNIPER_PPP": "syscall", - "syscall.DLT_JUNIPER_PPPOE": "syscall", - "syscall.DLT_JUNIPER_PPPOE_ATM": "syscall", - "syscall.DLT_JUNIPER_SERVICES": "syscall", - "syscall.DLT_JUNIPER_SRX_E2E": "syscall", - "syscall.DLT_JUNIPER_ST": "syscall", - "syscall.DLT_JUNIPER_VP": "syscall", - "syscall.DLT_JUNIPER_VS": "syscall", - "syscall.DLT_LAPB_WITH_DIR": "syscall", - "syscall.DLT_LAPD": "syscall", - "syscall.DLT_LIN": "syscall", - "syscall.DLT_LINUX_EVDEV": "syscall", - "syscall.DLT_LINUX_IRDA": "syscall", - "syscall.DLT_LINUX_LAPD": "syscall", - "syscall.DLT_LINUX_PPP_WITHDIRECTION": "syscall", - "syscall.DLT_LINUX_SLL": "syscall", - "syscall.DLT_LOOP": "syscall", - "syscall.DLT_LTALK": "syscall", - "syscall.DLT_MATCHING_MAX": "syscall", - "syscall.DLT_MATCHING_MIN": "syscall", - "syscall.DLT_MFR": "syscall", - "syscall.DLT_MOST": "syscall", - "syscall.DLT_MPEG_2_TS": "syscall", - "syscall.DLT_MPLS": "syscall", - "syscall.DLT_MTP2": "syscall", - "syscall.DLT_MTP2_WITH_PHDR": "syscall", - "syscall.DLT_MTP3": "syscall", - "syscall.DLT_MUX27010": "syscall", - "syscall.DLT_NETANALYZER": "syscall", - "syscall.DLT_NETANALYZER_TRANSPARENT": "syscall", - "syscall.DLT_NFC_LLCP": "syscall", - "syscall.DLT_NFLOG": "syscall", - "syscall.DLT_NG40": "syscall", - "syscall.DLT_NULL": "syscall", - "syscall.DLT_PCI_EXP": "syscall", - "syscall.DLT_PFLOG": "syscall", - "syscall.DLT_PFSYNC": "syscall", - "syscall.DLT_PPI": "syscall", - "syscall.DLT_PPP": "syscall", - "syscall.DLT_PPP_BSDOS": "syscall", - "syscall.DLT_PPP_ETHER": "syscall", - "syscall.DLT_PPP_PPPD": "syscall", - "syscall.DLT_PPP_SERIAL": "syscall", - "syscall.DLT_PPP_WITH_DIR": "syscall", - "syscall.DLT_PPP_WITH_DIRECTION": "syscall", - "syscall.DLT_PRISM_HEADER": "syscall", - "syscall.DLT_PRONET": "syscall", - "syscall.DLT_RAIF1": "syscall", - "syscall.DLT_RAW": "syscall", - "syscall.DLT_RAWAF_MASK": "syscall", - "syscall.DLT_RIO": "syscall", - "syscall.DLT_SCCP": "syscall", - "syscall.DLT_SITA": "syscall", - "syscall.DLT_SLIP": "syscall", - "syscall.DLT_SLIP_BSDOS": "syscall", - "syscall.DLT_STANAG_5066_D_PDU": "syscall", - "syscall.DLT_SUNATM": "syscall", - "syscall.DLT_SYMANTEC_FIREWALL": "syscall", - "syscall.DLT_TZSP": "syscall", - "syscall.DLT_USB": "syscall", - "syscall.DLT_USB_LINUX": "syscall", - "syscall.DLT_USB_LINUX_MMAPPED": "syscall", - "syscall.DLT_USER0": "syscall", - "syscall.DLT_USER1": "syscall", - "syscall.DLT_USER10": "syscall", - "syscall.DLT_USER11": "syscall", - "syscall.DLT_USER12": "syscall", - "syscall.DLT_USER13": "syscall", - "syscall.DLT_USER14": "syscall", - "syscall.DLT_USER15": "syscall", - "syscall.DLT_USER2": "syscall", - "syscall.DLT_USER3": "syscall", - "syscall.DLT_USER4": "syscall", - "syscall.DLT_USER5": "syscall", - "syscall.DLT_USER6": "syscall", - "syscall.DLT_USER7": "syscall", - "syscall.DLT_USER8": "syscall", - "syscall.DLT_USER9": "syscall", - "syscall.DLT_WIHART": "syscall", - "syscall.DLT_X2E_SERIAL": "syscall", - "syscall.DLT_X2E_XORAYA": "syscall", - "syscall.DNSMXData": "syscall", - "syscall.DNSPTRData": "syscall", - "syscall.DNSRecord": "syscall", - "syscall.DNSSRVData": "syscall", - "syscall.DNSTXTData": "syscall", - "syscall.DNS_INFO_NO_RECORDS": "syscall", - "syscall.DNS_TYPE_A": "syscall", - "syscall.DNS_TYPE_A6": "syscall", - "syscall.DNS_TYPE_AAAA": "syscall", - "syscall.DNS_TYPE_ADDRS": "syscall", - "syscall.DNS_TYPE_AFSDB": "syscall", - "syscall.DNS_TYPE_ALL": "syscall", - "syscall.DNS_TYPE_ANY": "syscall", - "syscall.DNS_TYPE_ATMA": "syscall", - "syscall.DNS_TYPE_AXFR": "syscall", - "syscall.DNS_TYPE_CERT": "syscall", - "syscall.DNS_TYPE_CNAME": "syscall", - "syscall.DNS_TYPE_DHCID": "syscall", - "syscall.DNS_TYPE_DNAME": "syscall", - "syscall.DNS_TYPE_DNSKEY": "syscall", - "syscall.DNS_TYPE_DS": "syscall", - "syscall.DNS_TYPE_EID": "syscall", - "syscall.DNS_TYPE_GID": "syscall", - "syscall.DNS_TYPE_GPOS": "syscall", - "syscall.DNS_TYPE_HINFO": "syscall", - "syscall.DNS_TYPE_ISDN": "syscall", - "syscall.DNS_TYPE_IXFR": "syscall", - "syscall.DNS_TYPE_KEY": "syscall", - "syscall.DNS_TYPE_KX": "syscall", - "syscall.DNS_TYPE_LOC": "syscall", - "syscall.DNS_TYPE_MAILA": "syscall", - "syscall.DNS_TYPE_MAILB": "syscall", - "syscall.DNS_TYPE_MB": "syscall", - "syscall.DNS_TYPE_MD": "syscall", - "syscall.DNS_TYPE_MF": "syscall", - "syscall.DNS_TYPE_MG": "syscall", - "syscall.DNS_TYPE_MINFO": "syscall", - "syscall.DNS_TYPE_MR": "syscall", - "syscall.DNS_TYPE_MX": "syscall", - "syscall.DNS_TYPE_NAPTR": "syscall", - "syscall.DNS_TYPE_NBSTAT": "syscall", - "syscall.DNS_TYPE_NIMLOC": "syscall", - "syscall.DNS_TYPE_NS": "syscall", - "syscall.DNS_TYPE_NSAP": "syscall", - "syscall.DNS_TYPE_NSAPPTR": "syscall", - "syscall.DNS_TYPE_NSEC": "syscall", - "syscall.DNS_TYPE_NULL": "syscall", - "syscall.DNS_TYPE_NXT": "syscall", - "syscall.DNS_TYPE_OPT": "syscall", - "syscall.DNS_TYPE_PTR": "syscall", - "syscall.DNS_TYPE_PX": "syscall", - "syscall.DNS_TYPE_RP": "syscall", - "syscall.DNS_TYPE_RRSIG": "syscall", - "syscall.DNS_TYPE_RT": "syscall", - "syscall.DNS_TYPE_SIG": "syscall", - "syscall.DNS_TYPE_SINK": "syscall", - "syscall.DNS_TYPE_SOA": "syscall", - "syscall.DNS_TYPE_SRV": "syscall", - "syscall.DNS_TYPE_TEXT": "syscall", - "syscall.DNS_TYPE_TKEY": "syscall", - "syscall.DNS_TYPE_TSIG": "syscall", - "syscall.DNS_TYPE_UID": "syscall", - "syscall.DNS_TYPE_UINFO": "syscall", - "syscall.DNS_TYPE_UNSPEC": "syscall", - "syscall.DNS_TYPE_WINS": "syscall", - "syscall.DNS_TYPE_WINSR": "syscall", - "syscall.DNS_TYPE_WKS": "syscall", - "syscall.DNS_TYPE_X25": "syscall", - "syscall.DT_BLK": "syscall", - "syscall.DT_CHR": "syscall", - "syscall.DT_DIR": "syscall", - "syscall.DT_FIFO": "syscall", - "syscall.DT_LNK": "syscall", - "syscall.DT_REG": "syscall", - "syscall.DT_SOCK": "syscall", - "syscall.DT_UNKNOWN": "syscall", - "syscall.DT_WHT": "syscall", - "syscall.DUPLICATE_CLOSE_SOURCE": "syscall", - "syscall.DUPLICATE_SAME_ACCESS": "syscall", - "syscall.DeleteFile": "syscall", - "syscall.DetachLsf": "syscall", - "syscall.DeviceIoControl": "syscall", - "syscall.Dirent": "syscall", - "syscall.DnsNameCompare": "syscall", - "syscall.DnsQuery": "syscall", - "syscall.DnsRecordListFree": "syscall", - "syscall.DnsSectionAdditional": "syscall", - "syscall.DnsSectionAnswer": "syscall", - "syscall.DnsSectionAuthority": "syscall", - "syscall.DnsSectionQuestion": "syscall", - "syscall.Dup": "syscall", - "syscall.Dup2": "syscall", - "syscall.Dup3": "syscall", - "syscall.DuplicateHandle": "syscall", - "syscall.E2BIG": "syscall", - "syscall.EACCES": "syscall", - "syscall.EADDRINUSE": "syscall", - "syscall.EADDRNOTAVAIL": "syscall", - "syscall.EADV": "syscall", - "syscall.EAFNOSUPPORT": "syscall", - "syscall.EAGAIN": "syscall", - "syscall.EALREADY": "syscall", - "syscall.EAUTH": "syscall", - "syscall.EBADARCH": "syscall", - "syscall.EBADE": "syscall", - "syscall.EBADEXEC": "syscall", - "syscall.EBADF": "syscall", - "syscall.EBADFD": "syscall", - "syscall.EBADMACHO": "syscall", - "syscall.EBADMSG": "syscall", - "syscall.EBADR": "syscall", - "syscall.EBADRPC": "syscall", - "syscall.EBADRQC": "syscall", - "syscall.EBADSLT": "syscall", - "syscall.EBFONT": "syscall", - "syscall.EBUSY": "syscall", - "syscall.ECANCELED": "syscall", - "syscall.ECAPMODE": "syscall", - "syscall.ECHILD": "syscall", - "syscall.ECHO": "syscall", - "syscall.ECHOCTL": "syscall", - "syscall.ECHOE": "syscall", - "syscall.ECHOK": "syscall", - "syscall.ECHOKE": "syscall", - "syscall.ECHONL": "syscall", - "syscall.ECHOPRT": "syscall", - "syscall.ECHRNG": "syscall", - "syscall.ECOMM": "syscall", - "syscall.ECONNABORTED": "syscall", - "syscall.ECONNREFUSED": "syscall", - "syscall.ECONNRESET": "syscall", - "syscall.EDEADLK": "syscall", - "syscall.EDEADLOCK": "syscall", - "syscall.EDESTADDRREQ": "syscall", - "syscall.EDEVERR": "syscall", - "syscall.EDOM": "syscall", - "syscall.EDOOFUS": "syscall", - "syscall.EDOTDOT": "syscall", - "syscall.EDQUOT": "syscall", - "syscall.EEXIST": "syscall", - "syscall.EFAULT": "syscall", - "syscall.EFBIG": "syscall", - "syscall.EFER_LMA": "syscall", - "syscall.EFER_LME": "syscall", - "syscall.EFER_NXE": "syscall", - "syscall.EFER_SCE": "syscall", - "syscall.EFTYPE": "syscall", - "syscall.EHOSTDOWN": "syscall", - "syscall.EHOSTUNREACH": "syscall", - "syscall.EHWPOISON": "syscall", - "syscall.EIDRM": "syscall", - "syscall.EILSEQ": "syscall", - "syscall.EINPROGRESS": "syscall", - "syscall.EINTR": "syscall", - "syscall.EINVAL": "syscall", - "syscall.EIO": "syscall", - "syscall.EIPSEC": "syscall", - "syscall.EISCONN": "syscall", - "syscall.EISDIR": "syscall", - "syscall.EISNAM": "syscall", - "syscall.EKEYEXPIRED": "syscall", - "syscall.EKEYREJECTED": "syscall", - "syscall.EKEYREVOKED": "syscall", - "syscall.EL2HLT": "syscall", - "syscall.EL2NSYNC": "syscall", - "syscall.EL3HLT": "syscall", - "syscall.EL3RST": "syscall", - "syscall.ELAST": "syscall", - "syscall.ELF_NGREG": "syscall", - "syscall.ELF_PRARGSZ": "syscall", - "syscall.ELIBACC": "syscall", - "syscall.ELIBBAD": "syscall", - "syscall.ELIBEXEC": "syscall", - "syscall.ELIBMAX": "syscall", - "syscall.ELIBSCN": "syscall", - "syscall.ELNRNG": "syscall", - "syscall.ELOOP": "syscall", - "syscall.EMEDIUMTYPE": "syscall", - "syscall.EMFILE": "syscall", - "syscall.EMLINK": "syscall", - "syscall.EMSGSIZE": "syscall", - "syscall.EMT_TAGOVF": "syscall", - "syscall.EMULTIHOP": "syscall", - "syscall.EMUL_ENABLED": "syscall", - "syscall.EMUL_LINUX": "syscall", - "syscall.EMUL_LINUX32": "syscall", - "syscall.EMUL_MAXID": "syscall", - "syscall.EMUL_NATIVE": "syscall", - "syscall.ENAMETOOLONG": "syscall", - "syscall.ENAVAIL": "syscall", - "syscall.ENDRUNDISC": "syscall", - "syscall.ENEEDAUTH": "syscall", - "syscall.ENETDOWN": "syscall", - "syscall.ENETRESET": "syscall", - "syscall.ENETUNREACH": "syscall", - "syscall.ENFILE": "syscall", - "syscall.ENOANO": "syscall", - "syscall.ENOATTR": "syscall", - "syscall.ENOBUFS": "syscall", - "syscall.ENOCSI": "syscall", - "syscall.ENODATA": "syscall", - "syscall.ENODEV": "syscall", - "syscall.ENOENT": "syscall", - "syscall.ENOEXEC": "syscall", - "syscall.ENOKEY": "syscall", - "syscall.ENOLCK": "syscall", - "syscall.ENOLINK": "syscall", - "syscall.ENOMEDIUM": "syscall", - "syscall.ENOMEM": "syscall", - "syscall.ENOMSG": "syscall", - "syscall.ENONET": "syscall", - "syscall.ENOPKG": "syscall", - "syscall.ENOPOLICY": "syscall", - "syscall.ENOPROTOOPT": "syscall", - "syscall.ENOSPC": "syscall", - "syscall.ENOSR": "syscall", - "syscall.ENOSTR": "syscall", - "syscall.ENOSYS": "syscall", - "syscall.ENOTBLK": "syscall", - "syscall.ENOTCAPABLE": "syscall", - "syscall.ENOTCONN": "syscall", - "syscall.ENOTDIR": "syscall", - "syscall.ENOTEMPTY": "syscall", - "syscall.ENOTNAM": "syscall", - "syscall.ENOTRECOVERABLE": "syscall", - "syscall.ENOTSOCK": "syscall", - "syscall.ENOTSUP": "syscall", - "syscall.ENOTTY": "syscall", - "syscall.ENOTUNIQ": "syscall", - "syscall.ENXIO": "syscall", - "syscall.EN_SW_CTL_INF": "syscall", - "syscall.EN_SW_CTL_PREC": "syscall", - "syscall.EN_SW_CTL_ROUND": "syscall", - "syscall.EN_SW_DATACHAIN": "syscall", - "syscall.EN_SW_DENORM": "syscall", - "syscall.EN_SW_INVOP": "syscall", - "syscall.EN_SW_OVERFLOW": "syscall", - "syscall.EN_SW_PRECLOSS": "syscall", - "syscall.EN_SW_UNDERFLOW": "syscall", - "syscall.EN_SW_ZERODIV": "syscall", - "syscall.EOPNOTSUPP": "syscall", - "syscall.EOVERFLOW": "syscall", - "syscall.EOWNERDEAD": "syscall", - "syscall.EPERM": "syscall", - "syscall.EPFNOSUPPORT": "syscall", - "syscall.EPIPE": "syscall", - "syscall.EPOLLERR": "syscall", - "syscall.EPOLLET": "syscall", - "syscall.EPOLLHUP": "syscall", - "syscall.EPOLLIN": "syscall", - "syscall.EPOLLMSG": "syscall", - "syscall.EPOLLONESHOT": "syscall", - "syscall.EPOLLOUT": "syscall", - "syscall.EPOLLPRI": "syscall", - "syscall.EPOLLRDBAND": "syscall", - "syscall.EPOLLRDHUP": "syscall", - "syscall.EPOLLRDNORM": "syscall", - "syscall.EPOLLWRBAND": "syscall", - "syscall.EPOLLWRNORM": "syscall", - "syscall.EPOLL_CLOEXEC": "syscall", - "syscall.EPOLL_CTL_ADD": "syscall", - "syscall.EPOLL_CTL_DEL": "syscall", - "syscall.EPOLL_CTL_MOD": "syscall", - "syscall.EPOLL_NONBLOCK": "syscall", - "syscall.EPROCLIM": "syscall", - "syscall.EPROCUNAVAIL": "syscall", - "syscall.EPROGMISMATCH": "syscall", - "syscall.EPROGUNAVAIL": "syscall", - "syscall.EPROTO": "syscall", - "syscall.EPROTONOSUPPORT": "syscall", - "syscall.EPROTOTYPE": "syscall", - "syscall.EPWROFF": "syscall", - "syscall.ERANGE": "syscall", - "syscall.EREMCHG": "syscall", - "syscall.EREMOTE": "syscall", - "syscall.EREMOTEIO": "syscall", - "syscall.ERESTART": "syscall", - "syscall.ERFKILL": "syscall", - "syscall.EROFS": "syscall", - "syscall.ERPCMISMATCH": "syscall", - "syscall.ERROR_ACCESS_DENIED": "syscall", - "syscall.ERROR_ALREADY_EXISTS": "syscall", - "syscall.ERROR_BROKEN_PIPE": "syscall", - "syscall.ERROR_BUFFER_OVERFLOW": "syscall", - "syscall.ERROR_DIR_NOT_EMPTY": "syscall", - "syscall.ERROR_ENVVAR_NOT_FOUND": "syscall", - "syscall.ERROR_FILE_EXISTS": "syscall", - "syscall.ERROR_FILE_NOT_FOUND": "syscall", - "syscall.ERROR_HANDLE_EOF": "syscall", - "syscall.ERROR_INSUFFICIENT_BUFFER": "syscall", - "syscall.ERROR_IO_PENDING": "syscall", - "syscall.ERROR_MOD_NOT_FOUND": "syscall", - "syscall.ERROR_MORE_DATA": "syscall", - "syscall.ERROR_NETNAME_DELETED": "syscall", - "syscall.ERROR_NOT_FOUND": "syscall", - "syscall.ERROR_NO_MORE_FILES": "syscall", - "syscall.ERROR_OPERATION_ABORTED": "syscall", - "syscall.ERROR_PATH_NOT_FOUND": "syscall", - "syscall.ERROR_PRIVILEGE_NOT_HELD": "syscall", - "syscall.ERROR_PROC_NOT_FOUND": "syscall", - "syscall.ESHLIBVERS": "syscall", - "syscall.ESHUTDOWN": "syscall", - "syscall.ESOCKTNOSUPPORT": "syscall", - "syscall.ESPIPE": "syscall", - "syscall.ESRCH": "syscall", - "syscall.ESRMNT": "syscall", - "syscall.ESTALE": "syscall", - "syscall.ESTRPIPE": "syscall", - "syscall.ETHERCAP_JUMBO_MTU": "syscall", - "syscall.ETHERCAP_VLAN_HWTAGGING": "syscall", - "syscall.ETHERCAP_VLAN_MTU": "syscall", - "syscall.ETHERMIN": "syscall", - "syscall.ETHERMTU": "syscall", - "syscall.ETHERMTU_JUMBO": "syscall", - "syscall.ETHERTYPE_8023": "syscall", - "syscall.ETHERTYPE_AARP": "syscall", - "syscall.ETHERTYPE_ACCTON": "syscall", - "syscall.ETHERTYPE_AEONIC": "syscall", - "syscall.ETHERTYPE_ALPHA": "syscall", - "syscall.ETHERTYPE_AMBER": "syscall", - "syscall.ETHERTYPE_AMOEBA": "syscall", - "syscall.ETHERTYPE_AOE": "syscall", - "syscall.ETHERTYPE_APOLLO": "syscall", - "syscall.ETHERTYPE_APOLLODOMAIN": "syscall", - "syscall.ETHERTYPE_APPLETALK": "syscall", - "syscall.ETHERTYPE_APPLITEK": "syscall", - "syscall.ETHERTYPE_ARGONAUT": "syscall", - "syscall.ETHERTYPE_ARP": "syscall", - "syscall.ETHERTYPE_AT": "syscall", - "syscall.ETHERTYPE_ATALK": "syscall", - "syscall.ETHERTYPE_ATOMIC": "syscall", - "syscall.ETHERTYPE_ATT": "syscall", - "syscall.ETHERTYPE_ATTSTANFORD": "syscall", - "syscall.ETHERTYPE_AUTOPHON": "syscall", - "syscall.ETHERTYPE_AXIS": "syscall", - "syscall.ETHERTYPE_BCLOOP": "syscall", - "syscall.ETHERTYPE_BOFL": "syscall", - "syscall.ETHERTYPE_CABLETRON": "syscall", - "syscall.ETHERTYPE_CHAOS": "syscall", - "syscall.ETHERTYPE_COMDESIGN": "syscall", - "syscall.ETHERTYPE_COMPUGRAPHIC": "syscall", - "syscall.ETHERTYPE_COUNTERPOINT": "syscall", - "syscall.ETHERTYPE_CRONUS": "syscall", - "syscall.ETHERTYPE_CRONUSVLN": "syscall", - "syscall.ETHERTYPE_DCA": "syscall", - "syscall.ETHERTYPE_DDE": "syscall", - "syscall.ETHERTYPE_DEBNI": "syscall", - "syscall.ETHERTYPE_DECAM": "syscall", - "syscall.ETHERTYPE_DECCUST": "syscall", - "syscall.ETHERTYPE_DECDIAG": "syscall", - "syscall.ETHERTYPE_DECDNS": "syscall", - "syscall.ETHERTYPE_DECDTS": "syscall", - "syscall.ETHERTYPE_DECEXPER": "syscall", - "syscall.ETHERTYPE_DECLAST": "syscall", - "syscall.ETHERTYPE_DECLTM": "syscall", - "syscall.ETHERTYPE_DECMUMPS": "syscall", - "syscall.ETHERTYPE_DECNETBIOS": "syscall", - "syscall.ETHERTYPE_DELTACON": "syscall", - "syscall.ETHERTYPE_DIDDLE": "syscall", - "syscall.ETHERTYPE_DLOG1": "syscall", - "syscall.ETHERTYPE_DLOG2": "syscall", - "syscall.ETHERTYPE_DN": "syscall", - "syscall.ETHERTYPE_DOGFIGHT": "syscall", - "syscall.ETHERTYPE_DSMD": "syscall", - "syscall.ETHERTYPE_ECMA": "syscall", - "syscall.ETHERTYPE_ENCRYPT": "syscall", - "syscall.ETHERTYPE_ES": "syscall", - "syscall.ETHERTYPE_EXCELAN": "syscall", - "syscall.ETHERTYPE_EXPERDATA": "syscall", - "syscall.ETHERTYPE_FLIP": "syscall", - "syscall.ETHERTYPE_FLOWCONTROL": "syscall", - "syscall.ETHERTYPE_FRARP": "syscall", - "syscall.ETHERTYPE_GENDYN": "syscall", - "syscall.ETHERTYPE_HAYES": "syscall", - "syscall.ETHERTYPE_HIPPI_FP": "syscall", - "syscall.ETHERTYPE_HITACHI": "syscall", - "syscall.ETHERTYPE_HP": "syscall", - "syscall.ETHERTYPE_IEEEPUP": "syscall", - "syscall.ETHERTYPE_IEEEPUPAT": "syscall", - "syscall.ETHERTYPE_IMLBL": "syscall", - "syscall.ETHERTYPE_IMLBLDIAG": "syscall", - "syscall.ETHERTYPE_IP": "syscall", - "syscall.ETHERTYPE_IPAS": "syscall", - "syscall.ETHERTYPE_IPV6": "syscall", - "syscall.ETHERTYPE_IPX": "syscall", - "syscall.ETHERTYPE_IPXNEW": "syscall", - "syscall.ETHERTYPE_KALPANA": "syscall", - "syscall.ETHERTYPE_LANBRIDGE": "syscall", - "syscall.ETHERTYPE_LANPROBE": "syscall", - "syscall.ETHERTYPE_LAT": "syscall", - "syscall.ETHERTYPE_LBACK": "syscall", - "syscall.ETHERTYPE_LITTLE": "syscall", - "syscall.ETHERTYPE_LLDP": "syscall", - "syscall.ETHERTYPE_LOGICRAFT": "syscall", - "syscall.ETHERTYPE_LOOPBACK": "syscall", - "syscall.ETHERTYPE_MATRA": "syscall", - "syscall.ETHERTYPE_MAX": "syscall", - "syscall.ETHERTYPE_MERIT": "syscall", - "syscall.ETHERTYPE_MICP": "syscall", - "syscall.ETHERTYPE_MOPDL": "syscall", - "syscall.ETHERTYPE_MOPRC": "syscall", - "syscall.ETHERTYPE_MOTOROLA": "syscall", - "syscall.ETHERTYPE_MPLS": "syscall", - "syscall.ETHERTYPE_MPLS_MCAST": "syscall", - "syscall.ETHERTYPE_MUMPS": "syscall", - "syscall.ETHERTYPE_NBPCC": "syscall", - "syscall.ETHERTYPE_NBPCLAIM": "syscall", - "syscall.ETHERTYPE_NBPCLREQ": "syscall", - "syscall.ETHERTYPE_NBPCLRSP": "syscall", - "syscall.ETHERTYPE_NBPCREQ": "syscall", - "syscall.ETHERTYPE_NBPCRSP": "syscall", - "syscall.ETHERTYPE_NBPDG": "syscall", - "syscall.ETHERTYPE_NBPDGB": "syscall", - "syscall.ETHERTYPE_NBPDLTE": "syscall", - "syscall.ETHERTYPE_NBPRAR": "syscall", - "syscall.ETHERTYPE_NBPRAS": "syscall", - "syscall.ETHERTYPE_NBPRST": "syscall", - "syscall.ETHERTYPE_NBPSCD": "syscall", - "syscall.ETHERTYPE_NBPVCD": "syscall", - "syscall.ETHERTYPE_NBS": "syscall", - "syscall.ETHERTYPE_NCD": "syscall", - "syscall.ETHERTYPE_NESTAR": "syscall", - "syscall.ETHERTYPE_NETBEUI": "syscall", - "syscall.ETHERTYPE_NOVELL": "syscall", - "syscall.ETHERTYPE_NS": "syscall", - "syscall.ETHERTYPE_NSAT": "syscall", - "syscall.ETHERTYPE_NSCOMPAT": "syscall", - "syscall.ETHERTYPE_NTRAILER": "syscall", - "syscall.ETHERTYPE_OS9": "syscall", - "syscall.ETHERTYPE_OS9NET": "syscall", - "syscall.ETHERTYPE_PACER": "syscall", - "syscall.ETHERTYPE_PAE": "syscall", - "syscall.ETHERTYPE_PCS": "syscall", - "syscall.ETHERTYPE_PLANNING": "syscall", - "syscall.ETHERTYPE_PPP": "syscall", - "syscall.ETHERTYPE_PPPOE": "syscall", - "syscall.ETHERTYPE_PPPOEDISC": "syscall", - "syscall.ETHERTYPE_PRIMENTS": "syscall", - "syscall.ETHERTYPE_PUP": "syscall", - "syscall.ETHERTYPE_PUPAT": "syscall", - "syscall.ETHERTYPE_QINQ": "syscall", - "syscall.ETHERTYPE_RACAL": "syscall", - "syscall.ETHERTYPE_RATIONAL": "syscall", - "syscall.ETHERTYPE_RAWFR": "syscall", - "syscall.ETHERTYPE_RCL": "syscall", - "syscall.ETHERTYPE_RDP": "syscall", - "syscall.ETHERTYPE_RETIX": "syscall", - "syscall.ETHERTYPE_REVARP": "syscall", - "syscall.ETHERTYPE_SCA": "syscall", - "syscall.ETHERTYPE_SECTRA": "syscall", - "syscall.ETHERTYPE_SECUREDATA": "syscall", - "syscall.ETHERTYPE_SGITW": "syscall", - "syscall.ETHERTYPE_SG_BOUNCE": "syscall", - "syscall.ETHERTYPE_SG_DIAG": "syscall", - "syscall.ETHERTYPE_SG_NETGAMES": "syscall", - "syscall.ETHERTYPE_SG_RESV": "syscall", - "syscall.ETHERTYPE_SIMNET": "syscall", - "syscall.ETHERTYPE_SLOW": "syscall", - "syscall.ETHERTYPE_SLOWPROTOCOLS": "syscall", - "syscall.ETHERTYPE_SNA": "syscall", - "syscall.ETHERTYPE_SNMP": "syscall", - "syscall.ETHERTYPE_SONIX": "syscall", - "syscall.ETHERTYPE_SPIDER": "syscall", - "syscall.ETHERTYPE_SPRITE": "syscall", - "syscall.ETHERTYPE_STP": "syscall", - "syscall.ETHERTYPE_TALARIS": "syscall", - "syscall.ETHERTYPE_TALARISMC": "syscall", - "syscall.ETHERTYPE_TCPCOMP": "syscall", - "syscall.ETHERTYPE_TCPSM": "syscall", - "syscall.ETHERTYPE_TEC": "syscall", - "syscall.ETHERTYPE_TIGAN": "syscall", - "syscall.ETHERTYPE_TRAIL": "syscall", - "syscall.ETHERTYPE_TRANSETHER": "syscall", - "syscall.ETHERTYPE_TYMSHARE": "syscall", - "syscall.ETHERTYPE_UBBST": "syscall", - "syscall.ETHERTYPE_UBDEBUG": "syscall", - "syscall.ETHERTYPE_UBDIAGLOOP": "syscall", - "syscall.ETHERTYPE_UBDL": "syscall", - "syscall.ETHERTYPE_UBNIU": "syscall", - "syscall.ETHERTYPE_UBNMC": "syscall", - "syscall.ETHERTYPE_VALID": "syscall", - "syscall.ETHERTYPE_VARIAN": "syscall", - "syscall.ETHERTYPE_VAXELN": "syscall", - "syscall.ETHERTYPE_VEECO": "syscall", - "syscall.ETHERTYPE_VEXP": "syscall", - "syscall.ETHERTYPE_VGLAB": "syscall", - "syscall.ETHERTYPE_VINES": "syscall", - "syscall.ETHERTYPE_VINESECHO": "syscall", - "syscall.ETHERTYPE_VINESLOOP": "syscall", - "syscall.ETHERTYPE_VITAL": "syscall", - "syscall.ETHERTYPE_VLAN": "syscall", - "syscall.ETHERTYPE_VLTLMAN": "syscall", - "syscall.ETHERTYPE_VPROD": "syscall", - "syscall.ETHERTYPE_VURESERVED": "syscall", - "syscall.ETHERTYPE_WATERLOO": "syscall", - "syscall.ETHERTYPE_WELLFLEET": "syscall", - "syscall.ETHERTYPE_X25": "syscall", - "syscall.ETHERTYPE_X75": "syscall", - "syscall.ETHERTYPE_XNSSM": "syscall", - "syscall.ETHERTYPE_XTP": "syscall", - "syscall.ETHER_ADDR_LEN": "syscall", - "syscall.ETHER_ALIGN": "syscall", - "syscall.ETHER_CRC_LEN": "syscall", - "syscall.ETHER_CRC_POLY_BE": "syscall", - "syscall.ETHER_CRC_POLY_LE": "syscall", - "syscall.ETHER_HDR_LEN": "syscall", - "syscall.ETHER_MAX_DIX_LEN": "syscall", - "syscall.ETHER_MAX_LEN": "syscall", - "syscall.ETHER_MAX_LEN_JUMBO": "syscall", - "syscall.ETHER_MIN_LEN": "syscall", - "syscall.ETHER_PPPOE_ENCAP_LEN": "syscall", - "syscall.ETHER_TYPE_LEN": "syscall", - "syscall.ETHER_VLAN_ENCAP_LEN": "syscall", - "syscall.ETH_P_1588": "syscall", - "syscall.ETH_P_8021Q": "syscall", - "syscall.ETH_P_802_2": "syscall", - "syscall.ETH_P_802_3": "syscall", - "syscall.ETH_P_AARP": "syscall", - "syscall.ETH_P_ALL": "syscall", - "syscall.ETH_P_AOE": "syscall", - "syscall.ETH_P_ARCNET": "syscall", - "syscall.ETH_P_ARP": "syscall", - "syscall.ETH_P_ATALK": "syscall", - "syscall.ETH_P_ATMFATE": "syscall", - "syscall.ETH_P_ATMMPOA": "syscall", - "syscall.ETH_P_AX25": "syscall", - "syscall.ETH_P_BPQ": "syscall", - "syscall.ETH_P_CAIF": "syscall", - "syscall.ETH_P_CAN": "syscall", - "syscall.ETH_P_CONTROL": "syscall", - "syscall.ETH_P_CUST": "syscall", - "syscall.ETH_P_DDCMP": "syscall", - "syscall.ETH_P_DEC": "syscall", - "syscall.ETH_P_DIAG": "syscall", - "syscall.ETH_P_DNA_DL": "syscall", - "syscall.ETH_P_DNA_RC": "syscall", - "syscall.ETH_P_DNA_RT": "syscall", - "syscall.ETH_P_DSA": "syscall", - "syscall.ETH_P_ECONET": "syscall", - "syscall.ETH_P_EDSA": "syscall", - "syscall.ETH_P_FCOE": "syscall", - "syscall.ETH_P_FIP": "syscall", - "syscall.ETH_P_HDLC": "syscall", - "syscall.ETH_P_IEEE802154": "syscall", - "syscall.ETH_P_IEEEPUP": "syscall", - "syscall.ETH_P_IEEEPUPAT": "syscall", - "syscall.ETH_P_IP": "syscall", - "syscall.ETH_P_IPV6": "syscall", - "syscall.ETH_P_IPX": "syscall", - "syscall.ETH_P_IRDA": "syscall", - "syscall.ETH_P_LAT": "syscall", - "syscall.ETH_P_LINK_CTL": "syscall", - "syscall.ETH_P_LOCALTALK": "syscall", - "syscall.ETH_P_LOOP": "syscall", - "syscall.ETH_P_MOBITEX": "syscall", - "syscall.ETH_P_MPLS_MC": "syscall", - "syscall.ETH_P_MPLS_UC": "syscall", - "syscall.ETH_P_PAE": "syscall", - "syscall.ETH_P_PAUSE": "syscall", - "syscall.ETH_P_PHONET": "syscall", - "syscall.ETH_P_PPPTALK": "syscall", - "syscall.ETH_P_PPP_DISC": "syscall", - "syscall.ETH_P_PPP_MP": "syscall", - "syscall.ETH_P_PPP_SES": "syscall", - "syscall.ETH_P_PUP": "syscall", - "syscall.ETH_P_PUPAT": "syscall", - "syscall.ETH_P_RARP": "syscall", - "syscall.ETH_P_SCA": "syscall", - "syscall.ETH_P_SLOW": "syscall", - "syscall.ETH_P_SNAP": "syscall", - "syscall.ETH_P_TEB": "syscall", - "syscall.ETH_P_TIPC": "syscall", - "syscall.ETH_P_TRAILER": "syscall", - "syscall.ETH_P_TR_802_2": "syscall", - "syscall.ETH_P_WAN_PPP": "syscall", - "syscall.ETH_P_WCCP": "syscall", - "syscall.ETH_P_X25": "syscall", - "syscall.ETIME": "syscall", - "syscall.ETIMEDOUT": "syscall", - "syscall.ETOOMANYREFS": "syscall", - "syscall.ETXTBSY": "syscall", - "syscall.EUCLEAN": "syscall", - "syscall.EUNATCH": "syscall", - "syscall.EUSERS": "syscall", - "syscall.EVFILT_AIO": "syscall", - "syscall.EVFILT_FS": "syscall", - "syscall.EVFILT_LIO": "syscall", - "syscall.EVFILT_MACHPORT": "syscall", - "syscall.EVFILT_PROC": "syscall", - "syscall.EVFILT_READ": "syscall", - "syscall.EVFILT_SIGNAL": "syscall", - "syscall.EVFILT_SYSCOUNT": "syscall", - "syscall.EVFILT_THREADMARKER": "syscall", - "syscall.EVFILT_TIMER": "syscall", - "syscall.EVFILT_USER": "syscall", - "syscall.EVFILT_VM": "syscall", - "syscall.EVFILT_VNODE": "syscall", - "syscall.EVFILT_WRITE": "syscall", - "syscall.EV_ADD": "syscall", - "syscall.EV_CLEAR": "syscall", - "syscall.EV_DELETE": "syscall", - "syscall.EV_DISABLE": "syscall", - "syscall.EV_DISPATCH": "syscall", - "syscall.EV_DROP": "syscall", - "syscall.EV_ENABLE": "syscall", - "syscall.EV_EOF": "syscall", - "syscall.EV_ERROR": "syscall", - "syscall.EV_FLAG0": "syscall", - "syscall.EV_FLAG1": "syscall", - "syscall.EV_ONESHOT": "syscall", - "syscall.EV_OOBAND": "syscall", - "syscall.EV_POLL": "syscall", - "syscall.EV_RECEIPT": "syscall", - "syscall.EV_SYSFLAGS": "syscall", - "syscall.EWINDOWS": "syscall", - "syscall.EWOULDBLOCK": "syscall", - "syscall.EXDEV": "syscall", - "syscall.EXFULL": "syscall", - "syscall.EXTA": "syscall", - "syscall.EXTB": "syscall", - "syscall.EXTPROC": "syscall", - "syscall.Environ": "syscall", - "syscall.EpollCreate": "syscall", - "syscall.EpollCreate1": "syscall", - "syscall.EpollCtl": "syscall", - "syscall.EpollEvent": "syscall", - "syscall.EpollWait": "syscall", - "syscall.Errno": "syscall", - "syscall.EscapeArg": "syscall", - "syscall.Exchangedata": "syscall", - "syscall.Exec": "syscall", - "syscall.Exit": "syscall", - "syscall.ExitProcess": "syscall", - "syscall.FD_CLOEXEC": "syscall", - "syscall.FD_SETSIZE": "syscall", - "syscall.FILE_ACTION_ADDED": "syscall", - "syscall.FILE_ACTION_MODIFIED": "syscall", - "syscall.FILE_ACTION_REMOVED": "syscall", - "syscall.FILE_ACTION_RENAMED_NEW_NAME": "syscall", - "syscall.FILE_ACTION_RENAMED_OLD_NAME": "syscall", - "syscall.FILE_APPEND_DATA": "syscall", - "syscall.FILE_ATTRIBUTE_ARCHIVE": "syscall", - "syscall.FILE_ATTRIBUTE_DIRECTORY": "syscall", - "syscall.FILE_ATTRIBUTE_HIDDEN": "syscall", - "syscall.FILE_ATTRIBUTE_NORMAL": "syscall", - "syscall.FILE_ATTRIBUTE_READONLY": "syscall", - "syscall.FILE_ATTRIBUTE_REPARSE_POINT": "syscall", - "syscall.FILE_ATTRIBUTE_SYSTEM": "syscall", - "syscall.FILE_BEGIN": "syscall", - "syscall.FILE_CURRENT": "syscall", - "syscall.FILE_END": "syscall", - "syscall.FILE_FLAG_BACKUP_SEMANTICS": "syscall", - "syscall.FILE_FLAG_OPEN_REPARSE_POINT": "syscall", - "syscall.FILE_FLAG_OVERLAPPED": "syscall", - "syscall.FILE_LIST_DIRECTORY": "syscall", - "syscall.FILE_MAP_COPY": "syscall", - "syscall.FILE_MAP_EXECUTE": "syscall", - "syscall.FILE_MAP_READ": "syscall", - "syscall.FILE_MAP_WRITE": "syscall", - "syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES": "syscall", - "syscall.FILE_NOTIFY_CHANGE_CREATION": "syscall", - "syscall.FILE_NOTIFY_CHANGE_DIR_NAME": "syscall", - "syscall.FILE_NOTIFY_CHANGE_FILE_NAME": "syscall", - "syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS": "syscall", - "syscall.FILE_NOTIFY_CHANGE_LAST_WRITE": "syscall", - "syscall.FILE_NOTIFY_CHANGE_SIZE": "syscall", - "syscall.FILE_SHARE_DELETE": "syscall", - "syscall.FILE_SHARE_READ": "syscall", - "syscall.FILE_SHARE_WRITE": "syscall", - "syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "syscall", - "syscall.FILE_SKIP_SET_EVENT_ON_HANDLE": "syscall", - "syscall.FILE_TYPE_CHAR": "syscall", - "syscall.FILE_TYPE_DISK": "syscall", - "syscall.FILE_TYPE_PIPE": "syscall", - "syscall.FILE_TYPE_REMOTE": "syscall", - "syscall.FILE_TYPE_UNKNOWN": "syscall", - "syscall.FILE_WRITE_ATTRIBUTES": "syscall", - "syscall.FLUSHO": "syscall", - "syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER": "syscall", - "syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY": "syscall", - "syscall.FORMAT_MESSAGE_FROM_HMODULE": "syscall", - "syscall.FORMAT_MESSAGE_FROM_STRING": "syscall", - "syscall.FORMAT_MESSAGE_FROM_SYSTEM": "syscall", - "syscall.FORMAT_MESSAGE_IGNORE_INSERTS": "syscall", - "syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK": "syscall", - "syscall.FSCTL_GET_REPARSE_POINT": "syscall", - "syscall.F_ADDFILESIGS": "syscall", - "syscall.F_ADDSIGS": "syscall", - "syscall.F_ALLOCATEALL": "syscall", - "syscall.F_ALLOCATECONTIG": "syscall", - "syscall.F_CANCEL": "syscall", - "syscall.F_CHKCLEAN": "syscall", - "syscall.F_CLOSEM": "syscall", - "syscall.F_DUP2FD": "syscall", - "syscall.F_DUP2FD_CLOEXEC": "syscall", - "syscall.F_DUPFD": "syscall", - "syscall.F_DUPFD_CLOEXEC": "syscall", - "syscall.F_EXLCK": "syscall", - "syscall.F_FLUSH_DATA": "syscall", - "syscall.F_FREEZE_FS": "syscall", - "syscall.F_FSCTL": "syscall", - "syscall.F_FSDIRMASK": "syscall", - "syscall.F_FSIN": "syscall", - "syscall.F_FSINOUT": "syscall", - "syscall.F_FSOUT": "syscall", - "syscall.F_FSPRIV": "syscall", - "syscall.F_FSVOID": "syscall", - "syscall.F_FULLFSYNC": "syscall", - "syscall.F_GETFD": "syscall", - "syscall.F_GETFL": "syscall", - "syscall.F_GETLEASE": "syscall", - "syscall.F_GETLK": "syscall", - "syscall.F_GETLK64": "syscall", - "syscall.F_GETLKPID": "syscall", - "syscall.F_GETNOSIGPIPE": "syscall", - "syscall.F_GETOWN": "syscall", - "syscall.F_GETOWN_EX": "syscall", - "syscall.F_GETPATH": "syscall", - "syscall.F_GETPATH_MTMINFO": "syscall", - "syscall.F_GETPIPE_SZ": "syscall", - "syscall.F_GETPROTECTIONCLASS": "syscall", - "syscall.F_GETSIG": "syscall", - "syscall.F_GLOBAL_NOCACHE": "syscall", - "syscall.F_LOCK": "syscall", - "syscall.F_LOG2PHYS": "syscall", - "syscall.F_LOG2PHYS_EXT": "syscall", - "syscall.F_MARKDEPENDENCY": "syscall", - "syscall.F_MAXFD": "syscall", - "syscall.F_NOCACHE": "syscall", - "syscall.F_NODIRECT": "syscall", - "syscall.F_NOTIFY": "syscall", - "syscall.F_OGETLK": "syscall", - "syscall.F_OK": "syscall", - "syscall.F_OSETLK": "syscall", - "syscall.F_OSETLKW": "syscall", - "syscall.F_PARAM_MASK": "syscall", - "syscall.F_PARAM_MAX": "syscall", - "syscall.F_PATHPKG_CHECK": "syscall", - "syscall.F_PEOFPOSMODE": "syscall", - "syscall.F_PREALLOCATE": "syscall", - "syscall.F_RDADVISE": "syscall", - "syscall.F_RDAHEAD": "syscall", - "syscall.F_RDLCK": "syscall", - "syscall.F_READAHEAD": "syscall", - "syscall.F_READBOOTSTRAP": "syscall", - "syscall.F_SETBACKINGSTORE": "syscall", - "syscall.F_SETFD": "syscall", - "syscall.F_SETFL": "syscall", - "syscall.F_SETLEASE": "syscall", - "syscall.F_SETLK": "syscall", - "syscall.F_SETLK64": "syscall", - "syscall.F_SETLKW": "syscall", - "syscall.F_SETLKW64": "syscall", - "syscall.F_SETLK_REMOTE": "syscall", - "syscall.F_SETNOSIGPIPE": "syscall", - "syscall.F_SETOWN": "syscall", - "syscall.F_SETOWN_EX": "syscall", - "syscall.F_SETPIPE_SZ": "syscall", - "syscall.F_SETPROTECTIONCLASS": "syscall", - "syscall.F_SETSIG": "syscall", - "syscall.F_SETSIZE": "syscall", - "syscall.F_SHLCK": "syscall", - "syscall.F_TEST": "syscall", - "syscall.F_THAW_FS": "syscall", - "syscall.F_TLOCK": "syscall", - "syscall.F_ULOCK": "syscall", - "syscall.F_UNLCK": "syscall", - "syscall.F_UNLCKSYS": "syscall", - "syscall.F_VOLPOSMODE": "syscall", - "syscall.F_WRITEBOOTSTRAP": "syscall", - "syscall.F_WRLCK": "syscall", - "syscall.Faccessat": "syscall", - "syscall.Fallocate": "syscall", - "syscall.Fbootstraptransfer_t": "syscall", - "syscall.Fchdir": "syscall", - "syscall.Fchflags": "syscall", - "syscall.Fchmod": "syscall", - "syscall.Fchmodat": "syscall", - "syscall.Fchown": "syscall", - "syscall.Fchownat": "syscall", - "syscall.FcntlFlock": "syscall", - "syscall.FdSet": "syscall", - "syscall.Fdatasync": "syscall", - "syscall.FileNotifyInformation": "syscall", - "syscall.Filetime": "syscall", - "syscall.FindClose": "syscall", - "syscall.FindFirstFile": "syscall", - "syscall.FindNextFile": "syscall", - "syscall.Flock": "syscall", - "syscall.Flock_t": "syscall", - "syscall.FlushBpf": "syscall", - "syscall.FlushFileBuffers": "syscall", - "syscall.FlushViewOfFile": "syscall", - "syscall.ForkExec": "syscall", - "syscall.ForkLock": "syscall", - "syscall.FormatMessage": "syscall", - "syscall.Fpathconf": "syscall", - "syscall.FreeAddrInfoW": "syscall", - "syscall.FreeEnvironmentStrings": "syscall", - "syscall.FreeLibrary": "syscall", - "syscall.Fsid": "syscall", - "syscall.Fstat": "syscall", - "syscall.Fstatat": "syscall", - "syscall.Fstatfs": "syscall", - "syscall.Fstore_t": "syscall", - "syscall.Fsync": "syscall", - "syscall.Ftruncate": "syscall", - "syscall.FullPath": "syscall", - "syscall.Futimes": "syscall", - "syscall.Futimesat": "syscall", - "syscall.GENERIC_ALL": "syscall", - "syscall.GENERIC_EXECUTE": "syscall", - "syscall.GENERIC_READ": "syscall", - "syscall.GENERIC_WRITE": "syscall", - "syscall.GUID": "syscall", - "syscall.GetAcceptExSockaddrs": "syscall", - "syscall.GetAdaptersInfo": "syscall", - "syscall.GetAddrInfoW": "syscall", - "syscall.GetCommandLine": "syscall", - "syscall.GetComputerName": "syscall", - "syscall.GetConsoleMode": "syscall", - "syscall.GetCurrentDirectory": "syscall", - "syscall.GetCurrentProcess": "syscall", - "syscall.GetEnvironmentStrings": "syscall", - "syscall.GetEnvironmentVariable": "syscall", - "syscall.GetExitCodeProcess": "syscall", - "syscall.GetFileAttributes": "syscall", - "syscall.GetFileAttributesEx": "syscall", - "syscall.GetFileExInfoStandard": "syscall", - "syscall.GetFileExMaxInfoLevel": "syscall", - "syscall.GetFileInformationByHandle": "syscall", - "syscall.GetFileType": "syscall", - "syscall.GetFullPathName": "syscall", - "syscall.GetHostByName": "syscall", - "syscall.GetIfEntry": "syscall", - "syscall.GetLastError": "syscall", - "syscall.GetLengthSid": "syscall", - "syscall.GetLongPathName": "syscall", - "syscall.GetProcAddress": "syscall", - "syscall.GetProcessTimes": "syscall", - "syscall.GetProtoByName": "syscall", - "syscall.GetQueuedCompletionStatus": "syscall", - "syscall.GetServByName": "syscall", - "syscall.GetShortPathName": "syscall", - "syscall.GetStartupInfo": "syscall", - "syscall.GetStdHandle": "syscall", - "syscall.GetSystemTimeAsFileTime": "syscall", - "syscall.GetTempPath": "syscall", - "syscall.GetTimeZoneInformation": "syscall", - "syscall.GetTokenInformation": "syscall", - "syscall.GetUserNameEx": "syscall", - "syscall.GetUserProfileDirectory": "syscall", - "syscall.GetVersion": "syscall", - "syscall.Getcwd": "syscall", - "syscall.Getdents": "syscall", - "syscall.Getdirentries": "syscall", - "syscall.Getdtablesize": "syscall", - "syscall.Getegid": "syscall", - "syscall.Getenv": "syscall", - "syscall.Geteuid": "syscall", - "syscall.Getfsstat": "syscall", - "syscall.Getgid": "syscall", - "syscall.Getgroups": "syscall", - "syscall.Getpagesize": "syscall", - "syscall.Getpeername": "syscall", - "syscall.Getpgid": "syscall", - "syscall.Getpgrp": "syscall", - "syscall.Getpid": "syscall", - "syscall.Getppid": "syscall", - "syscall.Getpriority": "syscall", - "syscall.Getrlimit": "syscall", - "syscall.Getrusage": "syscall", - "syscall.Getsid": "syscall", - "syscall.Getsockname": "syscall", - "syscall.Getsockopt": "syscall", - "syscall.GetsockoptByte": "syscall", - "syscall.GetsockoptICMPv6Filter": "syscall", - "syscall.GetsockoptIPMreq": "syscall", - "syscall.GetsockoptIPMreqn": "syscall", - "syscall.GetsockoptIPv6MTUInfo": "syscall", - "syscall.GetsockoptIPv6Mreq": "syscall", - "syscall.GetsockoptInet4Addr": "syscall", - "syscall.GetsockoptInt": "syscall", - "syscall.GetsockoptUcred": "syscall", - "syscall.Gettid": "syscall", - "syscall.Gettimeofday": "syscall", - "syscall.Getuid": "syscall", - "syscall.Getwd": "syscall", - "syscall.Getxattr": "syscall", - "syscall.HANDLE_FLAG_INHERIT": "syscall", - "syscall.HKEY_CLASSES_ROOT": "syscall", - "syscall.HKEY_CURRENT_CONFIG": "syscall", - "syscall.HKEY_CURRENT_USER": "syscall", - "syscall.HKEY_DYN_DATA": "syscall", - "syscall.HKEY_LOCAL_MACHINE": "syscall", - "syscall.HKEY_PERFORMANCE_DATA": "syscall", - "syscall.HKEY_USERS": "syscall", - "syscall.HUPCL": "syscall", - "syscall.Handle": "syscall", - "syscall.Hostent": "syscall", - "syscall.ICANON": "syscall", - "syscall.ICMP6_FILTER": "syscall", - "syscall.ICMPV6_FILTER": "syscall", - "syscall.ICMPv6Filter": "syscall", - "syscall.ICRNL": "syscall", - "syscall.IEXTEN": "syscall", - "syscall.IFAN_ARRIVAL": "syscall", - "syscall.IFAN_DEPARTURE": "syscall", - "syscall.IFA_ADDRESS": "syscall", - "syscall.IFA_ANYCAST": "syscall", - "syscall.IFA_BROADCAST": "syscall", - "syscall.IFA_CACHEINFO": "syscall", - "syscall.IFA_F_DADFAILED": "syscall", - "syscall.IFA_F_DEPRECATED": "syscall", - "syscall.IFA_F_HOMEADDRESS": "syscall", - "syscall.IFA_F_NODAD": "syscall", - "syscall.IFA_F_OPTIMISTIC": "syscall", - "syscall.IFA_F_PERMANENT": "syscall", - "syscall.IFA_F_SECONDARY": "syscall", - "syscall.IFA_F_TEMPORARY": "syscall", - "syscall.IFA_F_TENTATIVE": "syscall", - "syscall.IFA_LABEL": "syscall", - "syscall.IFA_LOCAL": "syscall", - "syscall.IFA_MAX": "syscall", - "syscall.IFA_MULTICAST": "syscall", - "syscall.IFA_ROUTE": "syscall", - "syscall.IFA_UNSPEC": "syscall", - "syscall.IFF_ALLMULTI": "syscall", - "syscall.IFF_ALTPHYS": "syscall", - "syscall.IFF_AUTOMEDIA": "syscall", - "syscall.IFF_BROADCAST": "syscall", - "syscall.IFF_CANTCHANGE": "syscall", - "syscall.IFF_CANTCONFIG": "syscall", - "syscall.IFF_DEBUG": "syscall", - "syscall.IFF_DRV_OACTIVE": "syscall", - "syscall.IFF_DRV_RUNNING": "syscall", - "syscall.IFF_DYING": "syscall", - "syscall.IFF_DYNAMIC": "syscall", - "syscall.IFF_LINK0": "syscall", - "syscall.IFF_LINK1": "syscall", - "syscall.IFF_LINK2": "syscall", - "syscall.IFF_LOOPBACK": "syscall", - "syscall.IFF_MASTER": "syscall", - "syscall.IFF_MONITOR": "syscall", - "syscall.IFF_MULTICAST": "syscall", - "syscall.IFF_NOARP": "syscall", - "syscall.IFF_NOTRAILERS": "syscall", - "syscall.IFF_NO_PI": "syscall", - "syscall.IFF_OACTIVE": "syscall", - "syscall.IFF_ONE_QUEUE": "syscall", - "syscall.IFF_POINTOPOINT": "syscall", - "syscall.IFF_POINTTOPOINT": "syscall", - "syscall.IFF_PORTSEL": "syscall", - "syscall.IFF_PPROMISC": "syscall", - "syscall.IFF_PROMISC": "syscall", - "syscall.IFF_RENAMING": "syscall", - "syscall.IFF_RUNNING": "syscall", - "syscall.IFF_SIMPLEX": "syscall", - "syscall.IFF_SLAVE": "syscall", - "syscall.IFF_SMART": "syscall", - "syscall.IFF_STATICARP": "syscall", - "syscall.IFF_TAP": "syscall", - "syscall.IFF_TUN": "syscall", - "syscall.IFF_TUN_EXCL": "syscall", - "syscall.IFF_UP": "syscall", - "syscall.IFF_VNET_HDR": "syscall", - "syscall.IFLA_ADDRESS": "syscall", - "syscall.IFLA_BROADCAST": "syscall", - "syscall.IFLA_COST": "syscall", - "syscall.IFLA_IFALIAS": "syscall", - "syscall.IFLA_IFNAME": "syscall", - "syscall.IFLA_LINK": "syscall", - "syscall.IFLA_LINKINFO": "syscall", - "syscall.IFLA_LINKMODE": "syscall", - "syscall.IFLA_MAP": "syscall", - "syscall.IFLA_MASTER": "syscall", - "syscall.IFLA_MAX": "syscall", - "syscall.IFLA_MTU": "syscall", - "syscall.IFLA_NET_NS_PID": "syscall", - "syscall.IFLA_OPERSTATE": "syscall", - "syscall.IFLA_PRIORITY": "syscall", - "syscall.IFLA_PROTINFO": "syscall", - "syscall.IFLA_QDISC": "syscall", - "syscall.IFLA_STATS": "syscall", - "syscall.IFLA_TXQLEN": "syscall", - "syscall.IFLA_UNSPEC": "syscall", - "syscall.IFLA_WEIGHT": "syscall", - "syscall.IFLA_WIRELESS": "syscall", - "syscall.IFNAMSIZ": "syscall", - "syscall.IFT_1822": "syscall", - "syscall.IFT_A12MPPSWITCH": "syscall", - "syscall.IFT_AAL2": "syscall", - "syscall.IFT_AAL5": "syscall", - "syscall.IFT_ADSL": "syscall", - "syscall.IFT_AFLANE8023": "syscall", - "syscall.IFT_AFLANE8025": "syscall", - "syscall.IFT_ARAP": "syscall", - "syscall.IFT_ARCNET": "syscall", - "syscall.IFT_ARCNETPLUS": "syscall", - "syscall.IFT_ASYNC": "syscall", - "syscall.IFT_ATM": "syscall", - "syscall.IFT_ATMDXI": "syscall", - "syscall.IFT_ATMFUNI": "syscall", - "syscall.IFT_ATMIMA": "syscall", - "syscall.IFT_ATMLOGICAL": "syscall", - "syscall.IFT_ATMRADIO": "syscall", - "syscall.IFT_ATMSUBINTERFACE": "syscall", - "syscall.IFT_ATMVCIENDPT": "syscall", - "syscall.IFT_ATMVIRTUAL": "syscall", - "syscall.IFT_BGPPOLICYACCOUNTING": "syscall", - "syscall.IFT_BLUETOOTH": "syscall", - "syscall.IFT_BRIDGE": "syscall", - "syscall.IFT_BSC": "syscall", - "syscall.IFT_CARP": "syscall", - "syscall.IFT_CCTEMUL": "syscall", - "syscall.IFT_CELLULAR": "syscall", - "syscall.IFT_CEPT": "syscall", - "syscall.IFT_CES": "syscall", - "syscall.IFT_CHANNEL": "syscall", - "syscall.IFT_CNR": "syscall", - "syscall.IFT_COFFEE": "syscall", - "syscall.IFT_COMPOSITELINK": "syscall", - "syscall.IFT_DCN": "syscall", - "syscall.IFT_DIGITALPOWERLINE": "syscall", - "syscall.IFT_DIGITALWRAPPEROVERHEADCHANNEL": "syscall", - "syscall.IFT_DLSW": "syscall", - "syscall.IFT_DOCSCABLEDOWNSTREAM": "syscall", - "syscall.IFT_DOCSCABLEMACLAYER": "syscall", - "syscall.IFT_DOCSCABLEUPSTREAM": "syscall", - "syscall.IFT_DOCSCABLEUPSTREAMCHANNEL": "syscall", - "syscall.IFT_DS0": "syscall", - "syscall.IFT_DS0BUNDLE": "syscall", - "syscall.IFT_DS1FDL": "syscall", - "syscall.IFT_DS3": "syscall", - "syscall.IFT_DTM": "syscall", - "syscall.IFT_DUMMY": "syscall", - "syscall.IFT_DVBASILN": "syscall", - "syscall.IFT_DVBASIOUT": "syscall", - "syscall.IFT_DVBRCCDOWNSTREAM": "syscall", - "syscall.IFT_DVBRCCMACLAYER": "syscall", - "syscall.IFT_DVBRCCUPSTREAM": "syscall", - "syscall.IFT_ECONET": "syscall", - "syscall.IFT_ENC": "syscall", - "syscall.IFT_EON": "syscall", - "syscall.IFT_EPLRS": "syscall", - "syscall.IFT_ESCON": "syscall", - "syscall.IFT_ETHER": "syscall", - "syscall.IFT_FAITH": "syscall", - "syscall.IFT_FAST": "syscall", - "syscall.IFT_FASTETHER": "syscall", - "syscall.IFT_FASTETHERFX": "syscall", - "syscall.IFT_FDDI": "syscall", - "syscall.IFT_FIBRECHANNEL": "syscall", - "syscall.IFT_FRAMERELAYINTERCONNECT": "syscall", - "syscall.IFT_FRAMERELAYMPI": "syscall", - "syscall.IFT_FRDLCIENDPT": "syscall", - "syscall.IFT_FRELAY": "syscall", - "syscall.IFT_FRELAYDCE": "syscall", - "syscall.IFT_FRF16MFRBUNDLE": "syscall", - "syscall.IFT_FRFORWARD": "syscall", - "syscall.IFT_G703AT2MB": "syscall", - "syscall.IFT_G703AT64K": "syscall", - "syscall.IFT_GIF": "syscall", - "syscall.IFT_GIGABITETHERNET": "syscall", - "syscall.IFT_GR303IDT": "syscall", - "syscall.IFT_GR303RDT": "syscall", - "syscall.IFT_H323GATEKEEPER": "syscall", - "syscall.IFT_H323PROXY": "syscall", - "syscall.IFT_HDH1822": "syscall", - "syscall.IFT_HDLC": "syscall", - "syscall.IFT_HDSL2": "syscall", - "syscall.IFT_HIPERLAN2": "syscall", - "syscall.IFT_HIPPI": "syscall", - "syscall.IFT_HIPPIINTERFACE": "syscall", - "syscall.IFT_HOSTPAD": "syscall", - "syscall.IFT_HSSI": "syscall", - "syscall.IFT_HY": "syscall", - "syscall.IFT_IBM370PARCHAN": "syscall", - "syscall.IFT_IDSL": "syscall", - "syscall.IFT_IEEE1394": "syscall", - "syscall.IFT_IEEE80211": "syscall", - "syscall.IFT_IEEE80212": "syscall", - "syscall.IFT_IEEE8023ADLAG": "syscall", - "syscall.IFT_IFGSN": "syscall", - "syscall.IFT_IMT": "syscall", - "syscall.IFT_INFINIBAND": "syscall", - "syscall.IFT_INTERLEAVE": "syscall", - "syscall.IFT_IP": "syscall", - "syscall.IFT_IPFORWARD": "syscall", - "syscall.IFT_IPOVERATM": "syscall", - "syscall.IFT_IPOVERCDLC": "syscall", - "syscall.IFT_IPOVERCLAW": "syscall", - "syscall.IFT_IPSWITCH": "syscall", - "syscall.IFT_IPXIP": "syscall", - "syscall.IFT_ISDN": "syscall", - "syscall.IFT_ISDNBASIC": "syscall", - "syscall.IFT_ISDNPRIMARY": "syscall", - "syscall.IFT_ISDNS": "syscall", - "syscall.IFT_ISDNU": "syscall", - "syscall.IFT_ISO88022LLC": "syscall", - "syscall.IFT_ISO88023": "syscall", - "syscall.IFT_ISO88024": "syscall", - "syscall.IFT_ISO88025": "syscall", - "syscall.IFT_ISO88025CRFPINT": "syscall", - "syscall.IFT_ISO88025DTR": "syscall", - "syscall.IFT_ISO88025FIBER": "syscall", - "syscall.IFT_ISO88026": "syscall", - "syscall.IFT_ISUP": "syscall", - "syscall.IFT_L2VLAN": "syscall", - "syscall.IFT_L3IPVLAN": "syscall", - "syscall.IFT_L3IPXVLAN": "syscall", - "syscall.IFT_LAPB": "syscall", - "syscall.IFT_LAPD": "syscall", - "syscall.IFT_LAPF": "syscall", - "syscall.IFT_LINEGROUP": "syscall", - "syscall.IFT_LOCALTALK": "syscall", - "syscall.IFT_LOOP": "syscall", - "syscall.IFT_MEDIAMAILOVERIP": "syscall", - "syscall.IFT_MFSIGLINK": "syscall", - "syscall.IFT_MIOX25": "syscall", - "syscall.IFT_MODEM": "syscall", - "syscall.IFT_MPC": "syscall", - "syscall.IFT_MPLS": "syscall", - "syscall.IFT_MPLSTUNNEL": "syscall", - "syscall.IFT_MSDSL": "syscall", - "syscall.IFT_MVL": "syscall", - "syscall.IFT_MYRINET": "syscall", - "syscall.IFT_NFAS": "syscall", - "syscall.IFT_NSIP": "syscall", - "syscall.IFT_OPTICALCHANNEL": "syscall", - "syscall.IFT_OPTICALTRANSPORT": "syscall", - "syscall.IFT_OTHER": "syscall", - "syscall.IFT_P10": "syscall", - "syscall.IFT_P80": "syscall", - "syscall.IFT_PARA": "syscall", - "syscall.IFT_PDP": "syscall", - "syscall.IFT_PFLOG": "syscall", - "syscall.IFT_PFLOW": "syscall", - "syscall.IFT_PFSYNC": "syscall", - "syscall.IFT_PLC": "syscall", - "syscall.IFT_PON155": "syscall", - "syscall.IFT_PON622": "syscall", - "syscall.IFT_POS": "syscall", - "syscall.IFT_PPP": "syscall", - "syscall.IFT_PPPMULTILINKBUNDLE": "syscall", - "syscall.IFT_PROPATM": "syscall", - "syscall.IFT_PROPBWAP2MP": "syscall", - "syscall.IFT_PROPCNLS": "syscall", - "syscall.IFT_PROPDOCSWIRELESSDOWNSTREAM": "syscall", - "syscall.IFT_PROPDOCSWIRELESSMACLAYER": "syscall", - "syscall.IFT_PROPDOCSWIRELESSUPSTREAM": "syscall", - "syscall.IFT_PROPMUX": "syscall", - "syscall.IFT_PROPVIRTUAL": "syscall", - "syscall.IFT_PROPWIRELESSP2P": "syscall", - "syscall.IFT_PTPSERIAL": "syscall", - "syscall.IFT_PVC": "syscall", - "syscall.IFT_Q2931": "syscall", - "syscall.IFT_QLLC": "syscall", - "syscall.IFT_RADIOMAC": "syscall", - "syscall.IFT_RADSL": "syscall", - "syscall.IFT_REACHDSL": "syscall", - "syscall.IFT_RFC1483": "syscall", - "syscall.IFT_RS232": "syscall", - "syscall.IFT_RSRB": "syscall", - "syscall.IFT_SDLC": "syscall", - "syscall.IFT_SDSL": "syscall", - "syscall.IFT_SHDSL": "syscall", - "syscall.IFT_SIP": "syscall", - "syscall.IFT_SIPSIG": "syscall", - "syscall.IFT_SIPTG": "syscall", - "syscall.IFT_SLIP": "syscall", - "syscall.IFT_SMDSDXI": "syscall", - "syscall.IFT_SMDSICIP": "syscall", - "syscall.IFT_SONET": "syscall", - "syscall.IFT_SONETOVERHEADCHANNEL": "syscall", - "syscall.IFT_SONETPATH": "syscall", - "syscall.IFT_SONETVT": "syscall", - "syscall.IFT_SRP": "syscall", - "syscall.IFT_SS7SIGLINK": "syscall", - "syscall.IFT_STACKTOSTACK": "syscall", - "syscall.IFT_STARLAN": "syscall", - "syscall.IFT_STF": "syscall", - "syscall.IFT_T1": "syscall", - "syscall.IFT_TDLC": "syscall", - "syscall.IFT_TELINK": "syscall", - "syscall.IFT_TERMPAD": "syscall", - "syscall.IFT_TR008": "syscall", - "syscall.IFT_TRANSPHDLC": "syscall", - "syscall.IFT_TUNNEL": "syscall", - "syscall.IFT_ULTRA": "syscall", - "syscall.IFT_USB": "syscall", - "syscall.IFT_V11": "syscall", - "syscall.IFT_V35": "syscall", - "syscall.IFT_V36": "syscall", - "syscall.IFT_V37": "syscall", - "syscall.IFT_VDSL": "syscall", - "syscall.IFT_VIRTUALIPADDRESS": "syscall", - "syscall.IFT_VIRTUALTG": "syscall", - "syscall.IFT_VOICEDID": "syscall", - "syscall.IFT_VOICEEM": "syscall", - "syscall.IFT_VOICEEMFGD": "syscall", - "syscall.IFT_VOICEENCAP": "syscall", - "syscall.IFT_VOICEFGDEANA": "syscall", - "syscall.IFT_VOICEFXO": "syscall", - "syscall.IFT_VOICEFXS": "syscall", - "syscall.IFT_VOICEOVERATM": "syscall", - "syscall.IFT_VOICEOVERCABLE": "syscall", - "syscall.IFT_VOICEOVERFRAMERELAY": "syscall", - "syscall.IFT_VOICEOVERIP": "syscall", - "syscall.IFT_X213": "syscall", - "syscall.IFT_X25": "syscall", - "syscall.IFT_X25DDN": "syscall", - "syscall.IFT_X25HUNTGROUP": "syscall", - "syscall.IFT_X25MLP": "syscall", - "syscall.IFT_X25PLE": "syscall", - "syscall.IFT_XETHER": "syscall", - "syscall.IGNBRK": "syscall", - "syscall.IGNCR": "syscall", - "syscall.IGNORE": "syscall", - "syscall.IGNPAR": "syscall", - "syscall.IMAXBEL": "syscall", - "syscall.INFINITE": "syscall", - "syscall.INLCR": "syscall", - "syscall.INPCK": "syscall", - "syscall.INVALID_FILE_ATTRIBUTES": "syscall", - "syscall.IN_ACCESS": "syscall", - "syscall.IN_ALL_EVENTS": "syscall", - "syscall.IN_ATTRIB": "syscall", - "syscall.IN_CLASSA_HOST": "syscall", - "syscall.IN_CLASSA_MAX": "syscall", - "syscall.IN_CLASSA_NET": "syscall", - "syscall.IN_CLASSA_NSHIFT": "syscall", - "syscall.IN_CLASSB_HOST": "syscall", - "syscall.IN_CLASSB_MAX": "syscall", - "syscall.IN_CLASSB_NET": "syscall", - "syscall.IN_CLASSB_NSHIFT": "syscall", - "syscall.IN_CLASSC_HOST": "syscall", - "syscall.IN_CLASSC_NET": "syscall", - "syscall.IN_CLASSC_NSHIFT": "syscall", - "syscall.IN_CLASSD_HOST": "syscall", - "syscall.IN_CLASSD_NET": "syscall", - "syscall.IN_CLASSD_NSHIFT": "syscall", - "syscall.IN_CLOEXEC": "syscall", - "syscall.IN_CLOSE": "syscall", - "syscall.IN_CLOSE_NOWRITE": "syscall", - "syscall.IN_CLOSE_WRITE": "syscall", - "syscall.IN_CREATE": "syscall", - "syscall.IN_DELETE": "syscall", - "syscall.IN_DELETE_SELF": "syscall", - "syscall.IN_DONT_FOLLOW": "syscall", - "syscall.IN_EXCL_UNLINK": "syscall", - "syscall.IN_IGNORED": "syscall", - "syscall.IN_ISDIR": "syscall", - "syscall.IN_LINKLOCALNETNUM": "syscall", - "syscall.IN_LOOPBACKNET": "syscall", - "syscall.IN_MASK_ADD": "syscall", - "syscall.IN_MODIFY": "syscall", - "syscall.IN_MOVE": "syscall", - "syscall.IN_MOVED_FROM": "syscall", - "syscall.IN_MOVED_TO": "syscall", - "syscall.IN_MOVE_SELF": "syscall", - "syscall.IN_NONBLOCK": "syscall", - "syscall.IN_ONESHOT": "syscall", - "syscall.IN_ONLYDIR": "syscall", - "syscall.IN_OPEN": "syscall", - "syscall.IN_Q_OVERFLOW": "syscall", - "syscall.IN_RFC3021_HOST": "syscall", - "syscall.IN_RFC3021_MASK": "syscall", - "syscall.IN_RFC3021_NET": "syscall", - "syscall.IN_RFC3021_NSHIFT": "syscall", - "syscall.IN_UNMOUNT": "syscall", - "syscall.IOC_IN": "syscall", - "syscall.IOC_INOUT": "syscall", - "syscall.IOC_OUT": "syscall", - "syscall.IOC_VENDOR": "syscall", - "syscall.IOC_WS2": "syscall", - "syscall.IO_REPARSE_TAG_SYMLINK": "syscall", - "syscall.IPMreq": "syscall", - "syscall.IPMreqn": "syscall", - "syscall.IPPROTO_3PC": "syscall", - "syscall.IPPROTO_ADFS": "syscall", - "syscall.IPPROTO_AH": "syscall", - "syscall.IPPROTO_AHIP": "syscall", - "syscall.IPPROTO_APES": "syscall", - "syscall.IPPROTO_ARGUS": "syscall", - "syscall.IPPROTO_AX25": "syscall", - "syscall.IPPROTO_BHA": "syscall", - "syscall.IPPROTO_BLT": "syscall", - "syscall.IPPROTO_BRSATMON": "syscall", - "syscall.IPPROTO_CARP": "syscall", - "syscall.IPPROTO_CFTP": "syscall", - "syscall.IPPROTO_CHAOS": "syscall", - "syscall.IPPROTO_CMTP": "syscall", - "syscall.IPPROTO_COMP": "syscall", - "syscall.IPPROTO_CPHB": "syscall", - "syscall.IPPROTO_CPNX": "syscall", - "syscall.IPPROTO_DCCP": "syscall", - "syscall.IPPROTO_DDP": "syscall", - "syscall.IPPROTO_DGP": "syscall", - "syscall.IPPROTO_DIVERT": "syscall", - "syscall.IPPROTO_DIVERT_INIT": "syscall", - "syscall.IPPROTO_DIVERT_RESP": "syscall", - "syscall.IPPROTO_DONE": "syscall", - "syscall.IPPROTO_DSTOPTS": "syscall", - "syscall.IPPROTO_EGP": "syscall", - "syscall.IPPROTO_EMCON": "syscall", - "syscall.IPPROTO_ENCAP": "syscall", - "syscall.IPPROTO_EON": "syscall", - "syscall.IPPROTO_ESP": "syscall", - "syscall.IPPROTO_ETHERIP": "syscall", - "syscall.IPPROTO_FRAGMENT": "syscall", - "syscall.IPPROTO_GGP": "syscall", - "syscall.IPPROTO_GMTP": "syscall", - "syscall.IPPROTO_GRE": "syscall", - "syscall.IPPROTO_HELLO": "syscall", - "syscall.IPPROTO_HMP": "syscall", - "syscall.IPPROTO_HOPOPTS": "syscall", - "syscall.IPPROTO_ICMP": "syscall", - "syscall.IPPROTO_ICMPV6": "syscall", - "syscall.IPPROTO_IDP": "syscall", - "syscall.IPPROTO_IDPR": "syscall", - "syscall.IPPROTO_IDRP": "syscall", - "syscall.IPPROTO_IGMP": "syscall", - "syscall.IPPROTO_IGP": "syscall", - "syscall.IPPROTO_IGRP": "syscall", - "syscall.IPPROTO_IL": "syscall", - "syscall.IPPROTO_INLSP": "syscall", - "syscall.IPPROTO_INP": "syscall", - "syscall.IPPROTO_IP": "syscall", - "syscall.IPPROTO_IPCOMP": "syscall", - "syscall.IPPROTO_IPCV": "syscall", - "syscall.IPPROTO_IPEIP": "syscall", - "syscall.IPPROTO_IPIP": "syscall", - "syscall.IPPROTO_IPPC": "syscall", - "syscall.IPPROTO_IPV4": "syscall", - "syscall.IPPROTO_IPV6": "syscall", - "syscall.IPPROTO_IPV6_ICMP": "syscall", - "syscall.IPPROTO_IRTP": "syscall", - "syscall.IPPROTO_KRYPTOLAN": "syscall", - "syscall.IPPROTO_LARP": "syscall", - "syscall.IPPROTO_LEAF1": "syscall", - "syscall.IPPROTO_LEAF2": "syscall", - "syscall.IPPROTO_MAX": "syscall", - "syscall.IPPROTO_MAXID": "syscall", - "syscall.IPPROTO_MEAS": "syscall", - "syscall.IPPROTO_MH": "syscall", - "syscall.IPPROTO_MHRP": "syscall", - "syscall.IPPROTO_MICP": "syscall", - "syscall.IPPROTO_MOBILE": "syscall", - "syscall.IPPROTO_MPLS": "syscall", - "syscall.IPPROTO_MTP": "syscall", - "syscall.IPPROTO_MUX": "syscall", - "syscall.IPPROTO_ND": "syscall", - "syscall.IPPROTO_NHRP": "syscall", - "syscall.IPPROTO_NONE": "syscall", - "syscall.IPPROTO_NSP": "syscall", - "syscall.IPPROTO_NVPII": "syscall", - "syscall.IPPROTO_OLD_DIVERT": "syscall", - "syscall.IPPROTO_OSPFIGP": "syscall", - "syscall.IPPROTO_PFSYNC": "syscall", - "syscall.IPPROTO_PGM": "syscall", - "syscall.IPPROTO_PIGP": "syscall", - "syscall.IPPROTO_PIM": "syscall", - "syscall.IPPROTO_PRM": "syscall", - "syscall.IPPROTO_PUP": "syscall", - "syscall.IPPROTO_PVP": "syscall", - "syscall.IPPROTO_RAW": "syscall", - "syscall.IPPROTO_RCCMON": "syscall", - "syscall.IPPROTO_RDP": "syscall", - "syscall.IPPROTO_ROUTING": "syscall", - "syscall.IPPROTO_RSVP": "syscall", - "syscall.IPPROTO_RVD": "syscall", - "syscall.IPPROTO_SATEXPAK": "syscall", - "syscall.IPPROTO_SATMON": "syscall", - "syscall.IPPROTO_SCCSP": "syscall", - "syscall.IPPROTO_SCTP": "syscall", - "syscall.IPPROTO_SDRP": "syscall", - "syscall.IPPROTO_SEND": "syscall", - "syscall.IPPROTO_SEP": "syscall", - "syscall.IPPROTO_SKIP": "syscall", - "syscall.IPPROTO_SPACER": "syscall", - "syscall.IPPROTO_SRPC": "syscall", - "syscall.IPPROTO_ST": "syscall", - "syscall.IPPROTO_SVMTP": "syscall", - "syscall.IPPROTO_SWIPE": "syscall", - "syscall.IPPROTO_TCF": "syscall", - "syscall.IPPROTO_TCP": "syscall", - "syscall.IPPROTO_TLSP": "syscall", - "syscall.IPPROTO_TP": "syscall", - "syscall.IPPROTO_TPXX": "syscall", - "syscall.IPPROTO_TRUNK1": "syscall", - "syscall.IPPROTO_TRUNK2": "syscall", - "syscall.IPPROTO_TTP": "syscall", - "syscall.IPPROTO_UDP": "syscall", - "syscall.IPPROTO_UDPLITE": "syscall", - "syscall.IPPROTO_VINES": "syscall", - "syscall.IPPROTO_VISA": "syscall", - "syscall.IPPROTO_VMTP": "syscall", - "syscall.IPPROTO_VRRP": "syscall", - "syscall.IPPROTO_WBEXPAK": "syscall", - "syscall.IPPROTO_WBMON": "syscall", - "syscall.IPPROTO_WSN": "syscall", - "syscall.IPPROTO_XNET": "syscall", - "syscall.IPPROTO_XTP": "syscall", - "syscall.IPV6_2292DSTOPTS": "syscall", - "syscall.IPV6_2292HOPLIMIT": "syscall", - "syscall.IPV6_2292HOPOPTS": "syscall", - "syscall.IPV6_2292NEXTHOP": "syscall", - "syscall.IPV6_2292PKTINFO": "syscall", - "syscall.IPV6_2292PKTOPTIONS": "syscall", - "syscall.IPV6_2292RTHDR": "syscall", - "syscall.IPV6_ADDRFORM": "syscall", - "syscall.IPV6_ADD_MEMBERSHIP": "syscall", - "syscall.IPV6_AUTHHDR": "syscall", - "syscall.IPV6_AUTH_LEVEL": "syscall", - "syscall.IPV6_AUTOFLOWLABEL": "syscall", - "syscall.IPV6_BINDANY": "syscall", - "syscall.IPV6_BINDV6ONLY": "syscall", - "syscall.IPV6_BOUND_IF": "syscall", - "syscall.IPV6_CHECKSUM": "syscall", - "syscall.IPV6_DEFAULT_MULTICAST_HOPS": "syscall", - "syscall.IPV6_DEFAULT_MULTICAST_LOOP": "syscall", - "syscall.IPV6_DEFHLIM": "syscall", - "syscall.IPV6_DONTFRAG": "syscall", - "syscall.IPV6_DROP_MEMBERSHIP": "syscall", - "syscall.IPV6_DSTOPTS": "syscall", - "syscall.IPV6_ESP_NETWORK_LEVEL": "syscall", - "syscall.IPV6_ESP_TRANS_LEVEL": "syscall", - "syscall.IPV6_FAITH": "syscall", - "syscall.IPV6_FLOWINFO_MASK": "syscall", - "syscall.IPV6_FLOWLABEL_MASK": "syscall", - "syscall.IPV6_FRAGTTL": "syscall", - "syscall.IPV6_FW_ADD": "syscall", - "syscall.IPV6_FW_DEL": "syscall", - "syscall.IPV6_FW_FLUSH": "syscall", - "syscall.IPV6_FW_GET": "syscall", - "syscall.IPV6_FW_ZERO": "syscall", - "syscall.IPV6_HLIMDEC": "syscall", - "syscall.IPV6_HOPLIMIT": "syscall", - "syscall.IPV6_HOPOPTS": "syscall", - "syscall.IPV6_IPCOMP_LEVEL": "syscall", - "syscall.IPV6_IPSEC_POLICY": "syscall", - "syscall.IPV6_JOIN_ANYCAST": "syscall", - "syscall.IPV6_JOIN_GROUP": "syscall", - "syscall.IPV6_LEAVE_ANYCAST": "syscall", - "syscall.IPV6_LEAVE_GROUP": "syscall", - "syscall.IPV6_MAXHLIM": "syscall", - "syscall.IPV6_MAXOPTHDR": "syscall", - "syscall.IPV6_MAXPACKET": "syscall", - "syscall.IPV6_MAX_GROUP_SRC_FILTER": "syscall", - "syscall.IPV6_MAX_MEMBERSHIPS": "syscall", - "syscall.IPV6_MAX_SOCK_SRC_FILTER": "syscall", - "syscall.IPV6_MIN_MEMBERSHIPS": "syscall", - "syscall.IPV6_MMTU": "syscall", - "syscall.IPV6_MSFILTER": "syscall", - "syscall.IPV6_MTU": "syscall", - "syscall.IPV6_MTU_DISCOVER": "syscall", - "syscall.IPV6_MULTICAST_HOPS": "syscall", - "syscall.IPV6_MULTICAST_IF": "syscall", - "syscall.IPV6_MULTICAST_LOOP": "syscall", - "syscall.IPV6_NEXTHOP": "syscall", - "syscall.IPV6_OPTIONS": "syscall", - "syscall.IPV6_PATHMTU": "syscall", - "syscall.IPV6_PIPEX": "syscall", - "syscall.IPV6_PKTINFO": "syscall", - "syscall.IPV6_PMTUDISC_DO": "syscall", - "syscall.IPV6_PMTUDISC_DONT": "syscall", - "syscall.IPV6_PMTUDISC_PROBE": "syscall", - "syscall.IPV6_PMTUDISC_WANT": "syscall", - "syscall.IPV6_PORTRANGE": "syscall", - "syscall.IPV6_PORTRANGE_DEFAULT": "syscall", - "syscall.IPV6_PORTRANGE_HIGH": "syscall", - "syscall.IPV6_PORTRANGE_LOW": "syscall", - "syscall.IPV6_PREFER_TEMPADDR": "syscall", - "syscall.IPV6_RECVDSTOPTS": "syscall", - "syscall.IPV6_RECVDSTPORT": "syscall", - "syscall.IPV6_RECVERR": "syscall", - "syscall.IPV6_RECVHOPLIMIT": "syscall", - "syscall.IPV6_RECVHOPOPTS": "syscall", - "syscall.IPV6_RECVPATHMTU": "syscall", - "syscall.IPV6_RECVPKTINFO": "syscall", - "syscall.IPV6_RECVRTHDR": "syscall", - "syscall.IPV6_RECVTCLASS": "syscall", - "syscall.IPV6_ROUTER_ALERT": "syscall", - "syscall.IPV6_RTABLE": "syscall", - "syscall.IPV6_RTHDR": "syscall", - "syscall.IPV6_RTHDRDSTOPTS": "syscall", - "syscall.IPV6_RTHDR_LOOSE": "syscall", - "syscall.IPV6_RTHDR_STRICT": "syscall", - "syscall.IPV6_RTHDR_TYPE_0": "syscall", - "syscall.IPV6_RXDSTOPTS": "syscall", - "syscall.IPV6_RXHOPOPTS": "syscall", - "syscall.IPV6_SOCKOPT_RESERVED1": "syscall", - "syscall.IPV6_TCLASS": "syscall", - "syscall.IPV6_UNICAST_HOPS": "syscall", - "syscall.IPV6_USE_MIN_MTU": "syscall", - "syscall.IPV6_V6ONLY": "syscall", - "syscall.IPV6_VERSION": "syscall", - "syscall.IPV6_VERSION_MASK": "syscall", - "syscall.IPV6_XFRM_POLICY": "syscall", - "syscall.IP_ADD_MEMBERSHIP": "syscall", - "syscall.IP_ADD_SOURCE_MEMBERSHIP": "syscall", - "syscall.IP_AUTH_LEVEL": "syscall", - "syscall.IP_BINDANY": "syscall", - "syscall.IP_BLOCK_SOURCE": "syscall", - "syscall.IP_BOUND_IF": "syscall", - "syscall.IP_DEFAULT_MULTICAST_LOOP": "syscall", - "syscall.IP_DEFAULT_MULTICAST_TTL": "syscall", - "syscall.IP_DF": "syscall", - "syscall.IP_DIVERTFL": "syscall", - "syscall.IP_DONTFRAG": "syscall", - "syscall.IP_DROP_MEMBERSHIP": "syscall", - "syscall.IP_DROP_SOURCE_MEMBERSHIP": "syscall", - "syscall.IP_DUMMYNET3": "syscall", - "syscall.IP_DUMMYNET_CONFIGURE": "syscall", - "syscall.IP_DUMMYNET_DEL": "syscall", - "syscall.IP_DUMMYNET_FLUSH": "syscall", - "syscall.IP_DUMMYNET_GET": "syscall", - "syscall.IP_EF": "syscall", - "syscall.IP_ERRORMTU": "syscall", - "syscall.IP_ESP_NETWORK_LEVEL": "syscall", - "syscall.IP_ESP_TRANS_LEVEL": "syscall", - "syscall.IP_FAITH": "syscall", - "syscall.IP_FREEBIND": "syscall", - "syscall.IP_FW3": "syscall", - "syscall.IP_FW_ADD": "syscall", - "syscall.IP_FW_DEL": "syscall", - "syscall.IP_FW_FLUSH": "syscall", - "syscall.IP_FW_GET": "syscall", - "syscall.IP_FW_NAT_CFG": "syscall", - "syscall.IP_FW_NAT_DEL": "syscall", - "syscall.IP_FW_NAT_GET_CONFIG": "syscall", - "syscall.IP_FW_NAT_GET_LOG": "syscall", - "syscall.IP_FW_RESETLOG": "syscall", - "syscall.IP_FW_TABLE_ADD": "syscall", - "syscall.IP_FW_TABLE_DEL": "syscall", - "syscall.IP_FW_TABLE_FLUSH": "syscall", - "syscall.IP_FW_TABLE_GETSIZE": "syscall", - "syscall.IP_FW_TABLE_LIST": "syscall", - "syscall.IP_FW_ZERO": "syscall", - "syscall.IP_HDRINCL": "syscall", - "syscall.IP_IPCOMP_LEVEL": "syscall", - "syscall.IP_IPSECFLOWINFO": "syscall", - "syscall.IP_IPSEC_LOCAL_AUTH": "syscall", - "syscall.IP_IPSEC_LOCAL_CRED": "syscall", - "syscall.IP_IPSEC_LOCAL_ID": "syscall", - "syscall.IP_IPSEC_POLICY": "syscall", - "syscall.IP_IPSEC_REMOTE_AUTH": "syscall", - "syscall.IP_IPSEC_REMOTE_CRED": "syscall", - "syscall.IP_IPSEC_REMOTE_ID": "syscall", - "syscall.IP_MAXPACKET": "syscall", - "syscall.IP_MAX_GROUP_SRC_FILTER": "syscall", - "syscall.IP_MAX_MEMBERSHIPS": "syscall", - "syscall.IP_MAX_SOCK_MUTE_FILTER": "syscall", - "syscall.IP_MAX_SOCK_SRC_FILTER": "syscall", - "syscall.IP_MAX_SOURCE_FILTER": "syscall", - "syscall.IP_MF": "syscall", - "syscall.IP_MINFRAGSIZE": "syscall", - "syscall.IP_MINTTL": "syscall", - "syscall.IP_MIN_MEMBERSHIPS": "syscall", - "syscall.IP_MSFILTER": "syscall", - "syscall.IP_MSS": "syscall", - "syscall.IP_MTU": "syscall", - "syscall.IP_MTU_DISCOVER": "syscall", - "syscall.IP_MULTICAST_IF": "syscall", - "syscall.IP_MULTICAST_IFINDEX": "syscall", - "syscall.IP_MULTICAST_LOOP": "syscall", - "syscall.IP_MULTICAST_TTL": "syscall", - "syscall.IP_MULTICAST_VIF": "syscall", - "syscall.IP_NAT__XXX": "syscall", - "syscall.IP_OFFMASK": "syscall", - "syscall.IP_OLD_FW_ADD": "syscall", - "syscall.IP_OLD_FW_DEL": "syscall", - "syscall.IP_OLD_FW_FLUSH": "syscall", - "syscall.IP_OLD_FW_GET": "syscall", - "syscall.IP_OLD_FW_RESETLOG": "syscall", - "syscall.IP_OLD_FW_ZERO": "syscall", - "syscall.IP_ONESBCAST": "syscall", - "syscall.IP_OPTIONS": "syscall", - "syscall.IP_ORIGDSTADDR": "syscall", - "syscall.IP_PASSSEC": "syscall", - "syscall.IP_PIPEX": "syscall", - "syscall.IP_PKTINFO": "syscall", - "syscall.IP_PKTOPTIONS": "syscall", - "syscall.IP_PMTUDISC": "syscall", - "syscall.IP_PMTUDISC_DO": "syscall", - "syscall.IP_PMTUDISC_DONT": "syscall", - "syscall.IP_PMTUDISC_PROBE": "syscall", - "syscall.IP_PMTUDISC_WANT": "syscall", - "syscall.IP_PORTRANGE": "syscall", - "syscall.IP_PORTRANGE_DEFAULT": "syscall", - "syscall.IP_PORTRANGE_HIGH": "syscall", - "syscall.IP_PORTRANGE_LOW": "syscall", - "syscall.IP_RECVDSTADDR": "syscall", - "syscall.IP_RECVDSTPORT": "syscall", - "syscall.IP_RECVERR": "syscall", - "syscall.IP_RECVIF": "syscall", - "syscall.IP_RECVOPTS": "syscall", - "syscall.IP_RECVORIGDSTADDR": "syscall", - "syscall.IP_RECVPKTINFO": "syscall", - "syscall.IP_RECVRETOPTS": "syscall", - "syscall.IP_RECVRTABLE": "syscall", - "syscall.IP_RECVTOS": "syscall", - "syscall.IP_RECVTTL": "syscall", - "syscall.IP_RETOPTS": "syscall", - "syscall.IP_RF": "syscall", - "syscall.IP_ROUTER_ALERT": "syscall", - "syscall.IP_RSVP_OFF": "syscall", - "syscall.IP_RSVP_ON": "syscall", - "syscall.IP_RSVP_VIF_OFF": "syscall", - "syscall.IP_RSVP_VIF_ON": "syscall", - "syscall.IP_RTABLE": "syscall", - "syscall.IP_SENDSRCADDR": "syscall", - "syscall.IP_STRIPHDR": "syscall", - "syscall.IP_TOS": "syscall", - "syscall.IP_TRAFFIC_MGT_BACKGROUND": "syscall", - "syscall.IP_TRANSPARENT": "syscall", - "syscall.IP_TTL": "syscall", - "syscall.IP_UNBLOCK_SOURCE": "syscall", - "syscall.IP_XFRM_POLICY": "syscall", - "syscall.IPv6MTUInfo": "syscall", - "syscall.IPv6Mreq": "syscall", - "syscall.ISIG": "syscall", - "syscall.ISTRIP": "syscall", - "syscall.IUCLC": "syscall", - "syscall.IUTF8": "syscall", - "syscall.IXANY": "syscall", - "syscall.IXOFF": "syscall", - "syscall.IXON": "syscall", - "syscall.IfAddrmsg": "syscall", - "syscall.IfAnnounceMsghdr": "syscall", - "syscall.IfData": "syscall", - "syscall.IfInfomsg": "syscall", - "syscall.IfMsghdr": "syscall", - "syscall.IfaMsghdr": "syscall", - "syscall.IfmaMsghdr": "syscall", - "syscall.IfmaMsghdr2": "syscall", - "syscall.ImplementsGetwd": "syscall", - "syscall.Inet4Pktinfo": "syscall", - "syscall.Inet6Pktinfo": "syscall", - "syscall.InotifyAddWatch": "syscall", - "syscall.InotifyEvent": "syscall", - "syscall.InotifyInit": "syscall", - "syscall.InotifyInit1": "syscall", - "syscall.InotifyRmWatch": "syscall", - "syscall.InterfaceAddrMessage": "syscall", - "syscall.InterfaceAnnounceMessage": "syscall", - "syscall.InterfaceInfo": "syscall", - "syscall.InterfaceMessage": "syscall", - "syscall.InterfaceMulticastAddrMessage": "syscall", - "syscall.InvalidHandle": "syscall", - "syscall.Ioperm": "syscall", - "syscall.Iopl": "syscall", - "syscall.Iovec": "syscall", - "syscall.IpAdapterInfo": "syscall", - "syscall.IpAddrString": "syscall", - "syscall.IpAddressString": "syscall", - "syscall.IpMaskString": "syscall", - "syscall.Issetugid": "syscall", - "syscall.KEY_ALL_ACCESS": "syscall", - "syscall.KEY_CREATE_LINK": "syscall", - "syscall.KEY_CREATE_SUB_KEY": "syscall", - "syscall.KEY_ENUMERATE_SUB_KEYS": "syscall", - "syscall.KEY_EXECUTE": "syscall", - "syscall.KEY_NOTIFY": "syscall", - "syscall.KEY_QUERY_VALUE": "syscall", - "syscall.KEY_READ": "syscall", - "syscall.KEY_SET_VALUE": "syscall", - "syscall.KEY_WOW64_32KEY": "syscall", - "syscall.KEY_WOW64_64KEY": "syscall", - "syscall.KEY_WRITE": "syscall", - "syscall.Kevent": "syscall", - "syscall.Kevent_t": "syscall", - "syscall.Kill": "syscall", - "syscall.Klogctl": "syscall", - "syscall.Kqueue": "syscall", - "syscall.LANG_ENGLISH": "syscall", - "syscall.LAYERED_PROTOCOL": "syscall", - "syscall.LCNT_OVERLOAD_FLUSH": "syscall", - "syscall.LINUX_REBOOT_CMD_CAD_OFF": "syscall", - "syscall.LINUX_REBOOT_CMD_CAD_ON": "syscall", - "syscall.LINUX_REBOOT_CMD_HALT": "syscall", - "syscall.LINUX_REBOOT_CMD_KEXEC": "syscall", - "syscall.LINUX_REBOOT_CMD_POWER_OFF": "syscall", - "syscall.LINUX_REBOOT_CMD_RESTART": "syscall", - "syscall.LINUX_REBOOT_CMD_RESTART2": "syscall", - "syscall.LINUX_REBOOT_CMD_SW_SUSPEND": "syscall", - "syscall.LINUX_REBOOT_MAGIC1": "syscall", - "syscall.LINUX_REBOOT_MAGIC2": "syscall", - "syscall.LOCK_EX": "syscall", - "syscall.LOCK_NB": "syscall", - "syscall.LOCK_SH": "syscall", - "syscall.LOCK_UN": "syscall", - "syscall.LazyDLL": "syscall", - "syscall.LazyProc": "syscall", - "syscall.Lchown": "syscall", - "syscall.Linger": "syscall", - "syscall.Link": "syscall", - "syscall.Listen": "syscall", - "syscall.Listxattr": "syscall", - "syscall.LoadCancelIoEx": "syscall", - "syscall.LoadConnectEx": "syscall", - "syscall.LoadCreateSymbolicLink": "syscall", - "syscall.LoadDLL": "syscall", - "syscall.LoadGetAddrInfo": "syscall", - "syscall.LoadLibrary": "syscall", - "syscall.LoadSetFileCompletionNotificationModes": "syscall", - "syscall.LocalFree": "syscall", - "syscall.Log2phys_t": "syscall", - "syscall.LookupAccountName": "syscall", - "syscall.LookupAccountSid": "syscall", - "syscall.LookupSID": "syscall", - "syscall.LsfJump": "syscall", - "syscall.LsfSocket": "syscall", - "syscall.LsfStmt": "syscall", - "syscall.Lstat": "syscall", - "syscall.MADV_AUTOSYNC": "syscall", - "syscall.MADV_CAN_REUSE": "syscall", - "syscall.MADV_CORE": "syscall", - "syscall.MADV_DOFORK": "syscall", - "syscall.MADV_DONTFORK": "syscall", - "syscall.MADV_DONTNEED": "syscall", - "syscall.MADV_FREE": "syscall", - "syscall.MADV_FREE_REUSABLE": "syscall", - "syscall.MADV_FREE_REUSE": "syscall", - "syscall.MADV_HUGEPAGE": "syscall", - "syscall.MADV_HWPOISON": "syscall", - "syscall.MADV_MERGEABLE": "syscall", - "syscall.MADV_NOCORE": "syscall", - "syscall.MADV_NOHUGEPAGE": "syscall", - "syscall.MADV_NORMAL": "syscall", - "syscall.MADV_NOSYNC": "syscall", - "syscall.MADV_PROTECT": "syscall", - "syscall.MADV_RANDOM": "syscall", - "syscall.MADV_REMOVE": "syscall", - "syscall.MADV_SEQUENTIAL": "syscall", - "syscall.MADV_SPACEAVAIL": "syscall", - "syscall.MADV_UNMERGEABLE": "syscall", - "syscall.MADV_WILLNEED": "syscall", - "syscall.MADV_ZERO_WIRED_PAGES": "syscall", - "syscall.MAP_32BIT": "syscall", - "syscall.MAP_ALIGNED_SUPER": "syscall", - "syscall.MAP_ALIGNMENT_16MB": "syscall", - "syscall.MAP_ALIGNMENT_1TB": "syscall", - "syscall.MAP_ALIGNMENT_256TB": "syscall", - "syscall.MAP_ALIGNMENT_4GB": "syscall", - "syscall.MAP_ALIGNMENT_64KB": "syscall", - "syscall.MAP_ALIGNMENT_64PB": "syscall", - "syscall.MAP_ALIGNMENT_MASK": "syscall", - "syscall.MAP_ALIGNMENT_SHIFT": "syscall", - "syscall.MAP_ANON": "syscall", - "syscall.MAP_ANONYMOUS": "syscall", - "syscall.MAP_COPY": "syscall", - "syscall.MAP_DENYWRITE": "syscall", - "syscall.MAP_EXECUTABLE": "syscall", - "syscall.MAP_FILE": "syscall", - "syscall.MAP_FIXED": "syscall", - "syscall.MAP_FLAGMASK": "syscall", - "syscall.MAP_GROWSDOWN": "syscall", - "syscall.MAP_HASSEMAPHORE": "syscall", - "syscall.MAP_HUGETLB": "syscall", - "syscall.MAP_INHERIT": "syscall", - "syscall.MAP_INHERIT_COPY": "syscall", - "syscall.MAP_INHERIT_DEFAULT": "syscall", - "syscall.MAP_INHERIT_DONATE_COPY": "syscall", - "syscall.MAP_INHERIT_NONE": "syscall", - "syscall.MAP_INHERIT_SHARE": "syscall", - "syscall.MAP_JIT": "syscall", - "syscall.MAP_LOCKED": "syscall", - "syscall.MAP_NOCACHE": "syscall", - "syscall.MAP_NOCORE": "syscall", - "syscall.MAP_NOEXTEND": "syscall", - "syscall.MAP_NONBLOCK": "syscall", - "syscall.MAP_NORESERVE": "syscall", - "syscall.MAP_NOSYNC": "syscall", - "syscall.MAP_POPULATE": "syscall", - "syscall.MAP_PREFAULT_READ": "syscall", - "syscall.MAP_PRIVATE": "syscall", - "syscall.MAP_RENAME": "syscall", - "syscall.MAP_RESERVED0080": "syscall", - "syscall.MAP_RESERVED0100": "syscall", - "syscall.MAP_SHARED": "syscall", - "syscall.MAP_STACK": "syscall", - "syscall.MAP_TRYFIXED": "syscall", - "syscall.MAP_TYPE": "syscall", - "syscall.MAP_WIRED": "syscall", - "syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE": "syscall", - "syscall.MAXLEN_IFDESCR": "syscall", - "syscall.MAXLEN_PHYSADDR": "syscall", - "syscall.MAX_ADAPTER_ADDRESS_LENGTH": "syscall", - "syscall.MAX_ADAPTER_DESCRIPTION_LENGTH": "syscall", - "syscall.MAX_ADAPTER_NAME_LENGTH": "syscall", - "syscall.MAX_COMPUTERNAME_LENGTH": "syscall", - "syscall.MAX_INTERFACE_NAME_LEN": "syscall", - "syscall.MAX_LONG_PATH": "syscall", - "syscall.MAX_PATH": "syscall", - "syscall.MAX_PROTOCOL_CHAIN": "syscall", - "syscall.MCL_CURRENT": "syscall", - "syscall.MCL_FUTURE": "syscall", - "syscall.MNT_DETACH": "syscall", - "syscall.MNT_EXPIRE": "syscall", - "syscall.MNT_FORCE": "syscall", - "syscall.MSG_BCAST": "syscall", - "syscall.MSG_CMSG_CLOEXEC": "syscall", - "syscall.MSG_COMPAT": "syscall", - "syscall.MSG_CONFIRM": "syscall", - "syscall.MSG_CONTROLMBUF": "syscall", - "syscall.MSG_CTRUNC": "syscall", - "syscall.MSG_DONTROUTE": "syscall", - "syscall.MSG_DONTWAIT": "syscall", - "syscall.MSG_EOF": "syscall", - "syscall.MSG_EOR": "syscall", - "syscall.MSG_ERRQUEUE": "syscall", - "syscall.MSG_FASTOPEN": "syscall", - "syscall.MSG_FIN": "syscall", - "syscall.MSG_FLUSH": "syscall", - "syscall.MSG_HAVEMORE": "syscall", - "syscall.MSG_HOLD": "syscall", - "syscall.MSG_IOVUSRSPACE": "syscall", - "syscall.MSG_LENUSRSPACE": "syscall", - "syscall.MSG_MCAST": "syscall", - "syscall.MSG_MORE": "syscall", - "syscall.MSG_NAMEMBUF": "syscall", - "syscall.MSG_NBIO": "syscall", - "syscall.MSG_NEEDSA": "syscall", - "syscall.MSG_NOSIGNAL": "syscall", - "syscall.MSG_NOTIFICATION": "syscall", - "syscall.MSG_OOB": "syscall", - "syscall.MSG_PEEK": "syscall", - "syscall.MSG_PROXY": "syscall", - "syscall.MSG_RCVMORE": "syscall", - "syscall.MSG_RST": "syscall", - "syscall.MSG_SEND": "syscall", - "syscall.MSG_SYN": "syscall", - "syscall.MSG_TRUNC": "syscall", - "syscall.MSG_TRYHARD": "syscall", - "syscall.MSG_USERFLAGS": "syscall", - "syscall.MSG_WAITALL": "syscall", - "syscall.MSG_WAITFORONE": "syscall", - "syscall.MSG_WAITSTREAM": "syscall", - "syscall.MS_ACTIVE": "syscall", - "syscall.MS_ASYNC": "syscall", - "syscall.MS_BIND": "syscall", - "syscall.MS_DEACTIVATE": "syscall", - "syscall.MS_DIRSYNC": "syscall", - "syscall.MS_INVALIDATE": "syscall", - "syscall.MS_I_VERSION": "syscall", - "syscall.MS_KERNMOUNT": "syscall", - "syscall.MS_KILLPAGES": "syscall", - "syscall.MS_MANDLOCK": "syscall", - "syscall.MS_MGC_MSK": "syscall", - "syscall.MS_MGC_VAL": "syscall", - "syscall.MS_MOVE": "syscall", - "syscall.MS_NOATIME": "syscall", - "syscall.MS_NODEV": "syscall", - "syscall.MS_NODIRATIME": "syscall", - "syscall.MS_NOEXEC": "syscall", - "syscall.MS_NOSUID": "syscall", - "syscall.MS_NOUSER": "syscall", - "syscall.MS_POSIXACL": "syscall", - "syscall.MS_PRIVATE": "syscall", - "syscall.MS_RDONLY": "syscall", - "syscall.MS_REC": "syscall", - "syscall.MS_RELATIME": "syscall", - "syscall.MS_REMOUNT": "syscall", - "syscall.MS_RMT_MASK": "syscall", - "syscall.MS_SHARED": "syscall", - "syscall.MS_SILENT": "syscall", - "syscall.MS_SLAVE": "syscall", - "syscall.MS_STRICTATIME": "syscall", - "syscall.MS_SYNC": "syscall", - "syscall.MS_SYNCHRONOUS": "syscall", - "syscall.MS_UNBINDABLE": "syscall", - "syscall.Madvise": "syscall", - "syscall.MapViewOfFile": "syscall", - "syscall.MaxTokenInfoClass": "syscall", - "syscall.Mclpool": "syscall", - "syscall.MibIfRow": "syscall", - "syscall.Mkdir": "syscall", - "syscall.Mkdirat": "syscall", - "syscall.Mkfifo": "syscall", - "syscall.Mknod": "syscall", - "syscall.Mknodat": "syscall", - "syscall.Mlock": "syscall", - "syscall.Mlockall": "syscall", - "syscall.Mmap": "syscall", - "syscall.Mount": "syscall", - "syscall.MoveFile": "syscall", - "syscall.Mprotect": "syscall", - "syscall.Msghdr": "syscall", - "syscall.Munlock": "syscall", - "syscall.Munlockall": "syscall", - "syscall.Munmap": "syscall", - "syscall.MustLoadDLL": "syscall", - "syscall.NAME_MAX": "syscall", - "syscall.NETLINK_ADD_MEMBERSHIP": "syscall", - "syscall.NETLINK_AUDIT": "syscall", - "syscall.NETLINK_BROADCAST_ERROR": "syscall", - "syscall.NETLINK_CONNECTOR": "syscall", - "syscall.NETLINK_DNRTMSG": "syscall", - "syscall.NETLINK_DROP_MEMBERSHIP": "syscall", - "syscall.NETLINK_ECRYPTFS": "syscall", - "syscall.NETLINK_FIB_LOOKUP": "syscall", - "syscall.NETLINK_FIREWALL": "syscall", - "syscall.NETLINK_GENERIC": "syscall", - "syscall.NETLINK_INET_DIAG": "syscall", - "syscall.NETLINK_IP6_FW": "syscall", - "syscall.NETLINK_ISCSI": "syscall", - "syscall.NETLINK_KOBJECT_UEVENT": "syscall", - "syscall.NETLINK_NETFILTER": "syscall", - "syscall.NETLINK_NFLOG": "syscall", - "syscall.NETLINK_NO_ENOBUFS": "syscall", - "syscall.NETLINK_PKTINFO": "syscall", - "syscall.NETLINK_RDMA": "syscall", - "syscall.NETLINK_ROUTE": "syscall", - "syscall.NETLINK_SCSITRANSPORT": "syscall", - "syscall.NETLINK_SELINUX": "syscall", - "syscall.NETLINK_UNUSED": "syscall", - "syscall.NETLINK_USERSOCK": "syscall", - "syscall.NETLINK_XFRM": "syscall", - "syscall.NET_RT_DUMP": "syscall", - "syscall.NET_RT_DUMP2": "syscall", - "syscall.NET_RT_FLAGS": "syscall", - "syscall.NET_RT_IFLIST": "syscall", - "syscall.NET_RT_IFLIST2": "syscall", - "syscall.NET_RT_IFLISTL": "syscall", - "syscall.NET_RT_IFMALIST": "syscall", - "syscall.NET_RT_MAXID": "syscall", - "syscall.NET_RT_OIFLIST": "syscall", - "syscall.NET_RT_OOIFLIST": "syscall", - "syscall.NET_RT_STAT": "syscall", - "syscall.NET_RT_STATS": "syscall", - "syscall.NET_RT_TABLE": "syscall", - "syscall.NET_RT_TRASH": "syscall", - "syscall.NLA_ALIGNTO": "syscall", - "syscall.NLA_F_NESTED": "syscall", - "syscall.NLA_F_NET_BYTEORDER": "syscall", - "syscall.NLA_HDRLEN": "syscall", - "syscall.NLMSG_ALIGNTO": "syscall", - "syscall.NLMSG_DONE": "syscall", - "syscall.NLMSG_ERROR": "syscall", - "syscall.NLMSG_HDRLEN": "syscall", - "syscall.NLMSG_MIN_TYPE": "syscall", - "syscall.NLMSG_NOOP": "syscall", - "syscall.NLMSG_OVERRUN": "syscall", - "syscall.NLM_F_ACK": "syscall", - "syscall.NLM_F_APPEND": "syscall", - "syscall.NLM_F_ATOMIC": "syscall", - "syscall.NLM_F_CREATE": "syscall", - "syscall.NLM_F_DUMP": "syscall", - "syscall.NLM_F_ECHO": "syscall", - "syscall.NLM_F_EXCL": "syscall", - "syscall.NLM_F_MATCH": "syscall", - "syscall.NLM_F_MULTI": "syscall", - "syscall.NLM_F_REPLACE": "syscall", - "syscall.NLM_F_REQUEST": "syscall", - "syscall.NLM_F_ROOT": "syscall", - "syscall.NOFLSH": "syscall", - "syscall.NOTE_ABSOLUTE": "syscall", - "syscall.NOTE_ATTRIB": "syscall", - "syscall.NOTE_CHILD": "syscall", - "syscall.NOTE_DELETE": "syscall", - "syscall.NOTE_EOF": "syscall", - "syscall.NOTE_EXEC": "syscall", - "syscall.NOTE_EXIT": "syscall", - "syscall.NOTE_EXITSTATUS": "syscall", - "syscall.NOTE_EXTEND": "syscall", - "syscall.NOTE_FFAND": "syscall", - "syscall.NOTE_FFCOPY": "syscall", - "syscall.NOTE_FFCTRLMASK": "syscall", - "syscall.NOTE_FFLAGSMASK": "syscall", - "syscall.NOTE_FFNOP": "syscall", - "syscall.NOTE_FFOR": "syscall", - "syscall.NOTE_FORK": "syscall", - "syscall.NOTE_LINK": "syscall", - "syscall.NOTE_LOWAT": "syscall", - "syscall.NOTE_NONE": "syscall", - "syscall.NOTE_NSECONDS": "syscall", - "syscall.NOTE_PCTRLMASK": "syscall", - "syscall.NOTE_PDATAMASK": "syscall", - "syscall.NOTE_REAP": "syscall", - "syscall.NOTE_RENAME": "syscall", - "syscall.NOTE_RESOURCEEND": "syscall", - "syscall.NOTE_REVOKE": "syscall", - "syscall.NOTE_SECONDS": "syscall", - "syscall.NOTE_SIGNAL": "syscall", - "syscall.NOTE_TRACK": "syscall", - "syscall.NOTE_TRACKERR": "syscall", - "syscall.NOTE_TRIGGER": "syscall", - "syscall.NOTE_TRUNCATE": "syscall", - "syscall.NOTE_USECONDS": "syscall", - "syscall.NOTE_VM_ERROR": "syscall", - "syscall.NOTE_VM_PRESSURE": "syscall", - "syscall.NOTE_VM_PRESSURE_SUDDEN_TERMINATE": "syscall", - "syscall.NOTE_VM_PRESSURE_TERMINATE": "syscall", - "syscall.NOTE_WRITE": "syscall", - "syscall.NameCanonical": "syscall", - "syscall.NameCanonicalEx": "syscall", - "syscall.NameDisplay": "syscall", - "syscall.NameDnsDomain": "syscall", - "syscall.NameFullyQualifiedDN": "syscall", - "syscall.NameSamCompatible": "syscall", - "syscall.NameServicePrincipal": "syscall", - "syscall.NameUniqueId": "syscall", - "syscall.NameUnknown": "syscall", - "syscall.NameUserPrincipal": "syscall", - "syscall.Nanosleep": "syscall", - "syscall.NetApiBufferFree": "syscall", - "syscall.NetGetJoinInformation": "syscall", - "syscall.NetSetupDomainName": "syscall", - "syscall.NetSetupUnjoined": "syscall", - "syscall.NetSetupUnknownStatus": "syscall", - "syscall.NetSetupWorkgroupName": "syscall", - "syscall.NetUserGetInfo": "syscall", - "syscall.NetlinkMessage": "syscall", - "syscall.NetlinkRIB": "syscall", - "syscall.NetlinkRouteAttr": "syscall", - "syscall.NetlinkRouteRequest": "syscall", - "syscall.NewCallback": "syscall", - "syscall.NewCallbackCDecl": "syscall", - "syscall.NewLazyDLL": "syscall", - "syscall.NlAttr": "syscall", - "syscall.NlMsgerr": "syscall", - "syscall.NlMsghdr": "syscall", - "syscall.NsecToFiletime": "syscall", - "syscall.NsecToTimespec": "syscall", - "syscall.NsecToTimeval": "syscall", - "syscall.Ntohs": "syscall", - "syscall.OCRNL": "syscall", - "syscall.OFDEL": "syscall", - "syscall.OFILL": "syscall", - "syscall.OFIOGETBMAP": "syscall", - "syscall.OID_PKIX_KP_SERVER_AUTH": "syscall", - "syscall.OID_SERVER_GATED_CRYPTO": "syscall", - "syscall.OID_SGC_NETSCAPE": "syscall", - "syscall.OLCUC": "syscall", - "syscall.ONLCR": "syscall", - "syscall.ONLRET": "syscall", - "syscall.ONOCR": "syscall", - "syscall.ONOEOT": "syscall", - "syscall.OPEN_ALWAYS": "syscall", - "syscall.OPEN_EXISTING": "syscall", - "syscall.OPOST": "syscall", - "syscall.O_ACCMODE": "syscall", - "syscall.O_ALERT": "syscall", - "syscall.O_ALT_IO": "syscall", - "syscall.O_APPEND": "syscall", - "syscall.O_ASYNC": "syscall", - "syscall.O_CLOEXEC": "syscall", - "syscall.O_CREAT": "syscall", - "syscall.O_DIRECT": "syscall", - "syscall.O_DIRECTORY": "syscall", - "syscall.O_DSYNC": "syscall", - "syscall.O_EVTONLY": "syscall", - "syscall.O_EXCL": "syscall", - "syscall.O_EXEC": "syscall", - "syscall.O_EXLOCK": "syscall", - "syscall.O_FSYNC": "syscall", - "syscall.O_LARGEFILE": "syscall", - "syscall.O_NDELAY": "syscall", - "syscall.O_NOATIME": "syscall", - "syscall.O_NOCTTY": "syscall", - "syscall.O_NOFOLLOW": "syscall", - "syscall.O_NONBLOCK": "syscall", - "syscall.O_NOSIGPIPE": "syscall", - "syscall.O_POPUP": "syscall", - "syscall.O_RDONLY": "syscall", - "syscall.O_RDWR": "syscall", - "syscall.O_RSYNC": "syscall", - "syscall.O_SHLOCK": "syscall", - "syscall.O_SYMLINK": "syscall", - "syscall.O_SYNC": "syscall", - "syscall.O_TRUNC": "syscall", - "syscall.O_TTY_INIT": "syscall", - "syscall.O_WRONLY": "syscall", - "syscall.Open": "syscall", - "syscall.OpenCurrentProcessToken": "syscall", - "syscall.OpenProcess": "syscall", - "syscall.OpenProcessToken": "syscall", - "syscall.Openat": "syscall", - "syscall.Overlapped": "syscall", - "syscall.PACKET_ADD_MEMBERSHIP": "syscall", - "syscall.PACKET_BROADCAST": "syscall", - "syscall.PACKET_DROP_MEMBERSHIP": "syscall", - "syscall.PACKET_FASTROUTE": "syscall", - "syscall.PACKET_HOST": "syscall", - "syscall.PACKET_LOOPBACK": "syscall", - "syscall.PACKET_MR_ALLMULTI": "syscall", - "syscall.PACKET_MR_MULTICAST": "syscall", - "syscall.PACKET_MR_PROMISC": "syscall", - "syscall.PACKET_MULTICAST": "syscall", - "syscall.PACKET_OTHERHOST": "syscall", - "syscall.PACKET_OUTGOING": "syscall", - "syscall.PACKET_RECV_OUTPUT": "syscall", - "syscall.PACKET_RX_RING": "syscall", - "syscall.PACKET_STATISTICS": "syscall", - "syscall.PAGE_EXECUTE_READ": "syscall", - "syscall.PAGE_EXECUTE_READWRITE": "syscall", - "syscall.PAGE_EXECUTE_WRITECOPY": "syscall", - "syscall.PAGE_READONLY": "syscall", - "syscall.PAGE_READWRITE": "syscall", - "syscall.PAGE_WRITECOPY": "syscall", - "syscall.PARENB": "syscall", - "syscall.PARMRK": "syscall", - "syscall.PARODD": "syscall", - "syscall.PENDIN": "syscall", - "syscall.PFL_HIDDEN": "syscall", - "syscall.PFL_MATCHES_PROTOCOL_ZERO": "syscall", - "syscall.PFL_MULTIPLE_PROTO_ENTRIES": "syscall", - "syscall.PFL_NETWORKDIRECT_PROVIDER": "syscall", - "syscall.PFL_RECOMMENDED_PROTO_ENTRY": "syscall", - "syscall.PF_FLUSH": "syscall", - "syscall.PKCS_7_ASN_ENCODING": "syscall", - "syscall.PMC5_PIPELINE_FLUSH": "syscall", - "syscall.PRIO_PGRP": "syscall", - "syscall.PRIO_PROCESS": "syscall", - "syscall.PRIO_USER": "syscall", - "syscall.PRI_IOFLUSH": "syscall", - "syscall.PROCESS_QUERY_INFORMATION": "syscall", - "syscall.PROCESS_TERMINATE": "syscall", - "syscall.PROT_EXEC": "syscall", - "syscall.PROT_GROWSDOWN": "syscall", - "syscall.PROT_GROWSUP": "syscall", - "syscall.PROT_NONE": "syscall", - "syscall.PROT_READ": "syscall", - "syscall.PROT_WRITE": "syscall", - "syscall.PROV_DH_SCHANNEL": "syscall", - "syscall.PROV_DSS": "syscall", - "syscall.PROV_DSS_DH": "syscall", - "syscall.PROV_EC_ECDSA_FULL": "syscall", - "syscall.PROV_EC_ECDSA_SIG": "syscall", - "syscall.PROV_EC_ECNRA_FULL": "syscall", - "syscall.PROV_EC_ECNRA_SIG": "syscall", - "syscall.PROV_FORTEZZA": "syscall", - "syscall.PROV_INTEL_SEC": "syscall", - "syscall.PROV_MS_EXCHANGE": "syscall", - "syscall.PROV_REPLACE_OWF": "syscall", - "syscall.PROV_RNG": "syscall", - "syscall.PROV_RSA_AES": "syscall", - "syscall.PROV_RSA_FULL": "syscall", - "syscall.PROV_RSA_SCHANNEL": "syscall", - "syscall.PROV_RSA_SIG": "syscall", - "syscall.PROV_SPYRUS_LYNKS": "syscall", - "syscall.PROV_SSL": "syscall", - "syscall.PR_CAPBSET_DROP": "syscall", - "syscall.PR_CAPBSET_READ": "syscall", - "syscall.PR_CLEAR_SECCOMP_FILTER": "syscall", - "syscall.PR_ENDIAN_BIG": "syscall", - "syscall.PR_ENDIAN_LITTLE": "syscall", - "syscall.PR_ENDIAN_PPC_LITTLE": "syscall", - "syscall.PR_FPEMU_NOPRINT": "syscall", - "syscall.PR_FPEMU_SIGFPE": "syscall", - "syscall.PR_FP_EXC_ASYNC": "syscall", - "syscall.PR_FP_EXC_DISABLED": "syscall", - "syscall.PR_FP_EXC_DIV": "syscall", - "syscall.PR_FP_EXC_INV": "syscall", - "syscall.PR_FP_EXC_NONRECOV": "syscall", - "syscall.PR_FP_EXC_OVF": "syscall", - "syscall.PR_FP_EXC_PRECISE": "syscall", - "syscall.PR_FP_EXC_RES": "syscall", - "syscall.PR_FP_EXC_SW_ENABLE": "syscall", - "syscall.PR_FP_EXC_UND": "syscall", - "syscall.PR_GET_DUMPABLE": "syscall", - "syscall.PR_GET_ENDIAN": "syscall", - "syscall.PR_GET_FPEMU": "syscall", - "syscall.PR_GET_FPEXC": "syscall", - "syscall.PR_GET_KEEPCAPS": "syscall", - "syscall.PR_GET_NAME": "syscall", - "syscall.PR_GET_PDEATHSIG": "syscall", - "syscall.PR_GET_SECCOMP": "syscall", - "syscall.PR_GET_SECCOMP_FILTER": "syscall", - "syscall.PR_GET_SECUREBITS": "syscall", - "syscall.PR_GET_TIMERSLACK": "syscall", - "syscall.PR_GET_TIMING": "syscall", - "syscall.PR_GET_TSC": "syscall", - "syscall.PR_GET_UNALIGN": "syscall", - "syscall.PR_MCE_KILL": "syscall", - "syscall.PR_MCE_KILL_CLEAR": "syscall", - "syscall.PR_MCE_KILL_DEFAULT": "syscall", - "syscall.PR_MCE_KILL_EARLY": "syscall", - "syscall.PR_MCE_KILL_GET": "syscall", - "syscall.PR_MCE_KILL_LATE": "syscall", - "syscall.PR_MCE_KILL_SET": "syscall", - "syscall.PR_SECCOMP_FILTER_EVENT": "syscall", - "syscall.PR_SECCOMP_FILTER_SYSCALL": "syscall", - "syscall.PR_SET_DUMPABLE": "syscall", - "syscall.PR_SET_ENDIAN": "syscall", - "syscall.PR_SET_FPEMU": "syscall", - "syscall.PR_SET_FPEXC": "syscall", - "syscall.PR_SET_KEEPCAPS": "syscall", - "syscall.PR_SET_NAME": "syscall", - "syscall.PR_SET_PDEATHSIG": "syscall", - "syscall.PR_SET_PTRACER": "syscall", - "syscall.PR_SET_SECCOMP": "syscall", - "syscall.PR_SET_SECCOMP_FILTER": "syscall", - "syscall.PR_SET_SECUREBITS": "syscall", - "syscall.PR_SET_TIMERSLACK": "syscall", - "syscall.PR_SET_TIMING": "syscall", - "syscall.PR_SET_TSC": "syscall", - "syscall.PR_SET_UNALIGN": "syscall", - "syscall.PR_TASK_PERF_EVENTS_DISABLE": "syscall", - "syscall.PR_TASK_PERF_EVENTS_ENABLE": "syscall", - "syscall.PR_TIMING_STATISTICAL": "syscall", - "syscall.PR_TIMING_TIMESTAMP": "syscall", - "syscall.PR_TSC_ENABLE": "syscall", - "syscall.PR_TSC_SIGSEGV": "syscall", - "syscall.PR_UNALIGN_NOPRINT": "syscall", - "syscall.PR_UNALIGN_SIGBUS": "syscall", - "syscall.PTRACE_ARCH_PRCTL": "syscall", - "syscall.PTRACE_ATTACH": "syscall", - "syscall.PTRACE_CONT": "syscall", - "syscall.PTRACE_DETACH": "syscall", - "syscall.PTRACE_EVENT_CLONE": "syscall", - "syscall.PTRACE_EVENT_EXEC": "syscall", - "syscall.PTRACE_EVENT_EXIT": "syscall", - "syscall.PTRACE_EVENT_FORK": "syscall", - "syscall.PTRACE_EVENT_VFORK": "syscall", - "syscall.PTRACE_EVENT_VFORK_DONE": "syscall", - "syscall.PTRACE_GETCRUNCHREGS": "syscall", - "syscall.PTRACE_GETEVENTMSG": "syscall", - "syscall.PTRACE_GETFPREGS": "syscall", - "syscall.PTRACE_GETFPXREGS": "syscall", - "syscall.PTRACE_GETHBPREGS": "syscall", - "syscall.PTRACE_GETREGS": "syscall", - "syscall.PTRACE_GETREGSET": "syscall", - "syscall.PTRACE_GETSIGINFO": "syscall", - "syscall.PTRACE_GETVFPREGS": "syscall", - "syscall.PTRACE_GETWMMXREGS": "syscall", - "syscall.PTRACE_GET_THREAD_AREA": "syscall", - "syscall.PTRACE_KILL": "syscall", - "syscall.PTRACE_OLDSETOPTIONS": "syscall", - "syscall.PTRACE_O_MASK": "syscall", - "syscall.PTRACE_O_TRACECLONE": "syscall", - "syscall.PTRACE_O_TRACEEXEC": "syscall", - "syscall.PTRACE_O_TRACEEXIT": "syscall", - "syscall.PTRACE_O_TRACEFORK": "syscall", - "syscall.PTRACE_O_TRACESYSGOOD": "syscall", - "syscall.PTRACE_O_TRACEVFORK": "syscall", - "syscall.PTRACE_O_TRACEVFORKDONE": "syscall", - "syscall.PTRACE_PEEKDATA": "syscall", - "syscall.PTRACE_PEEKTEXT": "syscall", - "syscall.PTRACE_PEEKUSR": "syscall", - "syscall.PTRACE_POKEDATA": "syscall", - "syscall.PTRACE_POKETEXT": "syscall", - "syscall.PTRACE_POKEUSR": "syscall", - "syscall.PTRACE_SETCRUNCHREGS": "syscall", - "syscall.PTRACE_SETFPREGS": "syscall", - "syscall.PTRACE_SETFPXREGS": "syscall", - "syscall.PTRACE_SETHBPREGS": "syscall", - "syscall.PTRACE_SETOPTIONS": "syscall", - "syscall.PTRACE_SETREGS": "syscall", - "syscall.PTRACE_SETREGSET": "syscall", - "syscall.PTRACE_SETSIGINFO": "syscall", - "syscall.PTRACE_SETVFPREGS": "syscall", - "syscall.PTRACE_SETWMMXREGS": "syscall", - "syscall.PTRACE_SET_SYSCALL": "syscall", - "syscall.PTRACE_SET_THREAD_AREA": "syscall", - "syscall.PTRACE_SINGLEBLOCK": "syscall", - "syscall.PTRACE_SINGLESTEP": "syscall", - "syscall.PTRACE_SYSCALL": "syscall", - "syscall.PTRACE_SYSEMU": "syscall", - "syscall.PTRACE_SYSEMU_SINGLESTEP": "syscall", - "syscall.PTRACE_TRACEME": "syscall", - "syscall.PT_ATTACH": "syscall", - "syscall.PT_ATTACHEXC": "syscall", - "syscall.PT_CONTINUE": "syscall", - "syscall.PT_DATA_ADDR": "syscall", - "syscall.PT_DENY_ATTACH": "syscall", - "syscall.PT_DETACH": "syscall", - "syscall.PT_FIRSTMACH": "syscall", - "syscall.PT_FORCEQUOTA": "syscall", - "syscall.PT_KILL": "syscall", - "syscall.PT_MASK": "syscall", - "syscall.PT_READ_D": "syscall", - "syscall.PT_READ_I": "syscall", - "syscall.PT_READ_U": "syscall", - "syscall.PT_SIGEXC": "syscall", - "syscall.PT_STEP": "syscall", - "syscall.PT_TEXT_ADDR": "syscall", - "syscall.PT_TEXT_END_ADDR": "syscall", - "syscall.PT_THUPDATE": "syscall", - "syscall.PT_TRACE_ME": "syscall", - "syscall.PT_WRITE_D": "syscall", - "syscall.PT_WRITE_I": "syscall", - "syscall.PT_WRITE_U": "syscall", - "syscall.ParseDirent": "syscall", - "syscall.ParseNetlinkMessage": "syscall", - "syscall.ParseNetlinkRouteAttr": "syscall", - "syscall.ParseRoutingMessage": "syscall", - "syscall.ParseRoutingSockaddr": "syscall", - "syscall.ParseSocketControlMessage": "syscall", - "syscall.ParseUnixCredentials": "syscall", - "syscall.ParseUnixRights": "syscall", - "syscall.PathMax": "syscall", - "syscall.Pathconf": "syscall", - "syscall.Pause": "syscall", - "syscall.Pipe": "syscall", - "syscall.Pipe2": "syscall", - "syscall.PivotRoot": "syscall", - "syscall.Pointer": "syscall", - "syscall.PostQueuedCompletionStatus": "syscall", - "syscall.Pread": "syscall", - "syscall.Proc": "syscall", - "syscall.ProcAttr": "syscall", - "syscall.Process32First": "syscall", - "syscall.Process32Next": "syscall", - "syscall.ProcessEntry32": "syscall", - "syscall.ProcessInformation": "syscall", - "syscall.Protoent": "syscall", - "syscall.PtraceAttach": "syscall", - "syscall.PtraceCont": "syscall", - "syscall.PtraceDetach": "syscall", - "syscall.PtraceGetEventMsg": "syscall", - "syscall.PtraceGetRegs": "syscall", - "syscall.PtracePeekData": "syscall", - "syscall.PtracePeekText": "syscall", - "syscall.PtracePokeData": "syscall", - "syscall.PtracePokeText": "syscall", - "syscall.PtraceRegs": "syscall", - "syscall.PtraceSetOptions": "syscall", - "syscall.PtraceSetRegs": "syscall", - "syscall.PtraceSingleStep": "syscall", - "syscall.PtraceSyscall": "syscall", - "syscall.Pwrite": "syscall", - "syscall.REG_BINARY": "syscall", - "syscall.REG_DWORD": "syscall", - "syscall.REG_DWORD_BIG_ENDIAN": "syscall", - "syscall.REG_DWORD_LITTLE_ENDIAN": "syscall", - "syscall.REG_EXPAND_SZ": "syscall", - "syscall.REG_FULL_RESOURCE_DESCRIPTOR": "syscall", - "syscall.REG_LINK": "syscall", - "syscall.REG_MULTI_SZ": "syscall", - "syscall.REG_NONE": "syscall", - "syscall.REG_QWORD": "syscall", - "syscall.REG_QWORD_LITTLE_ENDIAN": "syscall", - "syscall.REG_RESOURCE_LIST": "syscall", - "syscall.REG_RESOURCE_REQUIREMENTS_LIST": "syscall", - "syscall.REG_SZ": "syscall", - "syscall.RLIMIT_AS": "syscall", - "syscall.RLIMIT_CORE": "syscall", - "syscall.RLIMIT_CPU": "syscall", - "syscall.RLIMIT_DATA": "syscall", - "syscall.RLIMIT_FSIZE": "syscall", - "syscall.RLIMIT_NOFILE": "syscall", - "syscall.RLIMIT_STACK": "syscall", - "syscall.RLIM_INFINITY": "syscall", - "syscall.RTAX_ADVMSS": "syscall", - "syscall.RTAX_AUTHOR": "syscall", - "syscall.RTAX_BRD": "syscall", - "syscall.RTAX_CWND": "syscall", - "syscall.RTAX_DST": "syscall", - "syscall.RTAX_FEATURES": "syscall", - "syscall.RTAX_FEATURE_ALLFRAG": "syscall", - "syscall.RTAX_FEATURE_ECN": "syscall", - "syscall.RTAX_FEATURE_SACK": "syscall", - "syscall.RTAX_FEATURE_TIMESTAMP": "syscall", - "syscall.RTAX_GATEWAY": "syscall", - "syscall.RTAX_GENMASK": "syscall", - "syscall.RTAX_HOPLIMIT": "syscall", - "syscall.RTAX_IFA": "syscall", - "syscall.RTAX_IFP": "syscall", - "syscall.RTAX_INITCWND": "syscall", - "syscall.RTAX_INITRWND": "syscall", - "syscall.RTAX_LABEL": "syscall", - "syscall.RTAX_LOCK": "syscall", - "syscall.RTAX_MAX": "syscall", - "syscall.RTAX_MTU": "syscall", - "syscall.RTAX_NETMASK": "syscall", - "syscall.RTAX_REORDERING": "syscall", - "syscall.RTAX_RTO_MIN": "syscall", - "syscall.RTAX_RTT": "syscall", - "syscall.RTAX_RTTVAR": "syscall", - "syscall.RTAX_SRC": "syscall", - "syscall.RTAX_SRCMASK": "syscall", - "syscall.RTAX_SSTHRESH": "syscall", - "syscall.RTAX_TAG": "syscall", - "syscall.RTAX_UNSPEC": "syscall", - "syscall.RTAX_WINDOW": "syscall", - "syscall.RTA_ALIGNTO": "syscall", - "syscall.RTA_AUTHOR": "syscall", - "syscall.RTA_BRD": "syscall", - "syscall.RTA_CACHEINFO": "syscall", - "syscall.RTA_DST": "syscall", - "syscall.RTA_FLOW": "syscall", - "syscall.RTA_GATEWAY": "syscall", - "syscall.RTA_GENMASK": "syscall", - "syscall.RTA_IFA": "syscall", - "syscall.RTA_IFP": "syscall", - "syscall.RTA_IIF": "syscall", - "syscall.RTA_LABEL": "syscall", - "syscall.RTA_MAX": "syscall", - "syscall.RTA_METRICS": "syscall", - "syscall.RTA_MULTIPATH": "syscall", - "syscall.RTA_NETMASK": "syscall", - "syscall.RTA_OIF": "syscall", - "syscall.RTA_PREFSRC": "syscall", - "syscall.RTA_PRIORITY": "syscall", - "syscall.RTA_SRC": "syscall", - "syscall.RTA_SRCMASK": "syscall", - "syscall.RTA_TABLE": "syscall", - "syscall.RTA_TAG": "syscall", - "syscall.RTA_UNSPEC": "syscall", - "syscall.RTCF_DIRECTSRC": "syscall", - "syscall.RTCF_DOREDIRECT": "syscall", - "syscall.RTCF_LOG": "syscall", - "syscall.RTCF_MASQ": "syscall", - "syscall.RTCF_NAT": "syscall", - "syscall.RTCF_VALVE": "syscall", - "syscall.RTF_ADDRCLASSMASK": "syscall", - "syscall.RTF_ADDRCONF": "syscall", - "syscall.RTF_ALLONLINK": "syscall", - "syscall.RTF_ANNOUNCE": "syscall", - "syscall.RTF_BLACKHOLE": "syscall", - "syscall.RTF_BROADCAST": "syscall", - "syscall.RTF_CACHE": "syscall", - "syscall.RTF_CLONED": "syscall", - "syscall.RTF_CLONING": "syscall", - "syscall.RTF_CONDEMNED": "syscall", - "syscall.RTF_DEFAULT": "syscall", - "syscall.RTF_DELCLONE": "syscall", - "syscall.RTF_DONE": "syscall", - "syscall.RTF_DYNAMIC": "syscall", - "syscall.RTF_FLOW": "syscall", - "syscall.RTF_FMASK": "syscall", - "syscall.RTF_GATEWAY": "syscall", - "syscall.RTF_GWFLAG_COMPAT": "syscall", - "syscall.RTF_HOST": "syscall", - "syscall.RTF_IFREF": "syscall", - "syscall.RTF_IFSCOPE": "syscall", - "syscall.RTF_INTERFACE": "syscall", - "syscall.RTF_IRTT": "syscall", - "syscall.RTF_LINKRT": "syscall", - "syscall.RTF_LLDATA": "syscall", - "syscall.RTF_LLINFO": "syscall", - "syscall.RTF_LOCAL": "syscall", - "syscall.RTF_MASK": "syscall", - "syscall.RTF_MODIFIED": "syscall", - "syscall.RTF_MPATH": "syscall", - "syscall.RTF_MPLS": "syscall", - "syscall.RTF_MSS": "syscall", - "syscall.RTF_MTU": "syscall", - "syscall.RTF_MULTICAST": "syscall", - "syscall.RTF_NAT": "syscall", - "syscall.RTF_NOFORWARD": "syscall", - "syscall.RTF_NONEXTHOP": "syscall", - "syscall.RTF_NOPMTUDISC": "syscall", - "syscall.RTF_PERMANENT_ARP": "syscall", - "syscall.RTF_PINNED": "syscall", - "syscall.RTF_POLICY": "syscall", - "syscall.RTF_PRCLONING": "syscall", - "syscall.RTF_PROTO1": "syscall", - "syscall.RTF_PROTO2": "syscall", - "syscall.RTF_PROTO3": "syscall", - "syscall.RTF_REINSTATE": "syscall", - "syscall.RTF_REJECT": "syscall", - "syscall.RTF_RNH_LOCKED": "syscall", - "syscall.RTF_SOURCE": "syscall", - "syscall.RTF_SRC": "syscall", - "syscall.RTF_STATIC": "syscall", - "syscall.RTF_STICKY": "syscall", - "syscall.RTF_THROW": "syscall", - "syscall.RTF_TUNNEL": "syscall", - "syscall.RTF_UP": "syscall", - "syscall.RTF_USETRAILERS": "syscall", - "syscall.RTF_WASCLONED": "syscall", - "syscall.RTF_WINDOW": "syscall", - "syscall.RTF_XRESOLVE": "syscall", - "syscall.RTM_ADD": "syscall", - "syscall.RTM_BASE": "syscall", - "syscall.RTM_CHANGE": "syscall", - "syscall.RTM_CHGADDR": "syscall", - "syscall.RTM_DELACTION": "syscall", - "syscall.RTM_DELADDR": "syscall", - "syscall.RTM_DELADDRLABEL": "syscall", - "syscall.RTM_DELETE": "syscall", - "syscall.RTM_DELLINK": "syscall", - "syscall.RTM_DELMADDR": "syscall", - "syscall.RTM_DELNEIGH": "syscall", - "syscall.RTM_DELQDISC": "syscall", - "syscall.RTM_DELROUTE": "syscall", - "syscall.RTM_DELRULE": "syscall", - "syscall.RTM_DELTCLASS": "syscall", - "syscall.RTM_DELTFILTER": "syscall", - "syscall.RTM_DESYNC": "syscall", - "syscall.RTM_F_CLONED": "syscall", - "syscall.RTM_F_EQUALIZE": "syscall", - "syscall.RTM_F_NOTIFY": "syscall", - "syscall.RTM_F_PREFIX": "syscall", - "syscall.RTM_GET": "syscall", - "syscall.RTM_GET2": "syscall", - "syscall.RTM_GETACTION": "syscall", - "syscall.RTM_GETADDR": "syscall", - "syscall.RTM_GETADDRLABEL": "syscall", - "syscall.RTM_GETANYCAST": "syscall", - "syscall.RTM_GETDCB": "syscall", - "syscall.RTM_GETLINK": "syscall", - "syscall.RTM_GETMULTICAST": "syscall", - "syscall.RTM_GETNEIGH": "syscall", - "syscall.RTM_GETNEIGHTBL": "syscall", - "syscall.RTM_GETQDISC": "syscall", - "syscall.RTM_GETROUTE": "syscall", - "syscall.RTM_GETRULE": "syscall", - "syscall.RTM_GETTCLASS": "syscall", - "syscall.RTM_GETTFILTER": "syscall", - "syscall.RTM_IEEE80211": "syscall", - "syscall.RTM_IFANNOUNCE": "syscall", - "syscall.RTM_IFINFO": "syscall", - "syscall.RTM_IFINFO2": "syscall", - "syscall.RTM_LLINFO_UPD": "syscall", - "syscall.RTM_LOCK": "syscall", - "syscall.RTM_LOSING": "syscall", - "syscall.RTM_MAX": "syscall", - "syscall.RTM_MAXSIZE": "syscall", - "syscall.RTM_MISS": "syscall", - "syscall.RTM_NEWACTION": "syscall", - "syscall.RTM_NEWADDR": "syscall", - "syscall.RTM_NEWADDRLABEL": "syscall", - "syscall.RTM_NEWLINK": "syscall", - "syscall.RTM_NEWMADDR": "syscall", - "syscall.RTM_NEWMADDR2": "syscall", - "syscall.RTM_NEWNDUSEROPT": "syscall", - "syscall.RTM_NEWNEIGH": "syscall", - "syscall.RTM_NEWNEIGHTBL": "syscall", - "syscall.RTM_NEWPREFIX": "syscall", - "syscall.RTM_NEWQDISC": "syscall", - "syscall.RTM_NEWROUTE": "syscall", - "syscall.RTM_NEWRULE": "syscall", - "syscall.RTM_NEWTCLASS": "syscall", - "syscall.RTM_NEWTFILTER": "syscall", - "syscall.RTM_NR_FAMILIES": "syscall", - "syscall.RTM_NR_MSGTYPES": "syscall", - "syscall.RTM_OIFINFO": "syscall", - "syscall.RTM_OLDADD": "syscall", - "syscall.RTM_OLDDEL": "syscall", - "syscall.RTM_OOIFINFO": "syscall", - "syscall.RTM_REDIRECT": "syscall", - "syscall.RTM_RESOLVE": "syscall", - "syscall.RTM_RTTUNIT": "syscall", - "syscall.RTM_SETDCB": "syscall", - "syscall.RTM_SETGATE": "syscall", - "syscall.RTM_SETLINK": "syscall", - "syscall.RTM_SETNEIGHTBL": "syscall", - "syscall.RTM_VERSION": "syscall", - "syscall.RTNH_ALIGNTO": "syscall", - "syscall.RTNH_F_DEAD": "syscall", - "syscall.RTNH_F_ONLINK": "syscall", - "syscall.RTNH_F_PERVASIVE": "syscall", - "syscall.RTNLGRP_IPV4_IFADDR": "syscall", - "syscall.RTNLGRP_IPV4_MROUTE": "syscall", - "syscall.RTNLGRP_IPV4_ROUTE": "syscall", - "syscall.RTNLGRP_IPV4_RULE": "syscall", - "syscall.RTNLGRP_IPV6_IFADDR": "syscall", - "syscall.RTNLGRP_IPV6_IFINFO": "syscall", - "syscall.RTNLGRP_IPV6_MROUTE": "syscall", - "syscall.RTNLGRP_IPV6_PREFIX": "syscall", - "syscall.RTNLGRP_IPV6_ROUTE": "syscall", - "syscall.RTNLGRP_IPV6_RULE": "syscall", - "syscall.RTNLGRP_LINK": "syscall", - "syscall.RTNLGRP_ND_USEROPT": "syscall", - "syscall.RTNLGRP_NEIGH": "syscall", - "syscall.RTNLGRP_NONE": "syscall", - "syscall.RTNLGRP_NOTIFY": "syscall", - "syscall.RTNLGRP_TC": "syscall", - "syscall.RTN_ANYCAST": "syscall", - "syscall.RTN_BLACKHOLE": "syscall", - "syscall.RTN_BROADCAST": "syscall", - "syscall.RTN_LOCAL": "syscall", - "syscall.RTN_MAX": "syscall", - "syscall.RTN_MULTICAST": "syscall", - "syscall.RTN_NAT": "syscall", - "syscall.RTN_PROHIBIT": "syscall", - "syscall.RTN_THROW": "syscall", - "syscall.RTN_UNICAST": "syscall", - "syscall.RTN_UNREACHABLE": "syscall", - "syscall.RTN_UNSPEC": "syscall", - "syscall.RTN_XRESOLVE": "syscall", - "syscall.RTPROT_BIRD": "syscall", - "syscall.RTPROT_BOOT": "syscall", - "syscall.RTPROT_DHCP": "syscall", - "syscall.RTPROT_DNROUTED": "syscall", - "syscall.RTPROT_GATED": "syscall", - "syscall.RTPROT_KERNEL": "syscall", - "syscall.RTPROT_MRT": "syscall", - "syscall.RTPROT_NTK": "syscall", - "syscall.RTPROT_RA": "syscall", - "syscall.RTPROT_REDIRECT": "syscall", - "syscall.RTPROT_STATIC": "syscall", - "syscall.RTPROT_UNSPEC": "syscall", - "syscall.RTPROT_XORP": "syscall", - "syscall.RTPROT_ZEBRA": "syscall", - "syscall.RTV_EXPIRE": "syscall", - "syscall.RTV_HOPCOUNT": "syscall", - "syscall.RTV_MTU": "syscall", - "syscall.RTV_RPIPE": "syscall", - "syscall.RTV_RTT": "syscall", - "syscall.RTV_RTTVAR": "syscall", - "syscall.RTV_SPIPE": "syscall", - "syscall.RTV_SSTHRESH": "syscall", - "syscall.RTV_WEIGHT": "syscall", - "syscall.RT_CACHING_CONTEXT": "syscall", - "syscall.RT_CLASS_DEFAULT": "syscall", - "syscall.RT_CLASS_LOCAL": "syscall", - "syscall.RT_CLASS_MAIN": "syscall", - "syscall.RT_CLASS_MAX": "syscall", - "syscall.RT_CLASS_UNSPEC": "syscall", - "syscall.RT_DEFAULT_FIB": "syscall", - "syscall.RT_NORTREF": "syscall", - "syscall.RT_SCOPE_HOST": "syscall", - "syscall.RT_SCOPE_LINK": "syscall", - "syscall.RT_SCOPE_NOWHERE": "syscall", - "syscall.RT_SCOPE_SITE": "syscall", - "syscall.RT_SCOPE_UNIVERSE": "syscall", - "syscall.RT_TABLEID_MAX": "syscall", - "syscall.RT_TABLE_COMPAT": "syscall", - "syscall.RT_TABLE_DEFAULT": "syscall", - "syscall.RT_TABLE_LOCAL": "syscall", - "syscall.RT_TABLE_MAIN": "syscall", - "syscall.RT_TABLE_MAX": "syscall", - "syscall.RT_TABLE_UNSPEC": "syscall", - "syscall.RUSAGE_CHILDREN": "syscall", - "syscall.RUSAGE_SELF": "syscall", - "syscall.RUSAGE_THREAD": "syscall", - "syscall.Radvisory_t": "syscall", - "syscall.RawConn": "syscall", - "syscall.RawSockaddr": "syscall", - "syscall.RawSockaddrAny": "syscall", - "syscall.RawSockaddrDatalink": "syscall", - "syscall.RawSockaddrInet4": "syscall", - "syscall.RawSockaddrInet6": "syscall", - "syscall.RawSockaddrLinklayer": "syscall", - "syscall.RawSockaddrNetlink": "syscall", - "syscall.RawSockaddrUnix": "syscall", - "syscall.RawSyscall": "syscall", - "syscall.RawSyscall6": "syscall", - "syscall.Read": "syscall", - "syscall.ReadConsole": "syscall", - "syscall.ReadDirectoryChanges": "syscall", - "syscall.ReadDirent": "syscall", - "syscall.ReadFile": "syscall", - "syscall.Readlink": "syscall", - "syscall.Reboot": "syscall", - "syscall.Recvfrom": "syscall", - "syscall.Recvmsg": "syscall", - "syscall.RegCloseKey": "syscall", - "syscall.RegEnumKeyEx": "syscall", - "syscall.RegOpenKeyEx": "syscall", - "syscall.RegQueryInfoKey": "syscall", - "syscall.RegQueryValueEx": "syscall", - "syscall.RemoveDirectory": "syscall", - "syscall.Removexattr": "syscall", - "syscall.Rename": "syscall", - "syscall.Renameat": "syscall", - "syscall.Revoke": "syscall", - "syscall.Rlimit": "syscall", - "syscall.Rmdir": "syscall", - "syscall.RouteMessage": "syscall", - "syscall.RouteRIB": "syscall", - "syscall.RtAttr": "syscall", - "syscall.RtGenmsg": "syscall", - "syscall.RtMetrics": "syscall", - "syscall.RtMsg": "syscall", - "syscall.RtMsghdr": "syscall", - "syscall.RtNexthop": "syscall", - "syscall.Rusage": "syscall", - "syscall.SCM_BINTIME": "syscall", - "syscall.SCM_CREDENTIALS": "syscall", - "syscall.SCM_CREDS": "syscall", - "syscall.SCM_RIGHTS": "syscall", - "syscall.SCM_TIMESTAMP": "syscall", - "syscall.SCM_TIMESTAMPING": "syscall", - "syscall.SCM_TIMESTAMPNS": "syscall", - "syscall.SCM_TIMESTAMP_MONOTONIC": "syscall", - "syscall.SHUT_RD": "syscall", - "syscall.SHUT_RDWR": "syscall", - "syscall.SHUT_WR": "syscall", - "syscall.SID": "syscall", - "syscall.SIDAndAttributes": "syscall", - "syscall.SIGABRT": "syscall", - "syscall.SIGALRM": "syscall", - "syscall.SIGBUS": "syscall", - "syscall.SIGCHLD": "syscall", - "syscall.SIGCLD": "syscall", - "syscall.SIGCONT": "syscall", - "syscall.SIGEMT": "syscall", - "syscall.SIGFPE": "syscall", - "syscall.SIGHUP": "syscall", - "syscall.SIGILL": "syscall", - "syscall.SIGINFO": "syscall", - "syscall.SIGINT": "syscall", - "syscall.SIGIO": "syscall", - "syscall.SIGIOT": "syscall", - "syscall.SIGKILL": "syscall", - "syscall.SIGLIBRT": "syscall", - "syscall.SIGLWP": "syscall", - "syscall.SIGPIPE": "syscall", - "syscall.SIGPOLL": "syscall", - "syscall.SIGPROF": "syscall", - "syscall.SIGPWR": "syscall", - "syscall.SIGQUIT": "syscall", - "syscall.SIGSEGV": "syscall", - "syscall.SIGSTKFLT": "syscall", - "syscall.SIGSTOP": "syscall", - "syscall.SIGSYS": "syscall", - "syscall.SIGTERM": "syscall", - "syscall.SIGTHR": "syscall", - "syscall.SIGTRAP": "syscall", - "syscall.SIGTSTP": "syscall", - "syscall.SIGTTIN": "syscall", - "syscall.SIGTTOU": "syscall", - "syscall.SIGUNUSED": "syscall", - "syscall.SIGURG": "syscall", - "syscall.SIGUSR1": "syscall", - "syscall.SIGUSR2": "syscall", - "syscall.SIGVTALRM": "syscall", - "syscall.SIGWINCH": "syscall", - "syscall.SIGXCPU": "syscall", - "syscall.SIGXFSZ": "syscall", - "syscall.SIOCADDDLCI": "syscall", - "syscall.SIOCADDMULTI": "syscall", - "syscall.SIOCADDRT": "syscall", - "syscall.SIOCAIFADDR": "syscall", - "syscall.SIOCAIFGROUP": "syscall", - "syscall.SIOCALIFADDR": "syscall", - "syscall.SIOCARPIPLL": "syscall", - "syscall.SIOCATMARK": "syscall", - "syscall.SIOCAUTOADDR": "syscall", - "syscall.SIOCAUTONETMASK": "syscall", - "syscall.SIOCBRDGADD": "syscall", - "syscall.SIOCBRDGADDS": "syscall", - "syscall.SIOCBRDGARL": "syscall", - "syscall.SIOCBRDGDADDR": "syscall", - "syscall.SIOCBRDGDEL": "syscall", - "syscall.SIOCBRDGDELS": "syscall", - "syscall.SIOCBRDGFLUSH": "syscall", - "syscall.SIOCBRDGFRL": "syscall", - "syscall.SIOCBRDGGCACHE": "syscall", - "syscall.SIOCBRDGGFD": "syscall", - "syscall.SIOCBRDGGHT": "syscall", - "syscall.SIOCBRDGGIFFLGS": "syscall", - "syscall.SIOCBRDGGMA": "syscall", - "syscall.SIOCBRDGGPARAM": "syscall", - "syscall.SIOCBRDGGPRI": "syscall", - "syscall.SIOCBRDGGRL": "syscall", - "syscall.SIOCBRDGGSIFS": "syscall", - "syscall.SIOCBRDGGTO": "syscall", - "syscall.SIOCBRDGIFS": "syscall", - "syscall.SIOCBRDGRTS": "syscall", - "syscall.SIOCBRDGSADDR": "syscall", - "syscall.SIOCBRDGSCACHE": "syscall", - "syscall.SIOCBRDGSFD": "syscall", - "syscall.SIOCBRDGSHT": "syscall", - "syscall.SIOCBRDGSIFCOST": "syscall", - "syscall.SIOCBRDGSIFFLGS": "syscall", - "syscall.SIOCBRDGSIFPRIO": "syscall", - "syscall.SIOCBRDGSMA": "syscall", - "syscall.SIOCBRDGSPRI": "syscall", - "syscall.SIOCBRDGSPROTO": "syscall", - "syscall.SIOCBRDGSTO": "syscall", - "syscall.SIOCBRDGSTXHC": "syscall", - "syscall.SIOCDARP": "syscall", - "syscall.SIOCDELDLCI": "syscall", - "syscall.SIOCDELMULTI": "syscall", - "syscall.SIOCDELRT": "syscall", - "syscall.SIOCDEVPRIVATE": "syscall", - "syscall.SIOCDIFADDR": "syscall", - "syscall.SIOCDIFGROUP": "syscall", - "syscall.SIOCDIFPHYADDR": "syscall", - "syscall.SIOCDLIFADDR": "syscall", - "syscall.SIOCDRARP": "syscall", - "syscall.SIOCGARP": "syscall", - "syscall.SIOCGDRVSPEC": "syscall", - "syscall.SIOCGETKALIVE": "syscall", - "syscall.SIOCGETLABEL": "syscall", - "syscall.SIOCGETPFLOW": "syscall", - "syscall.SIOCGETPFSYNC": "syscall", - "syscall.SIOCGETSGCNT": "syscall", - "syscall.SIOCGETVIFCNT": "syscall", - "syscall.SIOCGETVLAN": "syscall", - "syscall.SIOCGHIWAT": "syscall", - "syscall.SIOCGIFADDR": "syscall", - "syscall.SIOCGIFADDRPREF": "syscall", - "syscall.SIOCGIFALIAS": "syscall", - "syscall.SIOCGIFALTMTU": "syscall", - "syscall.SIOCGIFASYNCMAP": "syscall", - "syscall.SIOCGIFBOND": "syscall", - "syscall.SIOCGIFBR": "syscall", - "syscall.SIOCGIFBRDADDR": "syscall", - "syscall.SIOCGIFCAP": "syscall", - "syscall.SIOCGIFCONF": "syscall", - "syscall.SIOCGIFCOUNT": "syscall", - "syscall.SIOCGIFDATA": "syscall", - "syscall.SIOCGIFDESCR": "syscall", - "syscall.SIOCGIFDEVMTU": "syscall", - "syscall.SIOCGIFDLT": "syscall", - "syscall.SIOCGIFDSTADDR": "syscall", - "syscall.SIOCGIFENCAP": "syscall", - "syscall.SIOCGIFFIB": "syscall", - "syscall.SIOCGIFFLAGS": "syscall", - "syscall.SIOCGIFGATTR": "syscall", - "syscall.SIOCGIFGENERIC": "syscall", - "syscall.SIOCGIFGMEMB": "syscall", - "syscall.SIOCGIFGROUP": "syscall", - "syscall.SIOCGIFHARDMTU": "syscall", - "syscall.SIOCGIFHWADDR": "syscall", - "syscall.SIOCGIFINDEX": "syscall", - "syscall.SIOCGIFKPI": "syscall", - "syscall.SIOCGIFMAC": "syscall", - "syscall.SIOCGIFMAP": "syscall", - "syscall.SIOCGIFMEDIA": "syscall", - "syscall.SIOCGIFMEM": "syscall", - "syscall.SIOCGIFMETRIC": "syscall", - "syscall.SIOCGIFMTU": "syscall", - "syscall.SIOCGIFNAME": "syscall", - "syscall.SIOCGIFNETMASK": "syscall", - "syscall.SIOCGIFPDSTADDR": "syscall", - "syscall.SIOCGIFPFLAGS": "syscall", - "syscall.SIOCGIFPHYS": "syscall", - "syscall.SIOCGIFPRIORITY": "syscall", - "syscall.SIOCGIFPSRCADDR": "syscall", - "syscall.SIOCGIFRDOMAIN": "syscall", - "syscall.SIOCGIFRTLABEL": "syscall", - "syscall.SIOCGIFSLAVE": "syscall", - "syscall.SIOCGIFSTATUS": "syscall", - "syscall.SIOCGIFTIMESLOT": "syscall", - "syscall.SIOCGIFTXQLEN": "syscall", - "syscall.SIOCGIFVLAN": "syscall", - "syscall.SIOCGIFWAKEFLAGS": "syscall", - "syscall.SIOCGIFXFLAGS": "syscall", - "syscall.SIOCGLIFADDR": "syscall", - "syscall.SIOCGLIFPHYADDR": "syscall", - "syscall.SIOCGLIFPHYRTABLE": "syscall", - "syscall.SIOCGLIFPHYTTL": "syscall", - "syscall.SIOCGLINKSTR": "syscall", - "syscall.SIOCGLOWAT": "syscall", - "syscall.SIOCGPGRP": "syscall", - "syscall.SIOCGPRIVATE_0": "syscall", - "syscall.SIOCGPRIVATE_1": "syscall", - "syscall.SIOCGRARP": "syscall", - "syscall.SIOCGSPPPPARAMS": "syscall", - "syscall.SIOCGSTAMP": "syscall", - "syscall.SIOCGSTAMPNS": "syscall", - "syscall.SIOCGVH": "syscall", - "syscall.SIOCGVNETID": "syscall", - "syscall.SIOCIFCREATE": "syscall", - "syscall.SIOCIFCREATE2": "syscall", - "syscall.SIOCIFDESTROY": "syscall", - "syscall.SIOCIFGCLONERS": "syscall", - "syscall.SIOCINITIFADDR": "syscall", - "syscall.SIOCPROTOPRIVATE": "syscall", - "syscall.SIOCRSLVMULTI": "syscall", - "syscall.SIOCRTMSG": "syscall", - "syscall.SIOCSARP": "syscall", - "syscall.SIOCSDRVSPEC": "syscall", - "syscall.SIOCSETKALIVE": "syscall", - "syscall.SIOCSETLABEL": "syscall", - "syscall.SIOCSETPFLOW": "syscall", - "syscall.SIOCSETPFSYNC": "syscall", - "syscall.SIOCSETVLAN": "syscall", - "syscall.SIOCSHIWAT": "syscall", - "syscall.SIOCSIFADDR": "syscall", - "syscall.SIOCSIFADDRPREF": "syscall", - "syscall.SIOCSIFALTMTU": "syscall", - "syscall.SIOCSIFASYNCMAP": "syscall", - "syscall.SIOCSIFBOND": "syscall", - "syscall.SIOCSIFBR": "syscall", - "syscall.SIOCSIFBRDADDR": "syscall", - "syscall.SIOCSIFCAP": "syscall", - "syscall.SIOCSIFDESCR": "syscall", - "syscall.SIOCSIFDSTADDR": "syscall", - "syscall.SIOCSIFENCAP": "syscall", - "syscall.SIOCSIFFIB": "syscall", - "syscall.SIOCSIFFLAGS": "syscall", - "syscall.SIOCSIFGATTR": "syscall", - "syscall.SIOCSIFGENERIC": "syscall", - "syscall.SIOCSIFHWADDR": "syscall", - "syscall.SIOCSIFHWBROADCAST": "syscall", - "syscall.SIOCSIFKPI": "syscall", - "syscall.SIOCSIFLINK": "syscall", - "syscall.SIOCSIFLLADDR": "syscall", - "syscall.SIOCSIFMAC": "syscall", - "syscall.SIOCSIFMAP": "syscall", - "syscall.SIOCSIFMEDIA": "syscall", - "syscall.SIOCSIFMEM": "syscall", - "syscall.SIOCSIFMETRIC": "syscall", - "syscall.SIOCSIFMTU": "syscall", - "syscall.SIOCSIFNAME": "syscall", - "syscall.SIOCSIFNETMASK": "syscall", - "syscall.SIOCSIFPFLAGS": "syscall", - "syscall.SIOCSIFPHYADDR": "syscall", - "syscall.SIOCSIFPHYS": "syscall", - "syscall.SIOCSIFPRIORITY": "syscall", - "syscall.SIOCSIFRDOMAIN": "syscall", - "syscall.SIOCSIFRTLABEL": "syscall", - "syscall.SIOCSIFRVNET": "syscall", - "syscall.SIOCSIFSLAVE": "syscall", - "syscall.SIOCSIFTIMESLOT": "syscall", - "syscall.SIOCSIFTXQLEN": "syscall", - "syscall.SIOCSIFVLAN": "syscall", - "syscall.SIOCSIFVNET": "syscall", - "syscall.SIOCSIFXFLAGS": "syscall", - "syscall.SIOCSLIFPHYADDR": "syscall", - "syscall.SIOCSLIFPHYRTABLE": "syscall", - "syscall.SIOCSLIFPHYTTL": "syscall", - "syscall.SIOCSLINKSTR": "syscall", - "syscall.SIOCSLOWAT": "syscall", - "syscall.SIOCSPGRP": "syscall", - "syscall.SIOCSRARP": "syscall", - "syscall.SIOCSSPPPPARAMS": "syscall", - "syscall.SIOCSVH": "syscall", - "syscall.SIOCSVNETID": "syscall", - "syscall.SIOCZIFDATA": "syscall", - "syscall.SIO_GET_EXTENSION_FUNCTION_POINTER": "syscall", - "syscall.SIO_GET_INTERFACE_LIST": "syscall", - "syscall.SIO_KEEPALIVE_VALS": "syscall", - "syscall.SIO_UDP_CONNRESET": "syscall", - "syscall.SOCK_CLOEXEC": "syscall", - "syscall.SOCK_DCCP": "syscall", - "syscall.SOCK_DGRAM": "syscall", - "syscall.SOCK_FLAGS_MASK": "syscall", - "syscall.SOCK_MAXADDRLEN": "syscall", - "syscall.SOCK_NONBLOCK": "syscall", - "syscall.SOCK_NOSIGPIPE": "syscall", - "syscall.SOCK_PACKET": "syscall", - "syscall.SOCK_RAW": "syscall", - "syscall.SOCK_RDM": "syscall", - "syscall.SOCK_SEQPACKET": "syscall", - "syscall.SOCK_STREAM": "syscall", - "syscall.SOL_AAL": "syscall", - "syscall.SOL_ATM": "syscall", - "syscall.SOL_DECNET": "syscall", - "syscall.SOL_ICMPV6": "syscall", - "syscall.SOL_IP": "syscall", - "syscall.SOL_IPV6": "syscall", - "syscall.SOL_IRDA": "syscall", - "syscall.SOL_PACKET": "syscall", - "syscall.SOL_RAW": "syscall", - "syscall.SOL_SOCKET": "syscall", - "syscall.SOL_TCP": "syscall", - "syscall.SOL_X25": "syscall", - "syscall.SOMAXCONN": "syscall", - "syscall.SO_ACCEPTCONN": "syscall", - "syscall.SO_ACCEPTFILTER": "syscall", - "syscall.SO_ATTACH_FILTER": "syscall", - "syscall.SO_BINDANY": "syscall", - "syscall.SO_BINDTODEVICE": "syscall", - "syscall.SO_BINTIME": "syscall", - "syscall.SO_BROADCAST": "syscall", - "syscall.SO_BSDCOMPAT": "syscall", - "syscall.SO_DEBUG": "syscall", - "syscall.SO_DETACH_FILTER": "syscall", - "syscall.SO_DOMAIN": "syscall", - "syscall.SO_DONTROUTE": "syscall", - "syscall.SO_DONTTRUNC": "syscall", - "syscall.SO_ERROR": "syscall", - "syscall.SO_KEEPALIVE": "syscall", - "syscall.SO_LABEL": "syscall", - "syscall.SO_LINGER": "syscall", - "syscall.SO_LINGER_SEC": "syscall", - "syscall.SO_LISTENINCQLEN": "syscall", - "syscall.SO_LISTENQLEN": "syscall", - "syscall.SO_LISTENQLIMIT": "syscall", - "syscall.SO_MARK": "syscall", - "syscall.SO_NETPROC": "syscall", - "syscall.SO_NKE": "syscall", - "syscall.SO_NOADDRERR": "syscall", - "syscall.SO_NOHEADER": "syscall", - "syscall.SO_NOSIGPIPE": "syscall", - "syscall.SO_NOTIFYCONFLICT": "syscall", - "syscall.SO_NO_CHECK": "syscall", - "syscall.SO_NO_DDP": "syscall", - "syscall.SO_NO_OFFLOAD": "syscall", - "syscall.SO_NP_EXTENSIONS": "syscall", - "syscall.SO_NREAD": "syscall", - "syscall.SO_NWRITE": "syscall", - "syscall.SO_OOBINLINE": "syscall", - "syscall.SO_OVERFLOWED": "syscall", - "syscall.SO_PASSCRED": "syscall", - "syscall.SO_PASSSEC": "syscall", - "syscall.SO_PEERCRED": "syscall", - "syscall.SO_PEERLABEL": "syscall", - "syscall.SO_PEERNAME": "syscall", - "syscall.SO_PEERSEC": "syscall", - "syscall.SO_PRIORITY": "syscall", - "syscall.SO_PROTOCOL": "syscall", - "syscall.SO_PROTOTYPE": "syscall", - "syscall.SO_RANDOMPORT": "syscall", - "syscall.SO_RCVBUF": "syscall", - "syscall.SO_RCVBUFFORCE": "syscall", - "syscall.SO_RCVLOWAT": "syscall", - "syscall.SO_RCVTIMEO": "syscall", - "syscall.SO_RESTRICTIONS": "syscall", - "syscall.SO_RESTRICT_DENYIN": "syscall", - "syscall.SO_RESTRICT_DENYOUT": "syscall", - "syscall.SO_RESTRICT_DENYSET": "syscall", - "syscall.SO_REUSEADDR": "syscall", - "syscall.SO_REUSEPORT": "syscall", - "syscall.SO_REUSESHAREUID": "syscall", - "syscall.SO_RTABLE": "syscall", - "syscall.SO_RXQ_OVFL": "syscall", - "syscall.SO_SECURITY_AUTHENTICATION": "syscall", - "syscall.SO_SECURITY_ENCRYPTION_NETWORK": "syscall", - "syscall.SO_SECURITY_ENCRYPTION_TRANSPORT": "syscall", - "syscall.SO_SETFIB": "syscall", - "syscall.SO_SNDBUF": "syscall", - "syscall.SO_SNDBUFFORCE": "syscall", - "syscall.SO_SNDLOWAT": "syscall", - "syscall.SO_SNDTIMEO": "syscall", - "syscall.SO_SPLICE": "syscall", - "syscall.SO_TIMESTAMP": "syscall", - "syscall.SO_TIMESTAMPING": "syscall", - "syscall.SO_TIMESTAMPNS": "syscall", - "syscall.SO_TIMESTAMP_MONOTONIC": "syscall", - "syscall.SO_TYPE": "syscall", - "syscall.SO_UPCALLCLOSEWAIT": "syscall", - "syscall.SO_UPDATE_ACCEPT_CONTEXT": "syscall", - "syscall.SO_UPDATE_CONNECT_CONTEXT": "syscall", - "syscall.SO_USELOOPBACK": "syscall", - "syscall.SO_USER_COOKIE": "syscall", - "syscall.SO_VENDOR": "syscall", - "syscall.SO_WANTMORE": "syscall", - "syscall.SO_WANTOOBFLAG": "syscall", - "syscall.SSLExtraCertChainPolicyPara": "syscall", - "syscall.STANDARD_RIGHTS_ALL": "syscall", - "syscall.STANDARD_RIGHTS_EXECUTE": "syscall", - "syscall.STANDARD_RIGHTS_READ": "syscall", - "syscall.STANDARD_RIGHTS_REQUIRED": "syscall", - "syscall.STANDARD_RIGHTS_WRITE": "syscall", - "syscall.STARTF_USESHOWWINDOW": "syscall", - "syscall.STARTF_USESTDHANDLES": "syscall", - "syscall.STD_ERROR_HANDLE": "syscall", - "syscall.STD_INPUT_HANDLE": "syscall", - "syscall.STD_OUTPUT_HANDLE": "syscall", - "syscall.SUBLANG_ENGLISH_US": "syscall", - "syscall.SW_FORCEMINIMIZE": "syscall", - "syscall.SW_HIDE": "syscall", - "syscall.SW_MAXIMIZE": "syscall", - "syscall.SW_MINIMIZE": "syscall", - "syscall.SW_NORMAL": "syscall", - "syscall.SW_RESTORE": "syscall", - "syscall.SW_SHOW": "syscall", - "syscall.SW_SHOWDEFAULT": "syscall", - "syscall.SW_SHOWMAXIMIZED": "syscall", - "syscall.SW_SHOWMINIMIZED": "syscall", - "syscall.SW_SHOWMINNOACTIVE": "syscall", - "syscall.SW_SHOWNA": "syscall", - "syscall.SW_SHOWNOACTIVATE": "syscall", - "syscall.SW_SHOWNORMAL": "syscall", - "syscall.SYMBOLIC_LINK_FLAG_DIRECTORY": "syscall", - "syscall.SYNCHRONIZE": "syscall", - "syscall.SYSCTL_VERSION": "syscall", - "syscall.SYSCTL_VERS_0": "syscall", - "syscall.SYSCTL_VERS_1": "syscall", - "syscall.SYSCTL_VERS_MASK": "syscall", - "syscall.SYS_ABORT2": "syscall", - "syscall.SYS_ACCEPT": "syscall", - "syscall.SYS_ACCEPT4": "syscall", - "syscall.SYS_ACCEPT_NOCANCEL": "syscall", - "syscall.SYS_ACCESS": "syscall", - "syscall.SYS_ACCESS_EXTENDED": "syscall", - "syscall.SYS_ACCT": "syscall", - "syscall.SYS_ADD_KEY": "syscall", - "syscall.SYS_ADD_PROFIL": "syscall", - "syscall.SYS_ADJFREQ": "syscall", - "syscall.SYS_ADJTIME": "syscall", - "syscall.SYS_ADJTIMEX": "syscall", - "syscall.SYS_AFS_SYSCALL": "syscall", - "syscall.SYS_AIO_CANCEL": "syscall", - "syscall.SYS_AIO_ERROR": "syscall", - "syscall.SYS_AIO_FSYNC": "syscall", - "syscall.SYS_AIO_READ": "syscall", - "syscall.SYS_AIO_RETURN": "syscall", - "syscall.SYS_AIO_SUSPEND": "syscall", - "syscall.SYS_AIO_SUSPEND_NOCANCEL": "syscall", - "syscall.SYS_AIO_WRITE": "syscall", - "syscall.SYS_ALARM": "syscall", - "syscall.SYS_ARCH_PRCTL": "syscall", - "syscall.SYS_ARM_FADVISE64_64": "syscall", - "syscall.SYS_ARM_SYNC_FILE_RANGE": "syscall", - "syscall.SYS_ATGETMSG": "syscall", - "syscall.SYS_ATPGETREQ": "syscall", - "syscall.SYS_ATPGETRSP": "syscall", - "syscall.SYS_ATPSNDREQ": "syscall", - "syscall.SYS_ATPSNDRSP": "syscall", - "syscall.SYS_ATPUTMSG": "syscall", - "syscall.SYS_ATSOCKET": "syscall", - "syscall.SYS_AUDIT": "syscall", - "syscall.SYS_AUDITCTL": "syscall", - "syscall.SYS_AUDITON": "syscall", - "syscall.SYS_AUDIT_SESSION_JOIN": "syscall", - "syscall.SYS_AUDIT_SESSION_PORT": "syscall", - "syscall.SYS_AUDIT_SESSION_SELF": "syscall", - "syscall.SYS_BDFLUSH": "syscall", - "syscall.SYS_BIND": "syscall", - "syscall.SYS_BINDAT": "syscall", - "syscall.SYS_BREAK": "syscall", - "syscall.SYS_BRK": "syscall", - "syscall.SYS_BSDTHREAD_CREATE": "syscall", - "syscall.SYS_BSDTHREAD_REGISTER": "syscall", - "syscall.SYS_BSDTHREAD_TERMINATE": "syscall", - "syscall.SYS_CAPGET": "syscall", - "syscall.SYS_CAPSET": "syscall", - "syscall.SYS_CAP_ENTER": "syscall", - "syscall.SYS_CAP_FCNTLS_GET": "syscall", - "syscall.SYS_CAP_FCNTLS_LIMIT": "syscall", - "syscall.SYS_CAP_GETMODE": "syscall", - "syscall.SYS_CAP_GETRIGHTS": "syscall", - "syscall.SYS_CAP_IOCTLS_GET": "syscall", - "syscall.SYS_CAP_IOCTLS_LIMIT": "syscall", - "syscall.SYS_CAP_NEW": "syscall", - "syscall.SYS_CAP_RIGHTS_GET": "syscall", - "syscall.SYS_CAP_RIGHTS_LIMIT": "syscall", - "syscall.SYS_CHDIR": "syscall", - "syscall.SYS_CHFLAGS": "syscall", - "syscall.SYS_CHFLAGSAT": "syscall", - "syscall.SYS_CHMOD": "syscall", - "syscall.SYS_CHMOD_EXTENDED": "syscall", - "syscall.SYS_CHOWN": "syscall", - "syscall.SYS_CHOWN32": "syscall", - "syscall.SYS_CHROOT": "syscall", - "syscall.SYS_CHUD": "syscall", - "syscall.SYS_CLOCK_ADJTIME": "syscall", - "syscall.SYS_CLOCK_GETCPUCLOCKID2": "syscall", - "syscall.SYS_CLOCK_GETRES": "syscall", - "syscall.SYS_CLOCK_GETTIME": "syscall", - "syscall.SYS_CLOCK_NANOSLEEP": "syscall", - "syscall.SYS_CLOCK_SETTIME": "syscall", - "syscall.SYS_CLONE": "syscall", - "syscall.SYS_CLOSE": "syscall", - "syscall.SYS_CLOSEFROM": "syscall", - "syscall.SYS_CLOSE_NOCANCEL": "syscall", - "syscall.SYS_CONNECT": "syscall", - "syscall.SYS_CONNECTAT": "syscall", - "syscall.SYS_CONNECT_NOCANCEL": "syscall", - "syscall.SYS_COPYFILE": "syscall", - "syscall.SYS_CPUSET": "syscall", - "syscall.SYS_CPUSET_GETAFFINITY": "syscall", - "syscall.SYS_CPUSET_GETID": "syscall", - "syscall.SYS_CPUSET_SETAFFINITY": "syscall", - "syscall.SYS_CPUSET_SETID": "syscall", - "syscall.SYS_CREAT": "syscall", - "syscall.SYS_CREATE_MODULE": "syscall", - "syscall.SYS_CSOPS": "syscall", - "syscall.SYS_DELETE": "syscall", - "syscall.SYS_DELETE_MODULE": "syscall", - "syscall.SYS_DUP": "syscall", - "syscall.SYS_DUP2": "syscall", - "syscall.SYS_DUP3": "syscall", - "syscall.SYS_EACCESS": "syscall", - "syscall.SYS_EPOLL_CREATE": "syscall", - "syscall.SYS_EPOLL_CREATE1": "syscall", - "syscall.SYS_EPOLL_CTL": "syscall", - "syscall.SYS_EPOLL_CTL_OLD": "syscall", - "syscall.SYS_EPOLL_PWAIT": "syscall", - "syscall.SYS_EPOLL_WAIT": "syscall", - "syscall.SYS_EPOLL_WAIT_OLD": "syscall", - "syscall.SYS_EVENTFD": "syscall", - "syscall.SYS_EVENTFD2": "syscall", - "syscall.SYS_EXCHANGEDATA": "syscall", - "syscall.SYS_EXECVE": "syscall", - "syscall.SYS_EXIT": "syscall", - "syscall.SYS_EXIT_GROUP": "syscall", - "syscall.SYS_EXTATTRCTL": "syscall", - "syscall.SYS_EXTATTR_DELETE_FD": "syscall", - "syscall.SYS_EXTATTR_DELETE_FILE": "syscall", - "syscall.SYS_EXTATTR_DELETE_LINK": "syscall", - "syscall.SYS_EXTATTR_GET_FD": "syscall", - "syscall.SYS_EXTATTR_GET_FILE": "syscall", - "syscall.SYS_EXTATTR_GET_LINK": "syscall", - "syscall.SYS_EXTATTR_LIST_FD": "syscall", - "syscall.SYS_EXTATTR_LIST_FILE": "syscall", - "syscall.SYS_EXTATTR_LIST_LINK": "syscall", - "syscall.SYS_EXTATTR_SET_FD": "syscall", - "syscall.SYS_EXTATTR_SET_FILE": "syscall", - "syscall.SYS_EXTATTR_SET_LINK": "syscall", - "syscall.SYS_FACCESSAT": "syscall", - "syscall.SYS_FADVISE64": "syscall", - "syscall.SYS_FADVISE64_64": "syscall", - "syscall.SYS_FALLOCATE": "syscall", - "syscall.SYS_FANOTIFY_INIT": "syscall", - "syscall.SYS_FANOTIFY_MARK": "syscall", - "syscall.SYS_FCHDIR": "syscall", - "syscall.SYS_FCHFLAGS": "syscall", - "syscall.SYS_FCHMOD": "syscall", - "syscall.SYS_FCHMODAT": "syscall", - "syscall.SYS_FCHMOD_EXTENDED": "syscall", - "syscall.SYS_FCHOWN": "syscall", - "syscall.SYS_FCHOWN32": "syscall", - "syscall.SYS_FCHOWNAT": "syscall", - "syscall.SYS_FCHROOT": "syscall", - "syscall.SYS_FCNTL": "syscall", - "syscall.SYS_FCNTL64": "syscall", - "syscall.SYS_FCNTL_NOCANCEL": "syscall", - "syscall.SYS_FDATASYNC": "syscall", - "syscall.SYS_FEXECVE": "syscall", - "syscall.SYS_FFCLOCK_GETCOUNTER": "syscall", - "syscall.SYS_FFCLOCK_GETESTIMATE": "syscall", - "syscall.SYS_FFCLOCK_SETESTIMATE": "syscall", - "syscall.SYS_FFSCTL": "syscall", - "syscall.SYS_FGETATTRLIST": "syscall", - "syscall.SYS_FGETXATTR": "syscall", - "syscall.SYS_FHOPEN": "syscall", - "syscall.SYS_FHSTAT": "syscall", - "syscall.SYS_FHSTATFS": "syscall", - "syscall.SYS_FILEPORT_MAKEFD": "syscall", - "syscall.SYS_FILEPORT_MAKEPORT": "syscall", - "syscall.SYS_FKTRACE": "syscall", - "syscall.SYS_FLISTXATTR": "syscall", - "syscall.SYS_FLOCK": "syscall", - "syscall.SYS_FORK": "syscall", - "syscall.SYS_FPATHCONF": "syscall", - "syscall.SYS_FREEBSD6_FTRUNCATE": "syscall", - "syscall.SYS_FREEBSD6_LSEEK": "syscall", - "syscall.SYS_FREEBSD6_MMAP": "syscall", - "syscall.SYS_FREEBSD6_PREAD": "syscall", - "syscall.SYS_FREEBSD6_PWRITE": "syscall", - "syscall.SYS_FREEBSD6_TRUNCATE": "syscall", - "syscall.SYS_FREMOVEXATTR": "syscall", - "syscall.SYS_FSCTL": "syscall", - "syscall.SYS_FSETATTRLIST": "syscall", - "syscall.SYS_FSETXATTR": "syscall", - "syscall.SYS_FSGETPATH": "syscall", - "syscall.SYS_FSTAT": "syscall", - "syscall.SYS_FSTAT64": "syscall", - "syscall.SYS_FSTAT64_EXTENDED": "syscall", - "syscall.SYS_FSTATAT": "syscall", - "syscall.SYS_FSTATAT64": "syscall", - "syscall.SYS_FSTATFS": "syscall", - "syscall.SYS_FSTATFS64": "syscall", - "syscall.SYS_FSTATV": "syscall", - "syscall.SYS_FSTATVFS1": "syscall", - "syscall.SYS_FSTAT_EXTENDED": "syscall", - "syscall.SYS_FSYNC": "syscall", - "syscall.SYS_FSYNC_NOCANCEL": "syscall", - "syscall.SYS_FSYNC_RANGE": "syscall", - "syscall.SYS_FTIME": "syscall", - "syscall.SYS_FTRUNCATE": "syscall", - "syscall.SYS_FTRUNCATE64": "syscall", - "syscall.SYS_FUTEX": "syscall", - "syscall.SYS_FUTIMENS": "syscall", - "syscall.SYS_FUTIMES": "syscall", - "syscall.SYS_FUTIMESAT": "syscall", - "syscall.SYS_GETATTRLIST": "syscall", - "syscall.SYS_GETAUDIT": "syscall", - "syscall.SYS_GETAUDIT_ADDR": "syscall", - "syscall.SYS_GETAUID": "syscall", - "syscall.SYS_GETCONTEXT": "syscall", - "syscall.SYS_GETCPU": "syscall", - "syscall.SYS_GETCWD": "syscall", - "syscall.SYS_GETDENTS": "syscall", - "syscall.SYS_GETDENTS64": "syscall", - "syscall.SYS_GETDIRENTRIES": "syscall", - "syscall.SYS_GETDIRENTRIES64": "syscall", - "syscall.SYS_GETDIRENTRIESATTR": "syscall", - "syscall.SYS_GETDTABLECOUNT": "syscall", - "syscall.SYS_GETDTABLESIZE": "syscall", - "syscall.SYS_GETEGID": "syscall", - "syscall.SYS_GETEGID32": "syscall", - "syscall.SYS_GETEUID": "syscall", - "syscall.SYS_GETEUID32": "syscall", - "syscall.SYS_GETFH": "syscall", - "syscall.SYS_GETFSSTAT": "syscall", - "syscall.SYS_GETFSSTAT64": "syscall", - "syscall.SYS_GETGID": "syscall", - "syscall.SYS_GETGID32": "syscall", - "syscall.SYS_GETGROUPS": "syscall", - "syscall.SYS_GETGROUPS32": "syscall", - "syscall.SYS_GETHOSTUUID": "syscall", - "syscall.SYS_GETITIMER": "syscall", - "syscall.SYS_GETLCID": "syscall", - "syscall.SYS_GETLOGIN": "syscall", - "syscall.SYS_GETLOGINCLASS": "syscall", - "syscall.SYS_GETPEERNAME": "syscall", - "syscall.SYS_GETPGID": "syscall", - "syscall.SYS_GETPGRP": "syscall", - "syscall.SYS_GETPID": "syscall", - "syscall.SYS_GETPMSG": "syscall", - "syscall.SYS_GETPPID": "syscall", - "syscall.SYS_GETPRIORITY": "syscall", - "syscall.SYS_GETRESGID": "syscall", - "syscall.SYS_GETRESGID32": "syscall", - "syscall.SYS_GETRESUID": "syscall", - "syscall.SYS_GETRESUID32": "syscall", - "syscall.SYS_GETRLIMIT": "syscall", - "syscall.SYS_GETRTABLE": "syscall", - "syscall.SYS_GETRUSAGE": "syscall", - "syscall.SYS_GETSGROUPS": "syscall", - "syscall.SYS_GETSID": "syscall", - "syscall.SYS_GETSOCKNAME": "syscall", - "syscall.SYS_GETSOCKOPT": "syscall", - "syscall.SYS_GETTHRID": "syscall", - "syscall.SYS_GETTID": "syscall", - "syscall.SYS_GETTIMEOFDAY": "syscall", - "syscall.SYS_GETUID": "syscall", - "syscall.SYS_GETUID32": "syscall", - "syscall.SYS_GETVFSSTAT": "syscall", - "syscall.SYS_GETWGROUPS": "syscall", - "syscall.SYS_GETXATTR": "syscall", - "syscall.SYS_GET_KERNEL_SYMS": "syscall", - "syscall.SYS_GET_MEMPOLICY": "syscall", - "syscall.SYS_GET_ROBUST_LIST": "syscall", - "syscall.SYS_GET_THREAD_AREA": "syscall", - "syscall.SYS_GTTY": "syscall", - "syscall.SYS_IDENTITYSVC": "syscall", - "syscall.SYS_IDLE": "syscall", - "syscall.SYS_INITGROUPS": "syscall", - "syscall.SYS_INIT_MODULE": "syscall", - "syscall.SYS_INOTIFY_ADD_WATCH": "syscall", - "syscall.SYS_INOTIFY_INIT": "syscall", - "syscall.SYS_INOTIFY_INIT1": "syscall", - "syscall.SYS_INOTIFY_RM_WATCH": "syscall", - "syscall.SYS_IOCTL": "syscall", - "syscall.SYS_IOPERM": "syscall", - "syscall.SYS_IOPL": "syscall", - "syscall.SYS_IOPOLICYSYS": "syscall", - "syscall.SYS_IOPRIO_GET": "syscall", - "syscall.SYS_IOPRIO_SET": "syscall", - "syscall.SYS_IO_CANCEL": "syscall", - "syscall.SYS_IO_DESTROY": "syscall", - "syscall.SYS_IO_GETEVENTS": "syscall", - "syscall.SYS_IO_SETUP": "syscall", - "syscall.SYS_IO_SUBMIT": "syscall", - "syscall.SYS_IPC": "syscall", - "syscall.SYS_ISSETUGID": "syscall", - "syscall.SYS_JAIL": "syscall", - "syscall.SYS_JAIL_ATTACH": "syscall", - "syscall.SYS_JAIL_GET": "syscall", - "syscall.SYS_JAIL_REMOVE": "syscall", - "syscall.SYS_JAIL_SET": "syscall", - "syscall.SYS_KDEBUG_TRACE": "syscall", - "syscall.SYS_KENV": "syscall", - "syscall.SYS_KEVENT": "syscall", - "syscall.SYS_KEVENT64": "syscall", - "syscall.SYS_KEXEC_LOAD": "syscall", - "syscall.SYS_KEYCTL": "syscall", - "syscall.SYS_KILL": "syscall", - "syscall.SYS_KLDFIND": "syscall", - "syscall.SYS_KLDFIRSTMOD": "syscall", - "syscall.SYS_KLDLOAD": "syscall", - "syscall.SYS_KLDNEXT": "syscall", - "syscall.SYS_KLDSTAT": "syscall", - "syscall.SYS_KLDSYM": "syscall", - "syscall.SYS_KLDUNLOAD": "syscall", - "syscall.SYS_KLDUNLOADF": "syscall", - "syscall.SYS_KQUEUE": "syscall", - "syscall.SYS_KQUEUE1": "syscall", - "syscall.SYS_KTIMER_CREATE": "syscall", - "syscall.SYS_KTIMER_DELETE": "syscall", - "syscall.SYS_KTIMER_GETOVERRUN": "syscall", - "syscall.SYS_KTIMER_GETTIME": "syscall", - "syscall.SYS_KTIMER_SETTIME": "syscall", - "syscall.SYS_KTRACE": "syscall", - "syscall.SYS_LCHFLAGS": "syscall", - "syscall.SYS_LCHMOD": "syscall", - "syscall.SYS_LCHOWN": "syscall", - "syscall.SYS_LCHOWN32": "syscall", - "syscall.SYS_LGETFH": "syscall", - "syscall.SYS_LGETXATTR": "syscall", - "syscall.SYS_LINK": "syscall", - "syscall.SYS_LINKAT": "syscall", - "syscall.SYS_LIO_LISTIO": "syscall", - "syscall.SYS_LISTEN": "syscall", - "syscall.SYS_LISTXATTR": "syscall", - "syscall.SYS_LLISTXATTR": "syscall", - "syscall.SYS_LOCK": "syscall", - "syscall.SYS_LOOKUP_DCOOKIE": "syscall", - "syscall.SYS_LPATHCONF": "syscall", - "syscall.SYS_LREMOVEXATTR": "syscall", - "syscall.SYS_LSEEK": "syscall", - "syscall.SYS_LSETXATTR": "syscall", - "syscall.SYS_LSTAT": "syscall", - "syscall.SYS_LSTAT64": "syscall", - "syscall.SYS_LSTAT64_EXTENDED": "syscall", - "syscall.SYS_LSTATV": "syscall", - "syscall.SYS_LSTAT_EXTENDED": "syscall", - "syscall.SYS_LUTIMES": "syscall", - "syscall.SYS_MAC_SYSCALL": "syscall", - "syscall.SYS_MADVISE": "syscall", - "syscall.SYS_MADVISE1": "syscall", - "syscall.SYS_MAXSYSCALL": "syscall", - "syscall.SYS_MBIND": "syscall", - "syscall.SYS_MIGRATE_PAGES": "syscall", - "syscall.SYS_MINCORE": "syscall", - "syscall.SYS_MINHERIT": "syscall", - "syscall.SYS_MKCOMPLEX": "syscall", - "syscall.SYS_MKDIR": "syscall", - "syscall.SYS_MKDIRAT": "syscall", - "syscall.SYS_MKDIR_EXTENDED": "syscall", - "syscall.SYS_MKFIFO": "syscall", - "syscall.SYS_MKFIFOAT": "syscall", - "syscall.SYS_MKFIFO_EXTENDED": "syscall", - "syscall.SYS_MKNOD": "syscall", - "syscall.SYS_MKNODAT": "syscall", - "syscall.SYS_MLOCK": "syscall", - "syscall.SYS_MLOCKALL": "syscall", - "syscall.SYS_MMAP": "syscall", - "syscall.SYS_MMAP2": "syscall", - "syscall.SYS_MODCTL": "syscall", - "syscall.SYS_MODFIND": "syscall", - "syscall.SYS_MODFNEXT": "syscall", - "syscall.SYS_MODIFY_LDT": "syscall", - "syscall.SYS_MODNEXT": "syscall", - "syscall.SYS_MODSTAT": "syscall", - "syscall.SYS_MODWATCH": "syscall", - "syscall.SYS_MOUNT": "syscall", - "syscall.SYS_MOVE_PAGES": "syscall", - "syscall.SYS_MPROTECT": "syscall", - "syscall.SYS_MPX": "syscall", - "syscall.SYS_MQUERY": "syscall", - "syscall.SYS_MQ_GETSETATTR": "syscall", - "syscall.SYS_MQ_NOTIFY": "syscall", - "syscall.SYS_MQ_OPEN": "syscall", - "syscall.SYS_MQ_TIMEDRECEIVE": "syscall", - "syscall.SYS_MQ_TIMEDSEND": "syscall", - "syscall.SYS_MQ_UNLINK": "syscall", - "syscall.SYS_MREMAP": "syscall", - "syscall.SYS_MSGCTL": "syscall", - "syscall.SYS_MSGGET": "syscall", - "syscall.SYS_MSGRCV": "syscall", - "syscall.SYS_MSGRCV_NOCANCEL": "syscall", - "syscall.SYS_MSGSND": "syscall", - "syscall.SYS_MSGSND_NOCANCEL": "syscall", - "syscall.SYS_MSGSYS": "syscall", - "syscall.SYS_MSYNC": "syscall", - "syscall.SYS_MSYNC_NOCANCEL": "syscall", - "syscall.SYS_MUNLOCK": "syscall", - "syscall.SYS_MUNLOCKALL": "syscall", - "syscall.SYS_MUNMAP": "syscall", - "syscall.SYS_NAME_TO_HANDLE_AT": "syscall", - "syscall.SYS_NANOSLEEP": "syscall", - "syscall.SYS_NEWFSTATAT": "syscall", - "syscall.SYS_NFSCLNT": "syscall", - "syscall.SYS_NFSSERVCTL": "syscall", - "syscall.SYS_NFSSVC": "syscall", - "syscall.SYS_NFSTAT": "syscall", - "syscall.SYS_NICE": "syscall", - "syscall.SYS_NLSTAT": "syscall", - "syscall.SYS_NMOUNT": "syscall", - "syscall.SYS_NSTAT": "syscall", - "syscall.SYS_NTP_ADJTIME": "syscall", - "syscall.SYS_NTP_GETTIME": "syscall", - "syscall.SYS_OABI_SYSCALL_BASE": "syscall", - "syscall.SYS_OBREAK": "syscall", - "syscall.SYS_OLDFSTAT": "syscall", - "syscall.SYS_OLDLSTAT": "syscall", - "syscall.SYS_OLDOLDUNAME": "syscall", - "syscall.SYS_OLDSTAT": "syscall", - "syscall.SYS_OLDUNAME": "syscall", - "syscall.SYS_OPEN": "syscall", - "syscall.SYS_OPENAT": "syscall", - "syscall.SYS_OPENBSD_POLL": "syscall", - "syscall.SYS_OPEN_BY_HANDLE_AT": "syscall", - "syscall.SYS_OPEN_EXTENDED": "syscall", - "syscall.SYS_OPEN_NOCANCEL": "syscall", - "syscall.SYS_OVADVISE": "syscall", - "syscall.SYS_PACCEPT": "syscall", - "syscall.SYS_PATHCONF": "syscall", - "syscall.SYS_PAUSE": "syscall", - "syscall.SYS_PCICONFIG_IOBASE": "syscall", - "syscall.SYS_PCICONFIG_READ": "syscall", - "syscall.SYS_PCICONFIG_WRITE": "syscall", - "syscall.SYS_PDFORK": "syscall", - "syscall.SYS_PDGETPID": "syscall", - "syscall.SYS_PDKILL": "syscall", - "syscall.SYS_PERF_EVENT_OPEN": "syscall", - "syscall.SYS_PERSONALITY": "syscall", - "syscall.SYS_PID_HIBERNATE": "syscall", - "syscall.SYS_PID_RESUME": "syscall", - "syscall.SYS_PID_SHUTDOWN_SOCKETS": "syscall", - "syscall.SYS_PID_SUSPEND": "syscall", - "syscall.SYS_PIPE": "syscall", - "syscall.SYS_PIPE2": "syscall", - "syscall.SYS_PIVOT_ROOT": "syscall", - "syscall.SYS_PMC_CONTROL": "syscall", - "syscall.SYS_PMC_GET_INFO": "syscall", - "syscall.SYS_POLL": "syscall", - "syscall.SYS_POLLTS": "syscall", - "syscall.SYS_POLL_NOCANCEL": "syscall", - "syscall.SYS_POSIX_FADVISE": "syscall", - "syscall.SYS_POSIX_FALLOCATE": "syscall", - "syscall.SYS_POSIX_OPENPT": "syscall", - "syscall.SYS_POSIX_SPAWN": "syscall", - "syscall.SYS_PPOLL": "syscall", - "syscall.SYS_PRCTL": "syscall", - "syscall.SYS_PREAD": "syscall", - "syscall.SYS_PREAD64": "syscall", - "syscall.SYS_PREADV": "syscall", - "syscall.SYS_PREAD_NOCANCEL": "syscall", - "syscall.SYS_PRLIMIT64": "syscall", - "syscall.SYS_PROCCTL": "syscall", - "syscall.SYS_PROCESS_POLICY": "syscall", - "syscall.SYS_PROCESS_VM_READV": "syscall", - "syscall.SYS_PROCESS_VM_WRITEV": "syscall", - "syscall.SYS_PROC_INFO": "syscall", - "syscall.SYS_PROF": "syscall", - "syscall.SYS_PROFIL": "syscall", - "syscall.SYS_PSELECT": "syscall", - "syscall.SYS_PSELECT6": "syscall", - "syscall.SYS_PSET_ASSIGN": "syscall", - "syscall.SYS_PSET_CREATE": "syscall", - "syscall.SYS_PSET_DESTROY": "syscall", - "syscall.SYS_PSYNCH_CVBROAD": "syscall", - "syscall.SYS_PSYNCH_CVCLRPREPOST": "syscall", - "syscall.SYS_PSYNCH_CVSIGNAL": "syscall", - "syscall.SYS_PSYNCH_CVWAIT": "syscall", - "syscall.SYS_PSYNCH_MUTEXDROP": "syscall", - "syscall.SYS_PSYNCH_MUTEXWAIT": "syscall", - "syscall.SYS_PSYNCH_RW_DOWNGRADE": "syscall", - "syscall.SYS_PSYNCH_RW_LONGRDLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_RDLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_UNLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_UNLOCK2": "syscall", - "syscall.SYS_PSYNCH_RW_UPGRADE": "syscall", - "syscall.SYS_PSYNCH_RW_WRLOCK": "syscall", - "syscall.SYS_PSYNCH_RW_YIELDWRLOCK": "syscall", - "syscall.SYS_PTRACE": "syscall", - "syscall.SYS_PUTPMSG": "syscall", - "syscall.SYS_PWRITE": "syscall", - "syscall.SYS_PWRITE64": "syscall", - "syscall.SYS_PWRITEV": "syscall", - "syscall.SYS_PWRITE_NOCANCEL": "syscall", - "syscall.SYS_QUERY_MODULE": "syscall", - "syscall.SYS_QUOTACTL": "syscall", - "syscall.SYS_RASCTL": "syscall", - "syscall.SYS_RCTL_ADD_RULE": "syscall", - "syscall.SYS_RCTL_GET_LIMITS": "syscall", - "syscall.SYS_RCTL_GET_RACCT": "syscall", - "syscall.SYS_RCTL_GET_RULES": "syscall", - "syscall.SYS_RCTL_REMOVE_RULE": "syscall", - "syscall.SYS_READ": "syscall", - "syscall.SYS_READAHEAD": "syscall", - "syscall.SYS_READDIR": "syscall", - "syscall.SYS_READLINK": "syscall", - "syscall.SYS_READLINKAT": "syscall", - "syscall.SYS_READV": "syscall", - "syscall.SYS_READV_NOCANCEL": "syscall", - "syscall.SYS_READ_NOCANCEL": "syscall", - "syscall.SYS_REBOOT": "syscall", - "syscall.SYS_RECV": "syscall", - "syscall.SYS_RECVFROM": "syscall", - "syscall.SYS_RECVFROM_NOCANCEL": "syscall", - "syscall.SYS_RECVMMSG": "syscall", - "syscall.SYS_RECVMSG": "syscall", - "syscall.SYS_RECVMSG_NOCANCEL": "syscall", - "syscall.SYS_REMAP_FILE_PAGES": "syscall", - "syscall.SYS_REMOVEXATTR": "syscall", - "syscall.SYS_RENAME": "syscall", - "syscall.SYS_RENAMEAT": "syscall", - "syscall.SYS_REQUEST_KEY": "syscall", - "syscall.SYS_RESTART_SYSCALL": "syscall", - "syscall.SYS_REVOKE": "syscall", - "syscall.SYS_RFORK": "syscall", - "syscall.SYS_RMDIR": "syscall", - "syscall.SYS_RTPRIO": "syscall", - "syscall.SYS_RTPRIO_THREAD": "syscall", - "syscall.SYS_RT_SIGACTION": "syscall", - "syscall.SYS_RT_SIGPENDING": "syscall", - "syscall.SYS_RT_SIGPROCMASK": "syscall", - "syscall.SYS_RT_SIGQUEUEINFO": "syscall", - "syscall.SYS_RT_SIGRETURN": "syscall", - "syscall.SYS_RT_SIGSUSPEND": "syscall", - "syscall.SYS_RT_SIGTIMEDWAIT": "syscall", - "syscall.SYS_RT_TGSIGQUEUEINFO": "syscall", - "syscall.SYS_SBRK": "syscall", - "syscall.SYS_SCHED_GETAFFINITY": "syscall", - "syscall.SYS_SCHED_GETPARAM": "syscall", - "syscall.SYS_SCHED_GETSCHEDULER": "syscall", - "syscall.SYS_SCHED_GET_PRIORITY_MAX": "syscall", - "syscall.SYS_SCHED_GET_PRIORITY_MIN": "syscall", - "syscall.SYS_SCHED_RR_GET_INTERVAL": "syscall", - "syscall.SYS_SCHED_SETAFFINITY": "syscall", - "syscall.SYS_SCHED_SETPARAM": "syscall", - "syscall.SYS_SCHED_SETSCHEDULER": "syscall", - "syscall.SYS_SCHED_YIELD": "syscall", - "syscall.SYS_SCTP_GENERIC_RECVMSG": "syscall", - "syscall.SYS_SCTP_GENERIC_SENDMSG": "syscall", - "syscall.SYS_SCTP_GENERIC_SENDMSG_IOV": "syscall", - "syscall.SYS_SCTP_PEELOFF": "syscall", - "syscall.SYS_SEARCHFS": "syscall", - "syscall.SYS_SECURITY": "syscall", - "syscall.SYS_SELECT": "syscall", - "syscall.SYS_SELECT_NOCANCEL": "syscall", - "syscall.SYS_SEMCONFIG": "syscall", - "syscall.SYS_SEMCTL": "syscall", - "syscall.SYS_SEMGET": "syscall", - "syscall.SYS_SEMOP": "syscall", - "syscall.SYS_SEMSYS": "syscall", - "syscall.SYS_SEMTIMEDOP": "syscall", - "syscall.SYS_SEM_CLOSE": "syscall", - "syscall.SYS_SEM_DESTROY": "syscall", - "syscall.SYS_SEM_GETVALUE": "syscall", - "syscall.SYS_SEM_INIT": "syscall", - "syscall.SYS_SEM_OPEN": "syscall", - "syscall.SYS_SEM_POST": "syscall", - "syscall.SYS_SEM_TRYWAIT": "syscall", - "syscall.SYS_SEM_UNLINK": "syscall", - "syscall.SYS_SEM_WAIT": "syscall", - "syscall.SYS_SEM_WAIT_NOCANCEL": "syscall", - "syscall.SYS_SEND": "syscall", - "syscall.SYS_SENDFILE": "syscall", - "syscall.SYS_SENDFILE64": "syscall", - "syscall.SYS_SENDMMSG": "syscall", - "syscall.SYS_SENDMSG": "syscall", - "syscall.SYS_SENDMSG_NOCANCEL": "syscall", - "syscall.SYS_SENDTO": "syscall", - "syscall.SYS_SENDTO_NOCANCEL": "syscall", - "syscall.SYS_SETATTRLIST": "syscall", - "syscall.SYS_SETAUDIT": "syscall", - "syscall.SYS_SETAUDIT_ADDR": "syscall", - "syscall.SYS_SETAUID": "syscall", - "syscall.SYS_SETCONTEXT": "syscall", - "syscall.SYS_SETDOMAINNAME": "syscall", - "syscall.SYS_SETEGID": "syscall", - "syscall.SYS_SETEUID": "syscall", - "syscall.SYS_SETFIB": "syscall", - "syscall.SYS_SETFSGID": "syscall", - "syscall.SYS_SETFSGID32": "syscall", - "syscall.SYS_SETFSUID": "syscall", - "syscall.SYS_SETFSUID32": "syscall", - "syscall.SYS_SETGID": "syscall", - "syscall.SYS_SETGID32": "syscall", - "syscall.SYS_SETGROUPS": "syscall", - "syscall.SYS_SETGROUPS32": "syscall", - "syscall.SYS_SETHOSTNAME": "syscall", - "syscall.SYS_SETITIMER": "syscall", - "syscall.SYS_SETLCID": "syscall", - "syscall.SYS_SETLOGIN": "syscall", - "syscall.SYS_SETLOGINCLASS": "syscall", - "syscall.SYS_SETNS": "syscall", - "syscall.SYS_SETPGID": "syscall", - "syscall.SYS_SETPRIORITY": "syscall", - "syscall.SYS_SETPRIVEXEC": "syscall", - "syscall.SYS_SETREGID": "syscall", - "syscall.SYS_SETREGID32": "syscall", - "syscall.SYS_SETRESGID": "syscall", - "syscall.SYS_SETRESGID32": "syscall", - "syscall.SYS_SETRESUID": "syscall", - "syscall.SYS_SETRESUID32": "syscall", - "syscall.SYS_SETREUID": "syscall", - "syscall.SYS_SETREUID32": "syscall", - "syscall.SYS_SETRLIMIT": "syscall", - "syscall.SYS_SETRTABLE": "syscall", - "syscall.SYS_SETSGROUPS": "syscall", - "syscall.SYS_SETSID": "syscall", - "syscall.SYS_SETSOCKOPT": "syscall", - "syscall.SYS_SETTID": "syscall", - "syscall.SYS_SETTID_WITH_PID": "syscall", - "syscall.SYS_SETTIMEOFDAY": "syscall", - "syscall.SYS_SETUID": "syscall", - "syscall.SYS_SETUID32": "syscall", - "syscall.SYS_SETWGROUPS": "syscall", - "syscall.SYS_SETXATTR": "syscall", - "syscall.SYS_SET_MEMPOLICY": "syscall", - "syscall.SYS_SET_ROBUST_LIST": "syscall", - "syscall.SYS_SET_THREAD_AREA": "syscall", - "syscall.SYS_SET_TID_ADDRESS": "syscall", - "syscall.SYS_SGETMASK": "syscall", - "syscall.SYS_SHARED_REGION_CHECK_NP": "syscall", - "syscall.SYS_SHARED_REGION_MAP_AND_SLIDE_NP": "syscall", - "syscall.SYS_SHMAT": "syscall", - "syscall.SYS_SHMCTL": "syscall", - "syscall.SYS_SHMDT": "syscall", - "syscall.SYS_SHMGET": "syscall", - "syscall.SYS_SHMSYS": "syscall", - "syscall.SYS_SHM_OPEN": "syscall", - "syscall.SYS_SHM_UNLINK": "syscall", - "syscall.SYS_SHUTDOWN": "syscall", - "syscall.SYS_SIGACTION": "syscall", - "syscall.SYS_SIGALTSTACK": "syscall", - "syscall.SYS_SIGNAL": "syscall", - "syscall.SYS_SIGNALFD": "syscall", - "syscall.SYS_SIGNALFD4": "syscall", - "syscall.SYS_SIGPENDING": "syscall", - "syscall.SYS_SIGPROCMASK": "syscall", - "syscall.SYS_SIGQUEUE": "syscall", - "syscall.SYS_SIGQUEUEINFO": "syscall", - "syscall.SYS_SIGRETURN": "syscall", - "syscall.SYS_SIGSUSPEND": "syscall", - "syscall.SYS_SIGSUSPEND_NOCANCEL": "syscall", - "syscall.SYS_SIGTIMEDWAIT": "syscall", - "syscall.SYS_SIGWAIT": "syscall", - "syscall.SYS_SIGWAITINFO": "syscall", - "syscall.SYS_SOCKET": "syscall", - "syscall.SYS_SOCKETCALL": "syscall", - "syscall.SYS_SOCKETPAIR": "syscall", - "syscall.SYS_SPLICE": "syscall", - "syscall.SYS_SSETMASK": "syscall", - "syscall.SYS_SSTK": "syscall", - "syscall.SYS_STACK_SNAPSHOT": "syscall", - "syscall.SYS_STAT": "syscall", - "syscall.SYS_STAT64": "syscall", - "syscall.SYS_STAT64_EXTENDED": "syscall", - "syscall.SYS_STATFS": "syscall", - "syscall.SYS_STATFS64": "syscall", - "syscall.SYS_STATV": "syscall", - "syscall.SYS_STATVFS1": "syscall", - "syscall.SYS_STAT_EXTENDED": "syscall", - "syscall.SYS_STIME": "syscall", - "syscall.SYS_STTY": "syscall", - "syscall.SYS_SWAPCONTEXT": "syscall", - "syscall.SYS_SWAPCTL": "syscall", - "syscall.SYS_SWAPOFF": "syscall", - "syscall.SYS_SWAPON": "syscall", - "syscall.SYS_SYMLINK": "syscall", - "syscall.SYS_SYMLINKAT": "syscall", - "syscall.SYS_SYNC": "syscall", - "syscall.SYS_SYNCFS": "syscall", - "syscall.SYS_SYNC_FILE_RANGE": "syscall", - "syscall.SYS_SYSARCH": "syscall", - "syscall.SYS_SYSCALL": "syscall", - "syscall.SYS_SYSCALL_BASE": "syscall", - "syscall.SYS_SYSFS": "syscall", - "syscall.SYS_SYSINFO": "syscall", - "syscall.SYS_SYSLOG": "syscall", - "syscall.SYS_TEE": "syscall", - "syscall.SYS_TGKILL": "syscall", - "syscall.SYS_THREAD_SELFID": "syscall", - "syscall.SYS_THR_CREATE": "syscall", - "syscall.SYS_THR_EXIT": "syscall", - "syscall.SYS_THR_KILL": "syscall", - "syscall.SYS_THR_KILL2": "syscall", - "syscall.SYS_THR_NEW": "syscall", - "syscall.SYS_THR_SELF": "syscall", - "syscall.SYS_THR_SET_NAME": "syscall", - "syscall.SYS_THR_SUSPEND": "syscall", - "syscall.SYS_THR_WAKE": "syscall", - "syscall.SYS_TIME": "syscall", - "syscall.SYS_TIMERFD_CREATE": "syscall", - "syscall.SYS_TIMERFD_GETTIME": "syscall", - "syscall.SYS_TIMERFD_SETTIME": "syscall", - "syscall.SYS_TIMER_CREATE": "syscall", - "syscall.SYS_TIMER_DELETE": "syscall", - "syscall.SYS_TIMER_GETOVERRUN": "syscall", - "syscall.SYS_TIMER_GETTIME": "syscall", - "syscall.SYS_TIMER_SETTIME": "syscall", - "syscall.SYS_TIMES": "syscall", - "syscall.SYS_TKILL": "syscall", - "syscall.SYS_TRUNCATE": "syscall", - "syscall.SYS_TRUNCATE64": "syscall", - "syscall.SYS_TUXCALL": "syscall", - "syscall.SYS_UGETRLIMIT": "syscall", - "syscall.SYS_ULIMIT": "syscall", - "syscall.SYS_UMASK": "syscall", - "syscall.SYS_UMASK_EXTENDED": "syscall", - "syscall.SYS_UMOUNT": "syscall", - "syscall.SYS_UMOUNT2": "syscall", - "syscall.SYS_UNAME": "syscall", - "syscall.SYS_UNDELETE": "syscall", - "syscall.SYS_UNLINK": "syscall", - "syscall.SYS_UNLINKAT": "syscall", - "syscall.SYS_UNMOUNT": "syscall", - "syscall.SYS_UNSHARE": "syscall", - "syscall.SYS_USELIB": "syscall", - "syscall.SYS_USTAT": "syscall", - "syscall.SYS_UTIME": "syscall", - "syscall.SYS_UTIMENSAT": "syscall", - "syscall.SYS_UTIMES": "syscall", - "syscall.SYS_UTRACE": "syscall", - "syscall.SYS_UUIDGEN": "syscall", - "syscall.SYS_VADVISE": "syscall", - "syscall.SYS_VFORK": "syscall", - "syscall.SYS_VHANGUP": "syscall", - "syscall.SYS_VM86": "syscall", - "syscall.SYS_VM86OLD": "syscall", - "syscall.SYS_VMSPLICE": "syscall", - "syscall.SYS_VM_PRESSURE_MONITOR": "syscall", - "syscall.SYS_VSERVER": "syscall", - "syscall.SYS_WAIT4": "syscall", - "syscall.SYS_WAIT4_NOCANCEL": "syscall", - "syscall.SYS_WAIT6": "syscall", - "syscall.SYS_WAITEVENT": "syscall", - "syscall.SYS_WAITID": "syscall", - "syscall.SYS_WAITID_NOCANCEL": "syscall", - "syscall.SYS_WAITPID": "syscall", - "syscall.SYS_WATCHEVENT": "syscall", - "syscall.SYS_WORKQ_KERNRETURN": "syscall", - "syscall.SYS_WORKQ_OPEN": "syscall", - "syscall.SYS_WRITE": "syscall", - "syscall.SYS_WRITEV": "syscall", - "syscall.SYS_WRITEV_NOCANCEL": "syscall", - "syscall.SYS_WRITE_NOCANCEL": "syscall", - "syscall.SYS_YIELD": "syscall", - "syscall.SYS__LLSEEK": "syscall", - "syscall.SYS__LWP_CONTINUE": "syscall", - "syscall.SYS__LWP_CREATE": "syscall", - "syscall.SYS__LWP_CTL": "syscall", - "syscall.SYS__LWP_DETACH": "syscall", - "syscall.SYS__LWP_EXIT": "syscall", - "syscall.SYS__LWP_GETNAME": "syscall", - "syscall.SYS__LWP_GETPRIVATE": "syscall", - "syscall.SYS__LWP_KILL": "syscall", - "syscall.SYS__LWP_PARK": "syscall", - "syscall.SYS__LWP_SELF": "syscall", - "syscall.SYS__LWP_SETNAME": "syscall", - "syscall.SYS__LWP_SETPRIVATE": "syscall", - "syscall.SYS__LWP_SUSPEND": "syscall", - "syscall.SYS__LWP_UNPARK": "syscall", - "syscall.SYS__LWP_UNPARK_ALL": "syscall", - "syscall.SYS__LWP_WAIT": "syscall", - "syscall.SYS__LWP_WAKEUP": "syscall", - "syscall.SYS__NEWSELECT": "syscall", - "syscall.SYS__PSET_BIND": "syscall", - "syscall.SYS__SCHED_GETAFFINITY": "syscall", - "syscall.SYS__SCHED_GETPARAM": "syscall", - "syscall.SYS__SCHED_SETAFFINITY": "syscall", - "syscall.SYS__SCHED_SETPARAM": "syscall", - "syscall.SYS__SYSCTL": "syscall", - "syscall.SYS__UMTX_LOCK": "syscall", - "syscall.SYS__UMTX_OP": "syscall", - "syscall.SYS__UMTX_UNLOCK": "syscall", - "syscall.SYS___ACL_ACLCHECK_FD": "syscall", - "syscall.SYS___ACL_ACLCHECK_FILE": "syscall", - "syscall.SYS___ACL_ACLCHECK_LINK": "syscall", - "syscall.SYS___ACL_DELETE_FD": "syscall", - "syscall.SYS___ACL_DELETE_FILE": "syscall", - "syscall.SYS___ACL_DELETE_LINK": "syscall", - "syscall.SYS___ACL_GET_FD": "syscall", - "syscall.SYS___ACL_GET_FILE": "syscall", - "syscall.SYS___ACL_GET_LINK": "syscall", - "syscall.SYS___ACL_SET_FD": "syscall", - "syscall.SYS___ACL_SET_FILE": "syscall", - "syscall.SYS___ACL_SET_LINK": "syscall", - "syscall.SYS___CLONE": "syscall", - "syscall.SYS___DISABLE_THREADSIGNAL": "syscall", - "syscall.SYS___GETCWD": "syscall", - "syscall.SYS___GETLOGIN": "syscall", - "syscall.SYS___GET_TCB": "syscall", - "syscall.SYS___MAC_EXECVE": "syscall", - "syscall.SYS___MAC_GETFSSTAT": "syscall", - "syscall.SYS___MAC_GET_FD": "syscall", - "syscall.SYS___MAC_GET_FILE": "syscall", - "syscall.SYS___MAC_GET_LCID": "syscall", - "syscall.SYS___MAC_GET_LCTX": "syscall", - "syscall.SYS___MAC_GET_LINK": "syscall", - "syscall.SYS___MAC_GET_MOUNT": "syscall", - "syscall.SYS___MAC_GET_PID": "syscall", - "syscall.SYS___MAC_GET_PROC": "syscall", - "syscall.SYS___MAC_MOUNT": "syscall", - "syscall.SYS___MAC_SET_FD": "syscall", - "syscall.SYS___MAC_SET_FILE": "syscall", - "syscall.SYS___MAC_SET_LCTX": "syscall", - "syscall.SYS___MAC_SET_LINK": "syscall", - "syscall.SYS___MAC_SET_PROC": "syscall", - "syscall.SYS___MAC_SYSCALL": "syscall", - "syscall.SYS___OLD_SEMWAIT_SIGNAL": "syscall", - "syscall.SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": "syscall", - "syscall.SYS___POSIX_CHOWN": "syscall", - "syscall.SYS___POSIX_FCHOWN": "syscall", - "syscall.SYS___POSIX_LCHOWN": "syscall", - "syscall.SYS___POSIX_RENAME": "syscall", - "syscall.SYS___PTHREAD_CANCELED": "syscall", - "syscall.SYS___PTHREAD_CHDIR": "syscall", - "syscall.SYS___PTHREAD_FCHDIR": "syscall", - "syscall.SYS___PTHREAD_KILL": "syscall", - "syscall.SYS___PTHREAD_MARKCANCEL": "syscall", - "syscall.SYS___PTHREAD_SIGMASK": "syscall", - "syscall.SYS___QUOTACTL": "syscall", - "syscall.SYS___SEMCTL": "syscall", - "syscall.SYS___SEMWAIT_SIGNAL": "syscall", - "syscall.SYS___SEMWAIT_SIGNAL_NOCANCEL": "syscall", - "syscall.SYS___SETLOGIN": "syscall", - "syscall.SYS___SETUGID": "syscall", - "syscall.SYS___SET_TCB": "syscall", - "syscall.SYS___SIGACTION_SIGTRAMP": "syscall", - "syscall.SYS___SIGTIMEDWAIT": "syscall", - "syscall.SYS___SIGWAIT": "syscall", - "syscall.SYS___SIGWAIT_NOCANCEL": "syscall", - "syscall.SYS___SYSCTL": "syscall", - "syscall.SYS___TFORK": "syscall", - "syscall.SYS___THREXIT": "syscall", - "syscall.SYS___THRSIGDIVERT": "syscall", - "syscall.SYS___THRSLEEP": "syscall", - "syscall.SYS___THRWAKEUP": "syscall", - "syscall.S_ARCH1": "syscall", - "syscall.S_ARCH2": "syscall", - "syscall.S_BLKSIZE": "syscall", - "syscall.S_IEXEC": "syscall", - "syscall.S_IFBLK": "syscall", - "syscall.S_IFCHR": "syscall", - "syscall.S_IFDIR": "syscall", - "syscall.S_IFIFO": "syscall", - "syscall.S_IFLNK": "syscall", - "syscall.S_IFMT": "syscall", - "syscall.S_IFREG": "syscall", - "syscall.S_IFSOCK": "syscall", - "syscall.S_IFWHT": "syscall", - "syscall.S_IREAD": "syscall", - "syscall.S_IRGRP": "syscall", - "syscall.S_IROTH": "syscall", - "syscall.S_IRUSR": "syscall", - "syscall.S_IRWXG": "syscall", - "syscall.S_IRWXO": "syscall", - "syscall.S_IRWXU": "syscall", - "syscall.S_ISGID": "syscall", - "syscall.S_ISTXT": "syscall", - "syscall.S_ISUID": "syscall", - "syscall.S_ISVTX": "syscall", - "syscall.S_IWGRP": "syscall", - "syscall.S_IWOTH": "syscall", - "syscall.S_IWRITE": "syscall", - "syscall.S_IWUSR": "syscall", - "syscall.S_IXGRP": "syscall", - "syscall.S_IXOTH": "syscall", - "syscall.S_IXUSR": "syscall", - "syscall.S_LOGIN_SET": "syscall", - "syscall.SecurityAttributes": "syscall", - "syscall.Seek": "syscall", - "syscall.Select": "syscall", - "syscall.Sendfile": "syscall", - "syscall.Sendmsg": "syscall", - "syscall.SendmsgN": "syscall", - "syscall.Sendto": "syscall", - "syscall.Servent": "syscall", - "syscall.SetBpf": "syscall", - "syscall.SetBpfBuflen": "syscall", - "syscall.SetBpfDatalink": "syscall", - "syscall.SetBpfHeadercmpl": "syscall", - "syscall.SetBpfImmediate": "syscall", - "syscall.SetBpfInterface": "syscall", - "syscall.SetBpfPromisc": "syscall", - "syscall.SetBpfTimeout": "syscall", - "syscall.SetCurrentDirectory": "syscall", - "syscall.SetEndOfFile": "syscall", - "syscall.SetEnvironmentVariable": "syscall", - "syscall.SetFileAttributes": "syscall", - "syscall.SetFileCompletionNotificationModes": "syscall", - "syscall.SetFilePointer": "syscall", - "syscall.SetFileTime": "syscall", - "syscall.SetHandleInformation": "syscall", - "syscall.SetKevent": "syscall", - "syscall.SetLsfPromisc": "syscall", - "syscall.SetNonblock": "syscall", - "syscall.Setdomainname": "syscall", - "syscall.Setegid": "syscall", - "syscall.Setenv": "syscall", - "syscall.Seteuid": "syscall", - "syscall.Setfsgid": "syscall", - "syscall.Setfsuid": "syscall", - "syscall.Setgid": "syscall", - "syscall.Setgroups": "syscall", - "syscall.Sethostname": "syscall", - "syscall.Setlogin": "syscall", - "syscall.Setpgid": "syscall", - "syscall.Setpriority": "syscall", - "syscall.Setprivexec": "syscall", - "syscall.Setregid": "syscall", - "syscall.Setresgid": "syscall", - "syscall.Setresuid": "syscall", - "syscall.Setreuid": "syscall", - "syscall.Setrlimit": "syscall", - "syscall.Setsid": "syscall", - "syscall.Setsockopt": "syscall", - "syscall.SetsockoptByte": "syscall", - "syscall.SetsockoptICMPv6Filter": "syscall", - "syscall.SetsockoptIPMreq": "syscall", - "syscall.SetsockoptIPMreqn": "syscall", - "syscall.SetsockoptIPv6Mreq": "syscall", - "syscall.SetsockoptInet4Addr": "syscall", - "syscall.SetsockoptInt": "syscall", - "syscall.SetsockoptLinger": "syscall", - "syscall.SetsockoptString": "syscall", - "syscall.SetsockoptTimeval": "syscall", - "syscall.Settimeofday": "syscall", - "syscall.Setuid": "syscall", - "syscall.Setxattr": "syscall", - "syscall.Shutdown": "syscall", - "syscall.SidTypeAlias": "syscall", - "syscall.SidTypeComputer": "syscall", - "syscall.SidTypeDeletedAccount": "syscall", - "syscall.SidTypeDomain": "syscall", - "syscall.SidTypeGroup": "syscall", - "syscall.SidTypeInvalid": "syscall", - "syscall.SidTypeLabel": "syscall", - "syscall.SidTypeUnknown": "syscall", - "syscall.SidTypeUser": "syscall", - "syscall.SidTypeWellKnownGroup": "syscall", - "syscall.Signal": "syscall", - "syscall.SizeofBpfHdr": "syscall", - "syscall.SizeofBpfInsn": "syscall", - "syscall.SizeofBpfProgram": "syscall", - "syscall.SizeofBpfStat": "syscall", - "syscall.SizeofBpfVersion": "syscall", - "syscall.SizeofBpfZbuf": "syscall", - "syscall.SizeofBpfZbufHeader": "syscall", - "syscall.SizeofCmsghdr": "syscall", - "syscall.SizeofICMPv6Filter": "syscall", - "syscall.SizeofIPMreq": "syscall", - "syscall.SizeofIPMreqn": "syscall", - "syscall.SizeofIPv6MTUInfo": "syscall", - "syscall.SizeofIPv6Mreq": "syscall", - "syscall.SizeofIfAddrmsg": "syscall", - "syscall.SizeofIfAnnounceMsghdr": "syscall", - "syscall.SizeofIfData": "syscall", - "syscall.SizeofIfInfomsg": "syscall", - "syscall.SizeofIfMsghdr": "syscall", - "syscall.SizeofIfaMsghdr": "syscall", - "syscall.SizeofIfmaMsghdr": "syscall", - "syscall.SizeofIfmaMsghdr2": "syscall", - "syscall.SizeofInet4Pktinfo": "syscall", - "syscall.SizeofInet6Pktinfo": "syscall", - "syscall.SizeofInotifyEvent": "syscall", - "syscall.SizeofLinger": "syscall", - "syscall.SizeofMsghdr": "syscall", - "syscall.SizeofNlAttr": "syscall", - "syscall.SizeofNlMsgerr": "syscall", - "syscall.SizeofNlMsghdr": "syscall", - "syscall.SizeofRtAttr": "syscall", - "syscall.SizeofRtGenmsg": "syscall", - "syscall.SizeofRtMetrics": "syscall", - "syscall.SizeofRtMsg": "syscall", - "syscall.SizeofRtMsghdr": "syscall", - "syscall.SizeofRtNexthop": "syscall", - "syscall.SizeofSockFilter": "syscall", - "syscall.SizeofSockFprog": "syscall", - "syscall.SizeofSockaddrAny": "syscall", - "syscall.SizeofSockaddrDatalink": "syscall", - "syscall.SizeofSockaddrInet4": "syscall", - "syscall.SizeofSockaddrInet6": "syscall", - "syscall.SizeofSockaddrLinklayer": "syscall", - "syscall.SizeofSockaddrNetlink": "syscall", - "syscall.SizeofSockaddrUnix": "syscall", - "syscall.SizeofTCPInfo": "syscall", - "syscall.SizeofUcred": "syscall", - "syscall.SlicePtrFromStrings": "syscall", - "syscall.SockFilter": "syscall", - "syscall.SockFprog": "syscall", - "syscall.SockaddrDatalink": "syscall", - "syscall.SockaddrGen": "syscall", - "syscall.SockaddrInet4": "syscall", - "syscall.SockaddrInet6": "syscall", - "syscall.SockaddrLinklayer": "syscall", - "syscall.SockaddrNetlink": "syscall", - "syscall.SockaddrUnix": "syscall", - "syscall.Socket": "syscall", - "syscall.SocketControlMessage": "syscall", - "syscall.SocketDisableIPv6": "syscall", - "syscall.Socketpair": "syscall", - "syscall.Splice": "syscall", - "syscall.StartProcess": "syscall", - "syscall.StartupInfo": "syscall", - "syscall.Stat": "syscall", - "syscall.Stat_t": "syscall", - "syscall.Statfs": "syscall", - "syscall.Statfs_t": "syscall", - "syscall.Stderr": "syscall", - "syscall.Stdin": "syscall", - "syscall.Stdout": "syscall", - "syscall.StringBytePtr": "syscall", - "syscall.StringByteSlice": "syscall", - "syscall.StringSlicePtr": "syscall", - "syscall.StringToSid": "syscall", - "syscall.StringToUTF16": "syscall", - "syscall.StringToUTF16Ptr": "syscall", - "syscall.Symlink": "syscall", - "syscall.Sync": "syscall", - "syscall.SyncFileRange": "syscall", - "syscall.SysProcAttr": "syscall", - "syscall.SysProcIDMap": "syscall", - "syscall.Syscall": "syscall", - "syscall.Syscall12": "syscall", - "syscall.Syscall15": "syscall", - "syscall.Syscall18": "syscall", - "syscall.Syscall6": "syscall", - "syscall.Syscall9": "syscall", - "syscall.Sysctl": "syscall", - "syscall.SysctlUint32": "syscall", - "syscall.Sysctlnode": "syscall", - "syscall.Sysinfo": "syscall", - "syscall.Sysinfo_t": "syscall", - "syscall.Systemtime": "syscall", - "syscall.TCGETS": "syscall", - "syscall.TCIFLUSH": "syscall", - "syscall.TCIOFLUSH": "syscall", - "syscall.TCOFLUSH": "syscall", - "syscall.TCPInfo": "syscall", - "syscall.TCPKeepalive": "syscall", - "syscall.TCP_CA_NAME_MAX": "syscall", - "syscall.TCP_CONGCTL": "syscall", - "syscall.TCP_CONGESTION": "syscall", - "syscall.TCP_CONNECTIONTIMEOUT": "syscall", - "syscall.TCP_CORK": "syscall", - "syscall.TCP_DEFER_ACCEPT": "syscall", - "syscall.TCP_INFO": "syscall", - "syscall.TCP_KEEPALIVE": "syscall", - "syscall.TCP_KEEPCNT": "syscall", - "syscall.TCP_KEEPIDLE": "syscall", - "syscall.TCP_KEEPINIT": "syscall", - "syscall.TCP_KEEPINTVL": "syscall", - "syscall.TCP_LINGER2": "syscall", - "syscall.TCP_MAXBURST": "syscall", - "syscall.TCP_MAXHLEN": "syscall", - "syscall.TCP_MAXOLEN": "syscall", - "syscall.TCP_MAXSEG": "syscall", - "syscall.TCP_MAXWIN": "syscall", - "syscall.TCP_MAX_SACK": "syscall", - "syscall.TCP_MAX_WINSHIFT": "syscall", - "syscall.TCP_MD5SIG": "syscall", - "syscall.TCP_MD5SIG_MAXKEYLEN": "syscall", - "syscall.TCP_MINMSS": "syscall", - "syscall.TCP_MINMSSOVERLOAD": "syscall", - "syscall.TCP_MSS": "syscall", - "syscall.TCP_NODELAY": "syscall", - "syscall.TCP_NOOPT": "syscall", - "syscall.TCP_NOPUSH": "syscall", - "syscall.TCP_NSTATES": "syscall", - "syscall.TCP_QUICKACK": "syscall", - "syscall.TCP_RXT_CONNDROPTIME": "syscall", - "syscall.TCP_RXT_FINDROP": "syscall", - "syscall.TCP_SACK_ENABLE": "syscall", - "syscall.TCP_SYNCNT": "syscall", - "syscall.TCP_VENDOR": "syscall", - "syscall.TCP_WINDOW_CLAMP": "syscall", - "syscall.TCSAFLUSH": "syscall", - "syscall.TCSETS": "syscall", - "syscall.TF_DISCONNECT": "syscall", - "syscall.TF_REUSE_SOCKET": "syscall", - "syscall.TF_USE_DEFAULT_WORKER": "syscall", - "syscall.TF_USE_KERNEL_APC": "syscall", - "syscall.TF_USE_SYSTEM_THREAD": "syscall", - "syscall.TF_WRITE_BEHIND": "syscall", - "syscall.TH32CS_INHERIT": "syscall", - "syscall.TH32CS_SNAPALL": "syscall", - "syscall.TH32CS_SNAPHEAPLIST": "syscall", - "syscall.TH32CS_SNAPMODULE": "syscall", - "syscall.TH32CS_SNAPMODULE32": "syscall", - "syscall.TH32CS_SNAPPROCESS": "syscall", - "syscall.TH32CS_SNAPTHREAD": "syscall", - "syscall.TIME_ZONE_ID_DAYLIGHT": "syscall", - "syscall.TIME_ZONE_ID_STANDARD": "syscall", - "syscall.TIME_ZONE_ID_UNKNOWN": "syscall", - "syscall.TIOCCBRK": "syscall", - "syscall.TIOCCDTR": "syscall", - "syscall.TIOCCONS": "syscall", - "syscall.TIOCDCDTIMESTAMP": "syscall", - "syscall.TIOCDRAIN": "syscall", - "syscall.TIOCDSIMICROCODE": "syscall", - "syscall.TIOCEXCL": "syscall", - "syscall.TIOCEXT": "syscall", - "syscall.TIOCFLAG_CDTRCTS": "syscall", - "syscall.TIOCFLAG_CLOCAL": "syscall", - "syscall.TIOCFLAG_CRTSCTS": "syscall", - "syscall.TIOCFLAG_MDMBUF": "syscall", - "syscall.TIOCFLAG_PPS": "syscall", - "syscall.TIOCFLAG_SOFTCAR": "syscall", - "syscall.TIOCFLUSH": "syscall", - "syscall.TIOCGDEV": "syscall", - "syscall.TIOCGDRAINWAIT": "syscall", - "syscall.TIOCGETA": "syscall", - "syscall.TIOCGETD": "syscall", - "syscall.TIOCGFLAGS": "syscall", - "syscall.TIOCGICOUNT": "syscall", - "syscall.TIOCGLCKTRMIOS": "syscall", - "syscall.TIOCGLINED": "syscall", - "syscall.TIOCGPGRP": "syscall", - "syscall.TIOCGPTN": "syscall", - "syscall.TIOCGQSIZE": "syscall", - "syscall.TIOCGRANTPT": "syscall", - "syscall.TIOCGRS485": "syscall", - "syscall.TIOCGSERIAL": "syscall", - "syscall.TIOCGSID": "syscall", - "syscall.TIOCGSIZE": "syscall", - "syscall.TIOCGSOFTCAR": "syscall", - "syscall.TIOCGTSTAMP": "syscall", - "syscall.TIOCGWINSZ": "syscall", - "syscall.TIOCINQ": "syscall", - "syscall.TIOCIXOFF": "syscall", - "syscall.TIOCIXON": "syscall", - "syscall.TIOCLINUX": "syscall", - "syscall.TIOCMBIC": "syscall", - "syscall.TIOCMBIS": "syscall", - "syscall.TIOCMGDTRWAIT": "syscall", - "syscall.TIOCMGET": "syscall", - "syscall.TIOCMIWAIT": "syscall", - "syscall.TIOCMODG": "syscall", - "syscall.TIOCMODS": "syscall", - "syscall.TIOCMSDTRWAIT": "syscall", - "syscall.TIOCMSET": "syscall", - "syscall.TIOCM_CAR": "syscall", - "syscall.TIOCM_CD": "syscall", - "syscall.TIOCM_CTS": "syscall", - "syscall.TIOCM_DCD": "syscall", - "syscall.TIOCM_DSR": "syscall", - "syscall.TIOCM_DTR": "syscall", - "syscall.TIOCM_LE": "syscall", - "syscall.TIOCM_RI": "syscall", - "syscall.TIOCM_RNG": "syscall", - "syscall.TIOCM_RTS": "syscall", - "syscall.TIOCM_SR": "syscall", - "syscall.TIOCM_ST": "syscall", - "syscall.TIOCNOTTY": "syscall", - "syscall.TIOCNXCL": "syscall", - "syscall.TIOCOUTQ": "syscall", - "syscall.TIOCPKT": "syscall", - "syscall.TIOCPKT_DATA": "syscall", - "syscall.TIOCPKT_DOSTOP": "syscall", - "syscall.TIOCPKT_FLUSHREAD": "syscall", - "syscall.TIOCPKT_FLUSHWRITE": "syscall", - "syscall.TIOCPKT_IOCTL": "syscall", - "syscall.TIOCPKT_NOSTOP": "syscall", - "syscall.TIOCPKT_START": "syscall", - "syscall.TIOCPKT_STOP": "syscall", - "syscall.TIOCPTMASTER": "syscall", - "syscall.TIOCPTMGET": "syscall", - "syscall.TIOCPTSNAME": "syscall", - "syscall.TIOCPTYGNAME": "syscall", - "syscall.TIOCPTYGRANT": "syscall", - "syscall.TIOCPTYUNLK": "syscall", - "syscall.TIOCRCVFRAME": "syscall", - "syscall.TIOCREMOTE": "syscall", - "syscall.TIOCSBRK": "syscall", - "syscall.TIOCSCONS": "syscall", - "syscall.TIOCSCTTY": "syscall", - "syscall.TIOCSDRAINWAIT": "syscall", - "syscall.TIOCSDTR": "syscall", - "syscall.TIOCSERCONFIG": "syscall", - "syscall.TIOCSERGETLSR": "syscall", - "syscall.TIOCSERGETMULTI": "syscall", - "syscall.TIOCSERGSTRUCT": "syscall", - "syscall.TIOCSERGWILD": "syscall", - "syscall.TIOCSERSETMULTI": "syscall", - "syscall.TIOCSERSWILD": "syscall", - "syscall.TIOCSER_TEMT": "syscall", - "syscall.TIOCSETA": "syscall", - "syscall.TIOCSETAF": "syscall", - "syscall.TIOCSETAW": "syscall", - "syscall.TIOCSETD": "syscall", - "syscall.TIOCSFLAGS": "syscall", - "syscall.TIOCSIG": "syscall", - "syscall.TIOCSLCKTRMIOS": "syscall", - "syscall.TIOCSLINED": "syscall", - "syscall.TIOCSPGRP": "syscall", - "syscall.TIOCSPTLCK": "syscall", - "syscall.TIOCSQSIZE": "syscall", - "syscall.TIOCSRS485": "syscall", - "syscall.TIOCSSERIAL": "syscall", - "syscall.TIOCSSIZE": "syscall", - "syscall.TIOCSSOFTCAR": "syscall", - "syscall.TIOCSTART": "syscall", - "syscall.TIOCSTAT": "syscall", - "syscall.TIOCSTI": "syscall", - "syscall.TIOCSTOP": "syscall", - "syscall.TIOCSTSTAMP": "syscall", - "syscall.TIOCSWINSZ": "syscall", - "syscall.TIOCTIMESTAMP": "syscall", - "syscall.TIOCUCNTL": "syscall", - "syscall.TIOCVHANGUP": "syscall", - "syscall.TIOCXMTFRAME": "syscall", - "syscall.TOKEN_ADJUST_DEFAULT": "syscall", - "syscall.TOKEN_ADJUST_GROUPS": "syscall", - "syscall.TOKEN_ADJUST_PRIVILEGES": "syscall", - "syscall.TOKEN_ADJUST_SESSIONID": "syscall", - "syscall.TOKEN_ALL_ACCESS": "syscall", - "syscall.TOKEN_ASSIGN_PRIMARY": "syscall", - "syscall.TOKEN_DUPLICATE": "syscall", - "syscall.TOKEN_EXECUTE": "syscall", - "syscall.TOKEN_IMPERSONATE": "syscall", - "syscall.TOKEN_QUERY": "syscall", - "syscall.TOKEN_QUERY_SOURCE": "syscall", - "syscall.TOKEN_READ": "syscall", - "syscall.TOKEN_WRITE": "syscall", - "syscall.TOSTOP": "syscall", - "syscall.TRUNCATE_EXISTING": "syscall", - "syscall.TUNATTACHFILTER": "syscall", - "syscall.TUNDETACHFILTER": "syscall", - "syscall.TUNGETFEATURES": "syscall", - "syscall.TUNGETIFF": "syscall", - "syscall.TUNGETSNDBUF": "syscall", - "syscall.TUNGETVNETHDRSZ": "syscall", - "syscall.TUNSETDEBUG": "syscall", - "syscall.TUNSETGROUP": "syscall", - "syscall.TUNSETIFF": "syscall", - "syscall.TUNSETLINK": "syscall", - "syscall.TUNSETNOCSUM": "syscall", - "syscall.TUNSETOFFLOAD": "syscall", - "syscall.TUNSETOWNER": "syscall", - "syscall.TUNSETPERSIST": "syscall", - "syscall.TUNSETSNDBUF": "syscall", - "syscall.TUNSETTXFILTER": "syscall", - "syscall.TUNSETVNETHDRSZ": "syscall", - "syscall.Tee": "syscall", - "syscall.TerminateProcess": "syscall", - "syscall.Termios": "syscall", - "syscall.Tgkill": "syscall", - "syscall.Time": "syscall", - "syscall.Time_t": "syscall", - "syscall.Times": "syscall", - "syscall.Timespec": "syscall", - "syscall.TimespecToNsec": "syscall", - "syscall.Timeval": "syscall", - "syscall.Timeval32": "syscall", - "syscall.TimevalToNsec": "syscall", - "syscall.Timex": "syscall", - "syscall.Timezoneinformation": "syscall", - "syscall.Tms": "syscall", - "syscall.Token": "syscall", - "syscall.TokenAccessInformation": "syscall", - "syscall.TokenAuditPolicy": "syscall", - "syscall.TokenDefaultDacl": "syscall", - "syscall.TokenElevation": "syscall", - "syscall.TokenElevationType": "syscall", - "syscall.TokenGroups": "syscall", - "syscall.TokenGroupsAndPrivileges": "syscall", - "syscall.TokenHasRestrictions": "syscall", - "syscall.TokenImpersonationLevel": "syscall", - "syscall.TokenIntegrityLevel": "syscall", - "syscall.TokenLinkedToken": "syscall", - "syscall.TokenLogonSid": "syscall", - "syscall.TokenMandatoryPolicy": "syscall", - "syscall.TokenOrigin": "syscall", - "syscall.TokenOwner": "syscall", - "syscall.TokenPrimaryGroup": "syscall", - "syscall.TokenPrivileges": "syscall", - "syscall.TokenRestrictedSids": "syscall", - "syscall.TokenSandBoxInert": "syscall", - "syscall.TokenSessionId": "syscall", - "syscall.TokenSessionReference": "syscall", - "syscall.TokenSource": "syscall", - "syscall.TokenStatistics": "syscall", - "syscall.TokenType": "syscall", - "syscall.TokenUIAccess": "syscall", - "syscall.TokenUser": "syscall", - "syscall.TokenVirtualizationAllowed": "syscall", - "syscall.TokenVirtualizationEnabled": "syscall", - "syscall.Tokenprimarygroup": "syscall", - "syscall.Tokenuser": "syscall", - "syscall.TranslateAccountName": "syscall", - "syscall.TranslateName": "syscall", - "syscall.TransmitFile": "syscall", - "syscall.TransmitFileBuffers": "syscall", - "syscall.Truncate": "syscall", - "syscall.UNIX_PATH_MAX": "syscall", - "syscall.USAGE_MATCH_TYPE_AND": "syscall", - "syscall.USAGE_MATCH_TYPE_OR": "syscall", - "syscall.UTF16FromString": "syscall", - "syscall.UTF16PtrFromString": "syscall", - "syscall.UTF16ToString": "syscall", - "syscall.Ucred": "syscall", - "syscall.Umask": "syscall", - "syscall.Uname": "syscall", - "syscall.Undelete": "syscall", - "syscall.UnixCredentials": "syscall", - "syscall.UnixRights": "syscall", - "syscall.Unlink": "syscall", - "syscall.Unlinkat": "syscall", - "syscall.UnmapViewOfFile": "syscall", - "syscall.Unmount": "syscall", - "syscall.Unsetenv": "syscall", - "syscall.Unshare": "syscall", - "syscall.UserInfo10": "syscall", - "syscall.Ustat": "syscall", - "syscall.Ustat_t": "syscall", - "syscall.Utimbuf": "syscall", - "syscall.Utime": "syscall", - "syscall.Utimes": "syscall", - "syscall.UtimesNano": "syscall", - "syscall.Utsname": "syscall", - "syscall.VDISCARD": "syscall", - "syscall.VDSUSP": "syscall", - "syscall.VEOF": "syscall", - "syscall.VEOL": "syscall", - "syscall.VEOL2": "syscall", - "syscall.VERASE": "syscall", - "syscall.VERASE2": "syscall", - "syscall.VINTR": "syscall", - "syscall.VKILL": "syscall", - "syscall.VLNEXT": "syscall", - "syscall.VMIN": "syscall", - "syscall.VQUIT": "syscall", - "syscall.VREPRINT": "syscall", - "syscall.VSTART": "syscall", - "syscall.VSTATUS": "syscall", - "syscall.VSTOP": "syscall", - "syscall.VSUSP": "syscall", - "syscall.VSWTC": "syscall", - "syscall.VT0": "syscall", - "syscall.VT1": "syscall", - "syscall.VTDLY": "syscall", - "syscall.VTIME": "syscall", - "syscall.VWERASE": "syscall", - "syscall.VirtualLock": "syscall", - "syscall.VirtualUnlock": "syscall", - "syscall.WAIT_ABANDONED": "syscall", - "syscall.WAIT_FAILED": "syscall", - "syscall.WAIT_OBJECT_0": "syscall", - "syscall.WAIT_TIMEOUT": "syscall", - "syscall.WALL": "syscall", - "syscall.WALLSIG": "syscall", - "syscall.WALTSIG": "syscall", - "syscall.WCLONE": "syscall", - "syscall.WCONTINUED": "syscall", - "syscall.WCOREFLAG": "syscall", - "syscall.WEXITED": "syscall", - "syscall.WLINUXCLONE": "syscall", - "syscall.WNOHANG": "syscall", - "syscall.WNOTHREAD": "syscall", - "syscall.WNOWAIT": "syscall", - "syscall.WNOZOMBIE": "syscall", - "syscall.WOPTSCHECKED": "syscall", - "syscall.WORDSIZE": "syscall", - "syscall.WSABuf": "syscall", - "syscall.WSACleanup": "syscall", - "syscall.WSADESCRIPTION_LEN": "syscall", - "syscall.WSAData": "syscall", - "syscall.WSAEACCES": "syscall", - "syscall.WSAECONNABORTED": "syscall", - "syscall.WSAECONNRESET": "syscall", - "syscall.WSAEnumProtocols": "syscall", - "syscall.WSAID_CONNECTEX": "syscall", - "syscall.WSAIoctl": "syscall", - "syscall.WSAPROTOCOL_LEN": "syscall", - "syscall.WSAProtocolChain": "syscall", - "syscall.WSAProtocolInfo": "syscall", - "syscall.WSARecv": "syscall", - "syscall.WSARecvFrom": "syscall", - "syscall.WSASYS_STATUS_LEN": "syscall", - "syscall.WSASend": "syscall", - "syscall.WSASendTo": "syscall", - "syscall.WSASendto": "syscall", - "syscall.WSAStartup": "syscall", - "syscall.WSTOPPED": "syscall", - "syscall.WTRAPPED": "syscall", - "syscall.WUNTRACED": "syscall", - "syscall.Wait4": "syscall", - "syscall.WaitForSingleObject": "syscall", - "syscall.WaitStatus": "syscall", - "syscall.Win32FileAttributeData": "syscall", - "syscall.Win32finddata": "syscall", - "syscall.Write": "syscall", - "syscall.WriteConsole": "syscall", - "syscall.WriteFile": "syscall", - "syscall.X509_ASN_ENCODING": "syscall", - "syscall.XCASE": "syscall", - "syscall.XP1_CONNECTIONLESS": "syscall", - "syscall.XP1_CONNECT_DATA": "syscall", - "syscall.XP1_DISCONNECT_DATA": "syscall", - "syscall.XP1_EXPEDITED_DATA": "syscall", - "syscall.XP1_GRACEFUL_CLOSE": "syscall", - "syscall.XP1_GUARANTEED_DELIVERY": "syscall", - "syscall.XP1_GUARANTEED_ORDER": "syscall", - "syscall.XP1_IFS_HANDLES": "syscall", - "syscall.XP1_MESSAGE_ORIENTED": "syscall", - "syscall.XP1_MULTIPOINT_CONTROL_PLANE": "syscall", - "syscall.XP1_MULTIPOINT_DATA_PLANE": "syscall", - "syscall.XP1_PARTIAL_MESSAGE": "syscall", - "syscall.XP1_PSEUDO_STREAM": "syscall", - "syscall.XP1_QOS_SUPPORTED": "syscall", - "syscall.XP1_SAN_SUPPORT_SDP": "syscall", - "syscall.XP1_SUPPORT_BROADCAST": "syscall", - "syscall.XP1_SUPPORT_MULTIPOINT": "syscall", - "syscall.XP1_UNI_RECV": "syscall", - "syscall.XP1_UNI_SEND": "syscall", - "syslog.Dial": "log/syslog", - "syslog.LOG_ALERT": "log/syslog", - "syslog.LOG_AUTH": "log/syslog", - "syslog.LOG_AUTHPRIV": "log/syslog", - "syslog.LOG_CRIT": "log/syslog", - "syslog.LOG_CRON": "log/syslog", - "syslog.LOG_DAEMON": "log/syslog", - "syslog.LOG_DEBUG": "log/syslog", - "syslog.LOG_EMERG": "log/syslog", - "syslog.LOG_ERR": "log/syslog", - "syslog.LOG_FTP": "log/syslog", - "syslog.LOG_INFO": "log/syslog", - "syslog.LOG_KERN": "log/syslog", - "syslog.LOG_LOCAL0": "log/syslog", - "syslog.LOG_LOCAL1": "log/syslog", - "syslog.LOG_LOCAL2": "log/syslog", - "syslog.LOG_LOCAL3": "log/syslog", - "syslog.LOG_LOCAL4": "log/syslog", - "syslog.LOG_LOCAL5": "log/syslog", - "syslog.LOG_LOCAL6": "log/syslog", - "syslog.LOG_LOCAL7": "log/syslog", - "syslog.LOG_LPR": "log/syslog", - "syslog.LOG_MAIL": "log/syslog", - "syslog.LOG_NEWS": "log/syslog", - "syslog.LOG_NOTICE": "log/syslog", - "syslog.LOG_SYSLOG": "log/syslog", - "syslog.LOG_USER": "log/syslog", - "syslog.LOG_UUCP": "log/syslog", - "syslog.LOG_WARNING": "log/syslog", - "syslog.New": "log/syslog", - "syslog.NewLogger": "log/syslog", - "syslog.Priority": "log/syslog", - "syslog.Writer": "log/syslog", - "tabwriter.AlignRight": "text/tabwriter", - "tabwriter.Debug": "text/tabwriter", - "tabwriter.DiscardEmptyColumns": "text/tabwriter", - "tabwriter.Escape": "text/tabwriter", - "tabwriter.FilterHTML": "text/tabwriter", - "tabwriter.NewWriter": "text/tabwriter", - "tabwriter.StripEscape": "text/tabwriter", - "tabwriter.TabIndent": "text/tabwriter", - "tabwriter.Writer": "text/tabwriter", - "tar.ErrFieldTooLong": "archive/tar", - "tar.ErrHeader": "archive/tar", - "tar.ErrWriteAfterClose": "archive/tar", - "tar.ErrWriteTooLong": "archive/tar", - "tar.FileInfoHeader": "archive/tar", - "tar.Format": "archive/tar", - "tar.FormatGNU": "archive/tar", - "tar.FormatPAX": "archive/tar", - "tar.FormatUSTAR": "archive/tar", - "tar.FormatUnknown": "archive/tar", - "tar.Header": "archive/tar", - "tar.NewReader": "archive/tar", - "tar.NewWriter": "archive/tar", - "tar.Reader": "archive/tar", - "tar.TypeBlock": "archive/tar", - "tar.TypeChar": "archive/tar", - "tar.TypeCont": "archive/tar", - "tar.TypeDir": "archive/tar", - "tar.TypeFifo": "archive/tar", - "tar.TypeGNULongLink": "archive/tar", - "tar.TypeGNULongName": "archive/tar", - "tar.TypeGNUSparse": "archive/tar", - "tar.TypeLink": "archive/tar", - "tar.TypeReg": "archive/tar", - "tar.TypeRegA": "archive/tar", - "tar.TypeSymlink": "archive/tar", - "tar.TypeXGlobalHeader": "archive/tar", - "tar.TypeXHeader": "archive/tar", - "tar.Writer": "archive/tar", - "template.CSS": "html/template", - "template.ErrAmbigContext": "html/template", - "template.ErrBadHTML": "html/template", - "template.ErrBranchEnd": "html/template", - "template.ErrEndContext": "html/template", - "template.ErrNoSuchTemplate": "html/template", - "template.ErrOutputContext": "html/template", - "template.ErrPartialCharset": "html/template", - "template.ErrPartialEscape": "html/template", - "template.ErrPredefinedEscaper": "html/template", - "template.ErrRangeLoopReentry": "html/template", - "template.ErrSlashAmbig": "html/template", - "template.Error": "html/template", - "template.ErrorCode": "html/template", - "template.ExecError": "text/template", - // "template.FuncMap" is ambiguous - "template.HTML": "html/template", - "template.HTMLAttr": "html/template", - // "template.HTMLEscape" is ambiguous - // "template.HTMLEscapeString" is ambiguous - // "template.HTMLEscaper" is ambiguous - // "template.IsTrue" is ambiguous - "template.JS": "html/template", - // "template.JSEscape" is ambiguous - // "template.JSEscapeString" is ambiguous - // "template.JSEscaper" is ambiguous - "template.JSStr": "html/template", - // "template.Must" is ambiguous - // "template.New" is ambiguous - "template.OK": "html/template", - // "template.ParseFiles" is ambiguous - // "template.ParseGlob" is ambiguous - "template.Srcset": "html/template", - // "template.Template" is ambiguous - "template.URL": "html/template", - // "template.URLQueryEscaper" is ambiguous - "testing.AllocsPerRun": "testing", - "testing.B": "testing", - "testing.Benchmark": "testing", - "testing.BenchmarkResult": "testing", - "testing.Cover": "testing", - "testing.CoverBlock": "testing", - "testing.CoverMode": "testing", - "testing.Coverage": "testing", - "testing.Init": "testing", - "testing.InternalBenchmark": "testing", - "testing.InternalExample": "testing", - "testing.InternalTest": "testing", - "testing.M": "testing", - "testing.Main": "testing", - "testing.MainStart": "testing", - "testing.PB": "testing", - "testing.RegisterCover": "testing", - "testing.RunBenchmarks": "testing", - "testing.RunExamples": "testing", - "testing.RunTests": "testing", - "testing.Short": "testing", - "testing.T": "testing", - "testing.Verbose": "testing", - "textproto.CanonicalMIMEHeaderKey": "net/textproto", - "textproto.Conn": "net/textproto", - "textproto.Dial": "net/textproto", - "textproto.Error": "net/textproto", - "textproto.MIMEHeader": "net/textproto", - "textproto.NewConn": "net/textproto", - "textproto.NewReader": "net/textproto", - "textproto.NewWriter": "net/textproto", - "textproto.Pipeline": "net/textproto", - "textproto.ProtocolError": "net/textproto", - "textproto.Reader": "net/textproto", - "textproto.TrimBytes": "net/textproto", - "textproto.TrimString": "net/textproto", - "textproto.Writer": "net/textproto", - "time.ANSIC": "time", - "time.After": "time", - "time.AfterFunc": "time", - "time.April": "time", - "time.August": "time", - "time.Date": "time", - "time.December": "time", - "time.Duration": "time", - "time.February": "time", - "time.FixedZone": "time", - "time.Friday": "time", - "time.Hour": "time", - "time.January": "time", - "time.July": "time", - "time.June": "time", - "time.Kitchen": "time", - "time.LoadLocation": "time", - "time.LoadLocationFromTZData": "time", - "time.Local": "time", - "time.Location": "time", - "time.March": "time", - "time.May": "time", - "time.Microsecond": "time", - "time.Millisecond": "time", - "time.Minute": "time", - "time.Monday": "time", - "time.Month": "time", - "time.Nanosecond": "time", - "time.NewTicker": "time", - "time.NewTimer": "time", - "time.November": "time", - "time.Now": "time", - "time.October": "time", - "time.Parse": "time", - "time.ParseDuration": "time", - "time.ParseError": "time", - "time.ParseInLocation": "time", - "time.RFC1123": "time", - "time.RFC1123Z": "time", - "time.RFC3339": "time", - "time.RFC3339Nano": "time", - "time.RFC822": "time", - "time.RFC822Z": "time", - "time.RFC850": "time", - "time.RubyDate": "time", - "time.Saturday": "time", - "time.Second": "time", - "time.September": "time", - "time.Since": "time", - "time.Sleep": "time", - "time.Stamp": "time", - "time.StampMicro": "time", - "time.StampMilli": "time", - "time.StampNano": "time", - "time.Sunday": "time", - "time.Thursday": "time", - "time.Tick": "time", - "time.Ticker": "time", - "time.Time": "time", - "time.Timer": "time", - "time.Tuesday": "time", - "time.UTC": "time", - "time.Unix": "time", - "time.UnixDate": "time", - "time.Until": "time", - "time.Wednesday": "time", - "time.Weekday": "time", - "tls.Certificate": "crypto/tls", - "tls.CertificateRequestInfo": "crypto/tls", - "tls.CipherSuite": "crypto/tls", - "tls.CipherSuiteName": "crypto/tls", - "tls.CipherSuites": "crypto/tls", - "tls.Client": "crypto/tls", - "tls.ClientAuthType": "crypto/tls", - "tls.ClientHelloInfo": "crypto/tls", - "tls.ClientSessionCache": "crypto/tls", - "tls.ClientSessionState": "crypto/tls", - "tls.Config": "crypto/tls", - "tls.Conn": "crypto/tls", - "tls.ConnectionState": "crypto/tls", - "tls.CurveID": "crypto/tls", - "tls.CurveP256": "crypto/tls", - "tls.CurveP384": "crypto/tls", - "tls.CurveP521": "crypto/tls", - "tls.Dial": "crypto/tls", - "tls.DialWithDialer": "crypto/tls", - "tls.ECDSAWithP256AndSHA256": "crypto/tls", - "tls.ECDSAWithP384AndSHA384": "crypto/tls", - "tls.ECDSAWithP521AndSHA512": "crypto/tls", - "tls.ECDSAWithSHA1": "crypto/tls", - "tls.Ed25519": "crypto/tls", - "tls.InsecureCipherSuites": "crypto/tls", - "tls.Listen": "crypto/tls", - "tls.LoadX509KeyPair": "crypto/tls", - "tls.NewLRUClientSessionCache": "crypto/tls", - "tls.NewListener": "crypto/tls", - "tls.NoClientCert": "crypto/tls", - "tls.PKCS1WithSHA1": "crypto/tls", - "tls.PKCS1WithSHA256": "crypto/tls", - "tls.PKCS1WithSHA384": "crypto/tls", - "tls.PKCS1WithSHA512": "crypto/tls", - "tls.PSSWithSHA256": "crypto/tls", - "tls.PSSWithSHA384": "crypto/tls", - "tls.PSSWithSHA512": "crypto/tls", - "tls.RecordHeaderError": "crypto/tls", - "tls.RenegotiateFreelyAsClient": "crypto/tls", - "tls.RenegotiateNever": "crypto/tls", - "tls.RenegotiateOnceAsClient": "crypto/tls", - "tls.RenegotiationSupport": "crypto/tls", - "tls.RequestClientCert": "crypto/tls", - "tls.RequireAndVerifyClientCert": "crypto/tls", - "tls.RequireAnyClientCert": "crypto/tls", - "tls.Server": "crypto/tls", - "tls.SignatureScheme": "crypto/tls", - "tls.TLS_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_CHACHA20_POLY1305_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": "crypto/tls", - "tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": "crypto/tls", - "tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.TLS_FALLBACK_SCSV": "crypto/tls", - "tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_CBC_SHA256": "crypto/tls", - "tls.TLS_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls", - "tls.TLS_RSA_WITH_AES_256_CBC_SHA": "crypto/tls", - "tls.TLS_RSA_WITH_AES_256_GCM_SHA384": "crypto/tls", - "tls.TLS_RSA_WITH_RC4_128_SHA": "crypto/tls", - "tls.VerifyClientCertIfGiven": "crypto/tls", - "tls.VersionSSL30": "crypto/tls", - "tls.VersionTLS10": "crypto/tls", - "tls.VersionTLS11": "crypto/tls", - "tls.VersionTLS12": "crypto/tls", - "tls.VersionTLS13": "crypto/tls", - "tls.X25519": "crypto/tls", - "tls.X509KeyPair": "crypto/tls", - "token.ADD": "go/token", - "token.ADD_ASSIGN": "go/token", - "token.AND": "go/token", - "token.AND_ASSIGN": "go/token", - "token.AND_NOT": "go/token", - "token.AND_NOT_ASSIGN": "go/token", - "token.ARROW": "go/token", - "token.ASSIGN": "go/token", - "token.BREAK": "go/token", - "token.CASE": "go/token", - "token.CHAN": "go/token", - "token.CHAR": "go/token", - "token.COLON": "go/token", - "token.COMMA": "go/token", - "token.COMMENT": "go/token", - "token.CONST": "go/token", - "token.CONTINUE": "go/token", - "token.DEC": "go/token", - "token.DEFAULT": "go/token", - "token.DEFER": "go/token", - "token.DEFINE": "go/token", - "token.ELLIPSIS": "go/token", - "token.ELSE": "go/token", - "token.EOF": "go/token", - "token.EQL": "go/token", - "token.FALLTHROUGH": "go/token", - "token.FLOAT": "go/token", - "token.FOR": "go/token", - "token.FUNC": "go/token", - "token.File": "go/token", - "token.FileSet": "go/token", - "token.GEQ": "go/token", - "token.GO": "go/token", - "token.GOTO": "go/token", - "token.GTR": "go/token", - "token.HighestPrec": "go/token", - "token.IDENT": "go/token", - "token.IF": "go/token", - "token.ILLEGAL": "go/token", - "token.IMAG": "go/token", - "token.IMPORT": "go/token", - "token.INC": "go/token", - "token.INT": "go/token", - "token.INTERFACE": "go/token", - "token.IsExported": "go/token", - "token.IsIdentifier": "go/token", - "token.IsKeyword": "go/token", - "token.LAND": "go/token", - "token.LBRACE": "go/token", - "token.LBRACK": "go/token", - "token.LEQ": "go/token", - "token.LOR": "go/token", - "token.LPAREN": "go/token", - "token.LSS": "go/token", - "token.Lookup": "go/token", - "token.LowestPrec": "go/token", - "token.MAP": "go/token", - "token.MUL": "go/token", - "token.MUL_ASSIGN": "go/token", - "token.NEQ": "go/token", - "token.NOT": "go/token", - "token.NewFileSet": "go/token", - "token.NoPos": "go/token", - "token.OR": "go/token", - "token.OR_ASSIGN": "go/token", - "token.PACKAGE": "go/token", - "token.PERIOD": "go/token", - "token.Pos": "go/token", - "token.Position": "go/token", - "token.QUO": "go/token", - "token.QUO_ASSIGN": "go/token", - "token.RANGE": "go/token", - "token.RBRACE": "go/token", - "token.RBRACK": "go/token", - "token.REM": "go/token", - "token.REM_ASSIGN": "go/token", - "token.RETURN": "go/token", - "token.RPAREN": "go/token", - "token.SELECT": "go/token", - "token.SEMICOLON": "go/token", - "token.SHL": "go/token", - "token.SHL_ASSIGN": "go/token", - "token.SHR": "go/token", - "token.SHR_ASSIGN": "go/token", - "token.STRING": "go/token", - "token.STRUCT": "go/token", - "token.SUB": "go/token", - "token.SUB_ASSIGN": "go/token", - "token.SWITCH": "go/token", - "token.TYPE": "go/token", - "token.Token": "go/token", - "token.UnaryPrec": "go/token", - "token.VAR": "go/token", - "token.XOR": "go/token", - "token.XOR_ASSIGN": "go/token", - "trace.IsEnabled": "runtime/trace", - "trace.Log": "runtime/trace", - "trace.Logf": "runtime/trace", - "trace.NewTask": "runtime/trace", - "trace.Region": "runtime/trace", - "trace.Start": "runtime/trace", - "trace.StartRegion": "runtime/trace", - "trace.Stop": "runtime/trace", - "trace.Task": "runtime/trace", - "trace.WithRegion": "runtime/trace", - "types.Array": "go/types", - "types.AssertableTo": "go/types", - "types.AssignableTo": "go/types", - "types.Basic": "go/types", - "types.BasicInfo": "go/types", - "types.BasicKind": "go/types", - "types.Bool": "go/types", - "types.Builtin": "go/types", - "types.Byte": "go/types", - "types.Chan": "go/types", - "types.ChanDir": "go/types", - "types.CheckExpr": "go/types", - "types.Checker": "go/types", - "types.Comparable": "go/types", - "types.Complex128": "go/types", - "types.Complex64": "go/types", - "types.Config": "go/types", - "types.Const": "go/types", - "types.ConvertibleTo": "go/types", - "types.DefPredeclaredTestFuncs": "go/types", - "types.Default": "go/types", - "types.Error": "go/types", - "types.Eval": "go/types", - "types.ExprString": "go/types", - "types.FieldVal": "go/types", - "types.Float32": "go/types", - "types.Float64": "go/types", - "types.Func": "go/types", - "types.Id": "go/types", - "types.Identical": "go/types", - "types.IdenticalIgnoreTags": "go/types", - "types.Implements": "go/types", - "types.ImportMode": "go/types", - "types.Importer": "go/types", - "types.ImporterFrom": "go/types", - "types.Info": "go/types", - "types.Initializer": "go/types", - "types.Int": "go/types", - "types.Int16": "go/types", - "types.Int32": "go/types", - "types.Int64": "go/types", - "types.Int8": "go/types", - "types.Interface": "go/types", - "types.Invalid": "go/types", - "types.IsBoolean": "go/types", - "types.IsComplex": "go/types", - "types.IsConstType": "go/types", - "types.IsFloat": "go/types", - "types.IsInteger": "go/types", - "types.IsInterface": "go/types", - "types.IsNumeric": "go/types", - "types.IsOrdered": "go/types", - "types.IsString": "go/types", - "types.IsUnsigned": "go/types", - "types.IsUntyped": "go/types", - "types.Label": "go/types", - "types.LookupFieldOrMethod": "go/types", - "types.Map": "go/types", - "types.MethodExpr": "go/types", - "types.MethodSet": "go/types", - "types.MethodVal": "go/types", - "types.MissingMethod": "go/types", - "types.Named": "go/types", - "types.NewArray": "go/types", - "types.NewChan": "go/types", - "types.NewChecker": "go/types", - "types.NewConst": "go/types", - "types.NewField": "go/types", - "types.NewFunc": "go/types", - "types.NewInterface": "go/types", - "types.NewInterfaceType": "go/types", - "types.NewLabel": "go/types", - "types.NewMap": "go/types", - "types.NewMethodSet": "go/types", - "types.NewNamed": "go/types", - "types.NewPackage": "go/types", - "types.NewParam": "go/types", - "types.NewPkgName": "go/types", - "types.NewPointer": "go/types", - "types.NewScope": "go/types", - "types.NewSignature": "go/types", - "types.NewSlice": "go/types", - "types.NewStruct": "go/types", - "types.NewTuple": "go/types", - "types.NewTypeName": "go/types", - "types.NewVar": "go/types", - "types.Nil": "go/types", - "types.ObjectString": "go/types", - "types.Package": "go/types", - "types.PkgName": "go/types", - "types.Pointer": "go/types", - "types.Qualifier": "go/types", - "types.RecvOnly": "go/types", - "types.RelativeTo": "go/types", - "types.Rune": "go/types", - "types.Scope": "go/types", - "types.Selection": "go/types", - "types.SelectionKind": "go/types", - "types.SelectionString": "go/types", - "types.SendOnly": "go/types", - "types.SendRecv": "go/types", - "types.Signature": "go/types", - "types.Sizes": "go/types", - "types.SizesFor": "go/types", - "types.Slice": "go/types", - "types.StdSizes": "go/types", - "types.String": "go/types", - "types.Struct": "go/types", - "types.Tuple": "go/types", - "types.Typ": "go/types", - "types.Type": "go/types", - "types.TypeAndValue": "go/types", - "types.TypeName": "go/types", - "types.TypeString": "go/types", - "types.Uint": "go/types", - "types.Uint16": "go/types", - "types.Uint32": "go/types", - "types.Uint64": "go/types", - "types.Uint8": "go/types", - "types.Uintptr": "go/types", - "types.Universe": "go/types", - "types.Unsafe": "go/types", - "types.UnsafePointer": "go/types", - "types.UntypedBool": "go/types", - "types.UntypedComplex": "go/types", - "types.UntypedFloat": "go/types", - "types.UntypedInt": "go/types", - "types.UntypedNil": "go/types", - "types.UntypedRune": "go/types", - "types.UntypedString": "go/types", - "types.Var": "go/types", - "types.WriteExpr": "go/types", - "types.WriteSignature": "go/types", - "types.WriteType": "go/types", - "unicode.ASCII_Hex_Digit": "unicode", - "unicode.Adlam": "unicode", - "unicode.Ahom": "unicode", - "unicode.Anatolian_Hieroglyphs": "unicode", - "unicode.Arabic": "unicode", - "unicode.Armenian": "unicode", - "unicode.Avestan": "unicode", - "unicode.AzeriCase": "unicode", - "unicode.Balinese": "unicode", - "unicode.Bamum": "unicode", - "unicode.Bassa_Vah": "unicode", - "unicode.Batak": "unicode", - "unicode.Bengali": "unicode", - "unicode.Bhaiksuki": "unicode", - "unicode.Bidi_Control": "unicode", - "unicode.Bopomofo": "unicode", - "unicode.Brahmi": "unicode", - "unicode.Braille": "unicode", - "unicode.Buginese": "unicode", - "unicode.Buhid": "unicode", - "unicode.C": "unicode", - "unicode.Canadian_Aboriginal": "unicode", - "unicode.Carian": "unicode", - "unicode.CaseRange": "unicode", - "unicode.CaseRanges": "unicode", - "unicode.Categories": "unicode", - "unicode.Caucasian_Albanian": "unicode", - "unicode.Cc": "unicode", - "unicode.Cf": "unicode", - "unicode.Chakma": "unicode", - "unicode.Cham": "unicode", - "unicode.Cherokee": "unicode", - "unicode.Co": "unicode", - "unicode.Common": "unicode", - "unicode.Coptic": "unicode", - "unicode.Cs": "unicode", - "unicode.Cuneiform": "unicode", - "unicode.Cypriot": "unicode", - "unicode.Cyrillic": "unicode", - "unicode.Dash": "unicode", - "unicode.Deprecated": "unicode", - "unicode.Deseret": "unicode", - "unicode.Devanagari": "unicode", - "unicode.Diacritic": "unicode", - "unicode.Digit": "unicode", - "unicode.Dogra": "unicode", - "unicode.Duployan": "unicode", - "unicode.Egyptian_Hieroglyphs": "unicode", - "unicode.Elbasan": "unicode", - "unicode.Elymaic": "unicode", - "unicode.Ethiopic": "unicode", - "unicode.Extender": "unicode", - "unicode.FoldCategory": "unicode", - "unicode.FoldScript": "unicode", - "unicode.Georgian": "unicode", - "unicode.Glagolitic": "unicode", - "unicode.Gothic": "unicode", - "unicode.Grantha": "unicode", - "unicode.GraphicRanges": "unicode", - "unicode.Greek": "unicode", - "unicode.Gujarati": "unicode", - "unicode.Gunjala_Gondi": "unicode", - "unicode.Gurmukhi": "unicode", - "unicode.Han": "unicode", - "unicode.Hangul": "unicode", - "unicode.Hanifi_Rohingya": "unicode", - "unicode.Hanunoo": "unicode", - "unicode.Hatran": "unicode", - "unicode.Hebrew": "unicode", - "unicode.Hex_Digit": "unicode", - "unicode.Hiragana": "unicode", - "unicode.Hyphen": "unicode", - "unicode.IDS_Binary_Operator": "unicode", - "unicode.IDS_Trinary_Operator": "unicode", - "unicode.Ideographic": "unicode", - "unicode.Imperial_Aramaic": "unicode", - "unicode.In": "unicode", - "unicode.Inherited": "unicode", - "unicode.Inscriptional_Pahlavi": "unicode", - "unicode.Inscriptional_Parthian": "unicode", - "unicode.Is": "unicode", - "unicode.IsControl": "unicode", - "unicode.IsDigit": "unicode", - "unicode.IsGraphic": "unicode", - "unicode.IsLetter": "unicode", - "unicode.IsLower": "unicode", - "unicode.IsMark": "unicode", - "unicode.IsNumber": "unicode", - "unicode.IsOneOf": "unicode", - "unicode.IsPrint": "unicode", - "unicode.IsPunct": "unicode", - "unicode.IsSpace": "unicode", - "unicode.IsSymbol": "unicode", - "unicode.IsTitle": "unicode", - "unicode.IsUpper": "unicode", - "unicode.Javanese": "unicode", - "unicode.Join_Control": "unicode", - "unicode.Kaithi": "unicode", - "unicode.Kannada": "unicode", - "unicode.Katakana": "unicode", - "unicode.Kayah_Li": "unicode", - "unicode.Kharoshthi": "unicode", - "unicode.Khmer": "unicode", - "unicode.Khojki": "unicode", - "unicode.Khudawadi": "unicode", - "unicode.L": "unicode", - "unicode.Lao": "unicode", - "unicode.Latin": "unicode", - "unicode.Lepcha": "unicode", - "unicode.Letter": "unicode", - "unicode.Limbu": "unicode", - "unicode.Linear_A": "unicode", - "unicode.Linear_B": "unicode", - "unicode.Lisu": "unicode", - "unicode.Ll": "unicode", - "unicode.Lm": "unicode", - "unicode.Lo": "unicode", - "unicode.Logical_Order_Exception": "unicode", - "unicode.Lower": "unicode", - "unicode.LowerCase": "unicode", - "unicode.Lt": "unicode", - "unicode.Lu": "unicode", - "unicode.Lycian": "unicode", - "unicode.Lydian": "unicode", - "unicode.M": "unicode", - "unicode.Mahajani": "unicode", - "unicode.Makasar": "unicode", - "unicode.Malayalam": "unicode", - "unicode.Mandaic": "unicode", - "unicode.Manichaean": "unicode", - "unicode.Marchen": "unicode", - "unicode.Mark": "unicode", - "unicode.Masaram_Gondi": "unicode", - "unicode.MaxASCII": "unicode", - "unicode.MaxCase": "unicode", - "unicode.MaxLatin1": "unicode", - "unicode.MaxRune": "unicode", - "unicode.Mc": "unicode", - "unicode.Me": "unicode", - "unicode.Medefaidrin": "unicode", - "unicode.Meetei_Mayek": "unicode", - "unicode.Mende_Kikakui": "unicode", - "unicode.Meroitic_Cursive": "unicode", - "unicode.Meroitic_Hieroglyphs": "unicode", - "unicode.Miao": "unicode", - "unicode.Mn": "unicode", - "unicode.Modi": "unicode", - "unicode.Mongolian": "unicode", - "unicode.Mro": "unicode", - "unicode.Multani": "unicode", - "unicode.Myanmar": "unicode", - "unicode.N": "unicode", - "unicode.Nabataean": "unicode", - "unicode.Nandinagari": "unicode", - "unicode.Nd": "unicode", - "unicode.New_Tai_Lue": "unicode", - "unicode.Newa": "unicode", - "unicode.Nko": "unicode", - "unicode.Nl": "unicode", - "unicode.No": "unicode", - "unicode.Noncharacter_Code_Point": "unicode", - "unicode.Number": "unicode", - "unicode.Nushu": "unicode", - "unicode.Nyiakeng_Puachue_Hmong": "unicode", - "unicode.Ogham": "unicode", - "unicode.Ol_Chiki": "unicode", - "unicode.Old_Hungarian": "unicode", - "unicode.Old_Italic": "unicode", - "unicode.Old_North_Arabian": "unicode", - "unicode.Old_Permic": "unicode", - "unicode.Old_Persian": "unicode", - "unicode.Old_Sogdian": "unicode", - "unicode.Old_South_Arabian": "unicode", - "unicode.Old_Turkic": "unicode", - "unicode.Oriya": "unicode", - "unicode.Osage": "unicode", - "unicode.Osmanya": "unicode", - "unicode.Other": "unicode", - "unicode.Other_Alphabetic": "unicode", - "unicode.Other_Default_Ignorable_Code_Point": "unicode", - "unicode.Other_Grapheme_Extend": "unicode", - "unicode.Other_ID_Continue": "unicode", - "unicode.Other_ID_Start": "unicode", - "unicode.Other_Lowercase": "unicode", - "unicode.Other_Math": "unicode", - "unicode.Other_Uppercase": "unicode", - "unicode.P": "unicode", - "unicode.Pahawh_Hmong": "unicode", - "unicode.Palmyrene": "unicode", - "unicode.Pattern_Syntax": "unicode", - "unicode.Pattern_White_Space": "unicode", - "unicode.Pau_Cin_Hau": "unicode", - "unicode.Pc": "unicode", - "unicode.Pd": "unicode", - "unicode.Pe": "unicode", - "unicode.Pf": "unicode", - "unicode.Phags_Pa": "unicode", - "unicode.Phoenician": "unicode", - "unicode.Pi": "unicode", - "unicode.Po": "unicode", - "unicode.Prepended_Concatenation_Mark": "unicode", - "unicode.PrintRanges": "unicode", - "unicode.Properties": "unicode", - "unicode.Ps": "unicode", - "unicode.Psalter_Pahlavi": "unicode", - "unicode.Punct": "unicode", - "unicode.Quotation_Mark": "unicode", - "unicode.Radical": "unicode", - "unicode.Range16": "unicode", - "unicode.Range32": "unicode", - "unicode.RangeTable": "unicode", - "unicode.Regional_Indicator": "unicode", - "unicode.Rejang": "unicode", - "unicode.ReplacementChar": "unicode", - "unicode.Runic": "unicode", - "unicode.S": "unicode", - "unicode.STerm": "unicode", - "unicode.Samaritan": "unicode", - "unicode.Saurashtra": "unicode", - "unicode.Sc": "unicode", - "unicode.Scripts": "unicode", - "unicode.Sentence_Terminal": "unicode", - "unicode.Sharada": "unicode", - "unicode.Shavian": "unicode", - "unicode.Siddham": "unicode", - "unicode.SignWriting": "unicode", - "unicode.SimpleFold": "unicode", - "unicode.Sinhala": "unicode", - "unicode.Sk": "unicode", - "unicode.Sm": "unicode", - "unicode.So": "unicode", - "unicode.Soft_Dotted": "unicode", - "unicode.Sogdian": "unicode", - "unicode.Sora_Sompeng": "unicode", - "unicode.Soyombo": "unicode", - "unicode.Space": "unicode", - "unicode.SpecialCase": "unicode", - "unicode.Sundanese": "unicode", - "unicode.Syloti_Nagri": "unicode", - "unicode.Symbol": "unicode", - "unicode.Syriac": "unicode", - "unicode.Tagalog": "unicode", - "unicode.Tagbanwa": "unicode", - "unicode.Tai_Le": "unicode", - "unicode.Tai_Tham": "unicode", - "unicode.Tai_Viet": "unicode", - "unicode.Takri": "unicode", - "unicode.Tamil": "unicode", - "unicode.Tangut": "unicode", - "unicode.Telugu": "unicode", - "unicode.Terminal_Punctuation": "unicode", - "unicode.Thaana": "unicode", - "unicode.Thai": "unicode", - "unicode.Tibetan": "unicode", - "unicode.Tifinagh": "unicode", - "unicode.Tirhuta": "unicode", - "unicode.Title": "unicode", - "unicode.TitleCase": "unicode", - "unicode.To": "unicode", - "unicode.ToLower": "unicode", - "unicode.ToTitle": "unicode", - "unicode.ToUpper": "unicode", - "unicode.TurkishCase": "unicode", - "unicode.Ugaritic": "unicode", - "unicode.Unified_Ideograph": "unicode", - "unicode.Upper": "unicode", - "unicode.UpperCase": "unicode", - "unicode.UpperLower": "unicode", - "unicode.Vai": "unicode", - "unicode.Variation_Selector": "unicode", - "unicode.Version": "unicode", - "unicode.Wancho": "unicode", - "unicode.Warang_Citi": "unicode", - "unicode.White_Space": "unicode", - "unicode.Yi": "unicode", - "unicode.Z": "unicode", - "unicode.Zanabazar_Square": "unicode", - "unicode.Zl": "unicode", - "unicode.Zp": "unicode", - "unicode.Zs": "unicode", - "url.Error": "net/url", - "url.EscapeError": "net/url", - "url.InvalidHostError": "net/url", - "url.Parse": "net/url", - "url.ParseQuery": "net/url", - "url.ParseRequestURI": "net/url", - "url.PathEscape": "net/url", - "url.PathUnescape": "net/url", - "url.QueryEscape": "net/url", - "url.QueryUnescape": "net/url", - "url.URL": "net/url", - "url.User": "net/url", - "url.UserPassword": "net/url", - "url.Userinfo": "net/url", - "url.Values": "net/url", - "user.Current": "os/user", - "user.Group": "os/user", - "user.Lookup": "os/user", - "user.LookupGroup": "os/user", - "user.LookupGroupId": "os/user", - "user.LookupId": "os/user", - "user.UnknownGroupError": "os/user", - "user.UnknownGroupIdError": "os/user", - "user.UnknownUserError": "os/user", - "user.UnknownUserIdError": "os/user", - "user.User": "os/user", - "utf16.Decode": "unicode/utf16", - "utf16.DecodeRune": "unicode/utf16", - "utf16.Encode": "unicode/utf16", - "utf16.EncodeRune": "unicode/utf16", - "utf16.IsSurrogate": "unicode/utf16", - "utf8.DecodeLastRune": "unicode/utf8", - "utf8.DecodeLastRuneInString": "unicode/utf8", - "utf8.DecodeRune": "unicode/utf8", - "utf8.DecodeRuneInString": "unicode/utf8", - "utf8.EncodeRune": "unicode/utf8", - "utf8.FullRune": "unicode/utf8", - "utf8.FullRuneInString": "unicode/utf8", - "utf8.MaxRune": "unicode/utf8", - "utf8.RuneCount": "unicode/utf8", - "utf8.RuneCountInString": "unicode/utf8", - "utf8.RuneError": "unicode/utf8", - "utf8.RuneLen": "unicode/utf8", - "utf8.RuneSelf": "unicode/utf8", - "utf8.RuneStart": "unicode/utf8", - "utf8.UTFMax": "unicode/utf8", - "utf8.Valid": "unicode/utf8", - "utf8.ValidRune": "unicode/utf8", - "utf8.ValidString": "unicode/utf8", - "x509.CANotAuthorizedForExtKeyUsage": "crypto/x509", - "x509.CANotAuthorizedForThisName": "crypto/x509", - "x509.CertPool": "crypto/x509", - "x509.Certificate": "crypto/x509", - "x509.CertificateInvalidError": "crypto/x509", - "x509.CertificateRequest": "crypto/x509", - "x509.ConstraintViolationError": "crypto/x509", - "x509.CreateCertificate": "crypto/x509", - "x509.CreateCertificateRequest": "crypto/x509", - "x509.DSA": "crypto/x509", - "x509.DSAWithSHA1": "crypto/x509", - "x509.DSAWithSHA256": "crypto/x509", - "x509.DecryptPEMBlock": "crypto/x509", - "x509.ECDSA": "crypto/x509", - "x509.ECDSAWithSHA1": "crypto/x509", - "x509.ECDSAWithSHA256": "crypto/x509", - "x509.ECDSAWithSHA384": "crypto/x509", - "x509.ECDSAWithSHA512": "crypto/x509", - "x509.Ed25519": "crypto/x509", - "x509.EncryptPEMBlock": "crypto/x509", - "x509.ErrUnsupportedAlgorithm": "crypto/x509", - "x509.Expired": "crypto/x509", - "x509.ExtKeyUsage": "crypto/x509", - "x509.ExtKeyUsageAny": "crypto/x509", - "x509.ExtKeyUsageClientAuth": "crypto/x509", - "x509.ExtKeyUsageCodeSigning": "crypto/x509", - "x509.ExtKeyUsageEmailProtection": "crypto/x509", - "x509.ExtKeyUsageIPSECEndSystem": "crypto/x509", - "x509.ExtKeyUsageIPSECTunnel": "crypto/x509", - "x509.ExtKeyUsageIPSECUser": "crypto/x509", - "x509.ExtKeyUsageMicrosoftCommercialCodeSigning": "crypto/x509", - "x509.ExtKeyUsageMicrosoftKernelCodeSigning": "crypto/x509", - "x509.ExtKeyUsageMicrosoftServerGatedCrypto": "crypto/x509", - "x509.ExtKeyUsageNetscapeServerGatedCrypto": "crypto/x509", - "x509.ExtKeyUsageOCSPSigning": "crypto/x509", - "x509.ExtKeyUsageServerAuth": "crypto/x509", - "x509.ExtKeyUsageTimeStamping": "crypto/x509", - "x509.HostnameError": "crypto/x509", - "x509.IncompatibleUsage": "crypto/x509", - "x509.IncorrectPasswordError": "crypto/x509", - "x509.InsecureAlgorithmError": "crypto/x509", - "x509.InvalidReason": "crypto/x509", - "x509.IsEncryptedPEMBlock": "crypto/x509", - "x509.KeyUsage": "crypto/x509", - "x509.KeyUsageCRLSign": "crypto/x509", - "x509.KeyUsageCertSign": "crypto/x509", - "x509.KeyUsageContentCommitment": "crypto/x509", - "x509.KeyUsageDataEncipherment": "crypto/x509", - "x509.KeyUsageDecipherOnly": "crypto/x509", - "x509.KeyUsageDigitalSignature": "crypto/x509", - "x509.KeyUsageEncipherOnly": "crypto/x509", - "x509.KeyUsageKeyAgreement": "crypto/x509", - "x509.KeyUsageKeyEncipherment": "crypto/x509", - "x509.MD2WithRSA": "crypto/x509", - "x509.MD5WithRSA": "crypto/x509", - "x509.MarshalECPrivateKey": "crypto/x509", - "x509.MarshalPKCS1PrivateKey": "crypto/x509", - "x509.MarshalPKCS1PublicKey": "crypto/x509", - "x509.MarshalPKCS8PrivateKey": "crypto/x509", - "x509.MarshalPKIXPublicKey": "crypto/x509", - "x509.NameConstraintsWithoutSANs": "crypto/x509", - "x509.NameMismatch": "crypto/x509", - "x509.NewCertPool": "crypto/x509", - "x509.NotAuthorizedToSign": "crypto/x509", - "x509.PEMCipher": "crypto/x509", - "x509.PEMCipher3DES": "crypto/x509", - "x509.PEMCipherAES128": "crypto/x509", - "x509.PEMCipherAES192": "crypto/x509", - "x509.PEMCipherAES256": "crypto/x509", - "x509.PEMCipherDES": "crypto/x509", - "x509.ParseCRL": "crypto/x509", - "x509.ParseCertificate": "crypto/x509", - "x509.ParseCertificateRequest": "crypto/x509", - "x509.ParseCertificates": "crypto/x509", - "x509.ParseDERCRL": "crypto/x509", - "x509.ParseECPrivateKey": "crypto/x509", - "x509.ParsePKCS1PrivateKey": "crypto/x509", - "x509.ParsePKCS1PublicKey": "crypto/x509", - "x509.ParsePKCS8PrivateKey": "crypto/x509", - "x509.ParsePKIXPublicKey": "crypto/x509", - "x509.PublicKeyAlgorithm": "crypto/x509", - "x509.PureEd25519": "crypto/x509", - "x509.RSA": "crypto/x509", - "x509.SHA1WithRSA": "crypto/x509", - "x509.SHA256WithRSA": "crypto/x509", - "x509.SHA256WithRSAPSS": "crypto/x509", - "x509.SHA384WithRSA": "crypto/x509", - "x509.SHA384WithRSAPSS": "crypto/x509", - "x509.SHA512WithRSA": "crypto/x509", - "x509.SHA512WithRSAPSS": "crypto/x509", - "x509.SignatureAlgorithm": "crypto/x509", - "x509.SystemCertPool": "crypto/x509", - "x509.SystemRootsError": "crypto/x509", - "x509.TooManyConstraints": "crypto/x509", - "x509.TooManyIntermediates": "crypto/x509", - "x509.UnconstrainedName": "crypto/x509", - "x509.UnhandledCriticalExtension": "crypto/x509", - "x509.UnknownAuthorityError": "crypto/x509", - "x509.UnknownPublicKeyAlgorithm": "crypto/x509", - "x509.UnknownSignatureAlgorithm": "crypto/x509", - "x509.VerifyOptions": "crypto/x509", - "xml.Attr": "encoding/xml", - "xml.CharData": "encoding/xml", - "xml.Comment": "encoding/xml", - "xml.CopyToken": "encoding/xml", - "xml.Decoder": "encoding/xml", - "xml.Directive": "encoding/xml", - "xml.Encoder": "encoding/xml", - "xml.EndElement": "encoding/xml", - "xml.Escape": "encoding/xml", - "xml.EscapeText": "encoding/xml", - "xml.HTMLAutoClose": "encoding/xml", - "xml.HTMLEntity": "encoding/xml", - "xml.Header": "encoding/xml", - "xml.Marshal": "encoding/xml", - "xml.MarshalIndent": "encoding/xml", - "xml.Marshaler": "encoding/xml", - "xml.MarshalerAttr": "encoding/xml", - "xml.Name": "encoding/xml", - "xml.NewDecoder": "encoding/xml", - "xml.NewEncoder": "encoding/xml", - "xml.NewTokenDecoder": "encoding/xml", - "xml.ProcInst": "encoding/xml", - "xml.StartElement": "encoding/xml", - "xml.SyntaxError": "encoding/xml", - "xml.TagPathError": "encoding/xml", - "xml.Token": "encoding/xml", - "xml.TokenReader": "encoding/xml", - "xml.Unmarshal": "encoding/xml", - "xml.UnmarshalError": "encoding/xml", - "xml.Unmarshaler": "encoding/xml", - "xml.UnmarshalerAttr": "encoding/xml", - "xml.UnsupportedTypeError": "encoding/xml", - "zip.Compressor": "archive/zip", - "zip.Decompressor": "archive/zip", - "zip.Deflate": "archive/zip", - "zip.ErrAlgorithm": "archive/zip", - "zip.ErrChecksum": "archive/zip", - "zip.ErrFormat": "archive/zip", - "zip.File": "archive/zip", - "zip.FileHeader": "archive/zip", - "zip.FileInfoHeader": "archive/zip", - "zip.NewReader": "archive/zip", - "zip.NewWriter": "archive/zip", - "zip.OpenReader": "archive/zip", - "zip.ReadCloser": "archive/zip", - "zip.Reader": "archive/zip", - "zip.RegisterCompressor": "archive/zip", - "zip.RegisterDecompressor": "archive/zip", - "zip.Store": "archive/zip", - "zip.Writer": "archive/zip", - "zlib.BestCompression": "compress/zlib", - "zlib.BestSpeed": "compress/zlib", - "zlib.DefaultCompression": "compress/zlib", - "zlib.ErrChecksum": "compress/zlib", - "zlib.ErrDictionary": "compress/zlib", - "zlib.ErrHeader": "compress/zlib", - "zlib.HuffmanOnly": "compress/zlib", - "zlib.NewReader": "compress/zlib", - "zlib.NewReaderDict": "compress/zlib", - "zlib.NewWriter": "compress/zlib", - "zlib.NewWriterLevel": "compress/zlib", - "zlib.NewWriterLevelDict": "compress/zlib", - "zlib.NoCompression": "compress/zlib", - "zlib.Resetter": "compress/zlib", - "zlib.Writer": "compress/zlib", -} diff --git a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go deleted file mode 100644 index b06d9df0..00000000 --- a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright 2011-2015 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pkgs - -import ( - "encoding/json" - "fmt" - "go/build" - "os" - "path/filepath" - "runtime" - "sort" - "strings" - "sync" - - "github.com/visualfc/gotools/pkg/command" -) - -var Command = &command.Command{ - Run: runPkgs, - UsageLine: "pkgs [-list|-json] [-std]", - Short: "print go package", - Long: `print go package.`, -} - -var ( - pkgsList bool - pkgsJson bool - pkgsSimple bool - pkgsFind string - pkgsStd bool - pkgsPkgOnly bool - pkgsSkipGoroot bool -) - -func init() { - Command.Flag.BoolVar(&pkgsList, "list", false, "list all package") - Command.Flag.BoolVar(&pkgsJson, "json", false, "json format") - Command.Flag.BoolVar(&pkgsSimple, "simple", false, "simple format") - Command.Flag.BoolVar(&pkgsStd, "std", false, "std library") - Command.Flag.BoolVar(&pkgsPkgOnly, "pkg", false, "pkg only") - Command.Flag.BoolVar(&pkgsSkipGoroot, "skip_goroot", false, "skip goroot") - Command.Flag.StringVar(&pkgsFind, "find", "", "find package by name") -} - -func runPkgs(cmd *command.Command, args []string) error { - runtime.GOMAXPROCS(runtime.NumCPU()) - if len(args) != 0 { - cmd.Usage() - return os.ErrInvalid - } - //pkgIndexOnce.Do(loadPkgsList) - var flag LoadFlag - if pkgsStd { - flag = LoadGoroot - } else if pkgsSkipGoroot { - flag = LoadSkipGoroot - } else { - flag = LoadAll - } - var pp PathPkgsIndex - pp.LoadIndex(build.Default, flag) - pp.Sort() - export := func(pkg *build.Package) { - if pkgsJson { - var p GoPackage - p.copyBuild(pkg) - b, err := json.MarshalIndent(&p, "", "\t") - if err == nil { - cmd.Stdout.Write(b) - cmd.Stdout.Write([]byte{'\n'}) - } - } else if pkgsSimple { - cmd.Println(pkg.Name + "::" + pkg.ImportPath + "::" + pkg.Dir) - } else { - cmd.Println(pkg.ImportPath) - } - } - if pkgsList { - for _, pi := range pp.Indexs { - for _, pkg := range pi.Pkgs { - if pkgsPkgOnly && pkg.IsCommand() { - continue - } - export(pkg) - } - } - } else if pkgsFind != "" { - for _, pi := range pp.Indexs { - for _, pkg := range pi.Pkgs { - if pkgsPkgOnly && pkg.IsCommand() { - continue - } - if pkg.Name == pkgsFind { - export(pkg) - break - } - } - } - } - return nil -} - -// A Package describes a single package found in a directory. -type GoPackage struct { - // Note: These fields are part of the go command's public API. - // See list.go. It is okay to add fields, but not to change or - // remove existing ones. Keep in sync with list.go - Dir string `json:",omitempty"` // directory containing package sources - ImportPath string `json:",omitempty"` // import path of package in dir - Name string `json:",omitempty"` // package name - Doc string `json:",omitempty"` // package documentation string - Target string `json:",omitempty"` // install path - Goroot bool `json:",omitempty"` // is this package found in the Go root? - Standard bool `json:",omitempty"` // is this package part of the standard Go library? - Stale bool `json:",omitempty"` // would 'go install' do anything for this package? - Root string `json:",omitempty"` // Go root or Go path dir containing this package - ConflictDir string `json:",omitempty"` // Dir is hidden by this other directory - - // Source files - GoFiles []string `json:",omitempty"` // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) - CgoFiles []string `json:",omitempty"` // .go sources files that import "C" - IgnoredGoFiles []string `json:",omitempty"` // .go sources ignored due to build constraints - CFiles []string `json:",omitempty"` // .c source files - CXXFiles []string `json:",omitempty"` // .cc, .cpp and .cxx source files - MFiles []string `json:",omitempty"` // .m source files - HFiles []string `json:",omitempty"` // .h, .hh, .hpp and .hxx source files - SFiles []string `json:",omitempty"` // .s source files - SwigFiles []string `json:",omitempty"` // .swig files - SwigCXXFiles []string `json:",omitempty"` // .swigcxx files - SysoFiles []string `json:",omitempty"` // .syso system object files added to package - - // Cgo directives - CgoCFLAGS []string `json:",omitempty"` // cgo: flags for C compiler - CgoCPPFLAGS []string `json:",omitempty"` // cgo: flags for C preprocessor - CgoCXXFLAGS []string `json:",omitempty"` // cgo: flags for C++ compiler - CgoLDFLAGS []string `json:",omitempty"` // cgo: flags for linker - CgoPkgConfig []string `json:",omitempty"` // cgo: pkg-config names - - // Dependency information - Imports []string `json:",omitempty"` // import paths used by this package - Deps []string `json:",omitempty"` // all (recursively) imported dependencies - - // Error information - Incomplete bool `json:",omitempty"` // was there an error loading this package or dependencies? - - // Test information - TestGoFiles []string `json:",omitempty"` // _test.go files in package - TestImports []string `json:",omitempty"` // imports from TestGoFiles - XTestGoFiles []string `json:",omitempty"` // _test.go files outside package - XTestImports []string `json:",omitempty"` // imports from XTestGoFiles - - // Unexported fields are not part of the public API. - build *build.Package - pkgdir string // overrides build.PkgDir - // imports []*goapi.Package - // deps []*goapi.Package - gofiles []string // GoFiles+CgoFiles+TestGoFiles+XTestGoFiles files, absolute paths - sfiles []string - allgofiles []string // gofiles + IgnoredGoFiles, absolute paths - target string // installed file for this package (may be executable) - fake bool // synthesized package - forceBuild bool // this package must be rebuilt - forceLibrary bool // this package is a library (even if named "main") - cmdline bool // defined by files listed on command line - local bool // imported via local path (./ or ../) - localPrefix string // interpret ./ and ../ imports relative to this prefix - exeName string // desired name for temporary executable - coverMode string // preprocess Go source files with the coverage tool in this mode - coverVars map[string]*CoverVar // variables created by coverage analysis - omitDWARF bool // tell linker not to write DWARF information -} - -// CoverVar holds the name of the generated coverage variables targeting the named file. -type CoverVar struct { - File string // local file name - Var string // name of count struct -} - -func (p *GoPackage) copyBuild(pp *build.Package) { - p.build = pp - - p.Dir = pp.Dir - p.ImportPath = pp.ImportPath - p.Name = pp.Name - p.Doc = pp.Doc - p.Root = pp.Root - p.ConflictDir = pp.ConflictDir - // TODO? Target - p.Goroot = pp.Goroot - p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".") - p.GoFiles = pp.GoFiles - p.CgoFiles = pp.CgoFiles - p.IgnoredGoFiles = pp.IgnoredGoFiles - p.CFiles = pp.CFiles - p.CXXFiles = pp.CXXFiles - p.MFiles = pp.MFiles - p.HFiles = pp.HFiles - p.SFiles = pp.SFiles - p.SwigFiles = pp.SwigFiles - p.SwigCXXFiles = pp.SwigCXXFiles - p.SysoFiles = pp.SysoFiles - p.CgoCFLAGS = pp.CgoCFLAGS - p.CgoCPPFLAGS = pp.CgoCPPFLAGS - p.CgoCXXFLAGS = pp.CgoCXXFLAGS - p.CgoLDFLAGS = pp.CgoLDFLAGS - p.CgoPkgConfig = pp.CgoPkgConfig - p.Imports = pp.Imports - p.TestGoFiles = pp.TestGoFiles - p.TestImports = pp.TestImports - p.XTestGoFiles = pp.XTestGoFiles - p.XTestImports = pp.XTestImports -} - -type PathPkgsIndex struct { - Indexs []*PkgsIndex -} - -type LoadFlag int - -const ( - LoadGoroot LoadFlag = iota - LoadSkipGoroot - LoadAll -) - -func (p *PathPkgsIndex) LoadIndex(context build.Context, flag LoadFlag) { - var wg sync.WaitGroup - if flag == LoadGoroot { - context.GOPATH = "" - } - var srcDirs []string - goroot := context.GOROOT - gopath := context.GOPATH - context.GOPATH = "" - - if flag != LoadSkipGoroot { - //go1.4 go/src/ - //go1.3 go/src/pkg; go/src/cmd - _, err := os.Stat(filepath.Join(goroot, "src/pkg/runtime")) - if err == nil { - for _, v := range context.SrcDirs() { - if strings.HasSuffix(v, "pkg") { - srcDirs = append(srcDirs, v[:len(v)-3]+"cmd") - } - srcDirs = append(srcDirs, v) - } - } else { - srcDirs = append(srcDirs, filepath.Join(goroot, "src")) - } - } - - context.GOPATH = gopath - context.GOROOT = "" - for _, v := range context.SrcDirs() { - srcDirs = append(srcDirs, v) - } - context.GOROOT = goroot - for _, path := range srcDirs { - pi := &PkgsIndex{} - p.Indexs = append(p.Indexs, pi) - pkgsGate.enter() - f, err := os.Open(path) - if err != nil { - pkgsGate.leave() - continue - } - children, err := f.Readdir(-1) - f.Close() - pkgsGate.leave() - if err != nil { - fmt.Fprint(os.Stderr, err) - continue - } - for _, child := range children { - if child.IsDir() { - wg.Add(1) - go func(path, name string) { - defer wg.Done() - pi.loadPkgsPath(&wg, path, name) - }(path, child.Name()) - } - } - } - wg.Wait() -} - -func (p *PathPkgsIndex) Sort() { - for _, v := range p.Indexs { - v.sort() - } -} - -type PkgsIndex struct { - sync.Mutex - Pkgs []*build.Package -} - -func (p *PkgsIndex) sort() { - sort.Sort(PkgSlice(p.Pkgs)) -} - -type PkgSlice []*build.Package - -func (p PkgSlice) Len() int { - return len([]*build.Package(p)) -} - -func (p PkgSlice) Less(i, j int) bool { - if p[i].IsCommand() && !p[j].IsCommand() { - return true - } else if !p[i].IsCommand() && p[j].IsCommand() { - return false - } - return p[i].ImportPath < p[j].ImportPath -} - -func (p PkgSlice) Swap(i, j int) { - p[i], p[j] = p[j], p[i] -} - -// pkgsgate protects the OS & filesystem from too much concurrency. -// Too much disk I/O -> too many threads -> swapping and bad scheduling. -// gate is a semaphore for limiting concurrency. -type gate chan struct{} - -func (g gate) enter() { g <- struct{}{} } -func (g gate) leave() { <-g } - -var pkgsGate = make(gate, 8) - -func (p *PkgsIndex) loadPkgsPath(wg *sync.WaitGroup, root, pkgrelpath string) { - importpath := filepath.ToSlash(pkgrelpath) - dir := filepath.Join(root, importpath) - - pkgsGate.enter() - defer pkgsGate.leave() - pkgDir, err := os.Open(dir) - if err != nil { - return - } - children, err := pkgDir.Readdir(-1) - pkgDir.Close() - if err != nil { - return - } - // hasGo tracks whether a directory actually appears to be a - // Go source code directory. If $GOPATH == $HOME, and - // $HOME/src has lots of other large non-Go projects in it, - // then the calls to importPathToName below can be expensive. - hasGo := false - for _, child := range children { - name := child.Name() - if name == "" { - continue - } - if c := name[0]; c == '.' || ('0' <= c && c <= '9') { - continue - } - if strings.HasSuffix(name, ".go") { - hasGo = true - } - if child.IsDir() { - if strings.HasPrefix(name, ".") || strings.HasPrefix(name, "_") || name == "testdata" { - continue - } - wg.Add(1) - go func(root, name string) { - defer wg.Done() - p.loadPkgsPath(wg, root, name) - }(root, filepath.Join(importpath, name)) - } - } - if hasGo { - buildPkg, err := build.ImportDir(dir, 0) - if err == nil { - if buildPkg.ImportPath == "." { - buildPkg.ImportPath = filepath.ToSlash(pkgrelpath) - buildPkg.Root = root - buildPkg.Goroot = true - } - p.Lock() - p.Pkgs = append(p.Pkgs, buildPkg) - p.Unlock() - } - } -} diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go deleted file mode 100644 index 2e51d8e3..00000000 --- a/vendor/github.com/visualfc/gotools/types/types.go +++ /dev/null @@ -1,2080 +0,0 @@ -// Copyright 2011-2018 visualfc . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package types - -import ( - "bytes" - "crypto/md5" - "fmt" - "go/ast" - "go/build" - "go/importer" - "go/parser" - "go/printer" - "go/token" - "go/types" - "io" - "io/ioutil" - "os" - "path/filepath" - "regexp" - "runtime" - "sort" - "strconv" - "strings" - "time" - - "github.com/visualfc/fastmod" - "github.com/visualfc/gotools/pkg/buildctx" - "github.com/visualfc/gotools/pkg/command" - "github.com/visualfc/gotools/pkg/pkgutil" - "github.com/visualfc/gotools/pkg/stdlib" - "golang.org/x/tools/go/buildutil" -) - -var Command = &command.Command{ - Run: runTypes, - UsageLine: "types", - Short: "golang type util", - Long: `golang type util`, -} - -var ( - typesVerbose bool - typesAllowBinary bool - typesFilePos string - typesCursorText string - typesFileStdin bool - typesFindUse bool - typesFindDef bool - typesFindUseAll bool - typesFindSkipGoroot bool - typesFindInfo bool - typesFindDoc bool - typesFindImportRange bool - typesFindImport bool - typesTags string - typesTagList = []string{} // exploded version of tags flag; set in main -) - -//func init -func init() { - Command.Flag.BoolVar(&typesVerbose, "v", false, "verbose debugging") - Command.Flag.BoolVar(&typesAllowBinary, "b", false, "import can be satisfied by a compiled package object without corresponding sources.") - Command.Flag.StringVar(&typesFilePos, "pos", "", "file position \"file.go:pos\"") - Command.Flag.StringVar(&typesCursorText, "text", "", "file cursor text info") - Command.Flag.BoolVar(&typesFileStdin, "stdin", false, "input file use stdin") - Command.Flag.BoolVar(&typesFindInfo, "info", false, "find cursor info") - Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define") - Command.Flag.BoolVar(&typesFindUse, "use", false, "find cursor usages") - Command.Flag.BoolVar(&typesFindUseAll, "all", false, "find cursor all usages in GOPATH") - Command.Flag.BoolVar(&typesFindImport, "import", false, "find cursor usages with import") - Command.Flag.BoolVar(&typesFindImportRange, "import_range", false, "find cursor usages with import range") - Command.Flag.BoolVar(&typesFindSkipGoroot, "skip_goroot", false, "find cursor all usages skip GOROOT") - Command.Flag.BoolVar(&typesFindDoc, "doc", false, "find cursor def doc") - Command.Flag.StringVar(&typesTags, "tags", "", "space-separated list of build tags to apply when parsing") -} - -type ObjKind int - -const ( - ObjNone ObjKind = iota - ObjPackage - ObjPkgName - ObjTypeName - ObjInterface - ObjStruct - ObjConst - ObjVar - ObjField - ObjFunc - ObjMethod - ObjLabel - ObjBuiltin - ObjNil - ObjImplicit - ObjUnknown - ObjComment -) - -var ObjKindName = []string{"none", "package", "package", - "type", "interface", "struct", - "const", "var", "field", - "func", "method", - "label", "builtin", "nil", - "implicit", "unknown", "comment"} - -func (k ObjKind) String() string { - if k >= 0 && int(k) < len(ObjKindName) { - return ObjKindName[k] - } - return "unkwnown" -} - -var builtinInfoMap = map[string]string{ - "append": "func append(slice []Type, elems ...Type) []Type", - "copy": "func copy(dst, src []Type) int", - "delete": "func delete(m map[Type]Type1, key Type)", - "len": "func len(v Type) int", - "cap": "func cap(v Type) int", - "make": "func make(Type, size IntegerType) Type", - "new": "func new(Type) *Type", - "complex": "func complex(r, i FloatType) ComplexType", - "real": "func real(c ComplexType) FloatType", - "imag": "func imag(c ComplexType) FloatType", - "close": "func close(c chan<- Type)", - "panic": "func panic(v interface{})", - "recover": "func recover() interface{}", - "print": "func print(args ...Type)", - "println": "func println(args ...Type)", - "error": "type error interface {Error() string}", - "Sizeof": "func unsafe.Sizeof(any) uintptr", - "Offsetof": "func unsafe.Offsetof(any) uintptr", - "Alignof": "func unsafe.Alignof(any) uintptr", -} - -func builtinInfo(id string) string { - if info, ok := builtinInfoMap[id]; ok { - return "builtin " + info - } - return "builtin " + id -} - -func simpleObjInfo(obj types.Object) string { - s := obj.String() - pkg := obj.Pkg() - if pkg != nil { - s = strings.Replace(s, pkg.Path(), pkg.Name(), -1) - s = simpleType(s) - if pkg.Name() == "main" { - s = strings.Replace(s, "main.", "", -1) - } - } - return s -} - -func simpleType(src string) string { - re, _ := regexp.Compile("[\\w\\./]+") - return re.ReplaceAllStringFunc(src, func(s string) string { - r := s - if i := strings.LastIndex(s, "/"); i != -1 { - r = s[i+1:] - } - if strings.Count(r, ".") > 1 { - r = r[strings.Index(r, ".")+1:] - } - return r - }) -} - -func runTypes(cmd *command.Command, args []string) error { - if len(args) < 1 { - cmd.Usage() - return nil - } - if typesVerbose { - now := time.Now() - defer func() { - cmd.Println("time", time.Now().Sub(now)) - }() - } - typesTagList = strings.Split(typesTags, " ") - context := buildctx.System() - context.BuildTags = append(typesTagList, context.BuildTags...) - - w := NewPkgWalker(context) - cursor := &FileCursor{} - cursor.text = typesCursorText - if typesFilePos != "" { - pos := strings.Index(typesFilePos, ":") - if pos != -1 { - cursor.fileName = typesFilePos[:pos] - if i, err := strconv.Atoi(typesFilePos[pos+1:]); err == nil { - cursor.cursorPos = i - } - } - if typesFileStdin { - src, err := ioutil.ReadAll(cmd.Stdin) - if err == nil { - cursor.src = src - } - } - } - w.cmd = cmd - w.findMode = &FindMode{ - Info: typesFindInfo, - Define: typesFindDef, - Doc: typesFindDoc, - Usage: typesFindUse, - UsageAll: typesFindUseAll, - Import: typesFindImport, - ImportRange: typesFindImportRange, - SkipGoroot: typesFindSkipGoroot, - } - - for _, pkgName := range args { - if pkgName == "." { - dir, err := os.Getwd() - if err != nil { - return err - } - pkgName = dir - cursor.fileDir = dir - } - if cursor.src != nil { - w.UpdateSourceData(filepath.Join(pkgName, cursor.fileName), cursor.src, false) - } - conf := DefaultPkgConfig() - pkg, outconf, err := w.Check(pkgName, conf, cursor) - if pkg == nil { - return fmt.Errorf("error import path %v", err) - } - if cursor != nil && w.findMode.IsValid() { - return w.LookupCursor(pkg, outconf, cursor) - } - } - return nil -} - -type FileCursor struct { - fileName string - fileDir string - cursorPos int - pos token.Pos - src []byte - xtest bool - text string -} - -func NewFileCursor(src []byte, dir string, filename string, pos int) *FileCursor { - return &FileCursor{fileDir: dir, fileName: filename, cursorPos: pos, src: src} -} - -func (f *FileCursor) SetText(text string) { - f.text = text -} - -type SourceData struct { - data []byte - mtime int64 -} - -type FindMode struct { - Info bool - Doc bool - Define bool - Usage bool - UsageAll bool - Import bool - ImportRange bool - SkipGoroot bool -} - -func (f *FindMode) IsValid() bool { - return f.Info || f.Define || f.Usage -} - -type PkgConfig struct { - Pkg *types.Package - XPkg *types.Package - Info *types.Info - XInfo *types.Info - Bpkg *build.Package - Files map[string]*ast.File - XTestFiles map[string]*ast.File - IgnoreFuncBodies bool - AllowBinary bool - WithTestFiles bool -} - -func DefaultPkgConfig() *PkgConfig { - conf := &PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} - conf.Info = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - Types: make(map[ast.Expr]types.TypeAndValue), - Scopes: make(map[ast.Node]*types.Scope), - Implicits: make(map[ast.Node]types.Object), - } - conf.XInfo = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - Types: make(map[ast.Expr]types.TypeAndValue), - Scopes: make(map[ast.Node]*types.Scope), - Implicits: make(map[ast.Node]types.Object), - } - return conf -} - -func NewPkgConfig(ignoreFuncBodies bool, withTestFiles bool) *PkgConfig { - conf := &PkgConfig{IgnoreFuncBodies: ignoreFuncBodies, AllowBinary: true, WithTestFiles: withTestFiles} - conf.Info = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - Types: make(map[ast.Expr]types.TypeAndValue), - Scopes: make(map[ast.Node]*types.Scope), - Implicits: make(map[ast.Node]types.Object), - } - conf.XInfo = &types.Info{ - Uses: make(map[*ast.Ident]types.Object), - Defs: make(map[*ast.Ident]types.Object), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - Types: make(map[ast.Expr]types.TypeAndValue), - Scopes: make(map[ast.Node]*types.Scope), - Implicits: make(map[ast.Node]types.Object), - } - return conf -} - -type PkgWalker struct { - FileSet *token.FileSet - Context *build.Context - current *types.Package - importingName map[string]bool - ParsedFileCache map[string]*ast.File - ParsedFileModTime map[string]int64 - fileSourceData map[string]*SourceData - Imported map[string]*types.Package // packages already imported - ImportedConfig map[string]*PkgConfig - ImportedFilesCheck map[string]*FilesCheck - gcimported types.Importer - cmd *command.Command - ModPkg *fastmod.Package - findMode *FindMode -} - -func NewPkgWalker(context *build.Context) *PkgWalker { - return &PkgWalker{ - Context: context, - FileSet: token.NewFileSet(), - ParsedFileCache: map[string]*ast.File{}, - ParsedFileModTime: map[string]int64{}, - fileSourceData: map[string]*SourceData{}, - importingName: map[string]bool{}, - Imported: map[string]*types.Package{"unsafe": types.Unsafe}, - ImportedConfig: map[string]*PkgConfig{}, - ImportedFilesCheck: map[string]*FilesCheck{}, - gcimported: importer.Default(), - findMode: &FindMode{}, - } -} - -func (w *PkgWalker) SetOutput(stdout io.Writer, stderr io.Writer) { - cmd := &command.Command{} - cmd.Stdout = stdout - cmd.Stderr = stderr - w.cmd = cmd -} - -func (w *PkgWalker) SetFindMode(mode *FindMode) { - w.findMode = mode -} - -func (w *PkgWalker) UpdateSourceData(filename string, data []byte, cleanAllSourceCache bool) { - if cleanAllSourceCache { - w.fileSourceData = make(map[string]*SourceData) - delete(w.ParsedFileModTime, filename) - } - if sd, ok := w.fileSourceData[filename]; ok { - if bytes.Equal(sd.data, data) { - return - } - } - w.fileSourceData[filename] = &SourceData{data, time.Now().UnixNano()} -} - -func (p *PkgWalker) Check(name string, conf *PkgConfig, cusror *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { - if name == "." { - name, _ = os.Getwd() - } - if conf == nil { - conf = DefaultPkgConfig() - } - //p.Imported[name] = nil - p.importingName = make(map[string]bool) - // check go mod and skip GOROOT - p.ModPkg = nil - var import_path string - if filepath.IsAbs(name) && !strings.HasPrefix(name, runtime.GOROOT()) { - p.ModPkg, _ = fastmod.LoadPackage(name, p.Context) - if p.ModPkg != nil { - dir := filepath.ToSlash(p.ModPkg.Node().ModDir()) - fname := filepath.ToSlash(name) - if dir == fname { - import_path = p.ModPkg.Node().Path() - } else if strings.HasPrefix(fname, dir+"/") { - import_path = p.ModPkg.Node().Path() + fname[len(dir):] - } - } - } - pkg, outconf, err = p.ImportHelper("", name, import_path, conf, cusror) - return -} - -func contains(list []string, s string) bool { - for _, t := range list { - if t == s { - return true - } - } - return false -} - -func (w *PkgWalker) isBinaryPkg(pkg string) bool { - return stdlib.IsStdPkg(pkg) -} - -func (w *PkgWalker) importPath(parentDir string, path string, mode build.ImportMode) (*build.Package, error) { - if filepath.IsAbs(path) { - return w.Context.ImportDir(path, 0) - } - if stdlib.IsStdPkg(path) { - return stdlib.ImportStdPkg(w.Context, path, build.AllowBinary) - } - if w.ModPkg != nil { - _path, dir, _ := w.ModPkg.Lookup(path) - if dir != "" { - pkg, err := w.Context.ImportDir(dir, mode) - if pkg != nil { - pkg.ImportPath = _path - } - return pkg, err - } - } - if path == "syscall/js" { - ctx := *w.Context - ctx.BuildTags = append(ctx.BuildTags, "js") - ctx.BuildTags = append(ctx.BuildTags, "wasm") - return ctx.Import(path, "", mode) - } - return w.Context.Import(path, "", mode) -} - -func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig, cursor *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { - return w.ImportHelper(parentDir, name, "", conf, cursor) -} - -type FilesCheck struct { - HashSum [16]byte - ModTime int64 -} - -func (w *PkgWalker) checkFiles(dir string, files []string) *FilesCheck { - chk := &FilesCheck{} - sort.Strings(files) - var temp string - for _, file := range files { - filename := filepath.Join(dir, file) - info, err := os.Lstat(filename) - if err != nil { - continue - } - t := info.ModTime().UnixNano() - if sd, ok := w.fileSourceData[filename]; ok { - if sd.mtime > t { - t = sd.mtime - } else { - delete(w.fileSourceData, filename) - } - } - temp += file - if chk.ModTime < t { - chk.ModTime = t - } - } - chk.HashSum = md5.Sum([]byte(temp)) - return chk -} - -func (w *PkgWalker) ImportHelper(parentDir string, name string, import_path string, conf *PkgConfig, cursor *FileCursor) (pkg *types.Package, outconf *PkgConfig, err error) { - defer func() { - err := recover() - if err != nil && typesVerbose { - fmt.Println(w.cmd.Stderr, err) - } - }() - - if parentDir != "" { - if strings.HasPrefix(name, ".") { - name = filepath.Join(parentDir, name) - } else { - if w.ModPkg == nil && pkgutil.IsVendorExperiment() { - parentPkg := pkgutil.ImportDirEx(w.Context, parentDir) - var err error - name, err = pkgutil.VendoredImportPath(parentPkg, name) - if err != nil { - return nil, nil, err - } - } - } - } - - bp, err := w.importPath(parentDir, name, 0) - - if bp == nil { - return nil, nil, err - } - - GoFiles := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...) - if conf.WithTestFiles { - GoFiles = append(GoFiles, bp.TestGoFiles...) - } - conf.Bpkg = bp - XTestGoFiles := append([]string{}, bp.XTestGoFiles...) - - //check cursor file - if cursor != nil && cursor.fileName != "" { - f, _ := w.parseFile(bp.Dir, cursor.fileName) - if f != nil { - cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) - cursor.fileDir = bp.Dir - isTest := strings.HasSuffix(cursor.fileName, "_test.go") - isXTest := false - if isTest && strings.HasSuffix(f.Name.Name, "_test") { - isXTest = true - } - cursor.xtest = isXTest - checkInsert := func(filenames []string, file string) []string { - for _, f := range filenames { - if f == file { - return filenames - } - } - return append([]string{file}, filenames...) - } - if isXTest { - XTestGoFiles = checkInsert(XTestGoFiles, cursor.fileName) - } else { - GoFiles = checkInsert(GoFiles, cursor.fileName) - } - } - } - - pkg = w.Imported[name] - chkFiles := w.checkFiles(bp.Dir, append(append([]string{}, GoFiles...), XTestGoFiles...)) - if pkg != nil { - if chk, ok := w.ImportedFilesCheck[name]; ok { - if chkFiles.ModTime == chk.ModTime && bytes.Equal(chkFiles.HashSum[:], chk.HashSum[:]) { - outconf := w.ImportedConfig[name] - if outconf != nil { - var errcheck bool - if !conf.IgnoreFuncBodies && outconf.IgnoreFuncBodies { - errcheck = true - } else if conf.WithTestFiles && !outconf.WithTestFiles { - errcheck = true - } - if !errcheck { - return pkg, outconf, nil - } - } - } - } - } - - if typesVerbose { - w.cmd.Println("parser pkg", parentDir, name) - } - checkName := name - - if bp.ImportPath == "." { - checkName = bp.Name - } else { - checkName = bp.ImportPath - } - - if import_path != "" { - checkName = import_path - } - - if w.importingName[checkName] { - return nil, nil, fmt.Errorf("cycle importing package %q", name) - } - - w.importingName[checkName] = true - - parserFiles := func(filenames []string, cursor *FileCursor, xtest bool) (files []*ast.File, fileMap map[string]*ast.File) { - fileMap = make(map[string]*ast.File) - for _, file := range filenames { - var f *ast.File - f, err = w.parseFile(bp.Dir, file) - if cursor != nil && cursor.fileName == file { - cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) - cursor.fileDir = bp.Dir - cursor.xtest = xtest - } - if err != nil && typesVerbose { - fmt.Fprintln(w.cmd.Stderr, err) - } - files = append(files, f) - fileMap[file] = f - } - return - } - var files []*ast.File - var xfiles []*ast.File - files, conf.Files = parserFiles(GoFiles, cursor, false) - xfiles, conf.XTestFiles = parserFiles(XTestGoFiles, cursor, true) - - typesConf := types.Config{ - IgnoreFuncBodies: conf.IgnoreFuncBodies, - FakeImportC: true, - Importer: &Importer{w, conf, bp.Dir}, - Error: func(err error) { - if typesVerbose { - fmt.Fprintln(w.cmd.Stderr, err) - } - }, - } - - pkg, err = typesConf.Check(checkName, w.FileSet, files, conf.Info) - conf.Pkg = pkg - - w.importingName[checkName] = false - w.Imported[name] = pkg - w.ImportedConfig[name] = conf - w.ImportedFilesCheck[name] = chkFiles - outconf = conf - - if len(xfiles) > 0 { - xpkg, _ := typesConf.Check(checkName+"_test", w.FileSet, xfiles, conf.XInfo) - w.Imported[checkName+"_test"] = xpkg - conf.XPkg = xpkg - } - return -} - -type Importer struct { - w *PkgWalker - conf *PkgConfig - dir string -} - -func (im *Importer) Import(name string) (pkg *types.Package, err error) { - if im.conf.AllowBinary && im.w.isBinaryPkg(name) { - if found := im.w.Imported[name]; found != nil { - return found, nil - } - pkg, err = im.w.gcimported.Import(name) - if pkg != nil && pkg.Complete() { - im.w.Imported[name] = pkg - return - } - // pkg = im.w.gcimporter[name] - // if pkg != nil && pkg.Complete() { - // return - // } - // pkg, err = importer.Default().Import(name) - // if pkg != nil && pkg.Complete() { - // im.w.gcimporter[name] = pkg - // return - // } - } - - pkg, _, err = im.w.Import(im.dir, name, NewPkgConfig(true, false), nil) - return pkg, err -} - -func (w *PkgWalker) parseFile(dir, file string) (*ast.File, error) { - return w.parseFileEx(dir, file, nil, 0, w.findMode.Doc) -} - -func (w *PkgWalker) parseFileEx(dir, file string, src interface{}, mtime int64, findDoc bool) (*ast.File, error) { - filename := filepath.Join(dir, file) - if sd, ok := w.fileSourceData[filename]; ok { - src = sd.data - mtime = sd.mtime - } - if f, ok := w.ParsedFileCache[filename]; ok { - if i, ok := w.ParsedFileModTime[filename]; ok { - if mtime != 0 { - if mtime == i { - return f, nil - } - } else { - info, err := os.Stat(filename) - if err == nil && info.ModTime().UnixNano() == i { - return f, nil - } - } - } - } - - flag := parser.AllErrors - if findDoc { - flag |= parser.ParseComments - } - f, err := parser.ParseFile(w.FileSet, filename, src, flag) - if f == nil { - return f, err - } - if mtime != 0 { - w.ParsedFileModTime[filename] = mtime - } else { - info, err := os.Stat(filename) - if err == nil { - w.ParsedFileModTime[filename] = info.ModTime().UnixNano() - } - } - w.ParsedFileCache[filename] = f - return f, err -} - -func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *FileCursor) error { - f, _ := w.parseFile(cursor.fileDir, cursor.fileName) - if f != nil { - cursor.pos = token.Pos(w.FileSet.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos) - isTest := strings.HasSuffix(cursor.fileName, "_test.go") - isXTest := false - if isTest && strings.HasSuffix(f.Name.Name, "_test") { - isXTest = true - } - cursor.xtest = isXTest - } - return w.LookupObjects(conf, cursor) - if nm := w.CheckIsName(cursor); nm != nil { - return w.LookupName(pkg, conf, cursor, nm) - } else if is := w.CheckIsImport(cursor); is != nil { - if cursor.xtest { - return w.LookupImport(conf.XPkg, conf.XInfo, cursor, is) - } else { - return w.LookupImport(conf.Pkg, conf.Info, cursor, is) - } - } else { - return w.LookupObjects(conf, cursor) - } -} - -func (w *PkgWalker) LookupName(pkg *types.Package, conf *PkgConfig, cursor *FileCursor, nm *ast.Ident) error { - if w.findMode.Define { - w.cmd.Println(w.FileSet.Position(nm.Pos())) - } - if w.findMode.Info { - if cursor.xtest { - w.cmd.Printf("package %s (%q)\n", pkg.Name()+"_test", pkg.Path()) - } else { - if pkg.Path() == pkg.Name() { - w.cmd.Printf("package %s\n", pkg.Name()) - } else { - w.cmd.Printf("package %s (%q)\n", pkg.Name(), pkg.Path()) - } - } - } - - if !w.findMode.Usage { - return nil - } - var usages []int - findUsage := func(fileMap map[string]*ast.File) { - for _, f := range fileMap { - if f != nil && f.Name != nil && f.Name.Name == nm.Name { - usages = append(usages, int(f.Name.Pos())) - } - } - } - if cursor.xtest { - findUsage(conf.XTestFiles) - } else { - findUsage(conf.Files) - } - (sort.IntSlice(usages)).Sort() - for _, pos := range usages { - w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - } - - // if !w.findMode.UsageAll { - // return nil - // } - - // cursorPkg := pkg - // if cursorPkg == nil { - // return nil - // } - // var pkg_path string - // var xpkg_path string - // if conf.Pkg != nil { - // pkg_path = conf.Pkg.Path() - // } - // if conf.XPkg != nil { - // xpkg_path = conf.XPkg.Path() - // } - - // var find_def_pkg string - // var uses_paths []string - - // if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { - // find_def_pkg = cursorPkg.Path() - // if w.findMode.SkipGoroot { - // bp, err := w.importPath(conf.Bpkg.Dir, find_def_pkg, 0) - // if err == nil && !bp.Goroot { - // uses_paths = append(uses_paths, find_def_pkg) - // } - // } else { - // uses_paths = append(uses_paths, find_def_pkg) - // } - // } - - // cursorPkgPath := pkg.Path() - // if w.ModPkg == nil && pkgutil.IsVendorExperiment() { - // cursorPkgPath = pkgutil.VendorPathToImportPath(cursorPkgPath) - // } - // // check on module dir - // if w.ModPkg != nil { - // dir := w.ModPkg.Node().ModDir() - // filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - // if !info.IsDir() { - // return nil - // } - // if path != dir && info.Name() == "vendor" { - // return filepath.SkipDir - // } - // if conf.Bpkg.Dir == path { - // return nil - // } - // bp, err := w.importPath(dir, path, 0) - // if err != nil { - // return nil - // } - // if !bp.IsCommand() { - // importPath := w.ModPkg.Node().Path() - // if path != dir { - // importPath = filepath.Join(importPath, path[len(dir)+1:]) - // } - // if importPath == cursorPkgPath { - // return nil - // } - // } - // find := false - // for _, v := range bp.Imports { - // if v == cursorPkgPath { - // find = true - // break - // } - // } - // if find { - // importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) - // for _, v := range uses_paths { - // if v == importPath { - // return nil - // } - // } - // uses_paths = append(uses_paths, importPath) - // } - // return nil - // }) - // } - // ctx := *w.Context - // searchAll := true - // if w.ModPkg != nil { - // ctx.GOPATH = "" - // if w.findMode.SkipGoroot { - // searchAll = false - // } - // } - // if searchAll { - // buildutil.ForEachPackage(&ctx, func(importPath string, err error) { - // if err != nil { - // return - // } - // if importPath == conf.Pkg.Path() { - // return - // } - // bp, err := w.importPath("", importPath, 0) - // if err != nil { - // return - // } - // find := false - // if bp.ImportPath == cursorPkg.Path() { - // find = true - // } else { - // for _, v := range bp.Imports { - // if v == cursorPkgPath { - // find = true - // break - // } - // } - // } - // if find { - // for _, v := range uses_paths { - // if v == bp.ImportPath { - // return - // } - // } - // if w.findMode.SkipGoroot && bp.Goroot { - // return - // } - // uses_paths = append(uses_paths, bp.ImportPath) - // } - // }) - // } - - // //w.Imported = make(map[string]*types.Package) - - // for _, v := range uses_paths { - // var usages []int - // vpkg, conf, _ := w.Import("", v, NewPkgConfig(false, true), nil) - // if vpkg != nil && vpkg != pkg { - // if conf.Info != nil { - // for k, v := range conf.Info.Uses { - // if k != nil && v != nil && IsSameObject(v, cursorObj) { - // usages = append(usages, int(k.Pos())) - // } - // } - // } - // if conf.XInfo != nil { - // for k, v := range conf.XInfo.Uses { - // if k != nil && v != nil && IsSameObject(v, cursorObj) { - // usages = append(usages, int(k.Pos())) - // } - // } - // } - // } - // if v == find_def_pkg { - // usages = append(usages, int(cursorPos)) - // } - // (sort.IntSlice(usages)).Sort() - // for _, pos := range usages { - // w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - // } - // } - - return nil -} - -func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor *FileCursor, is *ast.ImportSpec) error { - fpath, err := strconv.Unquote(is.Path.Value) - if err != nil { - return err - } - - fbase := fpath - pos := strings.LastIndexAny(fpath, "./-\\") - if pos != -1 { - fbase = fpath[pos+1:] - } - - var fname string - if is.Name != nil { - fname = is.Name.Name - } else { - fname = fbase - } - - var bp *build.Package - if w.findMode.Define { - var findpath string = fpath - //check imported and vendor - for _, v := range w.Imported { - vpath := v.Path() - pos := strings.Index(vpath, "/vendor/") - if pos >= 0 { - vpath = vpath[pos+8:] - } - if vpath == fpath { - findpath = v.Path() - break - } - } - bp, err = w.importPath("", findpath, build.FindOnly) - if err == nil { - w.cmd.Println(w.FileSet.Position(is.Pos()).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) - } else { - w.cmd.Println(w.FileSet.Position(is.Pos())) - } - } - - if w.findMode.Info { - if fname == fpath { - w.cmd.Printf("import %s\n", fname) - } else { - w.cmd.Printf("import %s (%q)\n", fname, fpath) - } - } - - if w.findMode.Doc && bp != nil && bp.Doc != "" { - w.cmd.Println(bp.Doc) - } - - if !w.findMode.Usage { - return nil - } - - fid := pkg.Path() + "." + fname - - var usages []int - for id, obj := range pkgInfo.Uses { - if obj != nil && obj.Id() == fid { //!= nil && cursorObj.Pos() == obj.Pos() { - if _, ok := obj.(*types.PkgName); ok { - usages = append(usages, int(id.Pos())) - } - } - } - (sort.IntSlice(usages)).Sort() - for _, pos := range usages { - w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - } - return nil -} - -func testObjKind(obj types.Object, kind ObjKind) bool { - k, err := parserObjKind(obj) - if err != nil { - return false - } - return k == kind -} - -func parserObjKind(obj types.Object) (ObjKind, error) { - var kind ObjKind - switch t := obj.(type) { - case *types.PkgName: - kind = ObjPkgName - case *types.Const: - kind = ObjConst - case *types.TypeName: - kind = ObjTypeName - switch t.Type().Underlying().(type) { - case *types.Interface: - kind = ObjInterface - case *types.Struct: - kind = ObjStruct - } - case *types.Var: - kind = ObjVar - if t.IsField() { - kind = ObjField - } - case *types.Func: - kind = ObjFunc - if sig, ok := t.Type().(*types.Signature); ok { - if sig.Recv() != nil { - kind = ObjMethod - } - } - case *types.Label: - kind = ObjLabel - case *types.Builtin: - kind = ObjBuiltin - case *types.Nil: - kind = ObjNil - default: - return ObjNone, fmt.Errorf("unknown obj type %T", obj) - } - return kind, nil -} - -func (w *PkgWalker) LookupStructFromField(info *types.Info, cursorPkg *types.Package, cursorObj types.Object, cursorPos token.Pos) types.Object { - if info == nil { - conf := NewPkgConfig(true, true) - _, outconf, _ := w.Import("", cursorPkg.Path(), conf, nil) - if outconf != nil { - info = outconf.Info - } - } - for _, obj := range info.Defs { - if obj == nil { - continue - } - if _, ok := obj.(*types.TypeName); ok { - if t, ok := obj.Type().Underlying().(*types.Struct); ok { - for i := 0; i < t.NumFields(); i++ { - if t.Field(i).Pos() == cursorPos { - return obj - } - } - } - } - } - return nil -} - -func (w *PkgWalker) lookupNamedField(named *types.Named, name string) *types.Named { - if istruct, ok := named.Underlying().(*types.Struct); ok { - for i := 0; i < istruct.NumFields(); i++ { - field := istruct.Field(i) - if field.Anonymous() { - fieldType := orgType(field.Type()) - if typ, ok := fieldType.(*types.Named); ok { - if na := w.lookupNamedField(typ, name); na != nil { - return na - } - } - } else { - if field.Name() == name { - return named - } - } - } - } - return nil -} - -func (w *PkgWalker) lookupNamedFieldVar(named *types.Named, name string) (*types.Var, *types.Named) { - if istruct, ok := named.Underlying().(*types.Struct); ok { - for i := 0; i < istruct.NumFields(); i++ { - field := istruct.Field(i) - if field.Anonymous() { - fieldType := orgType(field.Type()) - if typ, ok := fieldType.(*types.Named); ok { - if obj, na := w.lookupNamedFieldVar(typ, name); na != nil { - return obj, na - } - } - } else { - if field.Name() == name { - return field, named - } - } - } - } - return nil, nil -} - -func (w *PkgWalker) lookupNamedMethod(named *types.Named, name string) (types.Object, *types.Named) { - if iface, ok := named.Underlying().(*types.Interface); ok { - for i := 0; i < iface.NumMethods(); i++ { - fn := iface.Method(i) - if fn.Name() == name { - if fn.Pkg() != named.Obj().Pkg() { - goto Embedded - } - return fn, named - } - } - Embedded: - for i := 0; i < iface.NumEmbeddeds(); i++ { - if obj, na := w.lookupNamedMethod(iface.Embedded(i), name); obj != nil { - return obj, na - } - } - return nil, nil - } - if istruct, ok := named.Underlying().(*types.Struct); ok { - for i := 0; i < named.NumMethods(); i++ { - fn := named.Method(i) - if fn.Name() == name { - return fn, named - } - } - for i := 0; i < istruct.NumFields(); i++ { - field := istruct.Field(i) - if !field.Anonymous() { - continue - } - if typ, ok := field.Type().(*types.Named); ok { - if obj, na := w.lookupNamedMethod(typ, name); obj != nil { - return obj, na - } - } - } - } - return nil, nil -} - -func IsSamePkg(a, b *types.Package) bool { - if a == b { - return true - } - if a == nil || b == nil { - return false - } - return a.Path() == b.Path() -} - -func IsSameObject(a, b types.Object) bool { - if a == b { - return true - } - if a == nil || b == nil { - return false - } - var apath string - var bpath string - if a.Pkg() != nil { - apath = a.Pkg().Path() - } - if b.Pkg() != nil { - bpath = b.Pkg().Path() - } - if apath != bpath { - return false - } - if a.Id() != b.Id() { - return false - } - if a.Type().String() != b.Type().String() { - return false - } - t1, ok1 := a.(*types.TypeName) - t2, ok2 := b.(*types.TypeName) - if ok1 && ok2 { - return t1.Type().String() == t2.Type().String() - } - return a.String() == b.String() -} - -func orgType(typ types.Type) types.Type { - if pt, ok := typ.(*types.Pointer); ok { - return pt.Elem() - } - return typ -} - -func findScope(s *types.Scope, pos token.Pos) *types.Scope { - for i := 0; i < s.NumChildren(); i++ { - child := s.Child(i) - if child.Contains(pos) { - return findScope(child, pos) - } - } - return s -} - -func (w *PkgWalker) lookupNamed(obj types.Object, cname string) types.Object { - typ := orgType(obj.Type()) - if typ != nil { - if name, ok := typ.(*types.Named); ok { - obj, na := w.lookupNamedFieldVar(name, cname) - if na != nil { - return obj - } else { - obj, na := w.lookupNamedMethod(name, cname) - if na != nil { - return obj - } - } - } - } - return nil -} - -// pkg=fmt text=Println -func (w *PkgWalker) lookupPackage(pkg *types.Package, text string) types.Object { - if pkg != nil && pkg.Scope() != nil { - ids := strings.Split(text, ".") - obj := pkg.Scope().Lookup(ids[0]) - cursorObj := obj - if obj != nil { - var n int = 1 - for n < len(ids) { - obj = w.lookupNamed(obj, ids[n]) - if obj == nil { - break - } - cursorObj = obj - n++ - } - } - return cursorObj - } - return nil -} - -func (w *PkgWalker) LookupByText(pkgInfo *types.Info, text string) types.Object { - var cursorObj types.Object - ids := strings.Split(text, ".") - if len(ids) >= 2 { - //check pkg.Name - for _, obj := range pkgInfo.Uses { - if obj.Pkg() != nil { - if obj.Pkg().Name()+"."+obj.Name() == text { - cursorObj = obj - break - } - } - } - if cursorObj == nil { - //check local obj.name.name - for _, obj := range pkgInfo.Defs { - if obj != nil && obj.Name() == ids[0] { - var n int = 1 - for n < len(ids) { - obj = w.lookupNamed(obj, ids[n]) - if obj == nil { - break - } - cursorObj = obj - n++ - } - } - } - } - if cursorObj == nil { - for _, obj := range pkgInfo.Implicits { - if obj != nil && obj.Name() == ids[0] { - if pkg, ok := obj.(*types.PkgName); ok { - cursorObj = w.lookupPackage(pkg.Imported(), strings.Join(ids[1:], ".")) - } - } - } - } - } - //check local obj - if cursorObj == nil { - for _, obj := range pkgInfo.Defs { - if obj != nil && obj.Name() == text { - cursorObj = obj - break - } - } - } - //check implicitly declared objects - if cursorObj == nil { - for _, obj := range pkgInfo.Implicits { - if obj != nil && obj.Name() == text { - cursorObj = obj - break - } - } - } - return cursorObj -} - -func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) error { - var cursorObj types.Object - var cursorSelection *types.Selection - var cursorId ast.Expr - var kind ObjKind - //lookup defs - var pkg *types.Package - var pkgInfo *types.Info - if cursor.xtest { - pkgInfo = conf.XInfo - pkg = conf.XPkg - } else { - pkgInfo = conf.Info - pkg = conf.Pkg - } - var packageName string - var packagePath string - var isImport bool - if im := w.CheckIsName(cursor); im != nil { - cursorId = im - kind = ObjPackage - packageName = im.Name - packagePath = pkg.Path() - } else if im := w.CheckIsImport(cursor); im != nil { - cursorId = im.Path - kind = ObjPkgName - isImport = true - packagePath, _ = strconv.Unquote(im.Path.Value) - if im.Name != nil { - packageName = im.Name.Name - } else { - nameList := strings.Split(packagePath, "/") - packageName = nameList[len(nameList)-1] - } - } else if v := w.CheckIsBasic(cursor, pkgInfo); v != nil { - if w.findMode.Info { - w.cmd.Println(fmt.Sprintf("basic type %v (%v)", v.Kind, v.Value)) - return nil - } - return fmt.Errorf("not support basic type: %v (%v)", v.Kind, v.Value) - } else { - cursorObj, cursorSelection = w.CheckIsObject(cursor, pkgInfo) - if cursorObj == nil && cursor.text != "" { - cursorObj = w.LookupByText(pkgInfo, cursor.text) - } - if cursorObj != nil { - kind, _ = parserObjKind(cursorObj) - if kind == ObjField { - if cursorObj.(*types.Var).Anonymous() { - typ := orgType(cursorObj.Type()) - if named, ok := typ.(*types.Named); ok { - cursorObj = named.Obj() - } - } - } else if kind == ObjPkgName { - packageName = cursorObj.(*types.PkgName).Imported().Name() - packagePath = cursorObj.(*types.PkgName).Imported().Path() - } - } - } - - if cursorId == nil && cursorObj == nil { - return fmt.Errorf("not found object") - } - - var findInfo *ObjectInfo - var cursorPkg *types.Package - var cursorPos token.Pos - if cursorObj != nil { - findInfo = w.CheckObjectInfo(cursorObj, cursorSelection, kind, pkg, pkgInfo) - } else { - findInfo = &ObjectInfo{ - pkg: pkg, - pos: cursorId.Pos(), - } - } - cursorPkg = findInfo.pkg - cursorPos = findInfo.pos - - if w.findMode.Define { - if isImport { - var fname = packageName - var fpath = packagePath - var findpath string = fpath - //check imported and vendor - for _, v := range w.Imported { - vpath := v.Path() - pos := strings.Index(vpath, "/vendor/") - if pos >= 0 { - vpath = vpath[pos+8:] - } - if vpath == fpath { - findpath = v.Path() - break - } - } - bp, err := w.importPath("", findpath, build.FindOnly) - if err == nil { - w.cmd.Println(w.FileSet.Position(findInfo.pos).String() + "::" + fname + "::" + fpath + "::" + bp.Dir) - } else { - w.cmd.Println(w.FileSet.Position(findInfo.pos)) - } - } else { - w.cmd.Println(w.FileSet.Position(findInfo.pos)) - } - } - if w.findMode.Info { - // if kind == ObjField && fieldTypeObj != nil { - // typeName := fieldTypeObj.Name() - // if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg { - // typeName = fieldTypeObj.Pkg().Name() + "." + fieldTypeObj.Name() - // } - // fmt.Println(typeName, simpleObjInfo(cursorObj)) - // } else - if kind == ObjBuiltin { - w.cmd.Println(builtinInfo(cursorObj.Name())) - } else if kind == ObjPackage { - if packageName == packagePath { - w.cmd.Printf("package %s\n", packageName) - } else { - w.cmd.Printf("package %s (%q)\n", packageName, packagePath) - } - } else if kind == ObjPkgName { - if packageName == packagePath { - w.cmd.Printf("package %s\n", packageName) - } else { - w.cmd.Printf("package %s (%q)\n", packageName, packagePath) - } - } else if kind == ObjImplicit { - w.cmd.Printf("%s is implicit\n", cursorObj) - } else if findInfo.isInterfaceMethod { - if cursorPkg == nil { - // error.Error() - w.cmd.Println(simpleObjInfo(findInfo.obj)) - } else { - w.cmd.Println(strings.Replace(simpleObjInfo(findInfo.obj), "(interface)", cursorPkg.Name()+"."+findInfo.interfaceTypeName, 1)) - } - } else { - w.cmd.Println(simpleObjInfo(cursorObj)) - } - } - if w.findMode.Doc && w.findMode.Define { - pos := w.FileSet.Position(cursorPos) - file := w.ParsedFileCache[pos.Filename] - if file != nil { - line := pos.Line - var group *ast.CommentGroup - for _, v := range file.Comments { - lastLine := w.FileSet.Position(v.End()).Line - if lastLine == line || lastLine == line-1 { - group = v - } else if lastLine > line { - break - } - } - if group != nil { - w.cmd.Println(group.Text()) - } - } - } - - if !w.findMode.Usage { - return nil - } - - var usages []int - var importRange []ast.Expr - if kind == ObjPackage { - if !cursor.xtest { - usages = append(usages, findPackageDef(packageName, conf.Files)...) - if conf.XInfo != nil { - usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) - if w.findMode.ImportRange { - importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) - } else if w.findMode.Import { - usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) - } - } - } else { - usages = append(usages, findPackageDef(packageName, conf.XTestFiles)...) - } - } else if kind == ObjPkgName { - if conf.Info != nil { - usages = append(usages, findPackageUses(packagePath, conf.Files, conf.Info)...) - if w.findMode.ImportRange { - importRange = append(importRange, findPackageImportRange(packagePath, conf.Files)...) - } else if w.findMode.Import { - usages = append(usages, findPackageImports(packageName, packagePath, conf.Files)...) - } - } - if conf.XInfo != nil { - usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) - if w.findMode.ImportRange { - importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) - } else if w.findMode.Import { - usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) - } - } - } else { - if cursorObj != nil { - for id, obj := range pkgInfo.Uses { - if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() { - usages = append(usages, int(id.Pos())) - } - } - } else { - for id, obj := range pkgInfo.Uses { - if obj != nil && obj.Pos() == cursorPos { //!= nil && cursorObj.Pos() == obj.Pos() { - usages = append(usages, int(id.Pos())) - } - } - } - } - var pkg_path string - var xpkg_path string - if conf.Pkg != nil { - pkg_path = conf.Pkg.Path() - } - if conf.XPkg != nil { - xpkg_path = conf.XPkg.Path() - } - - if cursorPkg != nil && - (cursorPkg.Path() == pkg_path || cursorPkg.Path() == xpkg_path) && - kind != ObjPkgName && kind != ObjPackage { - usages = append(usages, int(cursorPos)) - } - - (sort.IntSlice(usages)).Sort() - for _, pos := range usages { - w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - } - //check look for current pkg.object on pkg_test - if w.findMode.UsageAll || IsSamePkg(cursorPkg, conf.Pkg) || IsSamePkg(cursorPkg, conf.XPkg) { - var addInfo *types.Info - if cursor.xtest { - addInfo = conf.Info - } else { - addInfo = conf.XInfo - } - if addInfo != nil && cursorPkg != nil { - var usages []int - // for id, obj := range addInfo.Defs { - // if id != nil && obj != nil && obj.Id() == cursorObj.Id() { - // usages = append(usages, int(id.Pos())) - // } - // } - for k, v := range addInfo.Uses { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - usages = append(usages, int(k.Pos())) - } - } - - if importRange != nil { - sort.Sort(ExprSlice(importRange)) - for _, expr := range importRange { - pos := w.FileSet.Position(expr.Pos() + 1) - pos.String() - w.cmd.Printf("%s:%d:%d-%d\n", - pos.Filename, pos.Line, pos.Column, - pos.Column+int(expr.End())-int(expr.Pos())-2) - } - } - - (sort.IntSlice(usages)).Sort() - for _, pos := range usages { - w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - } - } - } - - if !w.findMode.UsageAll { - return nil - } - - if cursorPkg == nil { - return nil - } - - var find_def_pkg string - var uses_paths []string - - if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path { - find_def_pkg = cursorPkg.Path() - if w.findMode.SkipGoroot { - bp, err := w.importPath(conf.Bpkg.Dir, find_def_pkg, 0) - if err == nil && !bp.Goroot { - uses_paths = append(uses_paths, find_def_pkg) - } - } else { - uses_paths = append(uses_paths, find_def_pkg) - } - } - findPkgPath := pkg.Path() - if cursorObj != nil { - findPkgPath = cursorObj.Pkg().Path() - } - if kind == ObjPackage || kind == ObjPkgName { - findPkgPath = packagePath - } - - //cursorPkgPath := cursorObj.Pkg().Path() - if w.ModPkg == nil && pkgutil.IsVendorExperiment() { - findPkgPath = pkgutil.VendorPathToImportPath(findPkgPath) - } - // check on module dir - if w.ModPkg != nil { - dir := w.ModPkg.Node().ModDir() - filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if !info.IsDir() { - return nil - } - if path != dir && info.Name() == "vendor" { - return filepath.SkipDir - } - if conf.Bpkg.Dir == path { - return nil - } - bp, err := w.importPath(dir, path, 0) - if err != nil { - return nil - } - if !bp.IsCommand() { - importPath := w.ModPkg.Node().Path() - if path != dir { - importPath = filepath.Join(importPath, path[len(dir)+1:]) - } - if kind == ObjPackage && importPath == findPkgPath { - return nil - } - } - if kind == ObjPkgName && bp.ImportPath == findPkgPath { - uses_paths = append(uses_paths, bp.ImportPath) - } else { - find := false - imports := append(append([]string{}, bp.Imports...), bp.XTestImports...) - for _, v := range imports { - if v == findPkgPath { - find = true - break - } - } - if find { - importPath := path //filepath.Join(w.mod.Path(), path[len(dir)+1:]) - for _, v := range uses_paths { - if v == importPath { - return nil - } - } - uses_paths = append(uses_paths, importPath) - } - } - return nil - }) - } - ctx := *w.Context - searchAll := true - if w.ModPkg != nil { - ctx.GOPATH = "" - if w.findMode.SkipGoroot { - searchAll = false - } - } - if searchAll { - buildutil.ForEachPackage(&ctx, func(importPath string, err error) { - if err != nil { - return - } - - if importPath == conf.Pkg.Path() { - return - } - bp, err := w.importPath("", importPath, 0) - if err != nil { - return - } - if kind == ObjPkgName && bp.ImportPath == findPkgPath { - uses_paths = append(uses_paths, bp.ImportPath) - } else { - find := false - if bp.ImportPath == cursorPkg.Path() { - find = true - } else { - imports := append(append([]string{}, bp.Imports...), bp.XTestImports...) - for _, v := range imports { - if v == findPkgPath { - find = true - break - } - } - } - if find { - for _, v := range uses_paths { - if v == bp.ImportPath { - return - } - } - if w.findMode.SkipGoroot && bp.Goroot { - return - } - uses_paths = append(uses_paths, bp.ImportPath) - } - } - }) - } - - //w.Imported = make(map[string]*types.Package) - for _, v := range uses_paths { - var usages []int - var importRange []ast.Expr - vpkg, conf, _ := w.Import("", v, NewPkgConfig(false, true), nil) - if vpkg != nil && vpkg.Path() == packagePath && kind == ObjPkgName { - usages = append(usages, findPackageDef(packageName, conf.Files)...) - } - if vpkg != nil && vpkg != pkg { - if kind == ObjPackage || kind == ObjPkgName { - if conf.Info != nil { - usages = append(usages, findPackageUses(packagePath, conf.Files, conf.Info)...) - if w.findMode.ImportRange { - importRange = append(importRange, findPackageImportRange(packagePath, conf.Files)...) - } else if w.findMode.Import { - usages = append(usages, findPackageImports(packageName, packagePath, conf.Files)...) - } - } - if conf.XInfo != nil { - usages = append(usages, findPackageUses(packagePath, conf.XTestFiles, conf.XInfo)...) - if w.findMode.ImportRange { - importRange = append(importRange, findPackageImportRange(packagePath, conf.XTestFiles)...) - } else if w.findMode.Import { - usages = append(usages, findPackageImports(packageName, packagePath, conf.XTestFiles)...) - } - } - } else { - if conf.Info != nil { - for k, v := range conf.Info.Uses { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - usages = append(usages, int(k.Pos())) - } - } - } - if conf.XInfo != nil { - for k, v := range conf.XInfo.Uses { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - usages = append(usages, int(k.Pos())) - } - } - } - } - } - if v == find_def_pkg { - usages = append(usages, int(cursorPos)) - } - - if importRange != nil { - sort.Sort(ExprSlice(importRange)) - for _, expr := range importRange { - pos := w.FileSet.Position(expr.Pos() + 1) - pos.String() - w.cmd.Printf("%s:%d:%d-%d\n", - pos.Filename, pos.Line, pos.Column, - pos.Column+int(expr.End())-int(expr.Pos())-2) - } - } - (sort.IntSlice(usages)).Sort() - for _, pos := range usages { - w.cmd.Println(w.FileSet.Position(token.Pos(pos))) - } - } - return nil -} - -func findPackageDef(pkgname string, files map[string]*ast.File) (pos []int) { - for _, f := range files { - if pkgname == f.Name.Name { - pos = append(pos, int(f.Name.Pos())) - } - } - return -} - -func findPackageImports(pkgname string, pkgpath string, files map[string]*ast.File) (pos []int) { - for _, f := range files { - for _, im := range f.Imports { - fpath, _ := strconv.Unquote(im.Path.Value) - if fpath == pkgpath { - pos = append(pos, int(im.Path.End())-len(pkgname)-1) - } - } - } - return -} - -func findPackageImportRange(pkgpath string, files map[string]*ast.File) (expr []ast.Expr) { - for _, f := range files { - for _, im := range f.Imports { - fpath, _ := strconv.Unquote(im.Path.Value) - if fpath == pkgpath { - expr = append(expr, im.Path) - } - } - } - return -} - -func findPackageUses(pkgpath string, files map[string]*ast.File, info *types.Info) (pos []int) { - for id, obj := range info.Uses { - if p, ok := obj.(*types.PkgName); ok { - if im := p.Imported(); im != nil && im.Path() == pkgpath { - pos = append(pos, int(id.Pos())) - } - } - } - return -} - -func (w *PkgWalker) CheckIsName(cursor *FileCursor) *ast.Ident { - if cursor.fileDir == "" { - return nil - } - file, _ := w.parseFile(cursor.fileDir, cursor.fileName) - if file == nil { - return nil - } - if inRange(file.Name, cursor.pos) { - return file.Name - } - return nil -} - -func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec { - if cursor.fileDir == "" { - return nil - } - file, _ := w.parseFile(cursor.fileDir, cursor.fileName) - if file == nil { - return nil - } - for _, is := range file.Imports { - if inRange(is, cursor.pos) { - return is - } - } - return nil -} - -func (w *PkgWalker) CheckIsBasic(cursor *FileCursor, pkgInfo *types.Info) *ast.BasicLit { - for id, _ := range pkgInfo.Types { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - switch v := id.(type) { - case *ast.BasicLit: - return v - } - } - } - return nil -} - -func (w *PkgWalker) CheckIsObject(cursor *FileCursor, pkgInfo *types.Info) (cursorObj types.Object, cursorSelection *types.Selection) { - //check selection - for sel, obj := range pkgInfo.Selections { - if cursor.pos >= sel.Sel.Pos() && cursor.pos <= sel.Sel.End() { - cursorObj = obj.Obj() - cursorSelection = obj - return - } - } - //check def - for id, obj := range pkgInfo.Defs { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - return - } - } - //check use - for id, obj := range pkgInfo.Uses { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - return - } - } - //check implicits - for id, obj := range pkgInfo.Implicits { - if cursor.pos >= id.Pos() && cursor.pos <= id.End() { - cursorObj = obj - return - } - } - return -} - -func (w *PkgWalker) CheckObjectInfo(cursorObj types.Object, cursorSelection *types.Selection, kind ObjKind, pkg *types.Package, pkgInfo *types.Info) *ObjectInfo { - cursorPkg := cursorObj.Pkg() - cursorPos := cursorObj.Pos() - - var fieldTypeObj types.Object - cursorIsInterfaceMethod := false - var cursorInterfaceTypeName string - var cursorInterfaceTypeNamed *types.Named - - if kind == ObjMethod && cursorSelection != nil && cursorSelection.Recv() != nil { - sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature) - if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { - if named, ok := cursorSelection.Recv().(*types.Named); ok { - obj, na := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil && na != nil { - cursorObj = obj - cursorPkg = na.Obj().Pkg() - cursorInterfaceTypeName = na.Obj().Name() - cursorInterfaceTypeNamed = na - cursorIsInterfaceMethod = true - } - } - } - } else if kind == ObjField && cursorSelection != nil { - if recv := cursorSelection.Recv(); recv != nil { - typ := orgType(recv) - if typ != nil { - if name, ok := typ.(*types.Named); ok { - fieldTypeObj = name.Obj() - na := w.lookupNamedField(name, cursorObj.Name()) - if na != nil { - fieldTypeObj = na.Obj() - } - //check current pkg - if fieldTypeObj != nil && fieldTypeObj.Pkg() == pkg { - cursorPkg = fieldTypeObj.Pkg() - if t, ok := fieldTypeObj.Type().Underlying().(*types.Struct); ok { - for i := 0; i < t.NumFields(); i++ { - if t.Field(i).Id() == cursorObj.Id() { - cursorPos = t.Field(i).Pos() - break - } - } - } - } - } - } - } - } - if cursorPkg != nil && cursorPkg != pkg && - kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) { - pkg, conf, _ := w.Import("", cursorPkg.Path(), NewPkgConfig(true, true), nil) - if pkg != nil { - if cursorIsInterfaceMethod { - for k, v := range conf.Info.Defs { - if k != nil && v != nil && IsSameObject(v, cursorInterfaceTypeNamed.Obj()) { - named := v.Type().(*types.Named) - obj, typ := w.lookupNamedMethod(named, cursorObj.Name()) - if obj != nil && typ != nil { - cursorObj = obj - cursorPos = obj.Pos() - cursorPkg = typ.Obj().Pkg() - cursorInterfaceTypeName = typ.Obj().Name() - break - } - } - } - // for _, obj := range conf.Info.Defs { - // if obj == nil { - // continue - // } - // if fn, ok := obj.(*types.Func); ok { - // if fn.Name() == cursorObj.Name() { - // if sig, ok := fn.Type().Underlying().(*types.Signature); ok { - // if named, ok := sig.Recv().Type().(*types.Named); ok { - // if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName { - // cursorPos = obj.Pos() - // break - // } - // } - // } - // } - // } - // } - } else if kind == ObjField && fieldTypeObj != nil { - for _, obj := range conf.Info.Defs { - if obj == nil { - continue - } - if _, ok := obj.(*types.TypeName); ok { - if IsSameObject(fieldTypeObj, obj) { - if t, ok := obj.Type().Underlying().(*types.Struct); ok { - for i := 0; i < t.NumFields(); i++ { - if t.Field(i).Id() == cursorObj.Id() { - cursorPos = t.Field(i).Pos() - break - } - } - } - break - } - } - } - } else { - for k, v := range conf.Info.Defs { - if k != nil && v != nil && IsSameObject(v, cursorObj) { - cursorPos = k.Pos() - break - } - } - } - } - // if kind == ObjField || cursorIsInterfaceMethod { - // fieldTypeInfo = conf.Info - // } - } - return &ObjectInfo{ - cursorPkg, - cursorObj, - cursorPos, - cursorIsInterfaceMethod, - cursorInterfaceTypeName, - } -} - -type ObjectInfo struct { - pkg *types.Package - obj types.Object - pos token.Pos - isInterfaceMethod bool - interfaceTypeName string -} - -func inRange(node ast.Node, p token.Pos) bool { - if node == nil { - return false - } - return p >= node.Pos() && p <= node.End() -} - -func (w *PkgWalker) nodeString(node interface{}) string { - if node == nil { - return "" - } - var b bytes.Buffer - printer.Fprint(&b, w.FileSet, node) - return b.String() -} - -type ExprSlice []ast.Expr - -func (p ExprSlice) Len() int { return len(p) } -func (p ExprSlice) Less(i, j int) bool { return p[i].Pos() < p[j].Pos() } -func (p ExprSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/golang.org/x/mod/LICENSE b/vendor/golang.org/x/mod/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/mod/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/mod/PATENTS b/vendor/golang.org/x/mod/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/mod/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go b/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go deleted file mode 100644 index 2681af35..00000000 --- a/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package lazyregexp is a thin wrapper over regexp, allowing the use of global -// regexp variables without forcing them to be compiled at init. -package lazyregexp - -import ( - "os" - "regexp" - "strings" - "sync" -) - -// Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be -// compiled the first time it is needed. -type Regexp struct { - str string - once sync.Once - rx *regexp.Regexp -} - -func (r *Regexp) re() *regexp.Regexp { - r.once.Do(r.build) - return r.rx -} - -func (r *Regexp) build() { - r.rx = regexp.MustCompile(r.str) - r.str = "" -} - -func (r *Regexp) FindSubmatch(s []byte) [][]byte { - return r.re().FindSubmatch(s) -} - -func (r *Regexp) FindStringSubmatch(s string) []string { - return r.re().FindStringSubmatch(s) -} - -func (r *Regexp) FindStringSubmatchIndex(s string) []int { - return r.re().FindStringSubmatchIndex(s) -} - -func (r *Regexp) ReplaceAllString(src, repl string) string { - return r.re().ReplaceAllString(src, repl) -} - -func (r *Regexp) FindString(s string) string { - return r.re().FindString(s) -} - -func (r *Regexp) FindAllString(s string, n int) []string { - return r.re().FindAllString(s, n) -} - -func (r *Regexp) MatchString(s string) bool { - return r.re().MatchString(s) -} - -func (r *Regexp) SubexpNames() []string { - return r.re().SubexpNames() -} - -var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test") - -// New creates a new lazy regexp, delaying the compiling work until it is first -// needed. If the code is being run as part of tests, the regexp compiling will -// happen immediately. -func New(str string) *Regexp { - lr := &Regexp{str: str} - if inTest { - // In tests, always compile the regexps early. - lr.re() - } - return lr -} diff --git a/vendor/golang.org/x/mod/modfile/print.go b/vendor/golang.org/x/mod/modfile/print.go deleted file mode 100644 index 3bbea385..00000000 --- a/vendor/golang.org/x/mod/modfile/print.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Module file printer. - -package modfile - -import ( - "bytes" - "fmt" - "strings" -) - -// Format returns a go.mod file as a byte slice, formatted in standard style. -func Format(f *FileSyntax) []byte { - pr := &printer{} - pr.file(f) - return pr.Bytes() -} - -// A printer collects the state during printing of a file or expression. -type printer struct { - bytes.Buffer // output buffer - comment []Comment // pending end-of-line comments - margin int // left margin (indent), a number of tabs -} - -// printf prints to the buffer. -func (p *printer) printf(format string, args ...interface{}) { - fmt.Fprintf(p, format, args...) -} - -// indent returns the position on the current line, in bytes, 0-indexed. -func (p *printer) indent() int { - b := p.Bytes() - n := 0 - for n < len(b) && b[len(b)-1-n] != '\n' { - n++ - } - return n -} - -// newline ends the current line, flushing end-of-line comments. -func (p *printer) newline() { - if len(p.comment) > 0 { - p.printf(" ") - for i, com := range p.comment { - if i > 0 { - p.trim() - p.printf("\n") - for i := 0; i < p.margin; i++ { - p.printf("\t") - } - } - p.printf("%s", strings.TrimSpace(com.Token)) - } - p.comment = p.comment[:0] - } - - p.trim() - p.printf("\n") - for i := 0; i < p.margin; i++ { - p.printf("\t") - } -} - -// trim removes trailing spaces and tabs from the current line. -func (p *printer) trim() { - // Remove trailing spaces and tabs from line we're about to end. - b := p.Bytes() - n := len(b) - for n > 0 && (b[n-1] == '\t' || b[n-1] == ' ') { - n-- - } - p.Truncate(n) -} - -// file formats the given file into the print buffer. -func (p *printer) file(f *FileSyntax) { - for _, com := range f.Before { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - - for i, stmt := range f.Stmt { - switch x := stmt.(type) { - case *CommentBlock: - // comments already handled - p.expr(x) - - default: - p.expr(x) - p.newline() - } - - for _, com := range stmt.Comment().After { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - - if i+1 < len(f.Stmt) { - p.newline() - } - } -} - -func (p *printer) expr(x Expr) { - // Emit line-comments preceding this expression. - if before := x.Comment().Before; len(before) > 0 { - // Want to print a line comment. - // Line comments must be at the current margin. - p.trim() - if p.indent() > 0 { - // There's other text on the line. Start a new line. - p.printf("\n") - } - // Re-indent to margin. - for i := 0; i < p.margin; i++ { - p.printf("\t") - } - for _, com := range before { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - } - - switch x := x.(type) { - default: - panic(fmt.Errorf("printer: unexpected type %T", x)) - - case *CommentBlock: - // done - - case *LParen: - p.printf("(") - case *RParen: - p.printf(")") - - case *Line: - sep := "" - for _, tok := range x.Token { - p.printf("%s%s", sep, tok) - sep = " " - } - - case *LineBlock: - for _, tok := range x.Token { - p.printf("%s ", tok) - } - p.expr(&x.LParen) - p.margin++ - for _, l := range x.Line { - p.newline() - p.expr(l) - } - p.margin-- - p.newline() - p.expr(&x.RParen) - } - - // Queue end-of-line comments for printing when we - // reach the end of the line. - p.comment = append(p.comment, x.Comment().Suffix...) -} diff --git a/vendor/golang.org/x/mod/modfile/read.go b/vendor/golang.org/x/mod/modfile/read.go deleted file mode 100644 index 616d00ef..00000000 --- a/vendor/golang.org/x/mod/modfile/read.go +++ /dev/null @@ -1,909 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Module file parser. -// This is a simplified copy of Google's buildifier parser. - -package modfile - -import ( - "bytes" - "fmt" - "os" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// A Position describes an arbitrary source position in a file, including the -// file, line, column, and byte offset. -type Position struct { - Line int // line in input (starting at 1) - LineRune int // rune in line (starting at 1) - Byte int // byte in input (starting at 0) -} - -// add returns the position at the end of s, assuming it starts at p. -func (p Position) add(s string) Position { - p.Byte += len(s) - if n := strings.Count(s, "\n"); n > 0 { - p.Line += n - s = s[strings.LastIndex(s, "\n")+1:] - p.LineRune = 1 - } - p.LineRune += utf8.RuneCountInString(s) - return p -} - -// An Expr represents an input element. -type Expr interface { - // Span returns the start and end position of the expression, - // excluding leading or trailing comments. - Span() (start, end Position) - - // Comment returns the comments attached to the expression. - // This method would normally be named 'Comments' but that - // would interfere with embedding a type of the same name. - Comment() *Comments -} - -// A Comment represents a single // comment. -type Comment struct { - Start Position - Token string // without trailing newline - Suffix bool // an end of line (not whole line) comment -} - -// Comments collects the comments associated with an expression. -type Comments struct { - Before []Comment // whole-line comments before this expression - Suffix []Comment // end-of-line comments after this expression - - // For top-level expressions only, After lists whole-line - // comments following the expression. - After []Comment -} - -// Comment returns the receiver. This isn't useful by itself, but -// a Comments struct is embedded into all the expression -// implementation types, and this gives each of those a Comment -// method to satisfy the Expr interface. -func (c *Comments) Comment() *Comments { - return c -} - -// A FileSyntax represents an entire go.mod file. -type FileSyntax struct { - Name string // file path - Comments - Stmt []Expr -} - -func (x *FileSyntax) Span() (start, end Position) { - if len(x.Stmt) == 0 { - return - } - start, _ = x.Stmt[0].Span() - _, end = x.Stmt[len(x.Stmt)-1].Span() - return start, end -} - -// addLine adds a line containing the given tokens to the file. -// -// If the first token of the hint matches the first token of the -// line, the new line is added at the end of the block containing hint, -// extracting hint into a new block if it is not yet in one. -// -// If the hint is non-nil buts its first token does not match, -// the new line is added after the block containing hint -// (or hint itself, if not in a block). -// -// If no hint is provided, addLine appends the line to the end of -// the last block with a matching first token, -// or to the end of the file if no such block exists. -func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { - if hint == nil { - // If no hint given, add to the last statement of the given type. - Loop: - for i := len(x.Stmt) - 1; i >= 0; i-- { - stmt := x.Stmt[i] - switch stmt := stmt.(type) { - case *Line: - if stmt.Token != nil && stmt.Token[0] == tokens[0] { - hint = stmt - break Loop - } - case *LineBlock: - if stmt.Token[0] == tokens[0] { - hint = stmt - break Loop - } - } - } - } - - newLineAfter := func(i int) *Line { - new := &Line{Token: tokens} - if i == len(x.Stmt) { - x.Stmt = append(x.Stmt, new) - } else { - x.Stmt = append(x.Stmt, nil) - copy(x.Stmt[i+2:], x.Stmt[i+1:]) - x.Stmt[i+1] = new - } - return new - } - - if hint != nil { - for i, stmt := range x.Stmt { - switch stmt := stmt.(type) { - case *Line: - if stmt == hint { - if stmt.Token == nil || stmt.Token[0] != tokens[0] { - return newLineAfter(i) - } - - // Convert line to line block. - stmt.InBlock = true - block := &LineBlock{Token: stmt.Token[:1], Line: []*Line{stmt}} - stmt.Token = stmt.Token[1:] - x.Stmt[i] = block - new := &Line{Token: tokens[1:], InBlock: true} - block.Line = append(block.Line, new) - return new - } - - case *LineBlock: - if stmt == hint { - if stmt.Token[0] != tokens[0] { - return newLineAfter(i) - } - - new := &Line{Token: tokens[1:], InBlock: true} - stmt.Line = append(stmt.Line, new) - return new - } - - for j, line := range stmt.Line { - if line == hint { - if stmt.Token[0] != tokens[0] { - return newLineAfter(i) - } - - // Add new line after hint within the block. - stmt.Line = append(stmt.Line, nil) - copy(stmt.Line[j+2:], stmt.Line[j+1:]) - new := &Line{Token: tokens[1:], InBlock: true} - stmt.Line[j+1] = new - return new - } - } - } - } - } - - new := &Line{Token: tokens} - x.Stmt = append(x.Stmt, new) - return new -} - -func (x *FileSyntax) updateLine(line *Line, tokens ...string) { - if line.InBlock { - tokens = tokens[1:] - } - line.Token = tokens -} - -func (x *FileSyntax) removeLine(line *Line) { - line.Token = nil -} - -// Cleanup cleans up the file syntax x after any edit operations. -// To avoid quadratic behavior, removeLine marks the line as dead -// by setting line.Token = nil but does not remove it from the slice -// in which it appears. After edits have all been indicated, -// calling Cleanup cleans out the dead lines. -func (x *FileSyntax) Cleanup() { - w := 0 - for _, stmt := range x.Stmt { - switch stmt := stmt.(type) { - case *Line: - if stmt.Token == nil { - continue - } - case *LineBlock: - ww := 0 - for _, line := range stmt.Line { - if line.Token != nil { - stmt.Line[ww] = line - ww++ - } - } - if ww == 0 { - continue - } - if ww == 1 { - // Collapse block into single line. - line := &Line{ - Comments: Comments{ - Before: commentsAdd(stmt.Before, stmt.Line[0].Before), - Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix), - After: commentsAdd(stmt.Line[0].After, stmt.After), - }, - Token: stringsAdd(stmt.Token, stmt.Line[0].Token), - } - x.Stmt[w] = line - w++ - continue - } - stmt.Line = stmt.Line[:ww] - } - x.Stmt[w] = stmt - w++ - } - x.Stmt = x.Stmt[:w] -} - -func commentsAdd(x, y []Comment) []Comment { - return append(x[:len(x):len(x)], y...) -} - -func stringsAdd(x, y []string) []string { - return append(x[:len(x):len(x)], y...) -} - -// A CommentBlock represents a top-level block of comments separate -// from any rule. -type CommentBlock struct { - Comments - Start Position -} - -func (x *CommentBlock) Span() (start, end Position) { - return x.Start, x.Start -} - -// A Line is a single line of tokens. -type Line struct { - Comments - Start Position - Token []string - InBlock bool - End Position -} - -func (x *Line) Span() (start, end Position) { - return x.Start, x.End -} - -// A LineBlock is a factored block of lines, like -// -// require ( -// "x" -// "y" -// ) -// -type LineBlock struct { - Comments - Start Position - LParen LParen - Token []string - Line []*Line - RParen RParen -} - -func (x *LineBlock) Span() (start, end Position) { - return x.Start, x.RParen.Pos.add(")") -} - -// An LParen represents the beginning of a parenthesized line block. -// It is a place to store suffix comments. -type LParen struct { - Comments - Pos Position -} - -func (x *LParen) Span() (start, end Position) { - return x.Pos, x.Pos.add(")") -} - -// An RParen represents the end of a parenthesized line block. -// It is a place to store whole-line (before) comments. -type RParen struct { - Comments - Pos Position -} - -func (x *RParen) Span() (start, end Position) { - return x.Pos, x.Pos.add(")") -} - -// An input represents a single input file being parsed. -type input struct { - // Lexing state. - filename string // name of input file, for errors - complete []byte // entire input - remaining []byte // remaining input - token []byte // token being scanned - lastToken string // most recently returned token, for error messages - pos Position // current input position - comments []Comment // accumulated comments - endRule int // position of end of current rule - - // Parser state. - file *FileSyntax // returned top-level syntax tree - parseError error // error encountered during parsing - - // Comment assignment state. - pre []Expr // all expressions, in preorder traversal - post []Expr // all expressions, in postorder traversal -} - -func newInput(filename string, data []byte) *input { - return &input{ - filename: filename, - complete: data, - remaining: data, - pos: Position{Line: 1, LineRune: 1, Byte: 0}, - } -} - -// parse parses the input file. -func parse(file string, data []byte) (f *FileSyntax, err error) { - in := newInput(file, data) - // The parser panics for both routine errors like syntax errors - // and for programmer bugs like array index errors. - // Turn both into error returns. Catching bug panics is - // especially important when processing many files. - defer func() { - if e := recover(); e != nil { - if e == in.parseError { - err = in.parseError - } else { - err = fmt.Errorf("%s:%d:%d: internal error: %v", in.filename, in.pos.Line, in.pos.LineRune, e) - } - } - }() - - // Invoke the parser. - in.parseFile() - if in.parseError != nil { - return nil, in.parseError - } - in.file.Name = in.filename - - // Assign comments to nearby syntax. - in.assignComments() - - return in.file, nil -} - -// Error is called to report an error. -// The reason s is often "syntax error". -// Error does not return: it panics. -func (in *input) Error(s string) { - if s == "syntax error" && in.lastToken != "" { - s += " near " + in.lastToken - } - in.parseError = fmt.Errorf("%s:%d:%d: %v", in.filename, in.pos.Line, in.pos.LineRune, s) - panic(in.parseError) -} - -// eof reports whether the input has reached end of file. -func (in *input) eof() bool { - return len(in.remaining) == 0 -} - -// peekRune returns the next rune in the input without consuming it. -func (in *input) peekRune() int { - if len(in.remaining) == 0 { - return 0 - } - r, _ := utf8.DecodeRune(in.remaining) - return int(r) -} - -// peekPrefix reports whether the remaining input begins with the given prefix. -func (in *input) peekPrefix(prefix string) bool { - // This is like bytes.HasPrefix(in.remaining, []byte(prefix)) - // but without the allocation of the []byte copy of prefix. - for i := 0; i < len(prefix); i++ { - if i >= len(in.remaining) || in.remaining[i] != prefix[i] { - return false - } - } - return true -} - -// readRune consumes and returns the next rune in the input. -func (in *input) readRune() int { - if len(in.remaining) == 0 { - in.Error("internal lexer error: readRune at EOF") - } - r, size := utf8.DecodeRune(in.remaining) - in.remaining = in.remaining[size:] - if r == '\n' { - in.pos.Line++ - in.pos.LineRune = 1 - } else { - in.pos.LineRune++ - } - in.pos.Byte += size - return int(r) -} - -type symType struct { - pos Position - endPos Position - text string -} - -// startToken marks the beginning of the next input token. -// It must be followed by a call to endToken, once the token has -// been consumed using readRune. -func (in *input) startToken(sym *symType) { - in.token = in.remaining - sym.text = "" - sym.pos = in.pos -} - -// endToken marks the end of an input token. -// It records the actual token string in sym.text if the caller -// has not done that already. -func (in *input) endToken(sym *symType) { - if sym.text == "" { - tok := string(in.token[:len(in.token)-len(in.remaining)]) - sym.text = tok - in.lastToken = sym.text - } - sym.endPos = in.pos -} - -// lex is called from the parser to obtain the next input token. -// It returns the token value (either a rune like '+' or a symbolic token _FOR) -// and sets val to the data associated with the token. -// For all our input tokens, the associated data is -// val.Pos (the position where the token begins) -// and val.Token (the input string corresponding to the token). -func (in *input) lex(sym *symType) int { - // Skip past spaces, stopping at non-space or EOF. - countNL := 0 // number of newlines we've skipped past - for !in.eof() { - // Skip over spaces. Count newlines so we can give the parser - // information about where top-level blank lines are, - // for top-level comment assignment. - c := in.peekRune() - if c == ' ' || c == '\t' || c == '\r' { - in.readRune() - continue - } - - // Comment runs to end of line. - if in.peekPrefix("//") { - in.startToken(sym) - - // Is this comment the only thing on its line? - // Find the last \n before this // and see if it's all - // spaces from there to here. - i := bytes.LastIndex(in.complete[:in.pos.Byte], []byte("\n")) - suffix := len(bytes.TrimSpace(in.complete[i+1:in.pos.Byte])) > 0 - in.readRune() - in.readRune() - - // Consume comment. - for len(in.remaining) > 0 && in.readRune() != '\n' { - } - in.endToken(sym) - - sym.text = strings.TrimRight(sym.text, "\n") - in.lastToken = "comment" - - // If we are at top level (not in a statement), hand the comment to - // the parser as a _COMMENT token. The grammar is written - // to handle top-level comments itself. - if !suffix { - // Not in a statement. Tell parser about top-level comment. - return _COMMENT - } - - // Otherwise, save comment for later attachment to syntax tree. - if countNL > 1 { - in.comments = append(in.comments, Comment{sym.pos, "", false}) - } - in.comments = append(in.comments, Comment{sym.pos, sym.text, suffix}) - countNL = 1 - return _EOL - } - - if in.peekPrefix("/*") { - in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) - } - - // Found non-space non-comment. - break - } - - // Found the beginning of the next token. - in.startToken(sym) - defer in.endToken(sym) - - // End of file. - if in.eof() { - in.lastToken = "EOF" - return _EOF - } - - // Punctuation tokens. - switch c := in.peekRune(); c { - case '\n': - in.readRune() - return c - - case '(': - in.readRune() - return c - - case ')': - in.readRune() - return c - - case '"', '`': // quoted string - quote := c - in.readRune() - for { - if in.eof() { - in.pos = sym.pos - in.Error("unexpected EOF in string") - } - if in.peekRune() == '\n' { - in.Error("unexpected newline in string") - } - c := in.readRune() - if c == quote { - break - } - if c == '\\' && quote != '`' { - if in.eof() { - in.pos = sym.pos - in.Error("unexpected EOF in string") - } - in.readRune() - } - } - in.endToken(sym) - return _STRING - } - - // Checked all punctuation. Must be identifier token. - if c := in.peekRune(); !isIdent(c) { - in.Error(fmt.Sprintf("unexpected input character %#q", c)) - } - - // Scan over identifier. - for isIdent(in.peekRune()) { - if in.peekPrefix("//") { - break - } - if in.peekPrefix("/*") { - in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) - } - in.readRune() - } - return _IDENT -} - -// isIdent reports whether c is an identifier rune. -// We treat nearly all runes as identifier runes. -func isIdent(c int) bool { - return c != 0 && !unicode.IsSpace(rune(c)) -} - -// Comment assignment. -// We build two lists of all subexpressions, preorder and postorder. -// The preorder list is ordered by start location, with outer expressions first. -// The postorder list is ordered by end location, with outer expressions last. -// We use the preorder list to assign each whole-line comment to the syntax -// immediately following it, and we use the postorder list to assign each -// end-of-line comment to the syntax immediately preceding it. - -// order walks the expression adding it and its subexpressions to the -// preorder and postorder lists. -func (in *input) order(x Expr) { - if x != nil { - in.pre = append(in.pre, x) - } - switch x := x.(type) { - default: - panic(fmt.Errorf("order: unexpected type %T", x)) - case nil: - // nothing - case *LParen, *RParen: - // nothing - case *CommentBlock: - // nothing - case *Line: - // nothing - case *FileSyntax: - for _, stmt := range x.Stmt { - in.order(stmt) - } - case *LineBlock: - in.order(&x.LParen) - for _, l := range x.Line { - in.order(l) - } - in.order(&x.RParen) - } - if x != nil { - in.post = append(in.post, x) - } -} - -// assignComments attaches comments to nearby syntax. -func (in *input) assignComments() { - const debug = false - - // Generate preorder and postorder lists. - in.order(in.file) - - // Split into whole-line comments and suffix comments. - var line, suffix []Comment - for _, com := range in.comments { - if com.Suffix { - suffix = append(suffix, com) - } else { - line = append(line, com) - } - } - - if debug { - for _, c := range line { - fmt.Fprintf(os.Stderr, "LINE %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) - } - } - - // Assign line comments to syntax immediately following. - for _, x := range in.pre { - start, _ := x.Span() - if debug { - fmt.Printf("pre %T :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte) - } - xcom := x.Comment() - for len(line) > 0 && start.Byte >= line[0].Start.Byte { - if debug { - fmt.Fprintf(os.Stderr, "ASSIGN LINE %q #%d\n", line[0].Token, line[0].Start.Byte) - } - xcom.Before = append(xcom.Before, line[0]) - line = line[1:] - } - } - - // Remaining line comments go at end of file. - in.file.After = append(in.file.After, line...) - - if debug { - for _, c := range suffix { - fmt.Fprintf(os.Stderr, "SUFFIX %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) - } - } - - // Assign suffix comments to syntax immediately before. - for i := len(in.post) - 1; i >= 0; i-- { - x := in.post[i] - - start, end := x.Span() - if debug { - fmt.Printf("post %T :%d:%d #%d :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte, end.Line, end.LineRune, end.Byte) - } - - // Do not assign suffix comments to end of line block or whole file. - // Instead assign them to the last element inside. - switch x.(type) { - case *FileSyntax: - continue - } - - // Do not assign suffix comments to something that starts - // on an earlier line, so that in - // - // x ( y - // z ) // comment - // - // we assign the comment to z and not to x ( ... ). - if start.Line != end.Line { - continue - } - xcom := x.Comment() - for len(suffix) > 0 && end.Byte <= suffix[len(suffix)-1].Start.Byte { - if debug { - fmt.Fprintf(os.Stderr, "ASSIGN SUFFIX %q #%d\n", suffix[len(suffix)-1].Token, suffix[len(suffix)-1].Start.Byte) - } - xcom.Suffix = append(xcom.Suffix, suffix[len(suffix)-1]) - suffix = suffix[:len(suffix)-1] - } - } - - // We assigned suffix comments in reverse. - // If multiple suffix comments were appended to the same - // expression node, they are now in reverse. Fix that. - for _, x := range in.post { - reverseComments(x.Comment().Suffix) - } - - // Remaining suffix comments go at beginning of file. - in.file.Before = append(in.file.Before, suffix...) -} - -// reverseComments reverses the []Comment list. -func reverseComments(list []Comment) { - for i, j := 0, len(list)-1; i < j; i, j = i+1, j-1 { - list[i], list[j] = list[j], list[i] - } -} - -func (in *input) parseFile() { - in.file = new(FileSyntax) - var sym symType - var cb *CommentBlock - for { - tok := in.lex(&sym) - switch tok { - case '\n': - if cb != nil { - in.file.Stmt = append(in.file.Stmt, cb) - cb = nil - } - case _COMMENT: - if cb == nil { - cb = &CommentBlock{Start: sym.pos} - } - com := cb.Comment() - com.Before = append(com.Before, Comment{Start: sym.pos, Token: sym.text}) - case _EOF: - if cb != nil { - in.file.Stmt = append(in.file.Stmt, cb) - } - return - default: - in.parseStmt(&sym) - if cb != nil { - in.file.Stmt[len(in.file.Stmt)-1].Comment().Before = cb.Before - cb = nil - } - } - } -} - -func (in *input) parseStmt(sym *symType) { - start := sym.pos - end := sym.endPos - token := []string{sym.text} - for { - tok := in.lex(sym) - switch tok { - case '\n', _EOF, _EOL: - in.file.Stmt = append(in.file.Stmt, &Line{ - Start: start, - Token: token, - End: end, - }) - return - case '(': - in.file.Stmt = append(in.file.Stmt, in.parseLineBlock(start, token, sym)) - return - default: - token = append(token, sym.text) - end = sym.endPos - } - } -} - -func (in *input) parseLineBlock(start Position, token []string, sym *symType) *LineBlock { - x := &LineBlock{ - Start: start, - Token: token, - LParen: LParen{Pos: sym.pos}, - } - var comments []Comment - for { - tok := in.lex(sym) - switch tok { - case _EOL: - // ignore - case '\n': - if len(comments) == 0 && len(x.Line) > 0 || len(comments) > 0 && comments[len(comments)-1].Token != "" { - comments = append(comments, Comment{}) - } - case _COMMENT: - comments = append(comments, Comment{Start: sym.pos, Token: sym.text}) - case _EOF: - in.Error(fmt.Sprintf("syntax error (unterminated block started at %s:%d:%d)", in.filename, x.Start.Line, x.Start.LineRune)) - case ')': - x.RParen.Before = comments - x.RParen.Pos = sym.pos - tok = in.lex(sym) - if tok != '\n' && tok != _EOF && tok != _EOL { - in.Error("syntax error (expected newline after closing paren)") - } - return x - default: - l := in.parseLine(sym) - x.Line = append(x.Line, l) - l.Comment().Before = comments - comments = nil - } - } -} - -func (in *input) parseLine(sym *symType) *Line { - start := sym.pos - end := sym.endPos - token := []string{sym.text} - for { - tok := in.lex(sym) - switch tok { - case '\n', _EOF, _EOL: - return &Line{ - Start: start, - Token: token, - End: end, - InBlock: true, - } - default: - token = append(token, sym.text) - end = sym.endPos - } - } -} - -const ( - _EOF = -(1 + iota) - _EOL - _IDENT - _STRING - _COMMENT -) - -var ( - slashSlash = []byte("//") - moduleStr = []byte("module") -) - -// ModulePath returns the module path from the gomod file text. -// If it cannot find a module path, it returns an empty string. -// It is tolerant of unrelated problems in the go.mod file. -func ModulePath(mod []byte) string { - for len(mod) > 0 { - line := mod - mod = nil - if i := bytes.IndexByte(line, '\n'); i >= 0 { - line, mod = line[:i], line[i+1:] - } - if i := bytes.Index(line, slashSlash); i >= 0 { - line = line[:i] - } - line = bytes.TrimSpace(line) - if !bytes.HasPrefix(line, moduleStr) { - continue - } - line = line[len(moduleStr):] - n := len(line) - line = bytes.TrimSpace(line) - if len(line) == n || len(line) == 0 { - continue - } - - if line[0] == '"' || line[0] == '`' { - p, err := strconv.Unquote(string(line)) - if err != nil { - return "" // malformed quoted string or multiline module path - } - return p - } - - return string(line) - } - return "" // missing module path -} diff --git a/vendor/golang.org/x/mod/modfile/rule.go b/vendor/golang.org/x/mod/modfile/rule.go deleted file mode 100644 index 62af0688..00000000 --- a/vendor/golang.org/x/mod/modfile/rule.go +++ /dev/null @@ -1,776 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package modfile - -import ( - "bytes" - "errors" - "fmt" - "path/filepath" - "sort" - "strconv" - "strings" - "unicode" - - "golang.org/x/mod/internal/lazyregexp" - "golang.org/x/mod/module" -) - -// A File is the parsed, interpreted form of a go.mod file. -type File struct { - Module *Module - Go *Go - Require []*Require - Exclude []*Exclude - Replace []*Replace - - Syntax *FileSyntax -} - -// A Module is the module statement. -type Module struct { - Mod module.Version - Syntax *Line -} - -// A Go is the go statement. -type Go struct { - Version string // "1.23" - Syntax *Line -} - -// A Require is a single require statement. -type Require struct { - Mod module.Version - Indirect bool // has "// indirect" comment - Syntax *Line -} - -// An Exclude is a single exclude statement. -type Exclude struct { - Mod module.Version - Syntax *Line -} - -// A Replace is a single replace statement. -type Replace struct { - Old module.Version - New module.Version - Syntax *Line -} - -func (f *File) AddModuleStmt(path string) error { - if f.Syntax == nil { - f.Syntax = new(FileSyntax) - } - if f.Module == nil { - f.Module = &Module{ - Mod: module.Version{Path: path}, - Syntax: f.Syntax.addLine(nil, "module", AutoQuote(path)), - } - } else { - f.Module.Mod.Path = path - f.Syntax.updateLine(f.Module.Syntax, "module", AutoQuote(path)) - } - return nil -} - -func (f *File) AddComment(text string) { - if f.Syntax == nil { - f.Syntax = new(FileSyntax) - } - f.Syntax.Stmt = append(f.Syntax.Stmt, &CommentBlock{ - Comments: Comments{ - Before: []Comment{ - { - Token: text, - }, - }, - }, - }) -} - -type VersionFixer func(path, version string) (string, error) - -// Parse parses the data, reported in errors as being from file, -// into a File struct. It applies fix, if non-nil, to canonicalize all module versions found. -func Parse(file string, data []byte, fix VersionFixer) (*File, error) { - return parseToFile(file, data, fix, true) -} - -// ParseLax is like Parse but ignores unknown statements. -// It is used when parsing go.mod files other than the main module, -// under the theory that most statement types we add in the future will -// only apply in the main module, like exclude and replace, -// and so we get better gradual deployments if old go commands -// simply ignore those statements when found in go.mod files -// in dependencies. -func ParseLax(file string, data []byte, fix VersionFixer) (*File, error) { - return parseToFile(file, data, fix, false) -} - -func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (*File, error) { - fs, err := parse(file, data) - if err != nil { - return nil, err - } - f := &File{ - Syntax: fs, - } - - var errs bytes.Buffer - for _, x := range fs.Stmt { - switch x := x.(type) { - case *Line: - f.add(&errs, x, x.Token[0], x.Token[1:], fix, strict) - - case *LineBlock: - if len(x.Token) > 1 { - if strict { - fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) - } - continue - } - switch x.Token[0] { - default: - if strict { - fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) - } - continue - case "module", "require", "exclude", "replace": - for _, l := range x.Line { - f.add(&errs, l, x.Token[0], l.Token, fix, strict) - } - } - } - } - - if errs.Len() > 0 { - return nil, errors.New(strings.TrimRight(errs.String(), "\n")) - } - return f, nil -} - -var GoVersionRE = lazyregexp.New(`^([1-9][0-9]*)\.(0|[1-9][0-9]*)$`) - -func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, fix VersionFixer, strict bool) { - // If strict is false, this module is a dependency. - // We ignore all unknown directives as well as main-module-only - // directives like replace and exclude. It will work better for - // forward compatibility if we can depend on modules that have unknown - // statements (presumed relevant only when acting as the main module) - // and simply ignore those statements. - if !strict { - switch verb { - case "module", "require", "go": - // want these even for dependency go.mods - default: - return - } - } - - switch verb { - default: - fmt.Fprintf(errs, "%s:%d: unknown directive: %s\n", f.Syntax.Name, line.Start.Line, verb) - - case "go": - if f.Go != nil { - fmt.Fprintf(errs, "%s:%d: repeated go statement\n", f.Syntax.Name, line.Start.Line) - return - } - if len(args) != 1 || !GoVersionRE.MatchString(args[0]) { - fmt.Fprintf(errs, "%s:%d: usage: go 1.23\n", f.Syntax.Name, line.Start.Line) - return - } - f.Go = &Go{Syntax: line} - f.Go.Version = args[0] - case "module": - if f.Module != nil { - fmt.Fprintf(errs, "%s:%d: repeated module statement\n", f.Syntax.Name, line.Start.Line) - return - } - f.Module = &Module{Syntax: line} - if len(args) != 1 { - - fmt.Fprintf(errs, "%s:%d: usage: module module/path\n", f.Syntax.Name, line.Start.Line) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - f.Module.Mod = module.Version{Path: s} - case "require", "exclude": - if len(args) != 2 { - fmt.Fprintf(errs, "%s:%d: usage: %s module/path v1.2.3\n", f.Syntax.Name, line.Start.Line, verb) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - v, err := parseVersion(verb, s, &args[1], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - pathMajor, err := modulePathMajor(s) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - if err := module.CheckPathMajor(v, pathMajor); err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) - return - } - if verb == "require" { - f.Require = append(f.Require, &Require{ - Mod: module.Version{Path: s, Version: v}, - Syntax: line, - Indirect: isIndirect(line), - }) - } else { - f.Exclude = append(f.Exclude, &Exclude{ - Mod: module.Version{Path: s, Version: v}, - Syntax: line, - }) - } - case "replace": - arrow := 2 - if len(args) >= 2 && args[1] == "=>" { - arrow = 1 - } - if len(args) < arrow+2 || len(args) > arrow+3 || args[arrow] != "=>" { - fmt.Fprintf(errs, "%s:%d: usage: %s module/path [v1.2.3] => other/module v1.4\n\t or %s module/path [v1.2.3] => ../local/directory\n", f.Syntax.Name, line.Start.Line, verb, verb) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - pathMajor, err := modulePathMajor(s) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - var v string - if arrow == 2 { - v, err = parseVersion(verb, s, &args[1], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - if err := module.CheckPathMajor(v, pathMajor); err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) - return - } - } - ns, err := parseString(&args[arrow+1]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - nv := "" - if len(args) == arrow+2 { - if !IsDirectoryPath(ns) { - fmt.Fprintf(errs, "%s:%d: replacement module without version must be directory path (rooted or starting with ./ or ../)\n", f.Syntax.Name, line.Start.Line) - return - } - if filepath.Separator == '/' && strings.Contains(ns, `\`) { - fmt.Fprintf(errs, "%s:%d: replacement directory appears to be Windows path (on a non-windows system)\n", f.Syntax.Name, line.Start.Line) - return - } - } - if len(args) == arrow+3 { - nv, err = parseVersion(verb, ns, &args[arrow+2], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - if IsDirectoryPath(ns) { - fmt.Fprintf(errs, "%s:%d: replacement module directory path %q cannot have version\n", f.Syntax.Name, line.Start.Line, ns) - return - } - } - f.Replace = append(f.Replace, &Replace{ - Old: module.Version{Path: s, Version: v}, - New: module.Version{Path: ns, Version: nv}, - Syntax: line, - }) - } -} - -// isIndirect reports whether line has a "// indirect" comment, -// meaning it is in go.mod only for its effect on indirect dependencies, -// so that it can be dropped entirely once the effective version of the -// indirect dependency reaches the given minimum version. -func isIndirect(line *Line) bool { - if len(line.Suffix) == 0 { - return false - } - f := strings.Fields(strings.TrimPrefix(line.Suffix[0].Token, string(slashSlash))) - return (len(f) == 1 && f[0] == "indirect" || len(f) > 1 && f[0] == "indirect;") -} - -// setIndirect sets line to have (or not have) a "// indirect" comment. -func setIndirect(line *Line, indirect bool) { - if isIndirect(line) == indirect { - return - } - if indirect { - // Adding comment. - if len(line.Suffix) == 0 { - // New comment. - line.Suffix = []Comment{{Token: "// indirect", Suffix: true}} - return - } - - com := &line.Suffix[0] - text := strings.TrimSpace(strings.TrimPrefix(com.Token, string(slashSlash))) - if text == "" { - // Empty comment. - com.Token = "// indirect" - return - } - - // Insert at beginning of existing comment. - com.Token = "// indirect; " + text - return - } - - // Removing comment. - f := strings.Fields(line.Suffix[0].Token) - if len(f) == 2 { - // Remove whole comment. - line.Suffix = nil - return - } - - // Remove comment prefix. - com := &line.Suffix[0] - i := strings.Index(com.Token, "indirect;") - com.Token = "//" + com.Token[i+len("indirect;"):] -} - -// IsDirectoryPath reports whether the given path should be interpreted -// as a directory path. Just like on the go command line, relative paths -// and rooted paths are directory paths; the rest are module paths. -func IsDirectoryPath(ns string) bool { - // Because go.mod files can move from one system to another, - // we check all known path syntaxes, both Unix and Windows. - return strings.HasPrefix(ns, "./") || strings.HasPrefix(ns, "../") || strings.HasPrefix(ns, "/") || - strings.HasPrefix(ns, `.\`) || strings.HasPrefix(ns, `..\`) || strings.HasPrefix(ns, `\`) || - len(ns) >= 2 && ('A' <= ns[0] && ns[0] <= 'Z' || 'a' <= ns[0] && ns[0] <= 'z') && ns[1] == ':' -} - -// MustQuote reports whether s must be quoted in order to appear as -// a single token in a go.mod line. -func MustQuote(s string) bool { - for _, r := range s { - if !unicode.IsPrint(r) || r == ' ' || r == '"' || r == '\'' || r == '`' { - return true - } - } - return s == "" || strings.Contains(s, "//") || strings.Contains(s, "/*") -} - -// AutoQuote returns s or, if quoting is required for s to appear in a go.mod, -// the quotation of s. -func AutoQuote(s string) string { - if MustQuote(s) { - return strconv.Quote(s) - } - return s -} - -func parseString(s *string) (string, error) { - t := *s - if strings.HasPrefix(t, `"`) { - var err error - if t, err = strconv.Unquote(t); err != nil { - return "", err - } - } else if strings.ContainsAny(t, "\"'`") { - // Other quotes are reserved both for possible future expansion - // and to avoid confusion. For example if someone types 'x' - // we want that to be a syntax error and not a literal x in literal quotation marks. - return "", fmt.Errorf("unquoted string cannot contain quote") - } - *s = AutoQuote(t) - return t, nil -} - -type Error struct { - Verb string - ModPath string - Err error -} - -func (e *Error) Error() string { - return fmt.Sprintf("%s %s: %v", e.Verb, e.ModPath, e.Err) -} - -func (e *Error) Unwrap() error { return e.Err } - -func parseVersion(verb string, path string, s *string, fix VersionFixer) (string, error) { - t, err := parseString(s) - if err != nil { - return "", &Error{ - Verb: verb, - ModPath: path, - Err: &module.InvalidVersionError{ - Version: *s, - Err: err, - }, - } - } - if fix != nil { - var err error - t, err = fix(path, t) - if err != nil { - if err, ok := err.(*module.ModuleError); ok { - return "", &Error{ - Verb: verb, - ModPath: path, - Err: err.Err, - } - } - return "", err - } - } - if v := module.CanonicalVersion(t); v != "" { - *s = v - return *s, nil - } - return "", &Error{ - Verb: verb, - ModPath: path, - Err: &module.InvalidVersionError{ - Version: t, - Err: errors.New("must be of the form v1.2.3"), - }, - } -} - -func modulePathMajor(path string) (string, error) { - _, major, ok := module.SplitPathVersion(path) - if !ok { - return "", fmt.Errorf("invalid module path") - } - return major, nil -} - -func (f *File) Format() ([]byte, error) { - return Format(f.Syntax), nil -} - -// Cleanup cleans up the file f after any edit operations. -// To avoid quadratic behavior, modifications like DropRequire -// clear the entry but do not remove it from the slice. -// Cleanup cleans out all the cleared entries. -func (f *File) Cleanup() { - w := 0 - for _, r := range f.Require { - if r.Mod.Path != "" { - f.Require[w] = r - w++ - } - } - f.Require = f.Require[:w] - - w = 0 - for _, x := range f.Exclude { - if x.Mod.Path != "" { - f.Exclude[w] = x - w++ - } - } - f.Exclude = f.Exclude[:w] - - w = 0 - for _, r := range f.Replace { - if r.Old.Path != "" { - f.Replace[w] = r - w++ - } - } - f.Replace = f.Replace[:w] - - f.Syntax.Cleanup() -} - -func (f *File) AddGoStmt(version string) error { - if !GoVersionRE.MatchString(version) { - return fmt.Errorf("invalid language version string %q", version) - } - if f.Go == nil { - var hint Expr - if f.Module != nil && f.Module.Syntax != nil { - hint = f.Module.Syntax - } - f.Go = &Go{ - Version: version, - Syntax: f.Syntax.addLine(hint, "go", version), - } - } else { - f.Go.Version = version - f.Syntax.updateLine(f.Go.Syntax, "go", version) - } - return nil -} - -func (f *File) AddRequire(path, vers string) error { - need := true - for _, r := range f.Require { - if r.Mod.Path == path { - if need { - r.Mod.Version = vers - f.Syntax.updateLine(r.Syntax, "require", AutoQuote(path), vers) - need = false - } else { - f.Syntax.removeLine(r.Syntax) - *r = Require{} - } - } - } - - if need { - f.AddNewRequire(path, vers, false) - } - return nil -} - -func (f *File) AddNewRequire(path, vers string, indirect bool) { - line := f.Syntax.addLine(nil, "require", AutoQuote(path), vers) - setIndirect(line, indirect) - f.Require = append(f.Require, &Require{module.Version{Path: path, Version: vers}, indirect, line}) -} - -func (f *File) SetRequire(req []*Require) { - need := make(map[string]string) - indirect := make(map[string]bool) - for _, r := range req { - need[r.Mod.Path] = r.Mod.Version - indirect[r.Mod.Path] = r.Indirect - } - - for _, r := range f.Require { - if v, ok := need[r.Mod.Path]; ok { - r.Mod.Version = v - r.Indirect = indirect[r.Mod.Path] - } else { - *r = Require{} - } - } - - var newStmts []Expr - for _, stmt := range f.Syntax.Stmt { - switch stmt := stmt.(type) { - case *LineBlock: - if len(stmt.Token) > 0 && stmt.Token[0] == "require" { - var newLines []*Line - for _, line := range stmt.Line { - if p, err := parseString(&line.Token[0]); err == nil && need[p] != "" { - if len(line.Comments.Before) == 1 && len(line.Comments.Before[0].Token) == 0 { - line.Comments.Before = line.Comments.Before[:0] - } - line.Token[1] = need[p] - delete(need, p) - setIndirect(line, indirect[p]) - newLines = append(newLines, line) - } - } - if len(newLines) == 0 { - continue // drop stmt - } - stmt.Line = newLines - } - - case *Line: - if len(stmt.Token) > 0 && stmt.Token[0] == "require" { - if p, err := parseString(&stmt.Token[1]); err == nil && need[p] != "" { - stmt.Token[2] = need[p] - delete(need, p) - setIndirect(stmt, indirect[p]) - } else { - continue // drop stmt - } - } - } - newStmts = append(newStmts, stmt) - } - f.Syntax.Stmt = newStmts - - for path, vers := range need { - f.AddNewRequire(path, vers, indirect[path]) - } - f.SortBlocks() -} - -func (f *File) DropRequire(path string) error { - for _, r := range f.Require { - if r.Mod.Path == path { - f.Syntax.removeLine(r.Syntax) - *r = Require{} - } - } - return nil -} - -func (f *File) AddExclude(path, vers string) error { - var hint *Line - for _, x := range f.Exclude { - if x.Mod.Path == path && x.Mod.Version == vers { - return nil - } - if x.Mod.Path == path { - hint = x.Syntax - } - } - - f.Exclude = append(f.Exclude, &Exclude{Mod: module.Version{Path: path, Version: vers}, Syntax: f.Syntax.addLine(hint, "exclude", AutoQuote(path), vers)}) - return nil -} - -func (f *File) DropExclude(path, vers string) error { - for _, x := range f.Exclude { - if x.Mod.Path == path && x.Mod.Version == vers { - f.Syntax.removeLine(x.Syntax) - *x = Exclude{} - } - } - return nil -} - -func (f *File) AddReplace(oldPath, oldVers, newPath, newVers string) error { - need := true - old := module.Version{Path: oldPath, Version: oldVers} - new := module.Version{Path: newPath, Version: newVers} - tokens := []string{"replace", AutoQuote(oldPath)} - if oldVers != "" { - tokens = append(tokens, oldVers) - } - tokens = append(tokens, "=>", AutoQuote(newPath)) - if newVers != "" { - tokens = append(tokens, newVers) - } - - var hint *Line - for _, r := range f.Replace { - if r.Old.Path == oldPath && (oldVers == "" || r.Old.Version == oldVers) { - if need { - // Found replacement for old; update to use new. - r.New = new - f.Syntax.updateLine(r.Syntax, tokens...) - need = false - continue - } - // Already added; delete other replacements for same. - f.Syntax.removeLine(r.Syntax) - *r = Replace{} - } - if r.Old.Path == oldPath { - hint = r.Syntax - } - } - if need { - f.Replace = append(f.Replace, &Replace{Old: old, New: new, Syntax: f.Syntax.addLine(hint, tokens...)}) - } - return nil -} - -func (f *File) DropReplace(oldPath, oldVers string) error { - for _, r := range f.Replace { - if r.Old.Path == oldPath && r.Old.Version == oldVers { - f.Syntax.removeLine(r.Syntax) - *r = Replace{} - } - } - return nil -} - -func (f *File) SortBlocks() { - f.removeDups() // otherwise sorting is unsafe - - for _, stmt := range f.Syntax.Stmt { - block, ok := stmt.(*LineBlock) - if !ok { - continue - } - sort.Slice(block.Line, func(i, j int) bool { - li := block.Line[i] - lj := block.Line[j] - for k := 0; k < len(li.Token) && k < len(lj.Token); k++ { - if li.Token[k] != lj.Token[k] { - return li.Token[k] < lj.Token[k] - } - } - return len(li.Token) < len(lj.Token) - }) - } -} - -func (f *File) removeDups() { - have := make(map[module.Version]bool) - kill := make(map[*Line]bool) - for _, x := range f.Exclude { - if have[x.Mod] { - kill[x.Syntax] = true - continue - } - have[x.Mod] = true - } - var excl []*Exclude - for _, x := range f.Exclude { - if !kill[x.Syntax] { - excl = append(excl, x) - } - } - f.Exclude = excl - - have = make(map[module.Version]bool) - // Later replacements take priority over earlier ones. - for i := len(f.Replace) - 1; i >= 0; i-- { - x := f.Replace[i] - if have[x.Old] { - kill[x.Syntax] = true - continue - } - have[x.Old] = true - } - var repl []*Replace - for _, x := range f.Replace { - if !kill[x.Syntax] { - repl = append(repl, x) - } - } - f.Replace = repl - - var stmts []Expr - for _, stmt := range f.Syntax.Stmt { - switch stmt := stmt.(type) { - case *Line: - if kill[stmt] { - continue - } - case *LineBlock: - var lines []*Line - for _, line := range stmt.Line { - if !kill[line] { - lines = append(lines, line) - } - } - stmt.Line = lines - if len(lines) == 0 { - continue - } - } - stmts = append(stmts, stmt) - } - f.Syntax.Stmt = stmts -} diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go deleted file mode 100644 index 6cd37280..00000000 --- a/vendor/golang.org/x/mod/module/module.go +++ /dev/null @@ -1,718 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package module defines the module.Version type along with support code. -// -// The module.Version type is a simple Path, Version pair: -// -// type Version struct { -// Path string -// Version string -// } -// -// There are no restrictions imposed directly by use of this structure, -// but additional checking functions, most notably Check, verify that -// a particular path, version pair is valid. -// -// Escaped Paths -// -// Module paths appear as substrings of file system paths -// (in the download cache) and of web server URLs in the proxy protocol. -// In general we cannot rely on file systems to be case-sensitive, -// nor can we rely on web servers, since they read from file systems. -// That is, we cannot rely on the file system to keep rsc.io/QUOTE -// and rsc.io/quote separate. Windows and macOS don't. -// Instead, we must never require two different casings of a file path. -// Because we want the download cache to match the proxy protocol, -// and because we want the proxy protocol to be possible to serve -// from a tree of static files (which might be stored on a case-insensitive -// file system), the proxy protocol must never require two different casings -// of a URL path either. -// -// One possibility would be to make the escaped form be the lowercase -// hexadecimal encoding of the actual path bytes. This would avoid ever -// needing different casings of a file path, but it would be fairly illegible -// to most programmers when those paths appeared in the file system -// (including in file paths in compiler errors and stack traces) -// in web server logs, and so on. Instead, we want a safe escaped form that -// leaves most paths unaltered. -// -// The safe escaped form is to replace every uppercase letter -// with an exclamation mark followed by the letter's lowercase equivalent. -// -// For example, -// -// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. -// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy -// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. -// -// Import paths that avoid upper-case letters are left unchanged. -// Note that because import paths are ASCII-only and avoid various -// problematic punctuation (like : < and >), the escaped form is also ASCII-only -// and avoids the same problematic punctuation. -// -// Import paths have never allowed exclamation marks, so there is no -// need to define how to escape a literal !. -// -// Unicode Restrictions -// -// Today, paths are disallowed from using Unicode. -// -// Although paths are currently disallowed from using Unicode, -// we would like at some point to allow Unicode letters as well, to assume that -// file systems and URLs are Unicode-safe (storing UTF-8), and apply -// the !-for-uppercase convention for escaping them in the file system. -// But there are at least two subtle considerations. -// -// First, note that not all case-fold equivalent distinct runes -// form an upper/lower pair. -// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) -// are three distinct runes that case-fold to each other. -// When we do add Unicode letters, we must not assume that upper/lower -// are the only case-equivalent pairs. -// Perhaps the Kelvin symbol would be disallowed entirely, for example. -// Or perhaps it would escape as "!!k", or perhaps as "(212A)". -// -// Second, it would be nice to allow Unicode marks as well as letters, -// but marks include combining marks, and then we must deal not -// only with case folding but also normalization: both U+00E9 ('é') -// and U+0065 U+0301 ('e' followed by combining acute accent) -// look the same on the page and are treated by some file systems -// as the same path. If we do allow Unicode marks in paths, there -// must be some kind of normalization to allow only one canonical -// encoding of any character used in an import path. -package module - -// IMPORTANT NOTE -// -// This file essentially defines the set of valid import paths for the go command. -// There are many subtle considerations, including Unicode ambiguity, -// security, network, and file system representations. -// -// This file also defines the set of valid module path and version combinations, -// another topic with many subtle considerations. -// -// Changes to the semantics in this file require approval from rsc. - -import ( - "fmt" - "sort" - "strings" - "unicode" - "unicode/utf8" - - "golang.org/x/mod/semver" - errors "golang.org/x/xerrors" -) - -// A Version (for clients, a module.Version) is defined by a module path and version pair. -// These are stored in their plain (unescaped) form. -type Version struct { - // Path is a module path, like "golang.org/x/text" or "rsc.io/quote/v2". - Path string - - // Version is usually a semantic version in canonical form. - // There are three exceptions to this general rule. - // First, the top-level target of a build has no specific version - // and uses Version = "". - // Second, during MVS calculations the version "none" is used - // to represent the decision to take no version of a given module. - // Third, filesystem paths found in "replace" directives are - // represented by a path with an empty version. - Version string `json:",omitempty"` -} - -// String returns a representation of the Version suitable for logging -// (Path@Version, or just Path if Version is empty). -func (m Version) String() string { - if m.Version == "" { - return m.Path - } - return m.Path + "@" + m.Version -} - -// A ModuleError indicates an error specific to a module. -type ModuleError struct { - Path string - Version string - Err error -} - -// VersionError returns a ModuleError derived from a Version and error, -// or err itself if it is already such an error. -func VersionError(v Version, err error) error { - var mErr *ModuleError - if errors.As(err, &mErr) && mErr.Path == v.Path && mErr.Version == v.Version { - return err - } - return &ModuleError{ - Path: v.Path, - Version: v.Version, - Err: err, - } -} - -func (e *ModuleError) Error() string { - if v, ok := e.Err.(*InvalidVersionError); ok { - return fmt.Sprintf("%s@%s: invalid %s: %v", e.Path, v.Version, v.noun(), v.Err) - } - if e.Version != "" { - return fmt.Sprintf("%s@%s: %v", e.Path, e.Version, e.Err) - } - return fmt.Sprintf("module %s: %v", e.Path, e.Err) -} - -func (e *ModuleError) Unwrap() error { return e.Err } - -// An InvalidVersionError indicates an error specific to a version, with the -// module path unknown or specified externally. -// -// A ModuleError may wrap an InvalidVersionError, but an InvalidVersionError -// must not wrap a ModuleError. -type InvalidVersionError struct { - Version string - Pseudo bool - Err error -} - -// noun returns either "version" or "pseudo-version", depending on whether -// e.Version is a pseudo-version. -func (e *InvalidVersionError) noun() string { - if e.Pseudo { - return "pseudo-version" - } - return "version" -} - -func (e *InvalidVersionError) Error() string { - return fmt.Sprintf("%s %q invalid: %s", e.noun(), e.Version, e.Err) -} - -func (e *InvalidVersionError) Unwrap() error { return e.Err } - -// Check checks that a given module path, version pair is valid. -// In addition to the path being a valid module path -// and the version being a valid semantic version, -// the two must correspond. -// For example, the path "yaml/v2" only corresponds to -// semantic versions beginning with "v2.". -func Check(path, version string) error { - if err := CheckPath(path); err != nil { - return err - } - if !semver.IsValid(version) { - return &ModuleError{ - Path: path, - Err: &InvalidVersionError{Version: version, Err: errors.New("not a semantic version")}, - } - } - _, pathMajor, _ := SplitPathVersion(path) - if err := CheckPathMajor(version, pathMajor); err != nil { - return &ModuleError{Path: path, Err: err} - } - return nil -} - -// firstPathOK reports whether r can appear in the first element of a module path. -// The first element of the path must be an LDH domain name, at least for now. -// To avoid case ambiguity, the domain name must be entirely lower case. -func firstPathOK(r rune) bool { - return r == '-' || r == '.' || - '0' <= r && r <= '9' || - 'a' <= r && r <= 'z' -} - -// pathOK reports whether r can appear in an import path element. -// Paths can be ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. -// This matches what "go get" has historically recognized in import paths. -// TODO(rsc): We would like to allow Unicode letters, but that requires additional -// care in the safe encoding (see "escaped paths" above). -func pathOK(r rune) bool { - if r < utf8.RuneSelf { - return r == '+' || r == '-' || r == '.' || r == '_' || r == '~' || - '0' <= r && r <= '9' || - 'A' <= r && r <= 'Z' || - 'a' <= r && r <= 'z' - } - return false -} - -// fileNameOK reports whether r can appear in a file name. -// For now we allow all Unicode letters but otherwise limit to pathOK plus a few more punctuation characters. -// If we expand the set of allowed characters here, we have to -// work harder at detecting potential case-folding and normalization collisions. -// See note about "escaped paths" above. -func fileNameOK(r rune) bool { - if r < utf8.RuneSelf { - // Entire set of ASCII punctuation, from which we remove characters: - // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ - // We disallow some shell special characters: " ' * < > ? ` | - // (Note that some of those are disallowed by the Windows file system as well.) - // We also disallow path separators / : and \ (fileNameOK is only called on path element characters). - // We allow spaces (U+0020) in file names. - const allowed = "!#$%&()+,-.=@[]^_{}~ " - if '0' <= r && r <= '9' || 'A' <= r && r <= 'Z' || 'a' <= r && r <= 'z' { - return true - } - for i := 0; i < len(allowed); i++ { - if rune(allowed[i]) == r { - return true - } - } - return false - } - // It may be OK to add more ASCII punctuation here, but only carefully. - // For example Windows disallows < > \, and macOS disallows :, so we must not allow those. - return unicode.IsLetter(r) -} - -// CheckPath checks that a module path is valid. -// A valid module path is a valid import path, as checked by CheckImportPath, -// with two additional constraints. -// First, the leading path element (up to the first slash, if any), -// by convention a domain name, must contain only lower-case ASCII letters, -// ASCII digits, dots (U+002E), and dashes (U+002D); -// it must contain at least one dot and cannot start with a dash. -// Second, for a final path element of the form /vN, where N looks numeric -// (ASCII digits and dots) must not begin with a leading zero, must not be /v1, -// and must not contain any dots. For paths beginning with "gopkg.in/", -// this second requirement is replaced by a requirement that the path -// follow the gopkg.in server's conventions. -func CheckPath(path string) error { - if err := checkPath(path, false); err != nil { - return fmt.Errorf("malformed module path %q: %v", path, err) - } - i := strings.Index(path, "/") - if i < 0 { - i = len(path) - } - if i == 0 { - return fmt.Errorf("malformed module path %q: leading slash", path) - } - if !strings.Contains(path[:i], ".") { - return fmt.Errorf("malformed module path %q: missing dot in first path element", path) - } - if path[0] == '-' { - return fmt.Errorf("malformed module path %q: leading dash in first path element", path) - } - for _, r := range path[:i] { - if !firstPathOK(r) { - return fmt.Errorf("malformed module path %q: invalid char %q in first path element", path, r) - } - } - if _, _, ok := SplitPathVersion(path); !ok { - return fmt.Errorf("malformed module path %q: invalid version", path) - } - return nil -} - -// CheckImportPath checks that an import path is valid. -// -// A valid import path consists of one or more valid path elements -// separated by slashes (U+002F). (It must not begin with nor end in a slash.) -// -// A valid path element is a non-empty string made up of -// ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. -// It must not begin or end with a dot (U+002E), nor contain two dots in a row. -// -// The element prefix up to the first dot must not be a reserved file name -// on Windows, regardless of case (CON, com1, NuL, and so on). -// -// CheckImportPath may be less restrictive in the future, but see the -// top-level package documentation for additional information about -// subtleties of Unicode. -func CheckImportPath(path string) error { - if err := checkPath(path, false); err != nil { - return fmt.Errorf("malformed import path %q: %v", path, err) - } - return nil -} - -// checkPath checks that a general path is valid. -// It returns an error describing why but not mentioning path. -// Because these checks apply to both module paths and import paths, -// the caller is expected to add the "malformed ___ path %q: " prefix. -// fileName indicates whether the final element of the path is a file name -// (as opposed to a directory name). -func checkPath(path string, fileName bool) error { - if !utf8.ValidString(path) { - return fmt.Errorf("invalid UTF-8") - } - if path == "" { - return fmt.Errorf("empty string") - } - if path[0] == '-' { - return fmt.Errorf("leading dash") - } - if strings.Contains(path, "//") { - return fmt.Errorf("double slash") - } - if path[len(path)-1] == '/' { - return fmt.Errorf("trailing slash") - } - elemStart := 0 - for i, r := range path { - if r == '/' { - if err := checkElem(path[elemStart:i], fileName); err != nil { - return err - } - elemStart = i + 1 - } - } - if err := checkElem(path[elemStart:], fileName); err != nil { - return err - } - return nil -} - -// checkElem checks whether an individual path element is valid. -// fileName indicates whether the element is a file name (not a directory name). -func checkElem(elem string, fileName bool) error { - if elem == "" { - return fmt.Errorf("empty path element") - } - if strings.Count(elem, ".") == len(elem) { - return fmt.Errorf("invalid path element %q", elem) - } - if elem[0] == '.' && !fileName { - return fmt.Errorf("leading dot in path element") - } - if elem[len(elem)-1] == '.' { - return fmt.Errorf("trailing dot in path element") - } - charOK := pathOK - if fileName { - charOK = fileNameOK - } - for _, r := range elem { - if !charOK(r) { - return fmt.Errorf("invalid char %q", r) - } - } - - // Windows disallows a bunch of path elements, sadly. - // See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file - short := elem - if i := strings.Index(short, "."); i >= 0 { - short = short[:i] - } - for _, bad := range badWindowsNames { - if strings.EqualFold(bad, short) { - return fmt.Errorf("%q disallowed as path element component on Windows", short) - } - } - return nil -} - -// CheckFilePath checks that a slash-separated file path is valid. -// The definition of a valid file path is the same as the definition -// of a valid import path except that the set of allowed characters is larger: -// all Unicode letters, ASCII digits, the ASCII space character (U+0020), -// and the ASCII punctuation characters -// “!#$%&()+,-.=@[]^_{}~”. -// (The excluded punctuation characters, " * < > ? ` ' | / \ and :, -// have special meanings in certain shells or operating systems.) -// -// CheckFilePath may be less restrictive in the future, but see the -// top-level package documentation for additional information about -// subtleties of Unicode. -func CheckFilePath(path string) error { - if err := checkPath(path, true); err != nil { - return fmt.Errorf("malformed file path %q: %v", path, err) - } - return nil -} - -// badWindowsNames are the reserved file path elements on Windows. -// See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file -var badWindowsNames = []string{ - "CON", - "PRN", - "AUX", - "NUL", - "COM1", - "COM2", - "COM3", - "COM4", - "COM5", - "COM6", - "COM7", - "COM8", - "COM9", - "LPT1", - "LPT2", - "LPT3", - "LPT4", - "LPT5", - "LPT6", - "LPT7", - "LPT8", - "LPT9", -} - -// SplitPathVersion returns prefix and major version such that prefix+pathMajor == path -// and version is either empty or "/vN" for N >= 2. -// As a special case, gopkg.in paths are recognized directly; -// they require ".vN" instead of "/vN", and for all N, not just N >= 2. -// SplitPathVersion returns with ok = false when presented with -// a path whose last path element does not satisfy the constraints -// applied by CheckPath, such as "example.com/pkg/v1" or "example.com/pkg/v1.2". -func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { - if strings.HasPrefix(path, "gopkg.in/") { - return splitGopkgIn(path) - } - - i := len(path) - dot := false - for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9' || path[i-1] == '.') { - if path[i-1] == '.' { - dot = true - } - i-- - } - if i <= 1 || i == len(path) || path[i-1] != 'v' || path[i-2] != '/' { - return path, "", true - } - prefix, pathMajor = path[:i-2], path[i-2:] - if dot || len(pathMajor) <= 2 || pathMajor[2] == '0' || pathMajor == "/v1" { - return path, "", false - } - return prefix, pathMajor, true -} - -// splitGopkgIn is like SplitPathVersion but only for gopkg.in paths. -func splitGopkgIn(path string) (prefix, pathMajor string, ok bool) { - if !strings.HasPrefix(path, "gopkg.in/") { - return path, "", false - } - i := len(path) - if strings.HasSuffix(path, "-unstable") { - i -= len("-unstable") - } - for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9') { - i-- - } - if i <= 1 || path[i-1] != 'v' || path[i-2] != '.' { - // All gopkg.in paths must end in vN for some N. - return path, "", false - } - prefix, pathMajor = path[:i-2], path[i-2:] - if len(pathMajor) <= 2 || pathMajor[2] == '0' && pathMajor != ".v0" { - return path, "", false - } - return prefix, pathMajor, true -} - -// MatchPathMajor reports whether the semantic version v -// matches the path major version pathMajor. -// -// MatchPathMajor returns true if and only if CheckPathMajor returns nil. -func MatchPathMajor(v, pathMajor string) bool { - return CheckPathMajor(v, pathMajor) == nil -} - -// CheckPathMajor returns a non-nil error if the semantic version v -// does not match the path major version pathMajor. -func CheckPathMajor(v, pathMajor string) error { - // TODO(jayconrod): return errors or panic for invalid inputs. This function - // (and others) was covered by integration tests for cmd/go, and surrounding - // code protected against invalid inputs like non-canonical versions. - if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { - pathMajor = strings.TrimSuffix(pathMajor, "-unstable") - } - if strings.HasPrefix(v, "v0.0.0-") && pathMajor == ".v1" { - // Allow old bug in pseudo-versions that generated v0.0.0- pseudoversion for gopkg .v1. - // For example, gopkg.in/yaml.v2@v2.2.1's go.mod requires gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405. - return nil - } - m := semver.Major(v) - if pathMajor == "" { - if m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" { - return nil - } - pathMajor = "v0 or v1" - } else if pathMajor[0] == '/' || pathMajor[0] == '.' { - if m == pathMajor[1:] { - return nil - } - pathMajor = pathMajor[1:] - } - return &InvalidVersionError{ - Version: v, - Err: fmt.Errorf("should be %s, not %s", pathMajor, semver.Major(v)), - } -} - -// PathMajorPrefix returns the major-version tag prefix implied by pathMajor. -// An empty PathMajorPrefix allows either v0 or v1. -// -// Note that MatchPathMajor may accept some versions that do not actually begin -// with this prefix: namely, it accepts a 'v0.0.0-' prefix for a '.v1' -// pathMajor, even though that pathMajor implies 'v1' tagging. -func PathMajorPrefix(pathMajor string) string { - if pathMajor == "" { - return "" - } - if pathMajor[0] != '/' && pathMajor[0] != '.' { - panic("pathMajor suffix " + pathMajor + " passed to PathMajorPrefix lacks separator") - } - if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { - pathMajor = strings.TrimSuffix(pathMajor, "-unstable") - } - m := pathMajor[1:] - if m != semver.Major(m) { - panic("pathMajor suffix " + pathMajor + "passed to PathMajorPrefix is not a valid major version") - } - return m -} - -// CanonicalVersion returns the canonical form of the version string v. -// It is the same as semver.Canonical(v) except that it preserves the special build suffix "+incompatible". -func CanonicalVersion(v string) string { - cv := semver.Canonical(v) - if semver.Build(v) == "+incompatible" { - cv += "+incompatible" - } - return cv -} - -// Sort sorts the list by Path, breaking ties by comparing Version fields. -// The Version fields are interpreted as semantic versions (using semver.Compare) -// optionally followed by a tie-breaking suffix introduced by a slash character, -// like in "v0.0.1/go.mod". -func Sort(list []Version) { - sort.Slice(list, func(i, j int) bool { - mi := list[i] - mj := list[j] - if mi.Path != mj.Path { - return mi.Path < mj.Path - } - // To help go.sum formatting, allow version/file. - // Compare semver prefix by semver rules, - // file by string order. - vi := mi.Version - vj := mj.Version - var fi, fj string - if k := strings.Index(vi, "/"); k >= 0 { - vi, fi = vi[:k], vi[k:] - } - if k := strings.Index(vj, "/"); k >= 0 { - vj, fj = vj[:k], vj[k:] - } - if vi != vj { - return semver.Compare(vi, vj) < 0 - } - return fi < fj - }) -} - -// EscapePath returns the escaped form of the given module path. -// It fails if the module path is invalid. -func EscapePath(path string) (escaped string, err error) { - if err := CheckPath(path); err != nil { - return "", err - } - - return escapeString(path) -} - -// EscapeVersion returns the escaped form of the given module version. -// Versions are allowed to be in non-semver form but must be valid file names -// and not contain exclamation marks. -func EscapeVersion(v string) (escaped string, err error) { - if err := checkElem(v, true); err != nil || strings.Contains(v, "!") { - return "", &InvalidVersionError{ - Version: v, - Err: fmt.Errorf("disallowed version string"), - } - } - return escapeString(v) -} - -func escapeString(s string) (escaped string, err error) { - haveUpper := false - for _, r := range s { - if r == '!' || r >= utf8.RuneSelf { - // This should be disallowed by CheckPath, but diagnose anyway. - // The correctness of the escaping loop below depends on it. - return "", fmt.Errorf("internal error: inconsistency in EscapePath") - } - if 'A' <= r && r <= 'Z' { - haveUpper = true - } - } - - if !haveUpper { - return s, nil - } - - var buf []byte - for _, r := range s { - if 'A' <= r && r <= 'Z' { - buf = append(buf, '!', byte(r+'a'-'A')) - } else { - buf = append(buf, byte(r)) - } - } - return string(buf), nil -} - -// UnescapePath returns the module path for the given escaped path. -// It fails if the escaped path is invalid or describes an invalid path. -func UnescapePath(escaped string) (path string, err error) { - path, ok := unescapeString(escaped) - if !ok { - return "", fmt.Errorf("invalid escaped module path %q", escaped) - } - if err := CheckPath(path); err != nil { - return "", fmt.Errorf("invalid escaped module path %q: %v", escaped, err) - } - return path, nil -} - -// UnescapeVersion returns the version string for the given escaped version. -// It fails if the escaped form is invalid or describes an invalid version. -// Versions are allowed to be in non-semver form but must be valid file names -// and not contain exclamation marks. -func UnescapeVersion(escaped string) (v string, err error) { - v, ok := unescapeString(escaped) - if !ok { - return "", fmt.Errorf("invalid escaped version %q", escaped) - } - if err := checkElem(v, true); err != nil { - return "", fmt.Errorf("invalid escaped version %q: %v", v, err) - } - return v, nil -} - -func unescapeString(escaped string) (string, bool) { - var buf []byte - - bang := false - for _, r := range escaped { - if r >= utf8.RuneSelf { - return "", false - } - if bang { - bang = false - if r < 'a' || 'z' < r { - return "", false - } - buf = append(buf, byte(r+'A'-'a')) - continue - } - if r == '!' { - bang = true - continue - } - if 'A' <= r && r <= 'Z' { - return "", false - } - buf = append(buf, byte(r)) - } - if bang { - return "", false - } - return string(buf), true -} diff --git a/vendor/golang.org/x/mod/semver/semver.go b/vendor/golang.org/x/mod/semver/semver.go deleted file mode 100644 index 2988e3cf..00000000 --- a/vendor/golang.org/x/mod/semver/semver.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package semver implements comparison of semantic version strings. -// In this package, semantic version strings must begin with a leading "v", -// as in "v1.0.0". -// -// The general form of a semantic version string accepted by this package is -// -// vMAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]] -// -// where square brackets indicate optional parts of the syntax; -// MAJOR, MINOR, and PATCH are decimal integers without extra leading zeros; -// PRERELEASE and BUILD are each a series of non-empty dot-separated identifiers -// using only alphanumeric characters and hyphens; and -// all-numeric PRERELEASE identifiers must not have leading zeros. -// -// This package follows Semantic Versioning 2.0.0 (see semver.org) -// with two exceptions. First, it requires the "v" prefix. Second, it recognizes -// vMAJOR and vMAJOR.MINOR (with no prerelease or build suffixes) -// as shorthands for vMAJOR.0.0 and vMAJOR.MINOR.0. -package semver - -// parsed returns the parsed form of a semantic version string. -type parsed struct { - major string - minor string - patch string - short string - prerelease string - build string - err string -} - -// IsValid reports whether v is a valid semantic version string. -func IsValid(v string) bool { - _, ok := parse(v) - return ok -} - -// Canonical returns the canonical formatting of the semantic version v. -// It fills in any missing .MINOR or .PATCH and discards build metadata. -// Two semantic versions compare equal only if their canonical formattings -// are identical strings. -// The canonical invalid semantic version is the empty string. -func Canonical(v string) string { - p, ok := parse(v) - if !ok { - return "" - } - if p.build != "" { - return v[:len(v)-len(p.build)] - } - if p.short != "" { - return v + p.short - } - return v -} - -// Major returns the major version prefix of the semantic version v. -// For example, Major("v2.1.0") == "v2". -// If v is an invalid semantic version string, Major returns the empty string. -func Major(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return v[:1+len(pv.major)] -} - -// MajorMinor returns the major.minor version prefix of the semantic version v. -// For example, MajorMinor("v2.1.0") == "v2.1". -// If v is an invalid semantic version string, MajorMinor returns the empty string. -func MajorMinor(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - i := 1 + len(pv.major) - if j := i + 1 + len(pv.minor); j <= len(v) && v[i] == '.' && v[i+1:j] == pv.minor { - return v[:j] - } - return v[:i] + "." + pv.minor -} - -// Prerelease returns the prerelease suffix of the semantic version v. -// For example, Prerelease("v2.1.0-pre+meta") == "-pre". -// If v is an invalid semantic version string, Prerelease returns the empty string. -func Prerelease(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return pv.prerelease -} - -// Build returns the build suffix of the semantic version v. -// For example, Build("v2.1.0+meta") == "+meta". -// If v is an invalid semantic version string, Build returns the empty string. -func Build(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return pv.build -} - -// Compare returns an integer comparing two versions according to -// semantic version precedence. -// The result will be 0 if v == w, -1 if v < w, or +1 if v > w. -// -// An invalid semantic version string is considered less than a valid one. -// All invalid semantic version strings compare equal to each other. -func Compare(v, w string) int { - pv, ok1 := parse(v) - pw, ok2 := parse(w) - if !ok1 && !ok2 { - return 0 - } - if !ok1 { - return -1 - } - if !ok2 { - return +1 - } - if c := compareInt(pv.major, pw.major); c != 0 { - return c - } - if c := compareInt(pv.minor, pw.minor); c != 0 { - return c - } - if c := compareInt(pv.patch, pw.patch); c != 0 { - return c - } - return comparePrerelease(pv.prerelease, pw.prerelease) -} - -// Max canonicalizes its arguments and then returns the version string -// that compares greater. -func Max(v, w string) string { - v = Canonical(v) - w = Canonical(w) - if Compare(v, w) > 0 { - return v - } - return w -} - -func parse(v string) (p parsed, ok bool) { - if v == "" || v[0] != 'v' { - p.err = "missing v prefix" - return - } - p.major, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad major version" - return - } - if v == "" { - p.minor = "0" - p.patch = "0" - p.short = ".0.0" - return - } - if v[0] != '.' { - p.err = "bad minor prefix" - ok = false - return - } - p.minor, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad minor version" - return - } - if v == "" { - p.patch = "0" - p.short = ".0" - return - } - if v[0] != '.' { - p.err = "bad patch prefix" - ok = false - return - } - p.patch, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad patch version" - return - } - if len(v) > 0 && v[0] == '-' { - p.prerelease, v, ok = parsePrerelease(v) - if !ok { - p.err = "bad prerelease" - return - } - } - if len(v) > 0 && v[0] == '+' { - p.build, v, ok = parseBuild(v) - if !ok { - p.err = "bad build" - return - } - } - if v != "" { - p.err = "junk on end" - ok = false - return - } - ok = true - return -} - -func parseInt(v string) (t, rest string, ok bool) { - if v == "" { - return - } - if v[0] < '0' || '9' < v[0] { - return - } - i := 1 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - if v[0] == '0' && i != 1 { - return - } - return v[:i], v[i:], true -} - -func parsePrerelease(v string) (t, rest string, ok bool) { - // "A pre-release version MAY be denoted by appending a hyphen and - // a series of dot separated identifiers immediately following the patch version. - // Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. - // Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes." - if v == "" || v[0] != '-' { - return - } - i := 1 - start := 1 - for i < len(v) && v[i] != '+' { - if !isIdentChar(v[i]) && v[i] != '.' { - return - } - if v[i] == '.' { - if start == i || isBadNum(v[start:i]) { - return - } - start = i + 1 - } - i++ - } - if start == i || isBadNum(v[start:i]) { - return - } - return v[:i], v[i:], true -} - -func parseBuild(v string) (t, rest string, ok bool) { - if v == "" || v[0] != '+' { - return - } - i := 1 - start := 1 - for i < len(v) { - if !isIdentChar(v[i]) && v[i] != '.' { - return - } - if v[i] == '.' { - if start == i { - return - } - start = i + 1 - } - i++ - } - if start == i { - return - } - return v[:i], v[i:], true -} - -func isIdentChar(c byte) bool { - return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '-' -} - -func isBadNum(v string) bool { - i := 0 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - return i == len(v) && i > 1 && v[0] == '0' -} - -func isNum(v string) bool { - i := 0 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - return i == len(v) -} - -func compareInt(x, y string) int { - if x == y { - return 0 - } - if len(x) < len(y) { - return -1 - } - if len(x) > len(y) { - return +1 - } - if x < y { - return -1 - } else { - return +1 - } -} - -func comparePrerelease(x, y string) int { - // "When major, minor, and patch are equal, a pre-release version has - // lower precedence than a normal version. - // Example: 1.0.0-alpha < 1.0.0. - // Precedence for two pre-release versions with the same major, minor, - // and patch version MUST be determined by comparing each dot separated - // identifier from left to right until a difference is found as follows: - // identifiers consisting of only digits are compared numerically and - // identifiers with letters or hyphens are compared lexically in ASCII - // sort order. Numeric identifiers always have lower precedence than - // non-numeric identifiers. A larger set of pre-release fields has a - // higher precedence than a smaller set, if all of the preceding - // identifiers are equal. - // Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < - // 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0." - if x == y { - return 0 - } - if x == "" { - return +1 - } - if y == "" { - return -1 - } - for x != "" && y != "" { - x = x[1:] // skip - or . - y = y[1:] // skip - or . - var dx, dy string - dx, x = nextIdent(x) - dy, y = nextIdent(y) - if dx != dy { - ix := isNum(dx) - iy := isNum(dy) - if ix != iy { - if ix { - return -1 - } else { - return +1 - } - } - if ix { - if len(dx) < len(dy) { - return -1 - } - if len(dx) > len(dy) { - return +1 - } - } - if dx < dy { - return -1 - } else { - return +1 - } - } - } - if x == "" { - return -1 - } else { - return +1 - } -} - -func nextIdent(x string) (dx, rest string) { - i := 0 - for i < len(x) && x[i] != '.' { - i++ - } - return x[:i], x[i:] -} diff --git a/vendor/golang.org/x/tools/AUTHORS b/vendor/golang.org/x/tools/AUTHORS deleted file mode 100644 index 15167cd7..00000000 --- a/vendor/golang.org/x/tools/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/tools/CONTRIBUTORS b/vendor/golang.org/x/tools/CONTRIBUTORS deleted file mode 100644 index 1c4577e9..00000000 --- a/vendor/golang.org/x/tools/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/tools/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/tools/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go deleted file mode 100644 index 6b7052b8..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package astutil - -// This file defines utilities for working with source positions. - -import ( - "fmt" - "go/ast" - "go/token" - "sort" -) - -// PathEnclosingInterval returns the node that encloses the source -// interval [start, end), and all its ancestors up to the AST root. -// -// The definition of "enclosing" used by this function considers -// additional whitespace abutting a node to be enclosed by it. -// In this example: -// -// z := x + y // add them -// <-A-> -// <----B-----> -// -// the ast.BinaryExpr(+) node is considered to enclose interval B -// even though its [Pos()..End()) is actually only interval A. -// This behaviour makes user interfaces more tolerant of imperfect -// input. -// -// This function treats tokens as nodes, though they are not included -// in the result. e.g. PathEnclosingInterval("+") returns the -// enclosing ast.BinaryExpr("x + y"). -// -// If start==end, the 1-char interval following start is used instead. -// -// The 'exact' result is true if the interval contains only path[0] -// and perhaps some adjacent whitespace. It is false if the interval -// overlaps multiple children of path[0], or if it contains only -// interior whitespace of path[0]. -// In this example: -// -// z := x + y // add them -// <--C--> <---E--> -// ^ -// D -// -// intervals C, D and E are inexact. C is contained by the -// z-assignment statement, because it spans three of its children (:=, -// x, +). So too is the 1-char interval D, because it contains only -// interior whitespace of the assignment. E is considered interior -// whitespace of the BlockStmt containing the assignment. -// -// Precondition: [start, end) both lie within the same file as root. -// TODO(adonovan): return (nil, false) in this case and remove precond. -// Requires FileSet; see loader.tokenFileContainsPos. -// -// Postcondition: path is never nil; it always contains at least 'root'. -// -func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) { - // fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging - - // Precondition: node.[Pos..End) and adjoining whitespace contain [start, end). - var visit func(node ast.Node) bool - visit = func(node ast.Node) bool { - path = append(path, node) - - nodePos := node.Pos() - nodeEnd := node.End() - - // fmt.Printf("visit(%T, %d, %d)\n", node, nodePos, nodeEnd) // debugging - - // Intersect [start, end) with interval of node. - if start < nodePos { - start = nodePos - } - if end > nodeEnd { - end = nodeEnd - } - - // Find sole child that contains [start, end). - children := childrenOf(node) - l := len(children) - for i, child := range children { - // [childPos, childEnd) is unaugmented interval of child. - childPos := child.Pos() - childEnd := child.End() - - // [augPos, augEnd) is whitespace-augmented interval of child. - augPos := childPos - augEnd := childEnd - if i > 0 { - augPos = children[i-1].End() // start of preceding whitespace - } - if i < l-1 { - nextChildPos := children[i+1].Pos() - // Does [start, end) lie between child and next child? - if start >= augEnd && end <= nextChildPos { - return false // inexact match - } - augEnd = nextChildPos // end of following whitespace - } - - // fmt.Printf("\tchild %d: [%d..%d)\tcontains interval [%d..%d)?\n", - // i, augPos, augEnd, start, end) // debugging - - // Does augmented child strictly contain [start, end)? - if augPos <= start && end <= augEnd { - _, isToken := child.(tokenNode) - return isToken || visit(child) - } - - // Does [start, end) overlap multiple children? - // i.e. left-augmented child contains start - // but LR-augmented child does not contain end. - if start < childEnd && end > augEnd { - break - } - } - - // No single child contained [start, end), - // so node is the result. Is it exact? - - // (It's tempting to put this condition before the - // child loop, but it gives the wrong result in the - // case where a node (e.g. ExprStmt) and its sole - // child have equal intervals.) - if start == nodePos && end == nodeEnd { - return true // exact match - } - - return false // inexact: overlaps multiple children - } - - if start > end { - start, end = end, start - } - - if start < root.End() && end > root.Pos() { - if start == end { - end = start + 1 // empty interval => interval of size 1 - } - exact = visit(root) - - // Reverse the path: - for i, l := 0, len(path); i < l/2; i++ { - path[i], path[l-1-i] = path[l-1-i], path[i] - } - } else { - // Selection lies within whitespace preceding the - // first (or following the last) declaration in the file. - // The result nonetheless always includes the ast.File. - path = append(path, root) - } - - return -} - -// tokenNode is a dummy implementation of ast.Node for a single token. -// They are used transiently by PathEnclosingInterval but never escape -// this package. -// -type tokenNode struct { - pos token.Pos - end token.Pos -} - -func (n tokenNode) Pos() token.Pos { - return n.pos -} - -func (n tokenNode) End() token.Pos { - return n.end -} - -func tok(pos token.Pos, len int) ast.Node { - return tokenNode{pos, pos + token.Pos(len)} -} - -// childrenOf returns the direct non-nil children of ast.Node n. -// It may include fake ast.Node implementations for bare tokens. -// it is not safe to call (e.g.) ast.Walk on such nodes. -// -func childrenOf(n ast.Node) []ast.Node { - var children []ast.Node - - // First add nodes for all true subtrees. - ast.Inspect(n, func(node ast.Node) bool { - if node == n { // push n - return true // recur - } - if node != nil { // push child - children = append(children, node) - } - return false // no recursion - }) - - // Then add fake Nodes for bare tokens. - switch n := n.(type) { - case *ast.ArrayType: - children = append(children, - tok(n.Lbrack, len("[")), - tok(n.Elt.End(), len("]"))) - - case *ast.AssignStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.BasicLit: - children = append(children, - tok(n.ValuePos, len(n.Value))) - - case *ast.BinaryExpr: - children = append(children, tok(n.OpPos, len(n.Op.String()))) - - case *ast.BlockStmt: - children = append(children, - tok(n.Lbrace, len("{")), - tok(n.Rbrace, len("}"))) - - case *ast.BranchStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.CallExpr: - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - if n.Ellipsis != 0 { - children = append(children, tok(n.Ellipsis, len("..."))) - } - - case *ast.CaseClause: - if n.List == nil { - children = append(children, - tok(n.Case, len("default"))) - } else { - children = append(children, - tok(n.Case, len("case"))) - } - children = append(children, tok(n.Colon, len(":"))) - - case *ast.ChanType: - switch n.Dir { - case ast.RECV: - children = append(children, tok(n.Begin, len("<-chan"))) - case ast.SEND: - children = append(children, tok(n.Begin, len("chan<-"))) - case ast.RECV | ast.SEND: - children = append(children, tok(n.Begin, len("chan"))) - } - - case *ast.CommClause: - if n.Comm == nil { - children = append(children, - tok(n.Case, len("default"))) - } else { - children = append(children, - tok(n.Case, len("case"))) - } - children = append(children, tok(n.Colon, len(":"))) - - case *ast.Comment: - // nop - - case *ast.CommentGroup: - // nop - - case *ast.CompositeLit: - children = append(children, - tok(n.Lbrace, len("{")), - tok(n.Rbrace, len("{"))) - - case *ast.DeclStmt: - // nop - - case *ast.DeferStmt: - children = append(children, - tok(n.Defer, len("defer"))) - - case *ast.Ellipsis: - children = append(children, - tok(n.Ellipsis, len("..."))) - - case *ast.EmptyStmt: - // nop - - case *ast.ExprStmt: - // nop - - case *ast.Field: - // TODO(adonovan): Field.{Doc,Comment,Tag}? - - case *ast.FieldList: - children = append(children, - tok(n.Opening, len("(")), - tok(n.Closing, len(")"))) - - case *ast.File: - // TODO test: Doc - children = append(children, - tok(n.Package, len("package"))) - - case *ast.ForStmt: - children = append(children, - tok(n.For, len("for"))) - - case *ast.FuncDecl: - // TODO(adonovan): FuncDecl.Comment? - - // Uniquely, FuncDecl breaks the invariant that - // preorder traversal yields tokens in lexical order: - // in fact, FuncDecl.Recv precedes FuncDecl.Type.Func. - // - // As a workaround, we inline the case for FuncType - // here and order things correctly. - // - children = nil // discard ast.Walk(FuncDecl) info subtrees - children = append(children, tok(n.Type.Func, len("func"))) - if n.Recv != nil { - children = append(children, n.Recv) - } - children = append(children, n.Name) - if n.Type.Params != nil { - children = append(children, n.Type.Params) - } - if n.Type.Results != nil { - children = append(children, n.Type.Results) - } - if n.Body != nil { - children = append(children, n.Body) - } - - case *ast.FuncLit: - // nop - - case *ast.FuncType: - if n.Func != 0 { - children = append(children, - tok(n.Func, len("func"))) - } - - case *ast.GenDecl: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - if n.Lparen != 0 { - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - } - - case *ast.GoStmt: - children = append(children, - tok(n.Go, len("go"))) - - case *ast.Ident: - children = append(children, - tok(n.NamePos, len(n.Name))) - - case *ast.IfStmt: - children = append(children, - tok(n.If, len("if"))) - - case *ast.ImportSpec: - // TODO(adonovan): ImportSpec.{Doc,EndPos}? - - case *ast.IncDecStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.IndexExpr: - children = append(children, - tok(n.Lbrack, len("{")), - tok(n.Rbrack, len("}"))) - - case *ast.InterfaceType: - children = append(children, - tok(n.Interface, len("interface"))) - - case *ast.KeyValueExpr: - children = append(children, - tok(n.Colon, len(":"))) - - case *ast.LabeledStmt: - children = append(children, - tok(n.Colon, len(":"))) - - case *ast.MapType: - children = append(children, - tok(n.Map, len("map"))) - - case *ast.ParenExpr: - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - - case *ast.RangeStmt: - children = append(children, - tok(n.For, len("for")), - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.ReturnStmt: - children = append(children, - tok(n.Return, len("return"))) - - case *ast.SelectStmt: - children = append(children, - tok(n.Select, len("select"))) - - case *ast.SelectorExpr: - // nop - - case *ast.SendStmt: - children = append(children, - tok(n.Arrow, len("<-"))) - - case *ast.SliceExpr: - children = append(children, - tok(n.Lbrack, len("[")), - tok(n.Rbrack, len("]"))) - - case *ast.StarExpr: - children = append(children, tok(n.Star, len("*"))) - - case *ast.StructType: - children = append(children, tok(n.Struct, len("struct"))) - - case *ast.SwitchStmt: - children = append(children, tok(n.Switch, len("switch"))) - - case *ast.TypeAssertExpr: - children = append(children, - tok(n.Lparen-1, len(".")), - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - - case *ast.TypeSpec: - // TODO(adonovan): TypeSpec.{Doc,Comment}? - - case *ast.TypeSwitchStmt: - children = append(children, tok(n.Switch, len("switch"))) - - case *ast.UnaryExpr: - children = append(children, tok(n.OpPos, len(n.Op.String()))) - - case *ast.ValueSpec: - // TODO(adonovan): ValueSpec.{Doc,Comment}? - - case *ast.BadDecl, *ast.BadExpr, *ast.BadStmt: - // nop - } - - // TODO(adonovan): opt: merge the logic of ast.Inspect() into - // the switch above so we can make interleaved callbacks for - // both Nodes and Tokens in the right order and avoid the need - // to sort. - sort.Sort(byPos(children)) - - return children -} - -type byPos []ast.Node - -func (sl byPos) Len() int { - return len(sl) -} -func (sl byPos) Less(i, j int) bool { - return sl[i].Pos() < sl[j].Pos() -} -func (sl byPos) Swap(i, j int) { - sl[i], sl[j] = sl[j], sl[i] -} - -// NodeDescription returns a description of the concrete type of n suitable -// for a user interface. -// -// TODO(adonovan): in some cases (e.g. Field, FieldList, Ident, -// StarExpr) we could be much more specific given the path to the AST -// root. Perhaps we should do that. -// -func NodeDescription(n ast.Node) string { - switch n := n.(type) { - case *ast.ArrayType: - return "array type" - case *ast.AssignStmt: - return "assignment" - case *ast.BadDecl: - return "bad declaration" - case *ast.BadExpr: - return "bad expression" - case *ast.BadStmt: - return "bad statement" - case *ast.BasicLit: - return "basic literal" - case *ast.BinaryExpr: - return fmt.Sprintf("binary %s operation", n.Op) - case *ast.BlockStmt: - return "block" - case *ast.BranchStmt: - switch n.Tok { - case token.BREAK: - return "break statement" - case token.CONTINUE: - return "continue statement" - case token.GOTO: - return "goto statement" - case token.FALLTHROUGH: - return "fall-through statement" - } - case *ast.CallExpr: - if len(n.Args) == 1 && !n.Ellipsis.IsValid() { - return "function call (or conversion)" - } - return "function call" - case *ast.CaseClause: - return "case clause" - case *ast.ChanType: - return "channel type" - case *ast.CommClause: - return "communication clause" - case *ast.Comment: - return "comment" - case *ast.CommentGroup: - return "comment group" - case *ast.CompositeLit: - return "composite literal" - case *ast.DeclStmt: - return NodeDescription(n.Decl) + " statement" - case *ast.DeferStmt: - return "defer statement" - case *ast.Ellipsis: - return "ellipsis" - case *ast.EmptyStmt: - return "empty statement" - case *ast.ExprStmt: - return "expression statement" - case *ast.Field: - // Can be any of these: - // struct {x, y int} -- struct field(s) - // struct {T} -- anon struct field - // interface {I} -- interface embedding - // interface {f()} -- interface method - // func (A) func(B) C -- receiver, param(s), result(s) - return "field/method/parameter" - case *ast.FieldList: - return "field/method/parameter list" - case *ast.File: - return "source file" - case *ast.ForStmt: - return "for loop" - case *ast.FuncDecl: - return "function declaration" - case *ast.FuncLit: - return "function literal" - case *ast.FuncType: - return "function type" - case *ast.GenDecl: - switch n.Tok { - case token.IMPORT: - return "import declaration" - case token.CONST: - return "constant declaration" - case token.TYPE: - return "type declaration" - case token.VAR: - return "variable declaration" - } - case *ast.GoStmt: - return "go statement" - case *ast.Ident: - return "identifier" - case *ast.IfStmt: - return "if statement" - case *ast.ImportSpec: - return "import specification" - case *ast.IncDecStmt: - if n.Tok == token.INC { - return "increment statement" - } - return "decrement statement" - case *ast.IndexExpr: - return "index expression" - case *ast.InterfaceType: - return "interface type" - case *ast.KeyValueExpr: - return "key/value association" - case *ast.LabeledStmt: - return "statement label" - case *ast.MapType: - return "map type" - case *ast.Package: - return "package" - case *ast.ParenExpr: - return "parenthesized " + NodeDescription(n.X) - case *ast.RangeStmt: - return "range loop" - case *ast.ReturnStmt: - return "return statement" - case *ast.SelectStmt: - return "select statement" - case *ast.SelectorExpr: - return "selector" - case *ast.SendStmt: - return "channel send" - case *ast.SliceExpr: - return "slice expression" - case *ast.StarExpr: - return "*-operation" // load/store expr or pointer type - case *ast.StructType: - return "struct type" - case *ast.SwitchStmt: - return "switch statement" - case *ast.TypeAssertExpr: - return "type assertion" - case *ast.TypeSpec: - return "type specification" - case *ast.TypeSwitchStmt: - return "type switch" - case *ast.UnaryExpr: - return fmt.Sprintf("unary %s operation", n.Op) - case *ast.ValueSpec: - return "value specification" - - } - panic(fmt.Sprintf("unexpected node type: %T", n)) -} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go deleted file mode 100644 index 2087ceec..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/imports.go +++ /dev/null @@ -1,482 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package astutil contains common utilities for working with the Go AST. -package astutil // import "golang.org/x/tools/go/ast/astutil" - -import ( - "fmt" - "go/ast" - "go/token" - "strconv" - "strings" -) - -// AddImport adds the import path to the file f, if absent. -func AddImport(fset *token.FileSet, f *ast.File, path string) (added bool) { - return AddNamedImport(fset, f, "", path) -} - -// AddNamedImport adds the import with the given name and path to the file f, if absent. -// If name is not empty, it is used to rename the import. -// -// For example, calling -// AddNamedImport(fset, f, "pathpkg", "path") -// adds -// import pathpkg "path" -func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string) (added bool) { - if imports(f, name, path) { - return false - } - - newImport := &ast.ImportSpec{ - Path: &ast.BasicLit{ - Kind: token.STRING, - Value: strconv.Quote(path), - }, - } - if name != "" { - newImport.Name = &ast.Ident{Name: name} - } - - // Find an import decl to add to. - // The goal is to find an existing import - // whose import path has the longest shared - // prefix with path. - var ( - bestMatch = -1 // length of longest shared prefix - lastImport = -1 // index in f.Decls of the file's final import decl - impDecl *ast.GenDecl // import decl containing the best match - impIndex = -1 // spec index in impDecl containing the best match - - isThirdPartyPath = isThirdParty(path) - ) - for i, decl := range f.Decls { - gen, ok := decl.(*ast.GenDecl) - if ok && gen.Tok == token.IMPORT { - lastImport = i - // Do not add to import "C", to avoid disrupting the - // association with its doc comment, breaking cgo. - if declImports(gen, "C") { - continue - } - - // Match an empty import decl if that's all that is available. - if len(gen.Specs) == 0 && bestMatch == -1 { - impDecl = gen - } - - // Compute longest shared prefix with imports in this group and find best - // matched import spec. - // 1. Always prefer import spec with longest shared prefix. - // 2. While match length is 0, - // - for stdlib package: prefer first import spec. - // - for third party package: prefer first third party import spec. - // We cannot use last import spec as best match for third party package - // because grouped imports are usually placed last by goimports -local - // flag. - // See issue #19190. - seenAnyThirdParty := false - for j, spec := range gen.Specs { - impspec := spec.(*ast.ImportSpec) - p := importPath(impspec) - n := matchLen(p, path) - if n > bestMatch || (bestMatch == 0 && !seenAnyThirdParty && isThirdPartyPath) { - bestMatch = n - impDecl = gen - impIndex = j - } - seenAnyThirdParty = seenAnyThirdParty || isThirdParty(p) - } - } - } - - // If no import decl found, add one after the last import. - if impDecl == nil { - impDecl = &ast.GenDecl{ - Tok: token.IMPORT, - } - if lastImport >= 0 { - impDecl.TokPos = f.Decls[lastImport].End() - } else { - // There are no existing imports. - // Our new import, preceded by a blank line, goes after the package declaration - // and after the comment, if any, that starts on the same line as the - // package declaration. - impDecl.TokPos = f.Package - - file := fset.File(f.Package) - pkgLine := file.Line(f.Package) - for _, c := range f.Comments { - if file.Line(c.Pos()) > pkgLine { - break - } - // +2 for a blank line - impDecl.TokPos = c.End() + 2 - } - } - f.Decls = append(f.Decls, nil) - copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:]) - f.Decls[lastImport+1] = impDecl - } - - // Insert new import at insertAt. - insertAt := 0 - if impIndex >= 0 { - // insert after the found import - insertAt = impIndex + 1 - } - impDecl.Specs = append(impDecl.Specs, nil) - copy(impDecl.Specs[insertAt+1:], impDecl.Specs[insertAt:]) - impDecl.Specs[insertAt] = newImport - pos := impDecl.Pos() - if insertAt > 0 { - // If there is a comment after an existing import, preserve the comment - // position by adding the new import after the comment. - if spec, ok := impDecl.Specs[insertAt-1].(*ast.ImportSpec); ok && spec.Comment != nil { - pos = spec.Comment.End() - } else { - // Assign same position as the previous import, - // so that the sorter sees it as being in the same block. - pos = impDecl.Specs[insertAt-1].Pos() - } - } - if newImport.Name != nil { - newImport.Name.NamePos = pos - } - newImport.Path.ValuePos = pos - newImport.EndPos = pos - - // Clean up parens. impDecl contains at least one spec. - if len(impDecl.Specs) == 1 { - // Remove unneeded parens. - impDecl.Lparen = token.NoPos - } else if !impDecl.Lparen.IsValid() { - // impDecl needs parens added. - impDecl.Lparen = impDecl.Specs[0].Pos() - } - - f.Imports = append(f.Imports, newImport) - - if len(f.Decls) <= 1 { - return true - } - - // Merge all the import declarations into the first one. - var first *ast.GenDecl - for i := 0; i < len(f.Decls); i++ { - decl := f.Decls[i] - gen, ok := decl.(*ast.GenDecl) - if !ok || gen.Tok != token.IMPORT || declImports(gen, "C") { - continue - } - if first == nil { - first = gen - continue // Don't touch the first one. - } - // We now know there is more than one package in this import - // declaration. Ensure that it ends up parenthesized. - first.Lparen = first.Pos() - // Move the imports of the other import declaration to the first one. - for _, spec := range gen.Specs { - spec.(*ast.ImportSpec).Path.ValuePos = first.Pos() - first.Specs = append(first.Specs, spec) - } - f.Decls = append(f.Decls[:i], f.Decls[i+1:]...) - i-- - } - - return true -} - -func isThirdParty(importPath string) bool { - // Third party package import path usually contains "." (".com", ".org", ...) - // This logic is taken from golang.org/x/tools/imports package. - return strings.Contains(importPath, ".") -} - -// DeleteImport deletes the import path from the file f, if present. -// If there are duplicate import declarations, all matching ones are deleted. -func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool) { - return DeleteNamedImport(fset, f, "", path) -} - -// DeleteNamedImport deletes the import with the given name and path from the file f, if present. -// If there are duplicate import declarations, all matching ones are deleted. -func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (deleted bool) { - var delspecs []*ast.ImportSpec - var delcomments []*ast.CommentGroup - - // Find the import nodes that import path, if any. - for i := 0; i < len(f.Decls); i++ { - decl := f.Decls[i] - gen, ok := decl.(*ast.GenDecl) - if !ok || gen.Tok != token.IMPORT { - continue - } - for j := 0; j < len(gen.Specs); j++ { - spec := gen.Specs[j] - impspec := spec.(*ast.ImportSpec) - if importName(impspec) != name || importPath(impspec) != path { - continue - } - - // We found an import spec that imports path. - // Delete it. - delspecs = append(delspecs, impspec) - deleted = true - copy(gen.Specs[j:], gen.Specs[j+1:]) - gen.Specs = gen.Specs[:len(gen.Specs)-1] - - // If this was the last import spec in this decl, - // delete the decl, too. - if len(gen.Specs) == 0 { - copy(f.Decls[i:], f.Decls[i+1:]) - f.Decls = f.Decls[:len(f.Decls)-1] - i-- - break - } else if len(gen.Specs) == 1 { - if impspec.Doc != nil { - delcomments = append(delcomments, impspec.Doc) - } - if impspec.Comment != nil { - delcomments = append(delcomments, impspec.Comment) - } - for _, cg := range f.Comments { - // Found comment on the same line as the import spec. - if cg.End() < impspec.Pos() && fset.Position(cg.End()).Line == fset.Position(impspec.Pos()).Line { - delcomments = append(delcomments, cg) - break - } - } - - spec := gen.Specs[0].(*ast.ImportSpec) - - // Move the documentation right after the import decl. - if spec.Doc != nil { - for fset.Position(gen.TokPos).Line+1 < fset.Position(spec.Doc.Pos()).Line { - fset.File(gen.TokPos).MergeLine(fset.Position(gen.TokPos).Line) - } - } - for _, cg := range f.Comments { - if cg.End() < spec.Pos() && fset.Position(cg.End()).Line == fset.Position(spec.Pos()).Line { - for fset.Position(gen.TokPos).Line+1 < fset.Position(spec.Pos()).Line { - fset.File(gen.TokPos).MergeLine(fset.Position(gen.TokPos).Line) - } - break - } - } - } - if j > 0 { - lastImpspec := gen.Specs[j-1].(*ast.ImportSpec) - lastLine := fset.Position(lastImpspec.Path.ValuePos).Line - line := fset.Position(impspec.Path.ValuePos).Line - - // We deleted an entry but now there may be - // a blank line-sized hole where the import was. - if line-lastLine > 1 || !gen.Rparen.IsValid() { - // There was a blank line immediately preceding the deleted import, - // so there's no need to close the hole. The right parenthesis is - // invalid after AddImport to an import statement without parenthesis. - // Do nothing. - } else if line != fset.File(gen.Rparen).LineCount() { - // There was no blank line. Close the hole. - fset.File(gen.Rparen).MergeLine(line) - } - } - j-- - } - } - - // Delete imports from f.Imports. - for i := 0; i < len(f.Imports); i++ { - imp := f.Imports[i] - for j, del := range delspecs { - if imp == del { - copy(f.Imports[i:], f.Imports[i+1:]) - f.Imports = f.Imports[:len(f.Imports)-1] - copy(delspecs[j:], delspecs[j+1:]) - delspecs = delspecs[:len(delspecs)-1] - i-- - break - } - } - } - - // Delete comments from f.Comments. - for i := 0; i < len(f.Comments); i++ { - cg := f.Comments[i] - for j, del := range delcomments { - if cg == del { - copy(f.Comments[i:], f.Comments[i+1:]) - f.Comments = f.Comments[:len(f.Comments)-1] - copy(delcomments[j:], delcomments[j+1:]) - delcomments = delcomments[:len(delcomments)-1] - i-- - break - } - } - } - - if len(delspecs) > 0 { - panic(fmt.Sprintf("deleted specs from Decls but not Imports: %v", delspecs)) - } - - return -} - -// RewriteImport rewrites any import of path oldPath to path newPath. -func RewriteImport(fset *token.FileSet, f *ast.File, oldPath, newPath string) (rewrote bool) { - for _, imp := range f.Imports { - if importPath(imp) == oldPath { - rewrote = true - // record old End, because the default is to compute - // it using the length of imp.Path.Value. - imp.EndPos = imp.End() - imp.Path.Value = strconv.Quote(newPath) - } - } - return -} - -// UsesImport reports whether a given import is used. -func UsesImport(f *ast.File, path string) (used bool) { - spec := importSpec(f, path) - if spec == nil { - return - } - - name := spec.Name.String() - switch name { - case "": - // If the package name is not explicitly specified, - // make an educated guess. This is not guaranteed to be correct. - lastSlash := strings.LastIndex(path, "/") - if lastSlash == -1 { - name = path - } else { - name = path[lastSlash+1:] - } - case "_", ".": - // Not sure if this import is used - err on the side of caution. - return true - } - - ast.Walk(visitFn(func(n ast.Node) { - sel, ok := n.(*ast.SelectorExpr) - if ok && isTopName(sel.X, name) { - used = true - } - }), f) - - return -} - -type visitFn func(node ast.Node) - -func (fn visitFn) Visit(node ast.Node) ast.Visitor { - fn(node) - return fn -} - -// imports reports whether f has an import with the specified name and path. -func imports(f *ast.File, name, path string) bool { - for _, s := range f.Imports { - if importName(s) == name && importPath(s) == path { - return true - } - } - return false -} - -// importSpec returns the import spec if f imports path, -// or nil otherwise. -func importSpec(f *ast.File, path string) *ast.ImportSpec { - for _, s := range f.Imports { - if importPath(s) == path { - return s - } - } - return nil -} - -// importName returns the name of s, -// or "" if the import is not named. -func importName(s *ast.ImportSpec) string { - if s.Name == nil { - return "" - } - return s.Name.Name -} - -// importPath returns the unquoted import path of s, -// or "" if the path is not properly quoted. -func importPath(s *ast.ImportSpec) string { - t, err := strconv.Unquote(s.Path.Value) - if err != nil { - return "" - } - return t -} - -// declImports reports whether gen contains an import of path. -func declImports(gen *ast.GenDecl, path string) bool { - if gen.Tok != token.IMPORT { - return false - } - for _, spec := range gen.Specs { - impspec := spec.(*ast.ImportSpec) - if importPath(impspec) == path { - return true - } - } - return false -} - -// matchLen returns the length of the longest path segment prefix shared by x and y. -func matchLen(x, y string) int { - n := 0 - for i := 0; i < len(x) && i < len(y) && x[i] == y[i]; i++ { - if x[i] == '/' { - n++ - } - } - return n -} - -// isTopName returns true if n is a top-level unresolved identifier with the given name. -func isTopName(n ast.Expr, name string) bool { - id, ok := n.(*ast.Ident) - return ok && id.Name == name && id.Obj == nil -} - -// Imports returns the file imports grouped by paragraph. -func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec { - var groups [][]*ast.ImportSpec - - for _, decl := range f.Decls { - genDecl, ok := decl.(*ast.GenDecl) - if !ok || genDecl.Tok != token.IMPORT { - break - } - - group := []*ast.ImportSpec{} - - var lastLine int - for _, spec := range genDecl.Specs { - importSpec := spec.(*ast.ImportSpec) - pos := importSpec.Path.ValuePos - line := fset.Position(pos).Line - if lastLine > 0 && pos > 0 && line-lastLine > 1 { - groups = append(groups, group) - group = []*ast.ImportSpec{} - } - group = append(group, importSpec) - lastLine = line - } - groups = append(groups, group) - } - - return groups -} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go b/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go deleted file mode 100644 index cf72ea99..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package astutil - -import ( - "fmt" - "go/ast" - "reflect" - "sort" -) - -// An ApplyFunc is invoked by Apply for each node n, even if n is nil, -// before and/or after the node's children, using a Cursor describing -// the current node and providing operations on it. -// -// The return value of ApplyFunc controls the syntax tree traversal. -// See Apply for details. -type ApplyFunc func(*Cursor) bool - -// Apply traverses a syntax tree recursively, starting with root, -// and calling pre and post for each node as described below. -// Apply returns the syntax tree, possibly modified. -// -// If pre is not nil, it is called for each node before the node's -// children are traversed (pre-order). If pre returns false, no -// children are traversed, and post is not called for that node. -// -// If post is not nil, and a prior call of pre didn't return false, -// post is called for each node after its children are traversed -// (post-order). If post returns false, traversal is terminated and -// Apply returns immediately. -// -// Only fields that refer to AST nodes are considered children; -// i.e., token.Pos, Scopes, Objects, and fields of basic types -// (strings, etc.) are ignored. -// -// Children are traversed in the order in which they appear in the -// respective node's struct definition. A package's files are -// traversed in the filenames' alphabetical order. -// -func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) { - parent := &struct{ ast.Node }{root} - defer func() { - if r := recover(); r != nil && r != abort { - panic(r) - } - result = parent.Node - }() - a := &application{pre: pre, post: post} - a.apply(parent, "Node", nil, root) - return -} - -var abort = new(int) // singleton, to signal termination of Apply - -// A Cursor describes a node encountered during Apply. -// Information about the node and its parent is available -// from the Node, Parent, Name, and Index methods. -// -// If p is a variable of type and value of the current parent node -// c.Parent(), and f is the field identifier with name c.Name(), -// the following invariants hold: -// -// p.f == c.Node() if c.Index() < 0 -// p.f[c.Index()] == c.Node() if c.Index() >= 0 -// -// The methods Replace, Delete, InsertBefore, and InsertAfter -// can be used to change the AST without disrupting Apply. -type Cursor struct { - parent ast.Node - name string - iter *iterator // valid if non-nil - node ast.Node -} - -// Node returns the current Node. -func (c *Cursor) Node() ast.Node { return c.node } - -// Parent returns the parent of the current Node. -func (c *Cursor) Parent() ast.Node { return c.parent } - -// Name returns the name of the parent Node field that contains the current Node. -// If the parent is a *ast.Package and the current Node is a *ast.File, Name returns -// the filename for the current Node. -func (c *Cursor) Name() string { return c.name } - -// Index reports the index >= 0 of the current Node in the slice of Nodes that -// contains it, or a value < 0 if the current Node is not part of a slice. -// The index of the current node changes if InsertBefore is called while -// processing the current node. -func (c *Cursor) Index() int { - if c.iter != nil { - return c.iter.index - } - return -1 -} - -// field returns the current node's parent field value. -func (c *Cursor) field() reflect.Value { - return reflect.Indirect(reflect.ValueOf(c.parent)).FieldByName(c.name) -} - -// Replace replaces the current Node with n. -// The replacement node is not walked by Apply. -func (c *Cursor) Replace(n ast.Node) { - if _, ok := c.node.(*ast.File); ok { - file, ok := n.(*ast.File) - if !ok { - panic("attempt to replace *ast.File with non-*ast.File") - } - c.parent.(*ast.Package).Files[c.name] = file - return - } - - v := c.field() - if i := c.Index(); i >= 0 { - v = v.Index(i) - } - v.Set(reflect.ValueOf(n)) -} - -// Delete deletes the current Node from its containing slice. -// If the current Node is not part of a slice, Delete panics. -// As a special case, if the current node is a package file, -// Delete removes it from the package's Files map. -func (c *Cursor) Delete() { - if _, ok := c.node.(*ast.File); ok { - delete(c.parent.(*ast.Package).Files, c.name) - return - } - - i := c.Index() - if i < 0 { - panic("Delete node not contained in slice") - } - v := c.field() - l := v.Len() - reflect.Copy(v.Slice(i, l), v.Slice(i+1, l)) - v.Index(l - 1).Set(reflect.Zero(v.Type().Elem())) - v.SetLen(l - 1) - c.iter.step-- -} - -// InsertAfter inserts n after the current Node in its containing slice. -// If the current Node is not part of a slice, InsertAfter panics. -// Apply does not walk n. -func (c *Cursor) InsertAfter(n ast.Node) { - i := c.Index() - if i < 0 { - panic("InsertAfter node not contained in slice") - } - v := c.field() - v.Set(reflect.Append(v, reflect.Zero(v.Type().Elem()))) - l := v.Len() - reflect.Copy(v.Slice(i+2, l), v.Slice(i+1, l)) - v.Index(i + 1).Set(reflect.ValueOf(n)) - c.iter.step++ -} - -// InsertBefore inserts n before the current Node in its containing slice. -// If the current Node is not part of a slice, InsertBefore panics. -// Apply will not walk n. -func (c *Cursor) InsertBefore(n ast.Node) { - i := c.Index() - if i < 0 { - panic("InsertBefore node not contained in slice") - } - v := c.field() - v.Set(reflect.Append(v, reflect.Zero(v.Type().Elem()))) - l := v.Len() - reflect.Copy(v.Slice(i+1, l), v.Slice(i, l)) - v.Index(i).Set(reflect.ValueOf(n)) - c.iter.index++ -} - -// application carries all the shared data so we can pass it around cheaply. -type application struct { - pre, post ApplyFunc - cursor Cursor - iter iterator -} - -func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.Node) { - // convert typed nil into untyped nil - if v := reflect.ValueOf(n); v.Kind() == reflect.Ptr && v.IsNil() { - n = nil - } - - // avoid heap-allocating a new cursor for each apply call; reuse a.cursor instead - saved := a.cursor - a.cursor.parent = parent - a.cursor.name = name - a.cursor.iter = iter - a.cursor.node = n - - if a.pre != nil && !a.pre(&a.cursor) { - a.cursor = saved - return - } - - // walk children - // (the order of the cases matches the order of the corresponding node types in go/ast) - switch n := n.(type) { - case nil: - // nothing to do - - // Comments and fields - case *ast.Comment: - // nothing to do - - case *ast.CommentGroup: - if n != nil { - a.applyList(n, "List") - } - - case *ast.Field: - a.apply(n, "Doc", nil, n.Doc) - a.applyList(n, "Names") - a.apply(n, "Type", nil, n.Type) - a.apply(n, "Tag", nil, n.Tag) - a.apply(n, "Comment", nil, n.Comment) - - case *ast.FieldList: - a.applyList(n, "List") - - // Expressions - case *ast.BadExpr, *ast.Ident, *ast.BasicLit: - // nothing to do - - case *ast.Ellipsis: - a.apply(n, "Elt", nil, n.Elt) - - case *ast.FuncLit: - a.apply(n, "Type", nil, n.Type) - a.apply(n, "Body", nil, n.Body) - - case *ast.CompositeLit: - a.apply(n, "Type", nil, n.Type) - a.applyList(n, "Elts") - - case *ast.ParenExpr: - a.apply(n, "X", nil, n.X) - - case *ast.SelectorExpr: - a.apply(n, "X", nil, n.X) - a.apply(n, "Sel", nil, n.Sel) - - case *ast.IndexExpr: - a.apply(n, "X", nil, n.X) - a.apply(n, "Index", nil, n.Index) - - case *ast.SliceExpr: - a.apply(n, "X", nil, n.X) - a.apply(n, "Low", nil, n.Low) - a.apply(n, "High", nil, n.High) - a.apply(n, "Max", nil, n.Max) - - case *ast.TypeAssertExpr: - a.apply(n, "X", nil, n.X) - a.apply(n, "Type", nil, n.Type) - - case *ast.CallExpr: - a.apply(n, "Fun", nil, n.Fun) - a.applyList(n, "Args") - - case *ast.StarExpr: - a.apply(n, "X", nil, n.X) - - case *ast.UnaryExpr: - a.apply(n, "X", nil, n.X) - - case *ast.BinaryExpr: - a.apply(n, "X", nil, n.X) - a.apply(n, "Y", nil, n.Y) - - case *ast.KeyValueExpr: - a.apply(n, "Key", nil, n.Key) - a.apply(n, "Value", nil, n.Value) - - // Types - case *ast.ArrayType: - a.apply(n, "Len", nil, n.Len) - a.apply(n, "Elt", nil, n.Elt) - - case *ast.StructType: - a.apply(n, "Fields", nil, n.Fields) - - case *ast.FuncType: - a.apply(n, "Params", nil, n.Params) - a.apply(n, "Results", nil, n.Results) - - case *ast.InterfaceType: - a.apply(n, "Methods", nil, n.Methods) - - case *ast.MapType: - a.apply(n, "Key", nil, n.Key) - a.apply(n, "Value", nil, n.Value) - - case *ast.ChanType: - a.apply(n, "Value", nil, n.Value) - - // Statements - case *ast.BadStmt: - // nothing to do - - case *ast.DeclStmt: - a.apply(n, "Decl", nil, n.Decl) - - case *ast.EmptyStmt: - // nothing to do - - case *ast.LabeledStmt: - a.apply(n, "Label", nil, n.Label) - a.apply(n, "Stmt", nil, n.Stmt) - - case *ast.ExprStmt: - a.apply(n, "X", nil, n.X) - - case *ast.SendStmt: - a.apply(n, "Chan", nil, n.Chan) - a.apply(n, "Value", nil, n.Value) - - case *ast.IncDecStmt: - a.apply(n, "X", nil, n.X) - - case *ast.AssignStmt: - a.applyList(n, "Lhs") - a.applyList(n, "Rhs") - - case *ast.GoStmt: - a.apply(n, "Call", nil, n.Call) - - case *ast.DeferStmt: - a.apply(n, "Call", nil, n.Call) - - case *ast.ReturnStmt: - a.applyList(n, "Results") - - case *ast.BranchStmt: - a.apply(n, "Label", nil, n.Label) - - case *ast.BlockStmt: - a.applyList(n, "List") - - case *ast.IfStmt: - a.apply(n, "Init", nil, n.Init) - a.apply(n, "Cond", nil, n.Cond) - a.apply(n, "Body", nil, n.Body) - a.apply(n, "Else", nil, n.Else) - - case *ast.CaseClause: - a.applyList(n, "List") - a.applyList(n, "Body") - - case *ast.SwitchStmt: - a.apply(n, "Init", nil, n.Init) - a.apply(n, "Tag", nil, n.Tag) - a.apply(n, "Body", nil, n.Body) - - case *ast.TypeSwitchStmt: - a.apply(n, "Init", nil, n.Init) - a.apply(n, "Assign", nil, n.Assign) - a.apply(n, "Body", nil, n.Body) - - case *ast.CommClause: - a.apply(n, "Comm", nil, n.Comm) - a.applyList(n, "Body") - - case *ast.SelectStmt: - a.apply(n, "Body", nil, n.Body) - - case *ast.ForStmt: - a.apply(n, "Init", nil, n.Init) - a.apply(n, "Cond", nil, n.Cond) - a.apply(n, "Post", nil, n.Post) - a.apply(n, "Body", nil, n.Body) - - case *ast.RangeStmt: - a.apply(n, "Key", nil, n.Key) - a.apply(n, "Value", nil, n.Value) - a.apply(n, "X", nil, n.X) - a.apply(n, "Body", nil, n.Body) - - // Declarations - case *ast.ImportSpec: - a.apply(n, "Doc", nil, n.Doc) - a.apply(n, "Name", nil, n.Name) - a.apply(n, "Path", nil, n.Path) - a.apply(n, "Comment", nil, n.Comment) - - case *ast.ValueSpec: - a.apply(n, "Doc", nil, n.Doc) - a.applyList(n, "Names") - a.apply(n, "Type", nil, n.Type) - a.applyList(n, "Values") - a.apply(n, "Comment", nil, n.Comment) - - case *ast.TypeSpec: - a.apply(n, "Doc", nil, n.Doc) - a.apply(n, "Name", nil, n.Name) - a.apply(n, "Type", nil, n.Type) - a.apply(n, "Comment", nil, n.Comment) - - case *ast.BadDecl: - // nothing to do - - case *ast.GenDecl: - a.apply(n, "Doc", nil, n.Doc) - a.applyList(n, "Specs") - - case *ast.FuncDecl: - a.apply(n, "Doc", nil, n.Doc) - a.apply(n, "Recv", nil, n.Recv) - a.apply(n, "Name", nil, n.Name) - a.apply(n, "Type", nil, n.Type) - a.apply(n, "Body", nil, n.Body) - - // Files and packages - case *ast.File: - a.apply(n, "Doc", nil, n.Doc) - a.apply(n, "Name", nil, n.Name) - a.applyList(n, "Decls") - // Don't walk n.Comments; they have either been walked already if - // they are Doc comments, or they can be easily walked explicitly. - - case *ast.Package: - // collect and sort names for reproducible behavior - var names []string - for name := range n.Files { - names = append(names, name) - } - sort.Strings(names) - for _, name := range names { - a.apply(n, name, nil, n.Files[name]) - } - - default: - panic(fmt.Sprintf("Apply: unexpected node type %T", n)) - } - - if a.post != nil && !a.post(&a.cursor) { - panic(abort) - } - - a.cursor = saved -} - -// An iterator controls iteration over a slice of nodes. -type iterator struct { - index, step int -} - -func (a *application) applyList(parent ast.Node, name string) { - // avoid heap-allocating a new iterator for each applyList call; reuse a.iter instead - saved := a.iter - a.iter.index = 0 - for { - // must reload parent.name each time, since cursor modifications might change it - v := reflect.Indirect(reflect.ValueOf(parent)).FieldByName(name) - if a.iter.index >= v.Len() { - break - } - - // element x may be nil in a bad AST - be cautious - var x ast.Node - if e := v.Index(a.iter.index); e.IsValid() { - x = e.Interface().(ast.Node) - } - - a.iter.step = 1 - a.apply(parent, name, &a.iter, x) - a.iter.index += a.iter.step - } - a.iter = saved -} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/util.go b/vendor/golang.org/x/tools/go/ast/astutil/util.go deleted file mode 100644 index 76306298..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/util.go +++ /dev/null @@ -1,14 +0,0 @@ -package astutil - -import "go/ast" - -// Unparen returns e with any enclosing parentheses stripped. -func Unparen(e ast.Expr) ast.Expr { - for { - p, ok := e.(*ast.ParenExpr) - if !ok { - return e - } - e = p.X - } -} diff --git a/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/golang.org/x/tools/go/buildutil/allpackages.go deleted file mode 100644 index c0cb03e7..00000000 --- a/vendor/golang.org/x/tools/go/buildutil/allpackages.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package buildutil provides utilities related to the go/build -// package in the standard library. -// -// All I/O is done via the build.Context file system interface, which must -// be concurrency-safe. -package buildutil // import "golang.org/x/tools/go/buildutil" - -import ( - "go/build" - "os" - "path/filepath" - "sort" - "strings" - "sync" -) - -// AllPackages returns the package path of each Go package in any source -// directory of the specified build context (e.g. $GOROOT or an element -// of $GOPATH). Errors are ignored. The results are sorted. -// All package paths are canonical, and thus may contain "/vendor/". -// -// The result may include import paths for directories that contain no -// *.go files, such as "archive" (in $GOROOT/src). -// -// All I/O is done via the build.Context file system interface, -// which must be concurrency-safe. -// -func AllPackages(ctxt *build.Context) []string { - var list []string - ForEachPackage(ctxt, func(pkg string, _ error) { - list = append(list, pkg) - }) - sort.Strings(list) - return list -} - -// ForEachPackage calls the found function with the package path of -// each Go package it finds in any source directory of the specified -// build context (e.g. $GOROOT or an element of $GOPATH). -// All package paths are canonical, and thus may contain "/vendor/". -// -// If the package directory exists but could not be read, the second -// argument to the found function provides the error. -// -// All I/O is done via the build.Context file system interface, -// which must be concurrency-safe. -// -func ForEachPackage(ctxt *build.Context, found func(importPath string, err error)) { - ch := make(chan item) - - var wg sync.WaitGroup - for _, root := range ctxt.SrcDirs() { - root := root - wg.Add(1) - go func() { - allPackages(ctxt, root, ch) - wg.Done() - }() - } - go func() { - wg.Wait() - close(ch) - }() - - // All calls to found occur in the caller's goroutine. - for i := range ch { - found(i.importPath, i.err) - } -} - -type item struct { - importPath string - err error // (optional) -} - -// We use a process-wide counting semaphore to limit -// the number of parallel calls to ReadDir. -var ioLimit = make(chan bool, 20) - -func allPackages(ctxt *build.Context, root string, ch chan<- item) { - root = filepath.Clean(root) + string(os.PathSeparator) - - var wg sync.WaitGroup - - var walkDir func(dir string) - walkDir = func(dir string) { - // Avoid .foo, _foo, and testdata directory trees. - base := filepath.Base(dir) - if base == "" || base[0] == '.' || base[0] == '_' || base == "testdata" { - return - } - - pkg := filepath.ToSlash(strings.TrimPrefix(dir, root)) - - // Prune search if we encounter any of these import paths. - switch pkg { - case "builtin": - return - } - - ioLimit <- true - files, err := ReadDir(ctxt, dir) - <-ioLimit - if pkg != "" || err != nil { - ch <- item{pkg, err} - } - for _, fi := range files { - fi := fi - if fi.IsDir() { - wg.Add(1) - go func() { - walkDir(filepath.Join(dir, fi.Name())) - wg.Done() - }() - } - } - } - - walkDir(root) - wg.Wait() -} - -// ExpandPatterns returns the set of packages matched by patterns, -// which may have the following forms: -// -// golang.org/x/tools/cmd/guru # a single package -// golang.org/x/tools/... # all packages beneath dir -// ... # the entire workspace. -// -// Order is significant: a pattern preceded by '-' removes matching -// packages from the set. For example, these patterns match all encoding -// packages except encoding/xml: -// -// encoding/... -encoding/xml -// -// A trailing slash in a pattern is ignored. (Path components of Go -// package names are separated by slash, not the platform's path separator.) -// -func ExpandPatterns(ctxt *build.Context, patterns []string) map[string]bool { - // TODO(adonovan): support other features of 'go list': - // - "std"/"cmd"/"all" meta-packages - // - "..." not at the end of a pattern - // - relative patterns using "./" or "../" prefix - - pkgs := make(map[string]bool) - doPkg := func(pkg string, neg bool) { - if neg { - delete(pkgs, pkg) - } else { - pkgs[pkg] = true - } - } - - // Scan entire workspace if wildcards are present. - // TODO(adonovan): opt: scan only the necessary subtrees of the workspace. - var all []string - for _, arg := range patterns { - if strings.HasSuffix(arg, "...") { - all = AllPackages(ctxt) - break - } - } - - for _, arg := range patterns { - if arg == "" { - continue - } - - neg := arg[0] == '-' - if neg { - arg = arg[1:] - } - - if arg == "..." { - // ... matches all packages - for _, pkg := range all { - doPkg(pkg, neg) - } - } else if dir := strings.TrimSuffix(arg, "/..."); dir != arg { - // dir/... matches all packages beneath dir - for _, pkg := range all { - if strings.HasPrefix(pkg, dir) && - (len(pkg) == len(dir) || pkg[len(dir)] == '/') { - doPkg(pkg, neg) - } - } - } else { - // single package - doPkg(strings.TrimSuffix(arg, "/"), neg) - } - } - - return pkgs -} diff --git a/vendor/golang.org/x/tools/go/buildutil/fakecontext.go b/vendor/golang.org/x/tools/go/buildutil/fakecontext.go deleted file mode 100644 index 8b7f0667..00000000 --- a/vendor/golang.org/x/tools/go/buildutil/fakecontext.go +++ /dev/null @@ -1,109 +0,0 @@ -package buildutil - -import ( - "fmt" - "go/build" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "sort" - "strings" - "time" -) - -// FakeContext returns a build.Context for the fake file tree specified -// by pkgs, which maps package import paths to a mapping from file base -// names to contents. -// -// The fake Context has a GOROOT of "/go" and no GOPATH, and overrides -// the necessary file access methods to read from memory instead of the -// real file system. -// -// Unlike a real file tree, the fake one has only two levels---packages -// and files---so ReadDir("/go/src/") returns all packages under -// /go/src/ including, for instance, "math" and "math/big". -// ReadDir("/go/src/math/big") would return all the files in the -// "math/big" package. -// -func FakeContext(pkgs map[string]map[string]string) *build.Context { - clean := func(filename string) string { - f := path.Clean(filepath.ToSlash(filename)) - // Removing "/go/src" while respecting segment - // boundaries has this unfortunate corner case: - if f == "/go/src" { - return "" - } - return strings.TrimPrefix(f, "/go/src/") - } - - ctxt := build.Default // copy - ctxt.GOROOT = "/go" - ctxt.GOPATH = "" - ctxt.Compiler = "gc" - ctxt.IsDir = func(dir string) bool { - dir = clean(dir) - if dir == "" { - return true // needed by (*build.Context).SrcDirs - } - return pkgs[dir] != nil - } - ctxt.ReadDir = func(dir string) ([]os.FileInfo, error) { - dir = clean(dir) - var fis []os.FileInfo - if dir == "" { - // enumerate packages - for importPath := range pkgs { - fis = append(fis, fakeDirInfo(importPath)) - } - } else { - // enumerate files of package - for basename := range pkgs[dir] { - fis = append(fis, fakeFileInfo(basename)) - } - } - sort.Sort(byName(fis)) - return fis, nil - } - ctxt.OpenFile = func(filename string) (io.ReadCloser, error) { - filename = clean(filename) - dir, base := path.Split(filename) - content, ok := pkgs[path.Clean(dir)][base] - if !ok { - return nil, fmt.Errorf("file not found: %s", filename) - } - return ioutil.NopCloser(strings.NewReader(content)), nil - } - ctxt.IsAbsPath = func(path string) bool { - path = filepath.ToSlash(path) - // Don't rely on the default (filepath.Path) since on - // Windows, it reports virtual paths as non-absolute. - return strings.HasPrefix(path, "/") - } - return &ctxt -} - -type byName []os.FileInfo - -func (s byName) Len() int { return len(s) } -func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } - -type fakeFileInfo string - -func (fi fakeFileInfo) Name() string { return string(fi) } -func (fakeFileInfo) Sys() interface{} { return nil } -func (fakeFileInfo) ModTime() time.Time { return time.Time{} } -func (fakeFileInfo) IsDir() bool { return false } -func (fakeFileInfo) Size() int64 { return 0 } -func (fakeFileInfo) Mode() os.FileMode { return 0644 } - -type fakeDirInfo string - -func (fd fakeDirInfo) Name() string { return string(fd) } -func (fakeDirInfo) Sys() interface{} { return nil } -func (fakeDirInfo) ModTime() time.Time { return time.Time{} } -func (fakeDirInfo) IsDir() bool { return true } -func (fakeDirInfo) Size() int64 { return 0 } -func (fakeDirInfo) Mode() os.FileMode { return 0755 } diff --git a/vendor/golang.org/x/tools/go/buildutil/overlay.go b/vendor/golang.org/x/tools/go/buildutil/overlay.go deleted file mode 100644 index 8e239086..00000000 --- a/vendor/golang.org/x/tools/go/buildutil/overlay.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package buildutil - -import ( - "bufio" - "bytes" - "fmt" - "go/build" - "io" - "io/ioutil" - "path/filepath" - "strconv" - "strings" -) - -// OverlayContext overlays a build.Context with additional files from -// a map. Files in the map take precedence over other files. -// -// In addition to plain string comparison, two file names are -// considered equal if their base names match and their directory -// components point at the same directory on the file system. That is, -// symbolic links are followed for directories, but not files. -// -// A common use case for OverlayContext is to allow editors to pass in -// a set of unsaved, modified files. -// -// Currently, only the Context.OpenFile function will respect the -// overlay. This may change in the future. -func OverlayContext(orig *build.Context, overlay map[string][]byte) *build.Context { - // TODO(dominikh): Implement IsDir, HasSubdir and ReadDir - - rc := func(data []byte) (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewBuffer(data)), nil - } - - copy := *orig // make a copy - ctxt := © - ctxt.OpenFile = func(path string) (io.ReadCloser, error) { - // Fast path: names match exactly. - if content, ok := overlay[path]; ok { - return rc(content) - } - - // Slow path: check for same file under a different - // alias, perhaps due to a symbolic link. - for filename, content := range overlay { - if sameFile(path, filename) { - return rc(content) - } - } - - return OpenFile(orig, path) - } - return ctxt -} - -// ParseOverlayArchive parses an archive containing Go files and their -// contents. The result is intended to be used with OverlayContext. -// -// -// Archive format -// -// The archive consists of a series of files. Each file consists of a -// name, a decimal file size and the file contents, separated by -// newlines. No newline follows after the file contents. -func ParseOverlayArchive(archive io.Reader) (map[string][]byte, error) { - overlay := make(map[string][]byte) - r := bufio.NewReader(archive) - for { - // Read file name. - filename, err := r.ReadString('\n') - if err != nil { - if err == io.EOF { - break // OK - } - return nil, fmt.Errorf("reading archive file name: %v", err) - } - filename = filepath.Clean(strings.TrimSpace(filename)) - - // Read file size. - sz, err := r.ReadString('\n') - if err != nil { - return nil, fmt.Errorf("reading size of archive file %s: %v", filename, err) - } - sz = strings.TrimSpace(sz) - size, err := strconv.ParseUint(sz, 10, 32) - if err != nil { - return nil, fmt.Errorf("parsing size of archive file %s: %v", filename, err) - } - - // Read file content. - content := make([]byte, size) - if _, err := io.ReadFull(r, content); err != nil { - return nil, fmt.Errorf("reading archive file %s: %v", filename, err) - } - overlay[filename] = content - } - - return overlay, nil -} diff --git a/vendor/golang.org/x/tools/go/buildutil/tags.go b/vendor/golang.org/x/tools/go/buildutil/tags.go deleted file mode 100644 index 486606f3..00000000 --- a/vendor/golang.org/x/tools/go/buildutil/tags.go +++ /dev/null @@ -1,75 +0,0 @@ -package buildutil - -// This logic was copied from stringsFlag from $GOROOT/src/cmd/go/build.go. - -import "fmt" - -const TagsFlagDoc = "a list of `build tags` to consider satisfied during the build. " + - "For more information about build tags, see the description of " + - "build constraints in the documentation for the go/build package" - -// TagsFlag is an implementation of the flag.Value and flag.Getter interfaces that parses -// a flag value in the same manner as go build's -tags flag and -// populates a []string slice. -// -// See $GOROOT/src/go/build/doc.go for description of build tags. -// See $GOROOT/src/cmd/go/doc.go for description of 'go build -tags' flag. -// -// Example: -// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc) -type TagsFlag []string - -func (v *TagsFlag) Set(s string) error { - var err error - *v, err = splitQuotedFields(s) - if *v == nil { - *v = []string{} - } - return err -} - -func (v *TagsFlag) Get() interface{} { return *v } - -func splitQuotedFields(s string) ([]string, error) { - // Split fields allowing '' or "" around elements. - // Quotes further inside the string do not count. - var f []string - for len(s) > 0 { - for len(s) > 0 && isSpaceByte(s[0]) { - s = s[1:] - } - if len(s) == 0 { - break - } - // Accepted quoted string. No unescaping inside. - if s[0] == '"' || s[0] == '\'' { - quote := s[0] - s = s[1:] - i := 0 - for i < len(s) && s[i] != quote { - i++ - } - if i >= len(s) { - return nil, fmt.Errorf("unterminated %c string", quote) - } - f = append(f, s[:i]) - s = s[i+1:] - continue - } - i := 0 - for i < len(s) && !isSpaceByte(s[i]) { - i++ - } - f = append(f, s[:i]) - s = s[i:] - } - return f, nil -} - -func (v *TagsFlag) String() string { - return "" -} - -func isSpaceByte(c byte) bool { - return c == ' ' || c == '\t' || c == '\n' || c == '\r' -} diff --git a/vendor/golang.org/x/tools/go/buildutil/util.go b/vendor/golang.org/x/tools/go/buildutil/util.go deleted file mode 100644 index fc923d7a..00000000 --- a/vendor/golang.org/x/tools/go/buildutil/util.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package buildutil - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "strings" -) - -// ParseFile behaves like parser.ParseFile, -// but uses the build context's file system interface, if any. -// -// If file is not absolute (as defined by IsAbsPath), the (dir, file) -// components are joined using JoinPath; dir must be absolute. -// -// The displayPath function, if provided, is used to transform the -// filename that will be attached to the ASTs. -// -// TODO(adonovan): call this from go/loader.parseFiles when the tree thaws. -// -func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, file string, mode parser.Mode) (*ast.File, error) { - if !IsAbsPath(ctxt, file) { - file = JoinPath(ctxt, dir, file) - } - rd, err := OpenFile(ctxt, file) - if err != nil { - return nil, err - } - defer rd.Close() // ignore error - if displayPath != nil { - file = displayPath(file) - } - return parser.ParseFile(fset, file, rd, mode) -} - -// ContainingPackage returns the package containing filename. -// -// If filename is not absolute, it is interpreted relative to working directory dir. -// All I/O is via the build context's file system interface, if any. -// -// The '...Files []string' fields of the resulting build.Package are not -// populated (build.FindOnly mode). -// -func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) { - if !IsAbsPath(ctxt, filename) { - filename = JoinPath(ctxt, dir, filename) - } - - // We must not assume the file tree uses - // "/" always, - // `\` always, - // or os.PathSeparator (which varies by platform), - // but to make any progress, we are forced to assume that - // paths will not use `\` unless the PathSeparator - // is also `\`, thus we can rely on filepath.ToSlash for some sanity. - - dirSlash := path.Dir(filepath.ToSlash(filename)) + "/" - - // We assume that no source root (GOPATH[i] or GOROOT) contains any other. - for _, srcdir := range ctxt.SrcDirs() { - srcdirSlash := filepath.ToSlash(srcdir) + "/" - if importPath, ok := HasSubdir(ctxt, srcdirSlash, dirSlash); ok { - return ctxt.Import(importPath, dir, build.FindOnly) - } - } - - return nil, fmt.Errorf("can't find package containing %s", filename) -} - -// -- Effective methods of file system interface ------------------------- - -// (go/build.Context defines these as methods, but does not export them.) - -// hasSubdir calls ctxt.HasSubdir (if not nil) or else uses -// the local file system to answer the question. -func HasSubdir(ctxt *build.Context, root, dir string) (rel string, ok bool) { - if f := ctxt.HasSubdir; f != nil { - return f(root, dir) - } - - // Try using paths we received. - if rel, ok = hasSubdir(root, dir); ok { - return - } - - // Try expanding symlinks and comparing - // expanded against unexpanded and - // expanded against expanded. - rootSym, _ := filepath.EvalSymlinks(root) - dirSym, _ := filepath.EvalSymlinks(dir) - - if rel, ok = hasSubdir(rootSym, dir); ok { - return - } - if rel, ok = hasSubdir(root, dirSym); ok { - return - } - return hasSubdir(rootSym, dirSym) -} - -func hasSubdir(root, dir string) (rel string, ok bool) { - const sep = string(filepath.Separator) - root = filepath.Clean(root) - if !strings.HasSuffix(root, sep) { - root += sep - } - - dir = filepath.Clean(dir) - if !strings.HasPrefix(dir, root) { - return "", false - } - - return filepath.ToSlash(dir[len(root):]), true -} - -// FileExists returns true if the specified file exists, -// using the build context's file system interface. -func FileExists(ctxt *build.Context, path string) bool { - if ctxt.OpenFile != nil { - r, err := ctxt.OpenFile(path) - if err != nil { - return false - } - r.Close() // ignore error - return true - } - _, err := os.Stat(path) - return err == nil -} - -// OpenFile behaves like os.Open, -// but uses the build context's file system interface, if any. -func OpenFile(ctxt *build.Context, path string) (io.ReadCloser, error) { - if ctxt.OpenFile != nil { - return ctxt.OpenFile(path) - } - return os.Open(path) -} - -// IsAbsPath behaves like filepath.IsAbs, -// but uses the build context's file system interface, if any. -func IsAbsPath(ctxt *build.Context, path string) bool { - if ctxt.IsAbsPath != nil { - return ctxt.IsAbsPath(path) - } - return filepath.IsAbs(path) -} - -// JoinPath behaves like filepath.Join, -// but uses the build context's file system interface, if any. -func JoinPath(ctxt *build.Context, path ...string) string { - if ctxt.JoinPath != nil { - return ctxt.JoinPath(path...) - } - return filepath.Join(path...) -} - -// IsDir behaves like os.Stat plus IsDir, -// but uses the build context's file system interface, if any. -func IsDir(ctxt *build.Context, path string) bool { - if ctxt.IsDir != nil { - return ctxt.IsDir(path) - } - fi, err := os.Stat(path) - return err == nil && fi.IsDir() -} - -// ReadDir behaves like ioutil.ReadDir, -// but uses the build context's file system interface, if any. -func ReadDir(ctxt *build.Context, path string) ([]os.FileInfo, error) { - if ctxt.ReadDir != nil { - return ctxt.ReadDir(path) - } - return ioutil.ReadDir(path) -} - -// SplitPathList behaves like filepath.SplitList, -// but uses the build context's file system interface, if any. -func SplitPathList(ctxt *build.Context, s string) []string { - if ctxt.SplitPathList != nil { - return ctxt.SplitPathList(s) - } - return filepath.SplitList(s) -} - -// sameFile returns true if x and y have the same basename and denote -// the same file. -// -func sameFile(x, y string) bool { - if path.Clean(x) == path.Clean(y) { - return true - } - if filepath.Base(x) == filepath.Base(y) { // (optimisation) - if xi, err := os.Stat(x); err == nil { - if yi, err := os.Stat(y); err == nil { - return os.SameFile(xi, yi) - } - } - } - return false -} diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go deleted file mode 100644 index f8363d8f..00000000 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package gcexportdata provides functions for locating, reading, and -// writing export data files containing type information produced by the -// gc compiler. This package supports go1.7 export data format and all -// later versions. -// -// Although it might seem convenient for this package to live alongside -// go/types in the standard library, this would cause version skew -// problems for developer tools that use it, since they must be able to -// consume the outputs of the gc compiler both before and after a Go -// update such as from Go 1.7 to Go 1.8. Because this package lives in -// golang.org/x/tools, sites can update their version of this repo some -// time before the Go 1.8 release and rebuild and redeploy their -// developer tools, which will then be able to consume both Go 1.7 and -// Go 1.8 export data files, so they will work before and after the -// Go update. (See discussion at https://golang.org/issue/15651.) -// -package gcexportdata // import "golang.org/x/tools/go/gcexportdata" - -import ( - "bufio" - "bytes" - "fmt" - "go/token" - "go/types" - "io" - "io/ioutil" - - "golang.org/x/tools/go/internal/gcimporter" -) - -// Find returns the name of an object (.o) or archive (.a) file -// containing type information for the specified import path, -// using the workspace layout conventions of go/build. -// If no file was found, an empty filename is returned. -// -// A relative srcDir is interpreted relative to the current working directory. -// -// Find also returns the package's resolved (canonical) import path, -// reflecting the effects of srcDir and vendoring on importPath. -func Find(importPath, srcDir string) (filename, path string) { - return gcimporter.FindPkg(importPath, srcDir) -} - -// NewReader returns a reader for the export data section of an object -// (.o) or archive (.a) file read from r. The new reader may provide -// additional trailing data beyond the end of the export data. -func NewReader(r io.Reader) (io.Reader, error) { - buf := bufio.NewReader(r) - _, err := gcimporter.FindExportData(buf) - // If we ever switch to a zip-like archive format with the ToC - // at the end, we can return the correct portion of export data, - // but for now we must return the entire rest of the file. - return buf, err -} - -// Read reads export data from in, decodes it, and returns type -// information for the package. -// The package name is specified by path. -// File position information is added to fset. -// -// Read may inspect and add to the imports map to ensure that references -// within the export data to other packages are consistent. The caller -// must ensure that imports[path] does not exist, or exists but is -// incomplete (see types.Package.Complete), and Read inserts the -// resulting package into this map entry. -// -// On return, the state of the reader is undefined. -func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) { - data, err := ioutil.ReadAll(in) - if err != nil { - return nil, fmt.Errorf("reading export data for %q: %v", path, err) - } - - if bytes.HasPrefix(data, []byte("!")) { - return nil, fmt.Errorf("can't read export data for %q directly from an archive file (call gcexportdata.NewReader first to extract export data)", path) - } - - // The App Engine Go runtime v1.6 uses the old export data format. - // TODO(adonovan): delete once v1.7 has been around for a while. - if bytes.HasPrefix(data, []byte("package ")) { - return gcimporter.ImportData(imports, path, path, bytes.NewReader(data)) - } - - // The indexed export format starts with an 'i'; the older - // binary export format starts with a 'c', 'd', or 'v' - // (from "version"). Select appropriate importer. - if len(data) > 0 && data[0] == 'i' { - _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path) - return pkg, err - } - - _, pkg, err := gcimporter.BImportData(fset, imports, data, path) - return pkg, err -} - -// Write writes encoded type information for the specified package to out. -// The FileSet provides file position information for named objects. -func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { - b, err := gcimporter.IExportData(fset, pkg) - if err != nil { - return err - } - _, err = out.Write(b) - return err -} diff --git a/vendor/golang.org/x/tools/go/gcexportdata/importer.go b/vendor/golang.org/x/tools/go/gcexportdata/importer.go deleted file mode 100644 index efe221e7..00000000 --- a/vendor/golang.org/x/tools/go/gcexportdata/importer.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gcexportdata - -import ( - "fmt" - "go/token" - "go/types" - "os" -) - -// NewImporter returns a new instance of the types.Importer interface -// that reads type information from export data files written by gc. -// The Importer also satisfies types.ImporterFrom. -// -// Export data files are located using "go build" workspace conventions -// and the build.Default context. -// -// Use this importer instead of go/importer.For("gc", ...) to avoid the -// version-skew problems described in the documentation of this package, -// or to control the FileSet or access the imports map populated during -// package loading. -// -func NewImporter(fset *token.FileSet, imports map[string]*types.Package) types.ImporterFrom { - return importer{fset, imports} -} - -type importer struct { - fset *token.FileSet - imports map[string]*types.Package -} - -func (imp importer) Import(importPath string) (*types.Package, error) { - return imp.ImportFrom(importPath, "", 0) -} - -func (imp importer) ImportFrom(importPath, srcDir string, mode types.ImportMode) (_ *types.Package, err error) { - filename, path := Find(importPath, srcDir) - if filename == "" { - if importPath == "unsafe" { - // Even for unsafe, call Find first in case - // the package was vendored. - return types.Unsafe, nil - } - return nil, fmt.Errorf("can't find import: %s", importPath) - } - - if pkg, ok := imp.imports[path]; ok && pkg.Complete() { - return pkg, nil // cache hit - } - - // open file - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer func() { - f.Close() - if err != nil { - // add file name to error - err = fmt.Errorf("reading export data: %s: %v", filename, err) - } - }() - - r, err := NewReader(f) - if err != nil { - return nil, err - } - - return Read(r, imp.fset, imp.imports, path) -} diff --git a/vendor/golang.org/x/tools/go/internal/cgo/cgo.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo.go deleted file mode 100644 index 5db8b309..00000000 --- a/vendor/golang.org/x/tools/go/internal/cgo/cgo.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cgo handles cgo preprocessing of files containing `import "C"`. -// -// DESIGN -// -// The approach taken is to run the cgo processor on the package's -// CgoFiles and parse the output, faking the filenames of the -// resulting ASTs so that the synthetic file containing the C types is -// called "C" (e.g. "~/go/src/net/C") and the preprocessed files -// have their original names (e.g. "~/go/src/net/cgo_unix.go"), -// not the names of the actual temporary files. -// -// The advantage of this approach is its fidelity to 'go build'. The -// downside is that the token.Position.Offset for each AST node is -// incorrect, being an offset within the temporary file. Line numbers -// should still be correct because of the //line comments. -// -// The logic of this file is mostly plundered from the 'go build' -// tool, which also invokes the cgo preprocessor. -// -// -// REJECTED ALTERNATIVE -// -// An alternative approach that we explored is to extend go/types' -// Importer mechanism to provide the identity of the importing package -// so that each time `import "C"` appears it resolves to a different -// synthetic package containing just the objects needed in that case. -// The loader would invoke cgo but parse only the cgo_types.go file -// defining the package-level objects, discarding the other files -// resulting from preprocessing. -// -// The benefit of this approach would have been that source-level -// syntax information would correspond exactly to the original cgo -// file, with no preprocessing involved, making source tools like -// godoc, guru, and eg happy. However, the approach was rejected -// due to the additional complexity it would impose on go/types. (It -// made for a beautiful demo, though.) -// -// cgo files, despite their *.go extension, are not legal Go source -// files per the specification since they may refer to unexported -// members of package "C" such as C.int. Also, a function such as -// C.getpwent has in effect two types, one matching its C type and one -// which additionally returns (errno C.int). The cgo preprocessor -// uses name mangling to distinguish these two functions in the -// processed code, but go/types would need to duplicate this logic in -// its handling of function calls, analogous to the treatment of map -// lookups in which y=m[k] and y,ok=m[k] are both legal. - -package cgo - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "regexp" - "strings" -) - -// ProcessFiles invokes the cgo preprocessor on bp.CgoFiles, parses -// the output and returns the resulting ASTs. -// -func ProcessFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { - tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C") - if err != nil { - return nil, err - } - defer os.RemoveAll(tmpdir) - - pkgdir := bp.Dir - if DisplayPath != nil { - pkgdir = DisplayPath(pkgdir) - } - - cgoFiles, cgoDisplayFiles, err := Run(bp, pkgdir, tmpdir, false) - if err != nil { - return nil, err - } - var files []*ast.File - for i := range cgoFiles { - rd, err := os.Open(cgoFiles[i]) - if err != nil { - return nil, err - } - display := filepath.Join(bp.Dir, cgoDisplayFiles[i]) - f, err := parser.ParseFile(fset, display, rd, mode) - rd.Close() - if err != nil { - return nil, err - } - files = append(files, f) - } - return files, nil -} - -var cgoRe = regexp.MustCompile(`[/\\:]`) - -// Run invokes the cgo preprocessor on bp.CgoFiles and returns two -// lists of files: the resulting processed files (in temporary -// directory tmpdir) and the corresponding names of the unprocessed files. -// -// Run is adapted from (*builder).cgo in -// $GOROOT/src/cmd/go/build.go, but these features are unsupported: -// Objective C, CGOPKGPATH, CGO_FLAGS. -// -// If useabs is set to true, absolute paths of the bp.CgoFiles will be passed in -// to the cgo preprocessor. This in turn will set the // line comments -// referring to those files to use absolute paths. This is needed for -// go/packages using the legacy go list support so it is able to find -// the original files. -func Run(bp *build.Package, pkgdir, tmpdir string, useabs bool) (files, displayFiles []string, err error) { - cgoCPPFLAGS, _, _, _ := cflags(bp, true) - _, cgoexeCFLAGS, _, _ := cflags(bp, false) - - if len(bp.CgoPkgConfig) > 0 { - pcCFLAGS, err := pkgConfigFlags(bp) - if err != nil { - return nil, nil, err - } - cgoCPPFLAGS = append(cgoCPPFLAGS, pcCFLAGS...) - } - - // Allows including _cgo_export.h from .[ch] files in the package. - cgoCPPFLAGS = append(cgoCPPFLAGS, "-I", tmpdir) - - // _cgo_gotypes.go (displayed "C") contains the type definitions. - files = append(files, filepath.Join(tmpdir, "_cgo_gotypes.go")) - displayFiles = append(displayFiles, "C") - for _, fn := range bp.CgoFiles { - // "foo.cgo1.go" (displayed "foo.go") is the processed Go source. - f := cgoRe.ReplaceAllString(fn[:len(fn)-len("go")], "_") - files = append(files, filepath.Join(tmpdir, f+"cgo1.go")) - displayFiles = append(displayFiles, fn) - } - - var cgoflags []string - if bp.Goroot && bp.ImportPath == "runtime/cgo" { - cgoflags = append(cgoflags, "-import_runtime_cgo=false") - } - if bp.Goroot && bp.ImportPath == "runtime/race" || bp.ImportPath == "runtime/cgo" { - cgoflags = append(cgoflags, "-import_syscall=false") - } - - var cgoFiles []string = bp.CgoFiles - if useabs { - cgoFiles = make([]string, len(bp.CgoFiles)) - for i := range cgoFiles { - cgoFiles[i] = filepath.Join(pkgdir, bp.CgoFiles[i]) - } - } - - args := stringList( - "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--", - cgoCPPFLAGS, cgoexeCFLAGS, cgoFiles, - ) - if false { - log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir) - } - cmd := exec.Command(args[0], args[1:]...) - cmd.Dir = pkgdir - cmd.Stdout = os.Stderr - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - return nil, nil, fmt.Errorf("cgo failed: %s: %s", args, err) - } - - return files, displayFiles, nil -} - -// -- unmodified from 'go build' --------------------------------------- - -// Return the flags to use when invoking the C or C++ compilers, or cgo. -func cflags(p *build.Package, def bool) (cppflags, cflags, cxxflags, ldflags []string) { - var defaults string - if def { - defaults = "-g -O2" - } - - cppflags = stringList(envList("CGO_CPPFLAGS", ""), p.CgoCPPFLAGS) - cflags = stringList(envList("CGO_CFLAGS", defaults), p.CgoCFLAGS) - cxxflags = stringList(envList("CGO_CXXFLAGS", defaults), p.CgoCXXFLAGS) - ldflags = stringList(envList("CGO_LDFLAGS", defaults), p.CgoLDFLAGS) - return -} - -// envList returns the value of the given environment variable broken -// into fields, using the default value when the variable is empty. -func envList(key, def string) []string { - v := os.Getenv(key) - if v == "" { - v = def - } - return strings.Fields(v) -} - -// stringList's arguments should be a sequence of string or []string values. -// stringList flattens them into a single []string. -func stringList(args ...interface{}) []string { - var x []string - for _, arg := range args { - switch arg := arg.(type) { - case []string: - x = append(x, arg...) - case string: - x = append(x, arg) - default: - panic("stringList: invalid argument") - } - } - return x -} diff --git a/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go deleted file mode 100644 index b5bb95a6..00000000 --- a/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cgo - -import ( - "errors" - "fmt" - "go/build" - "os/exec" - "strings" -) - -// pkgConfig runs pkg-config with the specified arguments and returns the flags it prints. -func pkgConfig(mode string, pkgs []string) (flags []string, err error) { - cmd := exec.Command("pkg-config", append([]string{mode}, pkgs...)...) - out, err := cmd.CombinedOutput() - if err != nil { - s := fmt.Sprintf("%s failed: %v", strings.Join(cmd.Args, " "), err) - if len(out) > 0 { - s = fmt.Sprintf("%s: %s", s, out) - } - return nil, errors.New(s) - } - if len(out) > 0 { - flags = strings.Fields(string(out)) - } - return -} - -// pkgConfigFlags calls pkg-config if needed and returns the cflags -// needed to build the package. -func pkgConfigFlags(p *build.Package) (cflags []string, err error) { - if len(p.CgoPkgConfig) == 0 { - return nil, nil - } - return pkgConfig("--cflags", p.CgoPkgConfig) -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go deleted file mode 100644 index a807d0aa..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go +++ /dev/null @@ -1,852 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go; -// see that file for specification of the format. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "fmt" - "go/ast" - "go/constant" - "go/token" - "go/types" - "math" - "math/big" - "sort" - "strings" -) - -// If debugFormat is set, each integer and string value is preceded by a marker -// and position information in the encoding. This mechanism permits an importer -// to recognize immediately when it is out of sync. The importer recognizes this -// mode automatically (i.e., it can import export data produced with debugging -// support even if debugFormat is not set at the time of import). This mode will -// lead to massively larger export data (by a factor of 2 to 3) and should only -// be enabled during development and debugging. -// -// NOTE: This flag is the first flag to enable if importing dies because of -// (suspected) format errors, and whenever a change is made to the format. -const debugFormat = false // default: false - -// If trace is set, debugging output is printed to std out. -const trace = false // default: false - -// Current export format version. Increase with each format change. -// Note: The latest binary (non-indexed) export format is at version 6. -// This exporter is still at level 4, but it doesn't matter since -// the binary importer can handle older versions just fine. -// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE -// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE -// 4: type name objects support type aliases, uses aliasTag -// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used) -// 2: removed unused bool in ODCL export (compiler only) -// 1: header format change (more regular), export package for _ struct fields -// 0: Go1.7 encoding -const exportVersion = 4 - -// trackAllTypes enables cycle tracking for all types, not just named -// types. The existing compiler invariants assume that unnamed types -// that are not completely set up are not used, or else there are spurious -// errors. -// If disabled, only named types are tracked, possibly leading to slightly -// less efficient encoding in rare cases. It also prevents the export of -// some corner-case type declarations (but those are not handled correctly -// with with the textual export format either). -// TODO(gri) enable and remove once issues caused by it are fixed -const trackAllTypes = false - -type exporter struct { - fset *token.FileSet - out bytes.Buffer - - // object -> index maps, indexed in order of serialization - strIndex map[string]int - pkgIndex map[*types.Package]int - typIndex map[types.Type]int - - // position encoding - posInfoFormat bool - prevFile string - prevLine int - - // debugging support - written int // bytes written - indent int // for trace -} - -// internalError represents an error generated inside this package. -type internalError string - -func (e internalError) Error() string { return "gcimporter: " + string(e) } - -func internalErrorf(format string, args ...interface{}) error { - return internalError(fmt.Sprintf(format, args...)) -} - -// BExportData returns binary export data for pkg. -// If no file set is provided, position info will be missing. -func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { - defer func() { - if e := recover(); e != nil { - if ierr, ok := e.(internalError); ok { - err = ierr - return - } - // Not an internal error; panic again. - panic(e) - } - }() - - p := exporter{ - fset: fset, - strIndex: map[string]int{"": 0}, // empty string is mapped to 0 - pkgIndex: make(map[*types.Package]int), - typIndex: make(map[types.Type]int), - posInfoFormat: true, // TODO(gri) might become a flag, eventually - } - - // write version info - // The version string must start with "version %d" where %d is the version - // number. Additional debugging information may follow after a blank; that - // text is ignored by the importer. - p.rawStringln(fmt.Sprintf("version %d", exportVersion)) - var debug string - if debugFormat { - debug = "debug" - } - p.rawStringln(debug) // cannot use p.bool since it's affected by debugFormat; also want to see this clearly - p.bool(trackAllTypes) - p.bool(p.posInfoFormat) - - // --- generic export data --- - - // populate type map with predeclared "known" types - for index, typ := range predeclared() { - p.typIndex[typ] = index - } - if len(p.typIndex) != len(predeclared()) { - return nil, internalError("duplicate entries in type map?") - } - - // write package data - p.pkg(pkg, true) - if trace { - p.tracef("\n") - } - - // write objects - objcount := 0 - scope := pkg.Scope() - for _, name := range scope.Names() { - if !ast.IsExported(name) { - continue - } - if trace { - p.tracef("\n") - } - p.obj(scope.Lookup(name)) - objcount++ - } - - // indicate end of list - if trace { - p.tracef("\n") - } - p.tag(endTag) - - // for self-verification only (redundant) - p.int(objcount) - - if trace { - p.tracef("\n") - } - - // --- end of export data --- - - return p.out.Bytes(), nil -} - -func (p *exporter) pkg(pkg *types.Package, emptypath bool) { - if pkg == nil { - panic(internalError("unexpected nil pkg")) - } - - // if we saw the package before, write its index (>= 0) - if i, ok := p.pkgIndex[pkg]; ok { - p.index('P', i) - return - } - - // otherwise, remember the package, write the package tag (< 0) and package data - if trace { - p.tracef("P%d = { ", len(p.pkgIndex)) - defer p.tracef("} ") - } - p.pkgIndex[pkg] = len(p.pkgIndex) - - p.tag(packageTag) - p.string(pkg.Name()) - if emptypath { - p.string("") - } else { - p.string(pkg.Path()) - } -} - -func (p *exporter) obj(obj types.Object) { - switch obj := obj.(type) { - case *types.Const: - p.tag(constTag) - p.pos(obj) - p.qualifiedName(obj) - p.typ(obj.Type()) - p.value(obj.Val()) - - case *types.TypeName: - if obj.IsAlias() { - p.tag(aliasTag) - p.pos(obj) - p.qualifiedName(obj) - } else { - p.tag(typeTag) - } - p.typ(obj.Type()) - - case *types.Var: - p.tag(varTag) - p.pos(obj) - p.qualifiedName(obj) - p.typ(obj.Type()) - - case *types.Func: - p.tag(funcTag) - p.pos(obj) - p.qualifiedName(obj) - sig := obj.Type().(*types.Signature) - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) - - default: - panic(internalErrorf("unexpected object %v (%T)", obj, obj)) - } -} - -func (p *exporter) pos(obj types.Object) { - if !p.posInfoFormat { - return - } - - file, line := p.fileLine(obj) - if file == p.prevFile { - // common case: write line delta - // delta == 0 means different file or no line change - delta := line - p.prevLine - p.int(delta) - if delta == 0 { - p.int(-1) // -1 means no file change - } - } else { - // different file - p.int(0) - // Encode filename as length of common prefix with previous - // filename, followed by (possibly empty) suffix. Filenames - // frequently share path prefixes, so this can save a lot - // of space and make export data size less dependent on file - // path length. The suffix is unlikely to be empty because - // file names tend to end in ".go". - n := commonPrefixLen(p.prevFile, file) - p.int(n) // n >= 0 - p.string(file[n:]) // write suffix only - p.prevFile = file - p.int(line) - } - p.prevLine = line -} - -func (p *exporter) fileLine(obj types.Object) (file string, line int) { - if p.fset != nil { - pos := p.fset.Position(obj.Pos()) - file = pos.Filename - line = pos.Line - } - return -} - -func commonPrefixLen(a, b string) int { - if len(a) > len(b) { - a, b = b, a - } - // len(a) <= len(b) - i := 0 - for i < len(a) && a[i] == b[i] { - i++ - } - return i -} - -func (p *exporter) qualifiedName(obj types.Object) { - p.string(obj.Name()) - p.pkg(obj.Pkg(), false) -} - -func (p *exporter) typ(t types.Type) { - if t == nil { - panic(internalError("nil type")) - } - - // Possible optimization: Anonymous pointer types *T where - // T is a named type are common. We could canonicalize all - // such types *T to a single type PT = *T. This would lead - // to at most one *T entry in typIndex, and all future *T's - // would be encoded as the respective index directly. Would - // save 1 byte (pointerTag) per *T and reduce the typIndex - // size (at the cost of a canonicalization map). We can do - // this later, without encoding format change. - - // if we saw the type before, write its index (>= 0) - if i, ok := p.typIndex[t]; ok { - p.index('T', i) - return - } - - // otherwise, remember the type, write the type tag (< 0) and type data - if trackAllTypes { - if trace { - p.tracef("T%d = {>\n", len(p.typIndex)) - defer p.tracef("<\n} ") - } - p.typIndex[t] = len(p.typIndex) - } - - switch t := t.(type) { - case *types.Named: - if !trackAllTypes { - // if we don't track all types, track named types now - p.typIndex[t] = len(p.typIndex) - } - - p.tag(namedTag) - p.pos(t.Obj()) - p.qualifiedName(t.Obj()) - p.typ(t.Underlying()) - if !types.IsInterface(t) { - p.assocMethods(t) - } - - case *types.Array: - p.tag(arrayTag) - p.int64(t.Len()) - p.typ(t.Elem()) - - case *types.Slice: - p.tag(sliceTag) - p.typ(t.Elem()) - - case *dddSlice: - p.tag(dddTag) - p.typ(t.elem) - - case *types.Struct: - p.tag(structTag) - p.fieldList(t) - - case *types.Pointer: - p.tag(pointerTag) - p.typ(t.Elem()) - - case *types.Signature: - p.tag(signatureTag) - p.paramList(t.Params(), t.Variadic()) - p.paramList(t.Results(), false) - - case *types.Interface: - p.tag(interfaceTag) - p.iface(t) - - case *types.Map: - p.tag(mapTag) - p.typ(t.Key()) - p.typ(t.Elem()) - - case *types.Chan: - p.tag(chanTag) - p.int(int(3 - t.Dir())) // hack - p.typ(t.Elem()) - - default: - panic(internalErrorf("unexpected type %T: %s", t, t)) - } -} - -func (p *exporter) assocMethods(named *types.Named) { - // Sort methods (for determinism). - var methods []*types.Func - for i := 0; i < named.NumMethods(); i++ { - methods = append(methods, named.Method(i)) - } - sort.Sort(methodsByName(methods)) - - p.int(len(methods)) - - if trace && methods != nil { - p.tracef("associated methods {>\n") - } - - for i, m := range methods { - if trace && i > 0 { - p.tracef("\n") - } - - p.pos(m) - name := m.Name() - p.string(name) - if !exported(name) { - p.pkg(m.Pkg(), false) - } - - sig := m.Type().(*types.Signature) - p.paramList(types.NewTuple(sig.Recv()), false) - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) - p.int(0) // dummy value for go:nointerface pragma - ignored by importer - } - - if trace && methods != nil { - p.tracef("<\n} ") - } -} - -type methodsByName []*types.Func - -func (x methodsByName) Len() int { return len(x) } -func (x methodsByName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } -func (x methodsByName) Less(i, j int) bool { return x[i].Name() < x[j].Name() } - -func (p *exporter) fieldList(t *types.Struct) { - if trace && t.NumFields() > 0 { - p.tracef("fields {>\n") - defer p.tracef("<\n} ") - } - - p.int(t.NumFields()) - for i := 0; i < t.NumFields(); i++ { - if trace && i > 0 { - p.tracef("\n") - } - p.field(t.Field(i)) - p.string(t.Tag(i)) - } -} - -func (p *exporter) field(f *types.Var) { - if !f.IsField() { - panic(internalError("field expected")) - } - - p.pos(f) - p.fieldName(f) - p.typ(f.Type()) -} - -func (p *exporter) iface(t *types.Interface) { - // TODO(gri): enable importer to load embedded interfaces, - // then emit Embeddeds and ExplicitMethods separately here. - p.int(0) - - n := t.NumMethods() - if trace && n > 0 { - p.tracef("methods {>\n") - defer p.tracef("<\n} ") - } - p.int(n) - for i := 0; i < n; i++ { - if trace && i > 0 { - p.tracef("\n") - } - p.method(t.Method(i)) - } -} - -func (p *exporter) method(m *types.Func) { - sig := m.Type().(*types.Signature) - if sig.Recv() == nil { - panic(internalError("method expected")) - } - - p.pos(m) - p.string(m.Name()) - if m.Name() != "_" && !ast.IsExported(m.Name()) { - p.pkg(m.Pkg(), false) - } - - // interface method; no need to encode receiver. - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) -} - -func (p *exporter) fieldName(f *types.Var) { - name := f.Name() - - if f.Anonymous() { - // anonymous field - we distinguish between 3 cases: - // 1) field name matches base type name and is exported - // 2) field name matches base type name and is not exported - // 3) field name doesn't match base type name (alias name) - bname := basetypeName(f.Type()) - if name == bname { - if ast.IsExported(name) { - name = "" // 1) we don't need to know the field name or package - } else { - name = "?" // 2) use unexported name "?" to force package export - } - } else { - // 3) indicate alias and export name as is - // (this requires an extra "@" but this is a rare case) - p.string("@") - } - } - - p.string(name) - if name != "" && !ast.IsExported(name) { - p.pkg(f.Pkg(), false) - } -} - -func basetypeName(typ types.Type) string { - switch typ := deref(typ).(type) { - case *types.Basic: - return typ.Name() - case *types.Named: - return typ.Obj().Name() - default: - return "" // unnamed type - } -} - -func (p *exporter) paramList(params *types.Tuple, variadic bool) { - // use negative length to indicate unnamed parameters - // (look at the first parameter only since either all - // names are present or all are absent) - n := params.Len() - if n > 0 && params.At(0).Name() == "" { - n = -n - } - p.int(n) - for i := 0; i < params.Len(); i++ { - q := params.At(i) - t := q.Type() - if variadic && i == params.Len()-1 { - t = &dddSlice{t.(*types.Slice).Elem()} - } - p.typ(t) - if n > 0 { - name := q.Name() - p.string(name) - if name != "_" { - p.pkg(q.Pkg(), false) - } - } - p.string("") // no compiler-specific info - } -} - -func (p *exporter) value(x constant.Value) { - if trace { - p.tracef("= ") - } - - switch x.Kind() { - case constant.Bool: - tag := falseTag - if constant.BoolVal(x) { - tag = trueTag - } - p.tag(tag) - - case constant.Int: - if v, exact := constant.Int64Val(x); exact { - // common case: x fits into an int64 - use compact encoding - p.tag(int64Tag) - p.int64(v) - return - } - // uncommon case: large x - use float encoding - // (powers of 2 will be encoded efficiently with exponent) - p.tag(floatTag) - p.float(constant.ToFloat(x)) - - case constant.Float: - p.tag(floatTag) - p.float(x) - - case constant.Complex: - p.tag(complexTag) - p.float(constant.Real(x)) - p.float(constant.Imag(x)) - - case constant.String: - p.tag(stringTag) - p.string(constant.StringVal(x)) - - case constant.Unknown: - // package contains type errors - p.tag(unknownTag) - - default: - panic(internalErrorf("unexpected value %v (%T)", x, x)) - } -} - -func (p *exporter) float(x constant.Value) { - if x.Kind() != constant.Float { - panic(internalErrorf("unexpected constant %v, want float", x)) - } - // extract sign (there is no -0) - sign := constant.Sign(x) - if sign == 0 { - // x == 0 - p.int(0) - return - } - // x != 0 - - var f big.Float - if v, exact := constant.Float64Val(x); exact { - // float64 - f.SetFloat64(v) - } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { - // TODO(gri): add big.Rat accessor to constant.Value. - r := valueToRat(num) - f.SetRat(r.Quo(r, valueToRat(denom))) - } else { - // Value too large to represent as a fraction => inaccessible. - // TODO(gri): add big.Float accessor to constant.Value. - f.SetFloat64(math.MaxFloat64) // FIXME - } - - // extract exponent such that 0.5 <= m < 1.0 - var m big.Float - exp := f.MantExp(&m) - - // extract mantissa as *big.Int - // - set exponent large enough so mant satisfies mant.IsInt() - // - get *big.Int from mant - m.SetMantExp(&m, int(m.MinPrec())) - mant, acc := m.Int(nil) - if acc != big.Exact { - panic(internalError("internal error")) - } - - p.int(sign) - p.int(exp) - p.string(string(mant.Bytes())) -} - -func valueToRat(x constant.Value) *big.Rat { - // Convert little-endian to big-endian. - // I can't believe this is necessary. - bytes := constant.Bytes(x) - for i := 0; i < len(bytes)/2; i++ { - bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i] - } - return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes)) -} - -func (p *exporter) bool(b bool) bool { - if trace { - p.tracef("[") - defer p.tracef("= %v] ", b) - } - - x := 0 - if b { - x = 1 - } - p.int(x) - return b -} - -// ---------------------------------------------------------------------------- -// Low-level encoders - -func (p *exporter) index(marker byte, index int) { - if index < 0 { - panic(internalError("invalid index < 0")) - } - if debugFormat { - p.marker('t') - } - if trace { - p.tracef("%c%d ", marker, index) - } - p.rawInt64(int64(index)) -} - -func (p *exporter) tag(tag int) { - if tag >= 0 { - panic(internalError("invalid tag >= 0")) - } - if debugFormat { - p.marker('t') - } - if trace { - p.tracef("%s ", tagString[-tag]) - } - p.rawInt64(int64(tag)) -} - -func (p *exporter) int(x int) { - p.int64(int64(x)) -} - -func (p *exporter) int64(x int64) { - if debugFormat { - p.marker('i') - } - if trace { - p.tracef("%d ", x) - } - p.rawInt64(x) -} - -func (p *exporter) string(s string) { - if debugFormat { - p.marker('s') - } - if trace { - p.tracef("%q ", s) - } - // if we saw the string before, write its index (>= 0) - // (the empty string is mapped to 0) - if i, ok := p.strIndex[s]; ok { - p.rawInt64(int64(i)) - return - } - // otherwise, remember string and write its negative length and bytes - p.strIndex[s] = len(p.strIndex) - p.rawInt64(-int64(len(s))) - for i := 0; i < len(s); i++ { - p.rawByte(s[i]) - } -} - -// marker emits a marker byte and position information which makes -// it easy for a reader to detect if it is "out of sync". Used for -// debugFormat format only. -func (p *exporter) marker(m byte) { - p.rawByte(m) - // Enable this for help tracking down the location - // of an incorrect marker when running in debugFormat. - if false && trace { - p.tracef("#%d ", p.written) - } - p.rawInt64(int64(p.written)) -} - -// rawInt64 should only be used by low-level encoders. -func (p *exporter) rawInt64(x int64) { - var tmp [binary.MaxVarintLen64]byte - n := binary.PutVarint(tmp[:], x) - for i := 0; i < n; i++ { - p.rawByte(tmp[i]) - } -} - -// rawStringln should only be used to emit the initial version string. -func (p *exporter) rawStringln(s string) { - for i := 0; i < len(s); i++ { - p.rawByte(s[i]) - } - p.rawByte('\n') -} - -// rawByte is the bottleneck interface to write to p.out. -// rawByte escapes b as follows (any encoding does that -// hides '$'): -// -// '$' => '|' 'S' -// '|' => '|' '|' -// -// Necessary so other tools can find the end of the -// export data by searching for "$$". -// rawByte should only be used by low-level encoders. -func (p *exporter) rawByte(b byte) { - switch b { - case '$': - // write '$' as '|' 'S' - b = 'S' - fallthrough - case '|': - // write '|' as '|' '|' - p.out.WriteByte('|') - p.written++ - } - p.out.WriteByte(b) - p.written++ -} - -// tracef is like fmt.Printf but it rewrites the format string -// to take care of indentation. -func (p *exporter) tracef(format string, args ...interface{}) { - if strings.ContainsAny(format, "<>\n") { - var buf bytes.Buffer - for i := 0; i < len(format); i++ { - // no need to deal with runes - ch := format[i] - switch ch { - case '>': - p.indent++ - continue - case '<': - p.indent-- - continue - } - buf.WriteByte(ch) - if ch == '\n' { - for j := p.indent; j > 0; j-- { - buf.WriteString(". ") - } - } - } - format = buf.String() - } - fmt.Printf(format, args...) -} - -// Debugging support. -// (tagString is only used when tracing is enabled) -var tagString = [...]string{ - // Packages - -packageTag: "package", - - // Types - -namedTag: "named type", - -arrayTag: "array", - -sliceTag: "slice", - -dddTag: "ddd", - -structTag: "struct", - -pointerTag: "pointer", - -signatureTag: "signature", - -interfaceTag: "interface", - -mapTag: "map", - -chanTag: "chan", - - // Values - -falseTag: "false", - -trueTag: "true", - -int64Tag: "int64", - -floatTag: "float", - -fractionTag: "fraction", - -complexTag: "complex", - -stringTag: "string", - -unknownTag: "unknown", - - // Type aliases - -aliasTag: "alias", -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go deleted file mode 100644 index e9f73d14..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go +++ /dev/null @@ -1,1039 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go. - -package gcimporter - -import ( - "encoding/binary" - "fmt" - "go/constant" - "go/token" - "go/types" - "sort" - "strconv" - "strings" - "sync" - "unicode" - "unicode/utf8" -) - -type importer struct { - imports map[string]*types.Package - data []byte - importpath string - buf []byte // for reading strings - version int // export format version - - // object lists - strList []string // in order of appearance - pathList []string // in order of appearance - pkgList []*types.Package // in order of appearance - typList []types.Type // in order of appearance - interfaceList []*types.Interface // for delayed completion only - trackAllTypes bool - - // position encoding - posInfoFormat bool - prevFile string - prevLine int - fake fakeFileSet - - // debugging support - debugFormat bool - read int // bytes read -} - -// BImportData imports a package from the serialized package data -// and returns the number of bytes consumed and a reference to the package. -// If the export data version is not recognized or the format is otherwise -// compromised, an error is returned. -func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - // catch panics and return them as errors - const currentVersion = 6 - version := -1 // unknown version - defer func() { - if e := recover(); e != nil { - // Return a (possibly nil or incomplete) package unchanged (see #16088). - if version > currentVersion { - err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) - } else { - err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) - } - } - }() - - p := importer{ - imports: imports, - data: data, - importpath: path, - version: version, - strList: []string{""}, // empty string is mapped to 0 - pathList: []string{""}, // empty string is mapped to 0 - fake: fakeFileSet{ - fset: fset, - files: make(map[string]*token.File), - }, - } - - // read version info - var versionstr string - if b := p.rawByte(); b == 'c' || b == 'd' { - // Go1.7 encoding; first byte encodes low-level - // encoding format (compact vs debug). - // For backward-compatibility only (avoid problems with - // old installed packages). Newly compiled packages use - // the extensible format string. - // TODO(gri) Remove this support eventually; after Go1.8. - if b == 'd' { - p.debugFormat = true - } - p.trackAllTypes = p.rawByte() == 'a' - p.posInfoFormat = p.int() != 0 - versionstr = p.string() - if versionstr == "v1" { - version = 0 - } - } else { - // Go1.8 extensible encoding - // read version string and extract version number (ignore anything after the version number) - versionstr = p.rawStringln(b) - if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { - if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { - version = v - } - } - } - p.version = version - - // read version specific flags - extend as necessary - switch p.version { - // case currentVersion: - // ... - // fallthrough - case currentVersion, 5, 4, 3, 2, 1: - p.debugFormat = p.rawStringln(p.rawByte()) == "debug" - p.trackAllTypes = p.int() != 0 - p.posInfoFormat = p.int() != 0 - case 0: - // Go1.7 encoding format - nothing to do here - default: - errorf("unknown bexport format version %d (%q)", p.version, versionstr) - } - - // --- generic export data --- - - // populate typList with predeclared "known" types - p.typList = append(p.typList, predeclared()...) - - // read package data - pkg = p.pkg() - - // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go) - objcount := 0 - for { - tag := p.tagOrIndex() - if tag == endTag { - break - } - p.obj(tag) - objcount++ - } - - // self-verification - if count := p.int(); count != objcount { - errorf("got %d objects; want %d", objcount, count) - } - - // ignore compiler-specific import data - - // complete interfaces - // TODO(gri) re-investigate if we still need to do this in a delayed fashion - for _, typ := range p.interfaceList { - typ.Complete() - } - - // record all referenced packages as imports - list := append(([]*types.Package)(nil), p.pkgList[1:]...) - sort.Sort(byPath(list)) - pkg.SetImports(list) - - // package was imported completely and without errors - pkg.MarkComplete() - - return p.read, pkg, nil -} - -func errorf(format string, args ...interface{}) { - panic(fmt.Sprintf(format, args...)) -} - -func (p *importer) pkg() *types.Package { - // if the package was seen before, i is its index (>= 0) - i := p.tagOrIndex() - if i >= 0 { - return p.pkgList[i] - } - - // otherwise, i is the package tag (< 0) - if i != packageTag { - errorf("unexpected package tag %d version %d", i, p.version) - } - - // read package data - name := p.string() - var path string - if p.version >= 5 { - path = p.path() - } else { - path = p.string() - } - if p.version >= 6 { - p.int() // package height; unused by go/types - } - - // we should never see an empty package name - if name == "" { - errorf("empty package name in import") - } - - // an empty path denotes the package we are currently importing; - // it must be the first package we see - if (path == "") != (len(p.pkgList) == 0) { - errorf("package path %q for pkg index %d", path, len(p.pkgList)) - } - - // if the package was imported before, use that one; otherwise create a new one - if path == "" { - path = p.importpath - } - pkg := p.imports[path] - if pkg == nil { - pkg = types.NewPackage(path, name) - p.imports[path] = pkg - } else if pkg.Name() != name { - errorf("conflicting names %s and %s for package %q", pkg.Name(), name, path) - } - p.pkgList = append(p.pkgList, pkg) - - return pkg -} - -// objTag returns the tag value for each object kind. -func objTag(obj types.Object) int { - switch obj.(type) { - case *types.Const: - return constTag - case *types.TypeName: - return typeTag - case *types.Var: - return varTag - case *types.Func: - return funcTag - default: - errorf("unexpected object: %v (%T)", obj, obj) // panics - panic("unreachable") - } -} - -func sameObj(a, b types.Object) bool { - // Because unnamed types are not canonicalized, we cannot simply compare types for - // (pointer) identity. - // Ideally we'd check equality of constant values as well, but this is good enough. - return objTag(a) == objTag(b) && types.Identical(a.Type(), b.Type()) -} - -func (p *importer) declare(obj types.Object) { - pkg := obj.Pkg() - if alt := pkg.Scope().Insert(obj); alt != nil { - // This can only trigger if we import a (non-type) object a second time. - // Excluding type aliases, this cannot happen because 1) we only import a package - // once; and b) we ignore compiler-specific export data which may contain - // functions whose inlined function bodies refer to other functions that - // were already imported. - // However, type aliases require reexporting the original type, so we need - // to allow it (see also the comment in cmd/compile/internal/gc/bimport.go, - // method importer.obj, switch case importing functions). - // TODO(gri) review/update this comment once the gc compiler handles type aliases. - if !sameObj(obj, alt) { - errorf("inconsistent import:\n\t%v\npreviously imported as:\n\t%v\n", obj, alt) - } - } -} - -func (p *importer) obj(tag int) { - switch tag { - case constTag: - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - val := p.value() - p.declare(types.NewConst(pos, pkg, name, typ, val)) - - case aliasTag: - // TODO(gri) verify type alias hookup is correct - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - p.declare(types.NewTypeName(pos, pkg, name, typ)) - - case typeTag: - p.typ(nil, nil) - - case varTag: - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - p.declare(types.NewVar(pos, pkg, name, typ)) - - case funcTag: - pos := p.pos() - pkg, name := p.qualifiedName() - params, isddd := p.paramList() - result, _ := p.paramList() - sig := types.NewSignature(nil, params, result, isddd) - p.declare(types.NewFunc(pos, pkg, name, sig)) - - default: - errorf("unexpected object tag %d", tag) - } -} - -const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go - -func (p *importer) pos() token.Pos { - if !p.posInfoFormat { - return token.NoPos - } - - file := p.prevFile - line := p.prevLine - delta := p.int() - line += delta - if p.version >= 5 { - if delta == deltaNewFile { - if n := p.int(); n >= 0 { - // file changed - file = p.path() - line = n - } - } - } else { - if delta == 0 { - if n := p.int(); n >= 0 { - // file changed - file = p.prevFile[:n] + p.string() - line = p.int() - } - } - } - p.prevFile = file - p.prevLine = line - - return p.fake.pos(file, line, 0) -} - -// Synthesize a token.Pos -type fakeFileSet struct { - fset *token.FileSet - files map[string]*token.File -} - -func (s *fakeFileSet) pos(file string, line, column int) token.Pos { - // TODO(mdempsky): Make use of column. - - // Since we don't know the set of needed file positions, we - // reserve maxlines positions per file. - const maxlines = 64 * 1024 - f := s.files[file] - if f == nil { - f = s.fset.AddFile(file, -1, maxlines) - s.files[file] = f - // Allocate the fake linebreak indices on first use. - // TODO(adonovan): opt: save ~512KB using a more complex scheme? - fakeLinesOnce.Do(func() { - fakeLines = make([]int, maxlines) - for i := range fakeLines { - fakeLines[i] = i - } - }) - f.SetLines(fakeLines) - } - - if line > maxlines { - line = 1 - } - - // Treat the file as if it contained only newlines - // and column=1: use the line number as the offset. - return f.Pos(line - 1) -} - -var ( - fakeLines []int - fakeLinesOnce sync.Once -) - -func (p *importer) qualifiedName() (pkg *types.Package, name string) { - name = p.string() - pkg = p.pkg() - return -} - -func (p *importer) record(t types.Type) { - p.typList = append(p.typList, t) -} - -// A dddSlice is a types.Type representing ...T parameters. -// It only appears for parameter types and does not escape -// the importer. -type dddSlice struct { - elem types.Type -} - -func (t *dddSlice) Underlying() types.Type { return t } -func (t *dddSlice) String() string { return "..." + t.elem.String() } - -// parent is the package which declared the type; parent == nil means -// the package currently imported. The parent package is needed for -// exported struct fields and interface methods which don't contain -// explicit package information in the export data. -// -// A non-nil tname is used as the "owner" of the result type; i.e., -// the result type is the underlying type of tname. tname is used -// to give interface methods a named receiver type where possible. -func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type { - // if the type was seen before, i is its index (>= 0) - i := p.tagOrIndex() - if i >= 0 { - return p.typList[i] - } - - // otherwise, i is the type tag (< 0) - switch i { - case namedTag: - // read type object - pos := p.pos() - parent, name := p.qualifiedName() - scope := parent.Scope() - obj := scope.Lookup(name) - - // if the object doesn't exist yet, create and insert it - if obj == nil { - obj = types.NewTypeName(pos, parent, name, nil) - scope.Insert(obj) - } - - if _, ok := obj.(*types.TypeName); !ok { - errorf("pkg = %s, name = %s => %s", parent, name, obj) - } - - // associate new named type with obj if it doesn't exist yet - t0 := types.NewNamed(obj.(*types.TypeName), nil, nil) - - // but record the existing type, if any - tname := obj.Type().(*types.Named) // tname is either t0 or the existing type - p.record(tname) - - // read underlying type - t0.SetUnderlying(p.typ(parent, t0)) - - // interfaces don't have associated methods - if types.IsInterface(t0) { - return tname - } - - // read associated methods - for i := p.int(); i > 0; i-- { - // TODO(gri) replace this with something closer to fieldName - pos := p.pos() - name := p.string() - if !exported(name) { - p.pkg() - } - - recv, _ := p.paramList() // TODO(gri) do we need a full param list for the receiver? - params, isddd := p.paramList() - result, _ := p.paramList() - p.int() // go:nointerface pragma - discarded - - sig := types.NewSignature(recv.At(0), params, result, isddd) - t0.AddMethod(types.NewFunc(pos, parent, name, sig)) - } - - return tname - - case arrayTag: - t := new(types.Array) - if p.trackAllTypes { - p.record(t) - } - - n := p.int64() - *t = *types.NewArray(p.typ(parent, nil), n) - return t - - case sliceTag: - t := new(types.Slice) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewSlice(p.typ(parent, nil)) - return t - - case dddTag: - t := new(dddSlice) - if p.trackAllTypes { - p.record(t) - } - - t.elem = p.typ(parent, nil) - return t - - case structTag: - t := new(types.Struct) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewStruct(p.fieldList(parent)) - return t - - case pointerTag: - t := new(types.Pointer) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewPointer(p.typ(parent, nil)) - return t - - case signatureTag: - t := new(types.Signature) - if p.trackAllTypes { - p.record(t) - } - - params, isddd := p.paramList() - result, _ := p.paramList() - *t = *types.NewSignature(nil, params, result, isddd) - return t - - case interfaceTag: - // Create a dummy entry in the type list. This is safe because we - // cannot expect the interface type to appear in a cycle, as any - // such cycle must contain a named type which would have been - // first defined earlier. - // TODO(gri) Is this still true now that we have type aliases? - // See issue #23225. - n := len(p.typList) - if p.trackAllTypes { - p.record(nil) - } - - var embeddeds []types.Type - for n := p.int(); n > 0; n-- { - p.pos() - embeddeds = append(embeddeds, p.typ(parent, nil)) - } - - t := newInterface(p.methodList(parent, tname), embeddeds) - p.interfaceList = append(p.interfaceList, t) - if p.trackAllTypes { - p.typList[n] = t - } - return t - - case mapTag: - t := new(types.Map) - if p.trackAllTypes { - p.record(t) - } - - key := p.typ(parent, nil) - val := p.typ(parent, nil) - *t = *types.NewMap(key, val) - return t - - case chanTag: - t := new(types.Chan) - if p.trackAllTypes { - p.record(t) - } - - dir := chanDir(p.int()) - val := p.typ(parent, nil) - *t = *types.NewChan(dir, val) - return t - - default: - errorf("unexpected type tag %d", i) // panics - panic("unreachable") - } -} - -func chanDir(d int) types.ChanDir { - // tag values must match the constants in cmd/compile/internal/gc/go.go - switch d { - case 1 /* Crecv */ : - return types.RecvOnly - case 2 /* Csend */ : - return types.SendOnly - case 3 /* Cboth */ : - return types.SendRecv - default: - errorf("unexpected channel dir %d", d) - return 0 - } -} - -func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) { - if n := p.int(); n > 0 { - fields = make([]*types.Var, n) - tags = make([]string, n) - for i := range fields { - fields[i], tags[i] = p.field(parent) - } - } - return -} - -func (p *importer) field(parent *types.Package) (*types.Var, string) { - pos := p.pos() - pkg, name, alias := p.fieldName(parent) - typ := p.typ(parent, nil) - tag := p.string() - - anonymous := false - if name == "" { - // anonymous field - typ must be T or *T and T must be a type name - switch typ := deref(typ).(type) { - case *types.Basic: // basic types are named types - pkg = nil // // objects defined in Universe scope have no package - name = typ.Name() - case *types.Named: - name = typ.Obj().Name() - default: - errorf("named base type expected") - } - anonymous = true - } else if alias { - // anonymous field: we have an explicit name because it's an alias - anonymous = true - } - - return types.NewField(pos, pkg, name, typ, anonymous), tag -} - -func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) { - if n := p.int(); n > 0 { - methods = make([]*types.Func, n) - for i := range methods { - methods[i] = p.method(parent, baseType) - } - } - return -} - -func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func { - pos := p.pos() - pkg, name, _ := p.fieldName(parent) - // If we don't have a baseType, use a nil receiver. - // A receiver using the actual interface type (which - // we don't know yet) will be filled in when we call - // types.Interface.Complete. - var recv *types.Var - if baseType != nil { - recv = types.NewVar(token.NoPos, parent, "", baseType) - } - params, isddd := p.paramList() - result, _ := p.paramList() - sig := types.NewSignature(recv, params, result, isddd) - return types.NewFunc(pos, pkg, name, sig) -} - -func (p *importer) fieldName(parent *types.Package) (pkg *types.Package, name string, alias bool) { - name = p.string() - pkg = parent - if pkg == nil { - // use the imported package instead - pkg = p.pkgList[0] - } - if p.version == 0 && name == "_" { - // version 0 didn't export a package for _ fields - return - } - switch name { - case "": - // 1) field name matches base type name and is exported: nothing to do - case "?": - // 2) field name matches base type name and is not exported: need package - name = "" - pkg = p.pkg() - case "@": - // 3) field name doesn't match type name (alias) - name = p.string() - alias = true - fallthrough - default: - if !exported(name) { - pkg = p.pkg() - } - } - return -} - -func (p *importer) paramList() (*types.Tuple, bool) { - n := p.int() - if n == 0 { - return nil, false - } - // negative length indicates unnamed parameters - named := true - if n < 0 { - n = -n - named = false - } - // n > 0 - params := make([]*types.Var, n) - isddd := false - for i := range params { - params[i], isddd = p.param(named) - } - return types.NewTuple(params...), isddd -} - -func (p *importer) param(named bool) (*types.Var, bool) { - t := p.typ(nil, nil) - td, isddd := t.(*dddSlice) - if isddd { - t = types.NewSlice(td.elem) - } - - var pkg *types.Package - var name string - if named { - name = p.string() - if name == "" { - errorf("expected named parameter") - } - if name != "_" { - pkg = p.pkg() - } - if i := strings.Index(name, "·"); i > 0 { - name = name[:i] // cut off gc-specific parameter numbering - } - } - - // read and discard compiler-specific info - p.string() - - return types.NewVar(token.NoPos, pkg, name, t), isddd -} - -func exported(name string) bool { - ch, _ := utf8.DecodeRuneInString(name) - return unicode.IsUpper(ch) -} - -func (p *importer) value() constant.Value { - switch tag := p.tagOrIndex(); tag { - case falseTag: - return constant.MakeBool(false) - case trueTag: - return constant.MakeBool(true) - case int64Tag: - return constant.MakeInt64(p.int64()) - case floatTag: - return p.float() - case complexTag: - re := p.float() - im := p.float() - return constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - case stringTag: - return constant.MakeString(p.string()) - case unknownTag: - return constant.MakeUnknown() - default: - errorf("unexpected value tag %d", tag) // panics - panic("unreachable") - } -} - -func (p *importer) float() constant.Value { - sign := p.int() - if sign == 0 { - return constant.MakeInt64(0) - } - - exp := p.int() - mant := []byte(p.string()) // big endian - - // remove leading 0's if any - for len(mant) > 0 && mant[0] == 0 { - mant = mant[1:] - } - - // convert to little endian - // TODO(gri) go/constant should have a more direct conversion function - // (e.g., once it supports a big.Float based implementation) - for i, j := 0, len(mant)-1; i < j; i, j = i+1, j-1 { - mant[i], mant[j] = mant[j], mant[i] - } - - // adjust exponent (constant.MakeFromBytes creates an integer value, - // but mant represents the mantissa bits such that 0.5 <= mant < 1.0) - exp -= len(mant) << 3 - if len(mant) > 0 { - for msd := mant[len(mant)-1]; msd&0x80 == 0; msd <<= 1 { - exp++ - } - } - - x := constant.MakeFromBytes(mant) - switch { - case exp < 0: - d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) - x = constant.BinaryOp(x, token.QUO, d) - case exp > 0: - x = constant.Shift(x, token.SHL, uint(exp)) - } - - if sign < 0 { - x = constant.UnaryOp(token.SUB, x, 0) - } - return x -} - -// ---------------------------------------------------------------------------- -// Low-level decoders - -func (p *importer) tagOrIndex() int { - if p.debugFormat { - p.marker('t') - } - - return int(p.rawInt64()) -} - -func (p *importer) int() int { - x := p.int64() - if int64(int(x)) != x { - errorf("exported integer too large") - } - return int(x) -} - -func (p *importer) int64() int64 { - if p.debugFormat { - p.marker('i') - } - - return p.rawInt64() -} - -func (p *importer) path() string { - if p.debugFormat { - p.marker('p') - } - // if the path was seen before, i is its index (>= 0) - // (the empty string is at index 0) - i := p.rawInt64() - if i >= 0 { - return p.pathList[i] - } - // otherwise, i is the negative path length (< 0) - a := make([]string, -i) - for n := range a { - a[n] = p.string() - } - s := strings.Join(a, "/") - p.pathList = append(p.pathList, s) - return s -} - -func (p *importer) string() string { - if p.debugFormat { - p.marker('s') - } - // if the string was seen before, i is its index (>= 0) - // (the empty string is at index 0) - i := p.rawInt64() - if i >= 0 { - return p.strList[i] - } - // otherwise, i is the negative string length (< 0) - if n := int(-i); n <= cap(p.buf) { - p.buf = p.buf[:n] - } else { - p.buf = make([]byte, n) - } - for i := range p.buf { - p.buf[i] = p.rawByte() - } - s := string(p.buf) - p.strList = append(p.strList, s) - return s -} - -func (p *importer) marker(want byte) { - if got := p.rawByte(); got != want { - errorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read) - } - - pos := p.read - if n := int(p.rawInt64()); n != pos { - errorf("incorrect position: got %d; want %d", n, pos) - } -} - -// rawInt64 should only be used by low-level decoders. -func (p *importer) rawInt64() int64 { - i, err := binary.ReadVarint(p) - if err != nil { - errorf("read error: %v", err) - } - return i -} - -// rawStringln should only be used to read the initial version string. -func (p *importer) rawStringln(b byte) string { - p.buf = p.buf[:0] - for b != '\n' { - p.buf = append(p.buf, b) - b = p.rawByte() - } - return string(p.buf) -} - -// needed for binary.ReadVarint in rawInt64 -func (p *importer) ReadByte() (byte, error) { - return p.rawByte(), nil -} - -// byte is the bottleneck interface for reading p.data. -// It unescapes '|' 'S' to '$' and '|' '|' to '|'. -// rawByte should only be used by low-level decoders. -func (p *importer) rawByte() byte { - b := p.data[0] - r := 1 - if b == '|' { - b = p.data[1] - r = 2 - switch b { - case 'S': - b = '$' - case '|': - // nothing to do - default: - errorf("unexpected escape sequence in export data") - } - } - p.data = p.data[r:] - p.read += r - return b - -} - -// ---------------------------------------------------------------------------- -// Export format - -// Tags. Must be < 0. -const ( - // Objects - packageTag = -(iota + 1) - constTag - typeTag - varTag - funcTag - endTag - - // Types - namedTag - arrayTag - sliceTag - dddTag - structTag - pointerTag - signatureTag - interfaceTag - mapTag - chanTag - - // Values - falseTag - trueTag - int64Tag - floatTag - fractionTag // not used by gc - complexTag - stringTag - nilTag // only used by gc (appears in exported inlined function bodies) - unknownTag // not used by gc (only appears in packages with errors) - - // Type aliases - aliasTag -) - -var predeclOnce sync.Once -var predecl []types.Type // initialized lazily - -func predeclared() []types.Type { - predeclOnce.Do(func() { - // initialize lazily to be sure that all - // elements have been initialized before - predecl = []types.Type{ // basic types - types.Typ[types.Bool], - types.Typ[types.Int], - types.Typ[types.Int8], - types.Typ[types.Int16], - types.Typ[types.Int32], - types.Typ[types.Int64], - types.Typ[types.Uint], - types.Typ[types.Uint8], - types.Typ[types.Uint16], - types.Typ[types.Uint32], - types.Typ[types.Uint64], - types.Typ[types.Uintptr], - types.Typ[types.Float32], - types.Typ[types.Float64], - types.Typ[types.Complex64], - types.Typ[types.Complex128], - types.Typ[types.String], - - // basic type aliases - types.Universe.Lookup("byte").Type(), - types.Universe.Lookup("rune").Type(), - - // error - types.Universe.Lookup("error").Type(), - - // untyped types - types.Typ[types.UntypedBool], - types.Typ[types.UntypedInt], - types.Typ[types.UntypedRune], - types.Typ[types.UntypedFloat], - types.Typ[types.UntypedComplex], - types.Typ[types.UntypedString], - types.Typ[types.UntypedNil], - - // package unsafe - types.Typ[types.UnsafePointer], - - // invalid type - types.Typ[types.Invalid], // only appears in packages with errors - - // used internally by gc; never used by this package or in .a files - anyType{}, - } - }) - return predecl -} - -type anyType struct{} - -func (t anyType) Underlying() types.Type { return t } -func (t anyType) String() string { return "any" } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go deleted file mode 100644 index f33dc561..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go. - -// This file implements FindExportData. - -package gcimporter - -import ( - "bufio" - "fmt" - "io" - "strconv" - "strings" -) - -func readGopackHeader(r *bufio.Reader) (name string, size int, err error) { - // See $GOROOT/include/ar.h. - hdr := make([]byte, 16+12+6+6+8+10+2) - _, err = io.ReadFull(r, hdr) - if err != nil { - return - } - // leave for debugging - if false { - fmt.Printf("header: %s", hdr) - } - s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10])) - size, err = strconv.Atoi(s) - if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' { - err = fmt.Errorf("invalid archive header") - return - } - name = strings.TrimSpace(string(hdr[:16])) - return -} - -// FindExportData positions the reader r at the beginning of the -// export data section of an underlying GC-created object/archive -// file by reading from it. The reader must be positioned at the -// start of the file before calling this function. The hdr result -// is the string before the export data, either "$$" or "$$B". -// -func FindExportData(r *bufio.Reader) (hdr string, err error) { - // Read first line to make sure this is an object file. - line, err := r.ReadSlice('\n') - if err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - - if string(line) == "!\n" { - // Archive file. Scan to __.PKGDEF. - var name string - if name, _, err = readGopackHeader(r); err != nil { - return - } - - // First entry should be __.PKGDEF. - if name != "__.PKGDEF" { - err = fmt.Errorf("go archive is missing __.PKGDEF") - return - } - - // Read first line of __.PKGDEF data, so that line - // is once again the first line of the input. - if line, err = r.ReadSlice('\n'); err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - } - - // Now at __.PKGDEF in archive or still at beginning of file. - // Either way, line should begin with "go object ". - if !strings.HasPrefix(string(line), "go object ") { - err = fmt.Errorf("not a Go object file") - return - } - - // Skip over object header to export data. - // Begins after first line starting with $$. - for line[0] != '$' { - if line, err = r.ReadSlice('\n'); err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - } - hdr = string(line) - - return -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go deleted file mode 100644 index 8dcd8bbb..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ /dev/null @@ -1,1078 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, -// but it also contains the original source-based importer code for Go1.6. -// Once we stop supporting 1.6, we can remove that code. - -// Package gcimporter provides various functions for reading -// gc-generated object files that can be used to implement the -// Importer interface defined by the Go 1.5 standard library package. -package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" - -import ( - "bufio" - "errors" - "fmt" - "go/build" - "go/constant" - "go/token" - "go/types" - "io" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "text/scanner" -) - -// debugging/development support -const debug = false - -var pkgExts = [...]string{".a", ".o"} - -// FindPkg returns the filename and unique package id for an import -// path based on package information provided by build.Import (using -// the build.Default build.Context). A relative srcDir is interpreted -// relative to the current working directory. -// If no file was found, an empty filename is returned. -// -func FindPkg(path, srcDir string) (filename, id string) { - if path == "" { - return - } - - var noext string - switch { - default: - // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x" - // Don't require the source files to be present. - if abs, err := filepath.Abs(srcDir); err == nil { // see issue 14282 - srcDir = abs - } - bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary) - if bp.PkgObj == "" { - id = path // make sure we have an id to print in error message - return - } - noext = strings.TrimSuffix(bp.PkgObj, ".a") - id = bp.ImportPath - - case build.IsLocalImport(path): - // "./x" -> "/this/directory/x.ext", "/this/directory/x" - noext = filepath.Join(srcDir, path) - id = noext - - case filepath.IsAbs(path): - // for completeness only - go/build.Import - // does not support absolute imports - // "/x" -> "/x.ext", "/x" - noext = path - id = path - } - - if false { // for debugging - if path != id { - fmt.Printf("%s -> %s\n", path, id) - } - } - - // try extensions - for _, ext := range pkgExts { - filename = noext + ext - if f, err := os.Stat(filename); err == nil && !f.IsDir() { - return - } - } - - filename = "" // not found - return -} - -// ImportData imports a package by reading the gc-generated export data, -// adds the corresponding package object to the packages map indexed by id, -// and returns the object. -// -// The packages map must contains all packages already imported. The data -// reader position must be the beginning of the export data section. The -// filename is only used in error messages. -// -// If packages[id] contains the completely imported package, that package -// can be used directly, and there is no need to call this function (but -// there is also no harm but for extra time used). -// -func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) { - // support for parser error handling - defer func() { - switch r := recover().(type) { - case nil: - // nothing to do - case importError: - err = r - default: - panic(r) // internal error - } - }() - - var p parser - p.init(filename, id, data, packages) - pkg = p.parseExport() - - return -} - -// Import imports a gc-generated package given its import path and srcDir, adds -// the corresponding package object to the packages map, and returns the object. -// The packages map must contain all packages already imported. -// -func Import(packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) { - var rc io.ReadCloser - var filename, id string - if lookup != nil { - // With custom lookup specified, assume that caller has - // converted path to a canonical import path for use in the map. - if path == "unsafe" { - return types.Unsafe, nil - } - id = path - - // No need to re-import if the package was imported completely before. - if pkg = packages[id]; pkg != nil && pkg.Complete() { - return - } - f, err := lookup(path) - if err != nil { - return nil, err - } - rc = f - } else { - filename, id = FindPkg(path, srcDir) - if filename == "" { - if path == "unsafe" { - return types.Unsafe, nil - } - return nil, fmt.Errorf("can't find import: %q", id) - } - - // no need to re-import if the package was imported completely before - if pkg = packages[id]; pkg != nil && pkg.Complete() { - return - } - - // open file - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer func() { - if err != nil { - // add file name to error - err = fmt.Errorf("%s: %v", filename, err) - } - }() - rc = f - } - defer rc.Close() - - var hdr string - buf := bufio.NewReader(rc) - if hdr, err = FindExportData(buf); err != nil { - return - } - - switch hdr { - case "$$\n": - // Work-around if we don't have a filename; happens only if lookup != nil. - // Either way, the filename is only needed for importer error messages, so - // this is fine. - if filename == "" { - filename = path - } - return ImportData(packages, filename, id, buf) - - case "$$B\n": - var data []byte - data, err = ioutil.ReadAll(buf) - if err != nil { - break - } - - // TODO(gri): allow clients of go/importer to provide a FileSet. - // Or, define a new standard go/types/gcexportdata package. - fset := token.NewFileSet() - - // The indexed export format starts with an 'i'; the older - // binary export format starts with a 'c', 'd', or 'v' - // (from "version"). Select appropriate importer. - if len(data) > 0 && data[0] == 'i' { - _, pkg, err = IImportData(fset, packages, data[1:], id) - } else { - _, pkg, err = BImportData(fset, packages, data, id) - } - - default: - err = fmt.Errorf("unknown export data header: %q", hdr) - } - - return -} - -// ---------------------------------------------------------------------------- -// Parser - -// TODO(gri) Imported objects don't have position information. -// Ideally use the debug table line info; alternatively -// create some fake position (or the position of the -// import). That way error messages referring to imported -// objects can print meaningful information. - -// parser parses the exports inside a gc compiler-produced -// object/archive file and populates its scope with the results. -type parser struct { - scanner scanner.Scanner - tok rune // current token - lit string // literal string; only valid for Ident, Int, String tokens - id string // package id of imported package - sharedPkgs map[string]*types.Package // package id -> package object (across importer) - localPkgs map[string]*types.Package // package id -> package object (just this package) -} - -func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) { - p.scanner.Init(src) - p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) } - p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments - p.scanner.Whitespace = 1<<'\t' | 1<<' ' - p.scanner.Filename = filename // for good error messages - p.next() - p.id = id - p.sharedPkgs = packages - if debug { - // check consistency of packages map - for _, pkg := range packages { - if pkg.Name() == "" { - fmt.Printf("no package name for %s\n", pkg.Path()) - } - } - } -} - -func (p *parser) next() { - p.tok = p.scanner.Scan() - switch p.tok { - case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·': - p.lit = p.scanner.TokenText() - default: - p.lit = "" - } - if debug { - fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit) - } -} - -func declTypeName(pkg *types.Package, name string) *types.TypeName { - scope := pkg.Scope() - if obj := scope.Lookup(name); obj != nil { - return obj.(*types.TypeName) - } - obj := types.NewTypeName(token.NoPos, pkg, name, nil) - // a named type may be referred to before the underlying type - // is known - set it up - types.NewNamed(obj, nil, nil) - scope.Insert(obj) - return obj -} - -// ---------------------------------------------------------------------------- -// Error handling - -// Internal errors are boxed as importErrors. -type importError struct { - pos scanner.Position - err error -} - -func (e importError) Error() string { - return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err) -} - -func (p *parser) error(err interface{}) { - if s, ok := err.(string); ok { - err = errors.New(s) - } - // panic with a runtime.Error if err is not an error - panic(importError{p.scanner.Pos(), err.(error)}) -} - -func (p *parser) errorf(format string, args ...interface{}) { - p.error(fmt.Sprintf(format, args...)) -} - -func (p *parser) expect(tok rune) string { - lit := p.lit - if p.tok != tok { - p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit) - } - p.next() - return lit -} - -func (p *parser) expectSpecial(tok string) { - sep := 'x' // not white space - i := 0 - for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' { - sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token - p.next() - i++ - } - if i < len(tok) { - p.errorf("expected %q, got %q", tok, tok[0:i]) - } -} - -func (p *parser) expectKeyword(keyword string) { - lit := p.expect(scanner.Ident) - if lit != keyword { - p.errorf("expected keyword %s, got %q", keyword, lit) - } -} - -// ---------------------------------------------------------------------------- -// Qualified and unqualified names - -// PackageId = string_lit . -// -func (p *parser) parsePackageID() string { - id, err := strconv.Unquote(p.expect(scanner.String)) - if err != nil { - p.error(err) - } - // id == "" stands for the imported package id - // (only known at time of package installation) - if id == "" { - id = p.id - } - return id -} - -// PackageName = ident . -// -func (p *parser) parsePackageName() string { - return p.expect(scanner.Ident) -} - -// dotIdentifier = ( ident | '·' ) { ident | int | '·' } . -func (p *parser) parseDotIdent() string { - ident := "" - if p.tok != scanner.Int { - sep := 'x' // not white space - for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' { - ident += p.lit - sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token - p.next() - } - } - if ident == "" { - p.expect(scanner.Ident) // use expect() for error handling - } - return ident -} - -// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) . -// -func (p *parser) parseQualifiedName() (id, name string) { - p.expect('@') - id = p.parsePackageID() - p.expect('.') - // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields. - if p.tok == '?' { - p.next() - } else { - name = p.parseDotIdent() - } - return -} - -// getPkg returns the package for a given id. If the package is -// not found, create the package and add it to the p.localPkgs -// and p.sharedPkgs maps. name is the (expected) name of the -// package. If name == "", the package name is expected to be -// set later via an import clause in the export data. -// -// id identifies a package, usually by a canonical package path like -// "encoding/json" but possibly by a non-canonical import path like -// "./json". -// -func (p *parser) getPkg(id, name string) *types.Package { - // package unsafe is not in the packages maps - handle explicitly - if id == "unsafe" { - return types.Unsafe - } - - pkg := p.localPkgs[id] - if pkg == nil { - // first import of id from this package - pkg = p.sharedPkgs[id] - if pkg == nil { - // first import of id by this importer; - // add (possibly unnamed) pkg to shared packages - pkg = types.NewPackage(id, name) - p.sharedPkgs[id] = pkg - } - // add (possibly unnamed) pkg to local packages - if p.localPkgs == nil { - p.localPkgs = make(map[string]*types.Package) - } - p.localPkgs[id] = pkg - } else if name != "" { - // package exists already and we have an expected package name; - // make sure names match or set package name if necessary - if pname := pkg.Name(); pname == "" { - pkg.SetName(name) - } else if pname != name { - p.errorf("%s package name mismatch: %s (given) vs %s (expected)", id, pname, name) - } - } - return pkg -} - -// parseExportedName is like parseQualifiedName, but -// the package id is resolved to an imported *types.Package. -// -func (p *parser) parseExportedName() (pkg *types.Package, name string) { - id, name := p.parseQualifiedName() - pkg = p.getPkg(id, "") - return -} - -// ---------------------------------------------------------------------------- -// Types - -// BasicType = identifier . -// -func (p *parser) parseBasicType() types.Type { - id := p.expect(scanner.Ident) - obj := types.Universe.Lookup(id) - if obj, ok := obj.(*types.TypeName); ok { - return obj.Type() - } - p.errorf("not a basic type: %s", id) - return nil -} - -// ArrayType = "[" int_lit "]" Type . -// -func (p *parser) parseArrayType(parent *types.Package) types.Type { - // "[" already consumed and lookahead known not to be "]" - lit := p.expect(scanner.Int) - p.expect(']') - elem := p.parseType(parent) - n, err := strconv.ParseInt(lit, 10, 64) - if err != nil { - p.error(err) - } - return types.NewArray(elem, n) -} - -// MapType = "map" "[" Type "]" Type . -// -func (p *parser) parseMapType(parent *types.Package) types.Type { - p.expectKeyword("map") - p.expect('[') - key := p.parseType(parent) - p.expect(']') - elem := p.parseType(parent) - return types.NewMap(key, elem) -} - -// Name = identifier | "?" | QualifiedName . -// -// For unqualified and anonymous names, the returned package is the parent -// package unless parent == nil, in which case the returned package is the -// package being imported. (The parent package is not nil if the the name -// is an unqualified struct field or interface method name belonging to a -// type declared in another package.) -// -// For qualified names, the returned package is nil (and not created if -// it doesn't exist yet) unless materializePkg is set (which creates an -// unnamed package with valid package path). In the latter case, a -// subsequent import clause is expected to provide a name for the package. -// -func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) { - pkg = parent - if pkg == nil { - pkg = p.sharedPkgs[p.id] - } - switch p.tok { - case scanner.Ident: - name = p.lit - p.next() - case '?': - // anonymous - p.next() - case '@': - // exported name prefixed with package path - pkg = nil - var id string - id, name = p.parseQualifiedName() - if materializePkg { - pkg = p.getPkg(id, "") - } - default: - p.error("name expected") - } - return -} - -func deref(typ types.Type) types.Type { - if p, _ := typ.(*types.Pointer); p != nil { - return p.Elem() - } - return typ -} - -// Field = Name Type [ string_lit ] . -// -func (p *parser) parseField(parent *types.Package) (*types.Var, string) { - pkg, name := p.parseName(parent, true) - - if name == "_" { - // Blank fields should be package-qualified because they - // are unexported identifiers, but gc does not qualify them. - // Assuming that the ident belongs to the current package - // causes types to change during re-exporting, leading - // to spurious "can't assign A to B" errors from go/types. - // As a workaround, pretend all blank fields belong - // to the same unique dummy package. - const blankpkg = "<_>" - pkg = p.getPkg(blankpkg, blankpkg) - } - - typ := p.parseType(parent) - anonymous := false - if name == "" { - // anonymous field - typ must be T or *T and T must be a type name - switch typ := deref(typ).(type) { - case *types.Basic: // basic types are named types - pkg = nil // objects defined in Universe scope have no package - name = typ.Name() - case *types.Named: - name = typ.Obj().Name() - default: - p.errorf("anonymous field expected") - } - anonymous = true - } - tag := "" - if p.tok == scanner.String { - s := p.expect(scanner.String) - var err error - tag, err = strconv.Unquote(s) - if err != nil { - p.errorf("invalid struct tag %s: %s", s, err) - } - } - return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag -} - -// StructType = "struct" "{" [ FieldList ] "}" . -// FieldList = Field { ";" Field } . -// -func (p *parser) parseStructType(parent *types.Package) types.Type { - var fields []*types.Var - var tags []string - - p.expectKeyword("struct") - p.expect('{') - for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { - if i > 0 { - p.expect(';') - } - fld, tag := p.parseField(parent) - if tag != "" && tags == nil { - tags = make([]string, i) - } - if tags != nil { - tags = append(tags, tag) - } - fields = append(fields, fld) - } - p.expect('}') - - return types.NewStruct(fields, tags) -} - -// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] . -// -func (p *parser) parseParameter() (par *types.Var, isVariadic bool) { - _, name := p.parseName(nil, false) - // remove gc-specific parameter numbering - if i := strings.Index(name, "·"); i >= 0 { - name = name[:i] - } - if p.tok == '.' { - p.expectSpecial("...") - isVariadic = true - } - typ := p.parseType(nil) - if isVariadic { - typ = types.NewSlice(typ) - } - // ignore argument tag (e.g. "noescape") - if p.tok == scanner.String { - p.next() - } - // TODO(gri) should we provide a package? - par = types.NewVar(token.NoPos, nil, name, typ) - return -} - -// Parameters = "(" [ ParameterList ] ")" . -// ParameterList = { Parameter "," } Parameter . -// -func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) { - p.expect('(') - for p.tok != ')' && p.tok != scanner.EOF { - if len(list) > 0 { - p.expect(',') - } - par, variadic := p.parseParameter() - list = append(list, par) - if variadic { - if isVariadic { - p.error("... not on final argument") - } - isVariadic = true - } - } - p.expect(')') - - return -} - -// Signature = Parameters [ Result ] . -// Result = Type | Parameters . -// -func (p *parser) parseSignature(recv *types.Var) *types.Signature { - params, isVariadic := p.parseParameters() - - // optional result type - var results []*types.Var - if p.tok == '(' { - var variadic bool - results, variadic = p.parseParameters() - if variadic { - p.error("... not permitted on result type") - } - } - - return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic) -} - -// InterfaceType = "interface" "{" [ MethodList ] "}" . -// MethodList = Method { ";" Method } . -// Method = Name Signature . -// -// The methods of embedded interfaces are always "inlined" -// by the compiler and thus embedded interfaces are never -// visible in the export data. -// -func (p *parser) parseInterfaceType(parent *types.Package) types.Type { - var methods []*types.Func - - p.expectKeyword("interface") - p.expect('{') - for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { - if i > 0 { - p.expect(';') - } - pkg, name := p.parseName(parent, true) - sig := p.parseSignature(nil) - methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig)) - } - p.expect('}') - - // Complete requires the type's embedded interfaces to be fully defined, - // but we do not define any - return newInterface(methods, nil).Complete() -} - -// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type . -// -func (p *parser) parseChanType(parent *types.Package) types.Type { - dir := types.SendRecv - if p.tok == scanner.Ident { - p.expectKeyword("chan") - if p.tok == '<' { - p.expectSpecial("<-") - dir = types.SendOnly - } - } else { - p.expectSpecial("<-") - p.expectKeyword("chan") - dir = types.RecvOnly - } - elem := p.parseType(parent) - return types.NewChan(dir, elem) -} - -// Type = -// BasicType | TypeName | ArrayType | SliceType | StructType | -// PointerType | FuncType | InterfaceType | MapType | ChanType | -// "(" Type ")" . -// -// BasicType = ident . -// TypeName = ExportedName . -// SliceType = "[" "]" Type . -// PointerType = "*" Type . -// FuncType = "func" Signature . -// -func (p *parser) parseType(parent *types.Package) types.Type { - switch p.tok { - case scanner.Ident: - switch p.lit { - default: - return p.parseBasicType() - case "struct": - return p.parseStructType(parent) - case "func": - // FuncType - p.next() - return p.parseSignature(nil) - case "interface": - return p.parseInterfaceType(parent) - case "map": - return p.parseMapType(parent) - case "chan": - return p.parseChanType(parent) - } - case '@': - // TypeName - pkg, name := p.parseExportedName() - return declTypeName(pkg, name).Type() - case '[': - p.next() // look ahead - if p.tok == ']' { - // SliceType - p.next() - return types.NewSlice(p.parseType(parent)) - } - return p.parseArrayType(parent) - case '*': - // PointerType - p.next() - return types.NewPointer(p.parseType(parent)) - case '<': - return p.parseChanType(parent) - case '(': - // "(" Type ")" - p.next() - typ := p.parseType(parent) - p.expect(')') - return typ - } - p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit) - return nil -} - -// ---------------------------------------------------------------------------- -// Declarations - -// ImportDecl = "import" PackageName PackageId . -// -func (p *parser) parseImportDecl() { - p.expectKeyword("import") - name := p.parsePackageName() - p.getPkg(p.parsePackageID(), name) -} - -// int_lit = [ "+" | "-" ] { "0" ... "9" } . -// -func (p *parser) parseInt() string { - s := "" - switch p.tok { - case '-': - s = "-" - p.next() - case '+': - p.next() - } - return s + p.expect(scanner.Int) -} - -// number = int_lit [ "p" int_lit ] . -// -func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { - // mantissa - mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) - if mant == nil { - panic("invalid mantissa") - } - - if p.lit == "p" { - // exponent (base 2) - p.next() - exp, err := strconv.ParseInt(p.parseInt(), 10, 0) - if err != nil { - p.error(err) - } - if exp < 0 { - denom := constant.MakeInt64(1) - denom = constant.Shift(denom, token.SHL, uint(-exp)) - typ = types.Typ[types.UntypedFloat] - val = constant.BinaryOp(mant, token.QUO, denom) - return - } - if exp > 0 { - mant = constant.Shift(mant, token.SHL, uint(exp)) - } - typ = types.Typ[types.UntypedFloat] - val = mant - return - } - - typ = types.Typ[types.UntypedInt] - val = mant - return -} - -// ConstDecl = "const" ExportedName [ Type ] "=" Literal . -// Literal = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit . -// bool_lit = "true" | "false" . -// complex_lit = "(" float_lit "+" float_lit "i" ")" . -// rune_lit = "(" int_lit "+" int_lit ")" . -// string_lit = `"` { unicode_char } `"` . -// -func (p *parser) parseConstDecl() { - p.expectKeyword("const") - pkg, name := p.parseExportedName() - - var typ0 types.Type - if p.tok != '=' { - // constant types are never structured - no need for parent type - typ0 = p.parseType(nil) - } - - p.expect('=') - var typ types.Type - var val constant.Value - switch p.tok { - case scanner.Ident: - // bool_lit - if p.lit != "true" && p.lit != "false" { - p.error("expected true or false") - } - typ = types.Typ[types.UntypedBool] - val = constant.MakeBool(p.lit == "true") - p.next() - - case '-', scanner.Int: - // int_lit - typ, val = p.parseNumber() - - case '(': - // complex_lit or rune_lit - p.next() - if p.tok == scanner.Char { - p.next() - p.expect('+') - typ = types.Typ[types.UntypedRune] - _, val = p.parseNumber() - p.expect(')') - break - } - _, re := p.parseNumber() - p.expect('+') - _, im := p.parseNumber() - p.expectKeyword("i") - p.expect(')') - typ = types.Typ[types.UntypedComplex] - val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - - case scanner.Char: - // rune_lit - typ = types.Typ[types.UntypedRune] - val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) - p.next() - - case scanner.String: - // string_lit - typ = types.Typ[types.UntypedString] - val = constant.MakeFromLiteral(p.lit, token.STRING, 0) - p.next() - - default: - p.errorf("expected literal got %s", scanner.TokenString(p.tok)) - } - - if typ0 == nil { - typ0 = typ - } - - pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val)) -} - -// TypeDecl = "type" ExportedName Type . -// -func (p *parser) parseTypeDecl() { - p.expectKeyword("type") - pkg, name := p.parseExportedName() - obj := declTypeName(pkg, name) - - // The type object may have been imported before and thus already - // have a type associated with it. We still need to parse the type - // structure, but throw it away if the object already has a type. - // This ensures that all imports refer to the same type object for - // a given type declaration. - typ := p.parseType(pkg) - - if name := obj.Type().(*types.Named); name.Underlying() == nil { - name.SetUnderlying(typ) - } -} - -// VarDecl = "var" ExportedName Type . -// -func (p *parser) parseVarDecl() { - p.expectKeyword("var") - pkg, name := p.parseExportedName() - typ := p.parseType(pkg) - pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ)) -} - -// Func = Signature [ Body ] . -// Body = "{" ... "}" . -// -func (p *parser) parseFunc(recv *types.Var) *types.Signature { - sig := p.parseSignature(recv) - if p.tok == '{' { - p.next() - for i := 1; i > 0; p.next() { - switch p.tok { - case '{': - i++ - case '}': - i-- - } - } - } - return sig -} - -// MethodDecl = "func" Receiver Name Func . -// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" . -// -func (p *parser) parseMethodDecl() { - // "func" already consumed - p.expect('(') - recv, _ := p.parseParameter() // receiver - p.expect(')') - - // determine receiver base type object - base := deref(recv.Type()).(*types.Named) - - // parse method name, signature, and possibly inlined body - _, name := p.parseName(nil, false) - sig := p.parseFunc(recv) - - // methods always belong to the same package as the base type object - pkg := base.Obj().Pkg() - - // add method to type unless type was imported before - // and method exists already - // TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small. - base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig)) -} - -// FuncDecl = "func" ExportedName Func . -// -func (p *parser) parseFuncDecl() { - // "func" already consumed - pkg, name := p.parseExportedName() - typ := p.parseFunc(nil) - pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ)) -} - -// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" . -// -func (p *parser) parseDecl() { - if p.tok == scanner.Ident { - switch p.lit { - case "import": - p.parseImportDecl() - case "const": - p.parseConstDecl() - case "type": - p.parseTypeDecl() - case "var": - p.parseVarDecl() - case "func": - p.next() // look ahead - if p.tok == '(' { - p.parseMethodDecl() - } else { - p.parseFuncDecl() - } - } - } - p.expect('\n') -} - -// ---------------------------------------------------------------------------- -// Export - -// Export = "PackageClause { Decl } "$$" . -// PackageClause = "package" PackageName [ "safe" ] "\n" . -// -func (p *parser) parseExport() *types.Package { - p.expectKeyword("package") - name := p.parsePackageName() - if p.tok == scanner.Ident && p.lit == "safe" { - // package was compiled with -u option - ignore - p.next() - } - p.expect('\n') - - pkg := p.getPkg(p.id, name) - - for p.tok != '$' && p.tok != scanner.EOF { - p.parseDecl() - } - - if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' { - // don't call next()/expect() since reading past the - // export data may cause scanner errors (e.g. NUL chars) - p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch) - } - - if n := p.scanner.ErrorCount; n != 0 { - p.errorf("expected no scanner errors, got %d", n) - } - - // Record all locally referenced packages as imports. - var imports []*types.Package - for id, pkg2 := range p.localPkgs { - if pkg2.Name() == "" { - p.errorf("%s package has no name", id) - } - if id == p.id { - continue // avoid self-edge - } - imports = append(imports, pkg2) - } - sort.Sort(byPath(imports)) - pkg.SetImports(imports) - - // package was imported completely and without errors - pkg.MarkComplete() - - return pkg -} - -type byPath []*types.Package - -func (a byPath) Len() int { return len(a) } -func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go deleted file mode 100644 index 4be32a2e..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go +++ /dev/null @@ -1,739 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Indexed binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; -// see that file for specification of the format. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "go/ast" - "go/constant" - "go/token" - "go/types" - "io" - "math/big" - "reflect" - "sort" -) - -// Current indexed export format version. Increase with each format change. -// 0: Go1.11 encoding -const iexportVersion = 0 - -// IExportData returns the binary export data for pkg. -// -// If no file set is provided, position info will be missing. -// The package path of the top-level package will not be recorded, -// so that calls to IImportData can override with a provided package path. -func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { - defer func() { - if e := recover(); e != nil { - if ierr, ok := e.(internalError); ok { - err = ierr - return - } - // Not an internal error; panic again. - panic(e) - } - }() - - p := iexporter{ - out: bytes.NewBuffer(nil), - fset: fset, - allPkgs: map[*types.Package]bool{}, - stringIndex: map[string]uint64{}, - declIndex: map[types.Object]uint64{}, - typIndex: map[types.Type]uint64{}, - localpkg: pkg, - } - - for i, pt := range predeclared() { - p.typIndex[pt] = uint64(i) - } - if len(p.typIndex) > predeclReserved { - panic(internalErrorf("too many predeclared types: %d > %d", len(p.typIndex), predeclReserved)) - } - - // Initialize work queue with exported declarations. - scope := pkg.Scope() - for _, name := range scope.Names() { - if ast.IsExported(name) { - p.pushDecl(scope.Lookup(name)) - } - } - - // Loop until no more work. - for !p.declTodo.empty() { - p.doDecl(p.declTodo.popHead()) - } - - // Append indices to data0 section. - dataLen := uint64(p.data0.Len()) - w := p.newWriter() - w.writeIndex(p.declIndex) - w.flush() - - // Assemble header. - var hdr intWriter - hdr.WriteByte('i') - hdr.uint64(iexportVersion) - hdr.uint64(uint64(p.strings.Len())) - hdr.uint64(dataLen) - - // Flush output. - io.Copy(p.out, &hdr) - io.Copy(p.out, &p.strings) - io.Copy(p.out, &p.data0) - - return p.out.Bytes(), nil -} - -// writeIndex writes out an object index. mainIndex indicates whether -// we're writing out the main index, which is also read by -// non-compiler tools and includes a complete package description -// (i.e., name and height). -func (w *exportWriter) writeIndex(index map[types.Object]uint64) { - // Build a map from packages to objects from that package. - pkgObjs := map[*types.Package][]types.Object{} - - // For the main index, make sure to include every package that - // we reference, even if we're not exporting (or reexporting) - // any symbols from it. - pkgObjs[w.p.localpkg] = nil - for pkg := range w.p.allPkgs { - pkgObjs[pkg] = nil - } - - for obj := range index { - pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj) - } - - var pkgs []*types.Package - for pkg, objs := range pkgObjs { - pkgs = append(pkgs, pkg) - - sort.Slice(objs, func(i, j int) bool { - return objs[i].Name() < objs[j].Name() - }) - } - - sort.Slice(pkgs, func(i, j int) bool { - return w.exportPath(pkgs[i]) < w.exportPath(pkgs[j]) - }) - - w.uint64(uint64(len(pkgs))) - for _, pkg := range pkgs { - w.string(w.exportPath(pkg)) - w.string(pkg.Name()) - w.uint64(uint64(0)) // package height is not needed for go/types - - objs := pkgObjs[pkg] - w.uint64(uint64(len(objs))) - for _, obj := range objs { - w.string(obj.Name()) - w.uint64(index[obj]) - } - } -} - -type iexporter struct { - fset *token.FileSet - out *bytes.Buffer - - localpkg *types.Package - - // allPkgs tracks all packages that have been referenced by - // the export data, so we can ensure to include them in the - // main index. - allPkgs map[*types.Package]bool - - declTodo objQueue - - strings intWriter - stringIndex map[string]uint64 - - data0 intWriter - declIndex map[types.Object]uint64 - typIndex map[types.Type]uint64 -} - -// stringOff returns the offset of s within the string section. -// If not already present, it's added to the end. -func (p *iexporter) stringOff(s string) uint64 { - off, ok := p.stringIndex[s] - if !ok { - off = uint64(p.strings.Len()) - p.stringIndex[s] = off - - p.strings.uint64(uint64(len(s))) - p.strings.WriteString(s) - } - return off -} - -// pushDecl adds n to the declaration work queue, if not already present. -func (p *iexporter) pushDecl(obj types.Object) { - // Package unsafe is known to the compiler and predeclared. - assert(obj.Pkg() != types.Unsafe) - - if _, ok := p.declIndex[obj]; ok { - return - } - - p.declIndex[obj] = ^uint64(0) // mark n present in work queue - p.declTodo.pushTail(obj) -} - -// exportWriter handles writing out individual data section chunks. -type exportWriter struct { - p *iexporter - - data intWriter - currPkg *types.Package - prevFile string - prevLine int64 -} - -func (w *exportWriter) exportPath(pkg *types.Package) string { - if pkg == w.p.localpkg { - return "" - } - return pkg.Path() -} - -func (p *iexporter) doDecl(obj types.Object) { - w := p.newWriter() - w.setPkg(obj.Pkg(), false) - - switch obj := obj.(type) { - case *types.Var: - w.tag('V') - w.pos(obj.Pos()) - w.typ(obj.Type(), obj.Pkg()) - - case *types.Func: - sig, _ := obj.Type().(*types.Signature) - if sig.Recv() != nil { - panic(internalErrorf("unexpected method: %v", sig)) - } - w.tag('F') - w.pos(obj.Pos()) - w.signature(sig) - - case *types.Const: - w.tag('C') - w.pos(obj.Pos()) - w.value(obj.Type(), obj.Val()) - - case *types.TypeName: - if obj.IsAlias() { - w.tag('A') - w.pos(obj.Pos()) - w.typ(obj.Type(), obj.Pkg()) - break - } - - // Defined type. - w.tag('T') - w.pos(obj.Pos()) - - underlying := obj.Type().Underlying() - w.typ(underlying, obj.Pkg()) - - t := obj.Type() - if types.IsInterface(t) { - break - } - - named, ok := t.(*types.Named) - if !ok { - panic(internalErrorf("%s is not a defined type", t)) - } - - n := named.NumMethods() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - m := named.Method(i) - w.pos(m.Pos()) - w.string(m.Name()) - sig, _ := m.Type().(*types.Signature) - w.param(sig.Recv()) - w.signature(sig) - } - - default: - panic(internalErrorf("unexpected object: %v", obj)) - } - - p.declIndex[obj] = w.flush() -} - -func (w *exportWriter) tag(tag byte) { - w.data.WriteByte(tag) -} - -func (w *exportWriter) pos(pos token.Pos) { - if w.p.fset == nil { - w.int64(0) - return - } - - p := w.p.fset.Position(pos) - file := p.Filename - line := int64(p.Line) - - // When file is the same as the last position (common case), - // we can save a few bytes by delta encoding just the line - // number. - // - // Note: Because data objects may be read out of order (or not - // at all), we can only apply delta encoding within a single - // object. This is handled implicitly by tracking prevFile and - // prevLine as fields of exportWriter. - - if file == w.prevFile { - delta := line - w.prevLine - w.int64(delta) - if delta == deltaNewFile { - w.int64(-1) - } - } else { - w.int64(deltaNewFile) - w.int64(line) // line >= 0 - w.string(file) - w.prevFile = file - } - w.prevLine = line -} - -func (w *exportWriter) pkg(pkg *types.Package) { - // Ensure any referenced packages are declared in the main index. - w.p.allPkgs[pkg] = true - - w.string(w.exportPath(pkg)) -} - -func (w *exportWriter) qualifiedIdent(obj types.Object) { - // Ensure any referenced declarations are written out too. - w.p.pushDecl(obj) - - w.string(obj.Name()) - w.pkg(obj.Pkg()) -} - -func (w *exportWriter) typ(t types.Type, pkg *types.Package) { - w.data.uint64(w.p.typOff(t, pkg)) -} - -func (p *iexporter) newWriter() *exportWriter { - return &exportWriter{p: p} -} - -func (w *exportWriter) flush() uint64 { - off := uint64(w.p.data0.Len()) - io.Copy(&w.p.data0, &w.data) - return off -} - -func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 { - off, ok := p.typIndex[t] - if !ok { - w := p.newWriter() - w.doTyp(t, pkg) - off = predeclReserved + w.flush() - p.typIndex[t] = off - } - return off -} - -func (w *exportWriter) startType(k itag) { - w.data.uint64(uint64(k)) -} - -func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { - switch t := t.(type) { - case *types.Named: - w.startType(definedType) - w.qualifiedIdent(t.Obj()) - - case *types.Pointer: - w.startType(pointerType) - w.typ(t.Elem(), pkg) - - case *types.Slice: - w.startType(sliceType) - w.typ(t.Elem(), pkg) - - case *types.Array: - w.startType(arrayType) - w.uint64(uint64(t.Len())) - w.typ(t.Elem(), pkg) - - case *types.Chan: - w.startType(chanType) - // 1 RecvOnly; 2 SendOnly; 3 SendRecv - var dir uint64 - switch t.Dir() { - case types.RecvOnly: - dir = 1 - case types.SendOnly: - dir = 2 - case types.SendRecv: - dir = 3 - } - w.uint64(dir) - w.typ(t.Elem(), pkg) - - case *types.Map: - w.startType(mapType) - w.typ(t.Key(), pkg) - w.typ(t.Elem(), pkg) - - case *types.Signature: - w.startType(signatureType) - w.setPkg(pkg, true) - w.signature(t) - - case *types.Struct: - w.startType(structType) - w.setPkg(pkg, true) - - n := t.NumFields() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - f := t.Field(i) - w.pos(f.Pos()) - w.string(f.Name()) - w.typ(f.Type(), pkg) - w.bool(f.Anonymous()) - w.string(t.Tag(i)) // note (or tag) - } - - case *types.Interface: - w.startType(interfaceType) - w.setPkg(pkg, true) - - n := t.NumEmbeddeds() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - f := t.Embedded(i) - w.pos(f.Obj().Pos()) - w.typ(f.Obj().Type(), f.Obj().Pkg()) - } - - n = t.NumExplicitMethods() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - m := t.ExplicitMethod(i) - w.pos(m.Pos()) - w.string(m.Name()) - sig, _ := m.Type().(*types.Signature) - w.signature(sig) - } - - default: - panic(internalErrorf("unexpected type: %v, %v", t, reflect.TypeOf(t))) - } -} - -func (w *exportWriter) setPkg(pkg *types.Package, write bool) { - if write { - w.pkg(pkg) - } - - w.currPkg = pkg -} - -func (w *exportWriter) signature(sig *types.Signature) { - w.paramList(sig.Params()) - w.paramList(sig.Results()) - if sig.Params().Len() > 0 { - w.bool(sig.Variadic()) - } -} - -func (w *exportWriter) paramList(tup *types.Tuple) { - n := tup.Len() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - w.param(tup.At(i)) - } -} - -func (w *exportWriter) param(obj types.Object) { - w.pos(obj.Pos()) - w.localIdent(obj) - w.typ(obj.Type(), obj.Pkg()) -} - -func (w *exportWriter) value(typ types.Type, v constant.Value) { - w.typ(typ, nil) - - switch v.Kind() { - case constant.Bool: - w.bool(constant.BoolVal(v)) - case constant.Int: - var i big.Int - if i64, exact := constant.Int64Val(v); exact { - i.SetInt64(i64) - } else if ui64, exact := constant.Uint64Val(v); exact { - i.SetUint64(ui64) - } else { - i.SetString(v.ExactString(), 10) - } - w.mpint(&i, typ) - case constant.Float: - f := constantToFloat(v) - w.mpfloat(f, typ) - case constant.Complex: - w.mpfloat(constantToFloat(constant.Real(v)), typ) - w.mpfloat(constantToFloat(constant.Imag(v)), typ) - case constant.String: - w.string(constant.StringVal(v)) - case constant.Unknown: - // package contains type errors - default: - panic(internalErrorf("unexpected value %v (%T)", v, v)) - } -} - -// constantToFloat converts a constant.Value with kind constant.Float to a -// big.Float. -func constantToFloat(x constant.Value) *big.Float { - assert(x.Kind() == constant.Float) - // Use the same floating-point precision (512) as cmd/compile - // (see Mpprec in cmd/compile/internal/gc/mpfloat.go). - const mpprec = 512 - var f big.Float - f.SetPrec(mpprec) - if v, exact := constant.Float64Val(x); exact { - // float64 - f.SetFloat64(v) - } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { - // TODO(gri): add big.Rat accessor to constant.Value. - n := valueToRat(num) - d := valueToRat(denom) - f.SetRat(n.Quo(n, d)) - } else { - // Value too large to represent as a fraction => inaccessible. - // TODO(gri): add big.Float accessor to constant.Value. - _, ok := f.SetString(x.ExactString()) - assert(ok) - } - return &f -} - -// mpint exports a multi-precision integer. -// -// For unsigned types, small values are written out as a single -// byte. Larger values are written out as a length-prefixed big-endian -// byte string, where the length prefix is encoded as its complement. -// For example, bytes 0, 1, and 2 directly represent the integer -// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-, -// 2-, and 3-byte big-endian string follow. -// -// Encoding for signed types use the same general approach as for -// unsigned types, except small values use zig-zag encoding and the -// bottom bit of length prefix byte for large values is reserved as a -// sign bit. -// -// The exact boundary between small and large encodings varies -// according to the maximum number of bytes needed to encode a value -// of type typ. As a special case, 8-bit types are always encoded as a -// single byte. -// -// TODO(mdempsky): Is this level of complexity really worthwhile? -func (w *exportWriter) mpint(x *big.Int, typ types.Type) { - basic, ok := typ.Underlying().(*types.Basic) - if !ok { - panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying())) - } - - signed, maxBytes := intSize(basic) - - negative := x.Sign() < 0 - if !signed && negative { - panic(internalErrorf("negative unsigned integer; type %v, value %v", typ, x)) - } - - b := x.Bytes() - if len(b) > 0 && b[0] == 0 { - panic(internalErrorf("leading zeros")) - } - if uint(len(b)) > maxBytes { - panic(internalErrorf("bad mpint length: %d > %d (type %v, value %v)", len(b), maxBytes, typ, x)) - } - - maxSmall := 256 - maxBytes - if signed { - maxSmall = 256 - 2*maxBytes - } - if maxBytes == 1 { - maxSmall = 256 - } - - // Check if x can use small value encoding. - if len(b) <= 1 { - var ux uint - if len(b) == 1 { - ux = uint(b[0]) - } - if signed { - ux <<= 1 - if negative { - ux-- - } - } - if ux < maxSmall { - w.data.WriteByte(byte(ux)) - return - } - } - - n := 256 - uint(len(b)) - if signed { - n = 256 - 2*uint(len(b)) - if negative { - n |= 1 - } - } - if n < maxSmall || n >= 256 { - panic(internalErrorf("encoding mistake: %d, %v, %v => %d", len(b), signed, negative, n)) - } - - w.data.WriteByte(byte(n)) - w.data.Write(b) -} - -// mpfloat exports a multi-precision floating point number. -// -// The number's value is decomposed into mantissa × 2**exponent, where -// mantissa is an integer. The value is written out as mantissa (as a -// multi-precision integer) and then the exponent, except exponent is -// omitted if mantissa is zero. -func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) { - if f.IsInf() { - panic("infinite constant") - } - - // Break into f = mant × 2**exp, with 0.5 <= mant < 1. - var mant big.Float - exp := int64(f.MantExp(&mant)) - - // Scale so that mant is an integer. - prec := mant.MinPrec() - mant.SetMantExp(&mant, int(prec)) - exp -= int64(prec) - - manti, acc := mant.Int(nil) - if acc != big.Exact { - panic(internalErrorf("mantissa scaling failed for %f (%s)", f, acc)) - } - w.mpint(manti, typ) - if manti.Sign() != 0 { - w.int64(exp) - } -} - -func (w *exportWriter) bool(b bool) bool { - var x uint64 - if b { - x = 1 - } - w.uint64(x) - return b -} - -func (w *exportWriter) int64(x int64) { w.data.int64(x) } -func (w *exportWriter) uint64(x uint64) { w.data.uint64(x) } -func (w *exportWriter) string(s string) { w.uint64(w.p.stringOff(s)) } - -func (w *exportWriter) localIdent(obj types.Object) { - // Anonymous parameters. - if obj == nil { - w.string("") - return - } - - name := obj.Name() - if name == "_" { - w.string("_") - return - } - - w.string(name) -} - -type intWriter struct { - bytes.Buffer -} - -func (w *intWriter) int64(x int64) { - var buf [binary.MaxVarintLen64]byte - n := binary.PutVarint(buf[:], x) - w.Write(buf[:n]) -} - -func (w *intWriter) uint64(x uint64) { - var buf [binary.MaxVarintLen64]byte - n := binary.PutUvarint(buf[:], x) - w.Write(buf[:n]) -} - -func assert(cond bool) { - if !cond { - panic("internal error: assertion failed") - } -} - -// The below is copied from go/src/cmd/compile/internal/gc/syntax.go. - -// objQueue is a FIFO queue of types.Object. The zero value of objQueue is -// a ready-to-use empty queue. -type objQueue struct { - ring []types.Object - head, tail int -} - -// empty returns true if q contains no Nodes. -func (q *objQueue) empty() bool { - return q.head == q.tail -} - -// pushTail appends n to the tail of the queue. -func (q *objQueue) pushTail(obj types.Object) { - if len(q.ring) == 0 { - q.ring = make([]types.Object, 16) - } else if q.head+len(q.ring) == q.tail { - // Grow the ring. - nring := make([]types.Object, len(q.ring)*2) - // Copy the old elements. - part := q.ring[q.head%len(q.ring):] - if q.tail-q.head <= len(part) { - part = part[:q.tail-q.head] - copy(nring, part) - } else { - pos := copy(nring, part) - copy(nring[pos:], q.ring[:q.tail%len(q.ring)]) - } - q.ring, q.head, q.tail = nring, 0, q.tail-q.head - } - - q.ring[q.tail%len(q.ring)] = obj - q.tail++ -} - -// popHead pops a node from the head of the queue. It panics if q is empty. -func (q *objQueue) popHead() types.Object { - if q.empty() { - panic("dequeue empty") - } - obj := q.ring[q.head%len(q.ring)] - q.head++ - return obj -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go deleted file mode 100644 index a31a8802..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Indexed package import. -// See cmd/compile/internal/gc/iexport.go for the export data format. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "fmt" - "go/constant" - "go/token" - "go/types" - "io" - "sort" -) - -type intReader struct { - *bytes.Reader - path string -} - -func (r *intReader) int64() int64 { - i, err := binary.ReadVarint(r.Reader) - if err != nil { - errorf("import %q: read varint error: %v", r.path, err) - } - return i -} - -func (r *intReader) uint64() uint64 { - i, err := binary.ReadUvarint(r.Reader) - if err != nil { - errorf("import %q: read varint error: %v", r.path, err) - } - return i -} - -const predeclReserved = 32 - -type itag uint64 - -const ( - // Types - definedType itag = iota - pointerType - sliceType - arrayType - chanType - mapType - signatureType - structType - interfaceType -) - -// IImportData imports a package from the serialized package data -// and returns the number of bytes consumed and a reference to the package. -// If the export data version is not recognized or the format is otherwise -// compromised, an error is returned. -func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - const currentVersion = 1 - version := int64(-1) - defer func() { - if e := recover(); e != nil { - if version > currentVersion { - err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) - } else { - err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) - } - } - }() - - r := &intReader{bytes.NewReader(data), path} - - version = int64(r.uint64()) - switch version { - case currentVersion, 0: - default: - errorf("unknown iexport format version %d", version) - } - - sLen := int64(r.uint64()) - dLen := int64(r.uint64()) - - whence, _ := r.Seek(0, io.SeekCurrent) - stringData := data[whence : whence+sLen] - declData := data[whence+sLen : whence+sLen+dLen] - r.Seek(sLen+dLen, io.SeekCurrent) - - p := iimporter{ - ipath: path, - version: int(version), - - stringData: stringData, - stringCache: make(map[uint64]string), - pkgCache: make(map[uint64]*types.Package), - - declData: declData, - pkgIndex: make(map[*types.Package]map[string]uint64), - typCache: make(map[uint64]types.Type), - - fake: fakeFileSet{ - fset: fset, - files: make(map[string]*token.File), - }, - } - - for i, pt := range predeclared() { - p.typCache[uint64(i)] = pt - } - - pkgList := make([]*types.Package, r.uint64()) - for i := range pkgList { - pkgPathOff := r.uint64() - pkgPath := p.stringAt(pkgPathOff) - pkgName := p.stringAt(r.uint64()) - _ = r.uint64() // package height; unused by go/types - - if pkgPath == "" { - pkgPath = path - } - pkg := imports[pkgPath] - if pkg == nil { - pkg = types.NewPackage(pkgPath, pkgName) - imports[pkgPath] = pkg - } else if pkg.Name() != pkgName { - errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path) - } - - p.pkgCache[pkgPathOff] = pkg - - nameIndex := make(map[string]uint64) - for nSyms := r.uint64(); nSyms > 0; nSyms-- { - name := p.stringAt(r.uint64()) - nameIndex[name] = r.uint64() - } - - p.pkgIndex[pkg] = nameIndex - pkgList[i] = pkg - } - if len(pkgList) == 0 { - errorf("no packages found for %s", path) - panic("unreachable") - } - p.ipkg = pkgList[0] - names := make([]string, 0, len(p.pkgIndex[p.ipkg])) - for name := range p.pkgIndex[p.ipkg] { - names = append(names, name) - } - sort.Strings(names) - for _, name := range names { - p.doDecl(p.ipkg, name) - } - - for _, typ := range p.interfaceList { - typ.Complete() - } - - // record all referenced packages as imports - list := append(([]*types.Package)(nil), pkgList[1:]...) - sort.Sort(byPath(list)) - p.ipkg.SetImports(list) - - // package was imported completely and without errors - p.ipkg.MarkComplete() - - consumed, _ := r.Seek(0, io.SeekCurrent) - return int(consumed), p.ipkg, nil -} - -type iimporter struct { - ipath string - ipkg *types.Package - version int - - stringData []byte - stringCache map[uint64]string - pkgCache map[uint64]*types.Package - - declData []byte - pkgIndex map[*types.Package]map[string]uint64 - typCache map[uint64]types.Type - - fake fakeFileSet - interfaceList []*types.Interface -} - -func (p *iimporter) doDecl(pkg *types.Package, name string) { - // See if we've already imported this declaration. - if obj := pkg.Scope().Lookup(name); obj != nil { - return - } - - off, ok := p.pkgIndex[pkg][name] - if !ok { - errorf("%v.%v not in index", pkg, name) - } - - r := &importReader{p: p, currPkg: pkg} - r.declReader.Reset(p.declData[off:]) - - r.obj(name) -} - -func (p *iimporter) stringAt(off uint64) string { - if s, ok := p.stringCache[off]; ok { - return s - } - - slen, n := binary.Uvarint(p.stringData[off:]) - if n <= 0 { - errorf("varint failed") - } - spos := off + uint64(n) - s := string(p.stringData[spos : spos+slen]) - p.stringCache[off] = s - return s -} - -func (p *iimporter) pkgAt(off uint64) *types.Package { - if pkg, ok := p.pkgCache[off]; ok { - return pkg - } - path := p.stringAt(off) - if path == p.ipath { - return p.ipkg - } - errorf("missing package %q in %q", path, p.ipath) - return nil -} - -func (p *iimporter) typAt(off uint64, base *types.Named) types.Type { - if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) { - return t - } - - if off < predeclReserved { - errorf("predeclared type missing from cache: %v", off) - } - - r := &importReader{p: p} - r.declReader.Reset(p.declData[off-predeclReserved:]) - t := r.doType(base) - - if base == nil || !isInterface(t) { - p.typCache[off] = t - } - return t -} - -type importReader struct { - p *iimporter - declReader bytes.Reader - currPkg *types.Package - prevFile string - prevLine int64 - prevColumn int64 -} - -func (r *importReader) obj(name string) { - tag := r.byte() - pos := r.pos() - - switch tag { - case 'A': - typ := r.typ() - - r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) - - case 'C': - typ, val := r.value() - - r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) - - case 'F': - sig := r.signature(nil) - - r.declare(types.NewFunc(pos, r.currPkg, name, sig)) - - case 'T': - // Types can be recursive. We need to setup a stub - // declaration before recursing. - obj := types.NewTypeName(pos, r.currPkg, name, nil) - named := types.NewNamed(obj, nil, nil) - r.declare(obj) - - underlying := r.p.typAt(r.uint64(), named).Underlying() - named.SetUnderlying(underlying) - - if !isInterface(underlying) { - for n := r.uint64(); n > 0; n-- { - mpos := r.pos() - mname := r.ident() - recv := r.param() - msig := r.signature(recv) - - named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig)) - } - } - - case 'V': - typ := r.typ() - - r.declare(types.NewVar(pos, r.currPkg, name, typ)) - - default: - errorf("unexpected tag: %v", tag) - } -} - -func (r *importReader) declare(obj types.Object) { - obj.Pkg().Scope().Insert(obj) -} - -func (r *importReader) value() (typ types.Type, val constant.Value) { - typ = r.typ() - - switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType { - case types.IsBoolean: - val = constant.MakeBool(r.bool()) - - case types.IsString: - val = constant.MakeString(r.string()) - - case types.IsInteger: - val = r.mpint(b) - - case types.IsFloat: - val = r.mpfloat(b) - - case types.IsComplex: - re := r.mpfloat(b) - im := r.mpfloat(b) - val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - - default: - if b.Kind() == types.Invalid { - val = constant.MakeUnknown() - return - } - errorf("unexpected type %v", typ) // panics - panic("unreachable") - } - - return -} - -func intSize(b *types.Basic) (signed bool, maxBytes uint) { - if (b.Info() & types.IsUntyped) != 0 { - return true, 64 - } - - switch b.Kind() { - case types.Float32, types.Complex64: - return true, 3 - case types.Float64, types.Complex128: - return true, 7 - } - - signed = (b.Info() & types.IsUnsigned) == 0 - switch b.Kind() { - case types.Int8, types.Uint8: - maxBytes = 1 - case types.Int16, types.Uint16: - maxBytes = 2 - case types.Int32, types.Uint32: - maxBytes = 4 - default: - maxBytes = 8 - } - - return -} - -func (r *importReader) mpint(b *types.Basic) constant.Value { - signed, maxBytes := intSize(b) - - maxSmall := 256 - maxBytes - if signed { - maxSmall = 256 - 2*maxBytes - } - if maxBytes == 1 { - maxSmall = 256 - } - - n, _ := r.declReader.ReadByte() - if uint(n) < maxSmall { - v := int64(n) - if signed { - v >>= 1 - if n&1 != 0 { - v = ^v - } - } - return constant.MakeInt64(v) - } - - v := -n - if signed { - v = -(n &^ 1) >> 1 - } - if v < 1 || uint(v) > maxBytes { - errorf("weird decoding: %v, %v => %v", n, signed, v) - } - - buf := make([]byte, v) - io.ReadFull(&r.declReader, buf) - - // convert to little endian - // TODO(gri) go/constant should have a more direct conversion function - // (e.g., once it supports a big.Float based implementation) - for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { - buf[i], buf[j] = buf[j], buf[i] - } - - x := constant.MakeFromBytes(buf) - if signed && n&1 != 0 { - x = constant.UnaryOp(token.SUB, x, 0) - } - return x -} - -func (r *importReader) mpfloat(b *types.Basic) constant.Value { - x := r.mpint(b) - if constant.Sign(x) == 0 { - return x - } - - exp := r.int64() - switch { - case exp > 0: - x = constant.Shift(x, token.SHL, uint(exp)) - case exp < 0: - d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) - x = constant.BinaryOp(x, token.QUO, d) - } - return x -} - -func (r *importReader) ident() string { - return r.string() -} - -func (r *importReader) qualifiedIdent() (*types.Package, string) { - name := r.string() - pkg := r.pkg() - return pkg, name -} - -func (r *importReader) pos() token.Pos { - if r.p.version >= 1 { - r.posv1() - } else { - r.posv0() - } - - if r.prevFile == "" && r.prevLine == 0 && r.prevColumn == 0 { - return token.NoPos - } - return r.p.fake.pos(r.prevFile, int(r.prevLine), int(r.prevColumn)) -} - -func (r *importReader) posv0() { - delta := r.int64() - if delta != deltaNewFile { - r.prevLine += delta - } else if l := r.int64(); l == -1 { - r.prevLine += deltaNewFile - } else { - r.prevFile = r.string() - r.prevLine = l - } -} - -func (r *importReader) posv1() { - delta := r.int64() - r.prevColumn += delta >> 1 - if delta&1 != 0 { - delta = r.int64() - r.prevLine += delta >> 1 - if delta&1 != 0 { - r.prevFile = r.string() - } - } -} - -func (r *importReader) typ() types.Type { - return r.p.typAt(r.uint64(), nil) -} - -func isInterface(t types.Type) bool { - _, ok := t.(*types.Interface) - return ok -} - -func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) } -func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } - -func (r *importReader) doType(base *types.Named) types.Type { - switch k := r.kind(); k { - default: - errorf("unexpected kind tag in %q: %v", r.p.ipath, k) - return nil - - case definedType: - pkg, name := r.qualifiedIdent() - r.p.doDecl(pkg, name) - return pkg.Scope().Lookup(name).(*types.TypeName).Type() - case pointerType: - return types.NewPointer(r.typ()) - case sliceType: - return types.NewSlice(r.typ()) - case arrayType: - n := r.uint64() - return types.NewArray(r.typ(), int64(n)) - case chanType: - dir := chanDir(int(r.uint64())) - return types.NewChan(dir, r.typ()) - case mapType: - return types.NewMap(r.typ(), r.typ()) - case signatureType: - r.currPkg = r.pkg() - return r.signature(nil) - - case structType: - r.currPkg = r.pkg() - - fields := make([]*types.Var, r.uint64()) - tags := make([]string, len(fields)) - for i := range fields { - fpos := r.pos() - fname := r.ident() - ftyp := r.typ() - emb := r.bool() - tag := r.string() - - fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb) - tags[i] = tag - } - return types.NewStruct(fields, tags) - - case interfaceType: - r.currPkg = r.pkg() - - embeddeds := make([]types.Type, r.uint64()) - for i := range embeddeds { - _ = r.pos() - embeddeds[i] = r.typ() - } - - methods := make([]*types.Func, r.uint64()) - for i := range methods { - mpos := r.pos() - mname := r.ident() - - // TODO(mdempsky): Matches bimport.go, but I - // don't agree with this. - var recv *types.Var - if base != nil { - recv = types.NewVar(token.NoPos, r.currPkg, "", base) - } - - msig := r.signature(recv) - methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig) - } - - typ := newInterface(methods, embeddeds) - r.p.interfaceList = append(r.p.interfaceList, typ) - return typ - } -} - -func (r *importReader) kind() itag { - return itag(r.uint64()) -} - -func (r *importReader) signature(recv *types.Var) *types.Signature { - params := r.paramList() - results := r.paramList() - variadic := params.Len() > 0 && r.bool() - return types.NewSignature(recv, params, results, variadic) -} - -func (r *importReader) paramList() *types.Tuple { - xs := make([]*types.Var, r.uint64()) - for i := range xs { - xs[i] = r.param() - } - return types.NewTuple(xs...) -} - -func (r *importReader) param() *types.Var { - pos := r.pos() - name := r.ident() - typ := r.typ() - return types.NewParam(pos, r.currPkg, name, typ) -} - -func (r *importReader) bool() bool { - return r.uint64() != 0 -} - -func (r *importReader) int64() int64 { - n, err := binary.ReadVarint(&r.declReader) - if err != nil { - errorf("readVarint: %v", err) - } - return n -} - -func (r *importReader) uint64() uint64 { - n, err := binary.ReadUvarint(&r.declReader) - if err != nil { - errorf("readUvarint: %v", err) - } - return n -} - -func (r *importReader) byte() byte { - x, err := r.declReader.ReadByte() - if err != nil { - errorf("declReader.ReadByte: %v", err) - } - return x -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go deleted file mode 100644 index 463f2522..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - named := make([]*types.Named, len(embeddeds)) - for i, e := range embeddeds { - var ok bool - named[i], ok = e.(*types.Named) - if !ok { - panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") - } - } - return types.NewInterface(methods, named) -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go deleted file mode 100644 index ab28b95c..00000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - return types.NewInterfaceType(methods, embeddeds) -} diff --git a/vendor/golang.org/x/tools/go/loader/doc.go b/vendor/golang.org/x/tools/go/loader/doc.go deleted file mode 100644 index c5aa31c1..00000000 --- a/vendor/golang.org/x/tools/go/loader/doc.go +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package loader loads a complete Go program from source code, parsing -// and type-checking the initial packages plus their transitive closure -// of dependencies. The ASTs and the derived facts are retained for -// later use. -// -// Deprecated: This is an older API and does not have support -// for modules. Use golang.org/x/tools/go/packages instead. -// -// The package defines two primary types: Config, which specifies a -// set of initial packages to load and various other options; and -// Program, which is the result of successfully loading the packages -// specified by a configuration. -// -// The configuration can be set directly, but *Config provides various -// convenience methods to simplify the common cases, each of which can -// be called any number of times. Finally, these are followed by a -// call to Load() to actually load and type-check the program. -// -// var conf loader.Config -// -// // Use the command-line arguments to specify -// // a set of initial packages to load from source. -// // See FromArgsUsage for help. -// rest, err := conf.FromArgs(os.Args[1:], wantTests) -// -// // Parse the specified files and create an ad hoc package with path "foo". -// // All files must have the same 'package' declaration. -// conf.CreateFromFilenames("foo", "foo.go", "bar.go") -// -// // Create an ad hoc package with path "foo" from -// // the specified already-parsed files. -// // All ASTs must have the same 'package' declaration. -// conf.CreateFromFiles("foo", parsedFiles) -// -// // Add "runtime" to the set of packages to be loaded. -// conf.Import("runtime") -// -// // Adds "fmt" and "fmt_test" to the set of packages -// // to be loaded. "fmt" will include *_test.go files. -// conf.ImportWithTests("fmt") -// -// // Finally, load all the packages specified by the configuration. -// prog, err := conf.Load() -// -// See examples_test.go for examples of API usage. -// -// -// CONCEPTS AND TERMINOLOGY -// -// The WORKSPACE is the set of packages accessible to the loader. The -// workspace is defined by Config.Build, a *build.Context. The -// default context treats subdirectories of $GOROOT and $GOPATH as -// packages, but this behavior may be overridden. -// -// An AD HOC package is one specified as a set of source files on the -// command line. In the simplest case, it may consist of a single file -// such as $GOROOT/src/net/http/triv.go. -// -// EXTERNAL TEST packages are those comprised of a set of *_test.go -// files all with the same 'package foo_test' declaration, all in the -// same directory. (go/build.Package calls these files XTestFiles.) -// -// An IMPORTABLE package is one that can be referred to by some import -// spec. Every importable package is uniquely identified by its -// PACKAGE PATH or just PATH, a string such as "fmt", "encoding/json", -// or "cmd/vendor/golang.org/x/arch/x86/x86asm". A package path -// typically denotes a subdirectory of the workspace. -// -// An import declaration uses an IMPORT PATH to refer to a package. -// Most import declarations use the package path as the import path. -// -// Due to VENDORING (https://golang.org/s/go15vendor), the -// interpretation of an import path may depend on the directory in which -// it appears. To resolve an import path to a package path, go/build -// must search the enclosing directories for a subdirectory named -// "vendor". -// -// ad hoc packages and external test packages are NON-IMPORTABLE. The -// path of an ad hoc package is inferred from the package -// declarations of its files and is therefore not a unique package key. -// For example, Config.CreatePkgs may specify two initial ad hoc -// packages, both with path "main". -// -// An AUGMENTED package is an importable package P plus all the -// *_test.go files with same 'package foo' declaration as P. -// (go/build.Package calls these files TestFiles.) -// -// The INITIAL packages are those specified in the configuration. A -// DEPENDENCY is a package loaded to satisfy an import in an initial -// package or another dependency. -// -package loader - -// IMPLEMENTATION NOTES -// -// 'go test', in-package test files, and import cycles -// --------------------------------------------------- -// -// An external test package may depend upon members of the augmented -// package that are not in the unaugmented package, such as functions -// that expose internals. (See bufio/export_test.go for an example.) -// So, the loader must ensure that for each external test package -// it loads, it also augments the corresponding non-test package. -// -// The import graph over n unaugmented packages must be acyclic; the -// import graph over n-1 unaugmented packages plus one augmented -// package must also be acyclic. ('go test' relies on this.) But the -// import graph over n augmented packages may contain cycles. -// -// First, all the (unaugmented) non-test packages and their -// dependencies are imported in the usual way; the loader reports an -// error if it detects an import cycle. -// -// Then, each package P for which testing is desired is augmented by -// the list P' of its in-package test files, by calling -// (*types.Checker).Files. This arrangement ensures that P' may -// reference definitions within P, but P may not reference definitions -// within P'. Furthermore, P' may import any other package, including -// ones that depend upon P, without an import cycle error. -// -// Consider two packages A and B, both of which have lists of -// in-package test files we'll call A' and B', and which have the -// following import graph edges: -// B imports A -// B' imports A -// A' imports B -// This last edge would be expected to create an error were it not -// for the special type-checking discipline above. -// Cycles of size greater than two are possible. For example: -// compress/bzip2/bzip2_test.go (package bzip2) imports "io/ioutil" -// io/ioutil/tempfile_test.go (package ioutil) imports "regexp" -// regexp/exec_test.go (package regexp) imports "compress/bzip2" -// -// -// Concurrency -// ----------- -// -// Let us define the import dependency graph as follows. Each node is a -// list of files passed to (Checker).Files at once. Many of these lists -// are the production code of an importable Go package, so those nodes -// are labelled by the package's path. The remaining nodes are -// ad hoc packages and lists of in-package *_test.go files that augment -// an importable package; those nodes have no label. -// -// The edges of the graph represent import statements appearing within a -// file. An edge connects a node (a list of files) to the node it -// imports, which is importable and thus always labelled. -// -// Loading is controlled by this dependency graph. -// -// To reduce I/O latency, we start loading a package's dependencies -// asynchronously as soon as we've parsed its files and enumerated its -// imports (scanImports). This performs a preorder traversal of the -// import dependency graph. -// -// To exploit hardware parallelism, we type-check unrelated packages in -// parallel, where "unrelated" means not ordered by the partial order of -// the import dependency graph. -// -// We use a concurrency-safe non-blocking cache (importer.imported) to -// record the results of type-checking, whether success or failure. An -// entry is created in this cache by startLoad the first time the -// package is imported. The first goroutine to request an entry becomes -// responsible for completing the task and broadcasting completion to -// subsequent requestors, which block until then. -// -// Type checking occurs in (parallel) postorder: we cannot type-check a -// set of files until we have loaded and type-checked all of their -// immediate dependencies (and thus all of their transitive -// dependencies). If the input were guaranteed free of import cycles, -// this would be trivial: we could simply wait for completion of the -// dependencies and then invoke the typechecker. -// -// But as we saw in the 'go test' section above, some cycles in the -// import graph over packages are actually legal, so long as the -// cycle-forming edge originates in the in-package test files that -// augment the package. This explains why the nodes of the import -// dependency graph are not packages, but lists of files: the unlabelled -// nodes avoid the cycles. Consider packages A and B where B imports A -// and A's in-package tests AT import B. The naively constructed import -// graph over packages would contain a cycle (A+AT) --> B --> (A+AT) but -// the graph over lists of files is AT --> B --> A, where AT is an -// unlabelled node. -// -// Awaiting completion of the dependencies in a cyclic graph would -// deadlock, so we must materialize the import dependency graph (as -// importer.graph) and check whether each import edge forms a cycle. If -// x imports y, and the graph already contains a path from y to x, then -// there is an import cycle, in which case the processing of x must not -// wait for the completion of processing of y. -// -// When the type-checker makes a callback (doImport) to the loader for a -// given import edge, there are two possible cases. In the normal case, -// the dependency has already been completely type-checked; doImport -// does a cache lookup and returns it. In the cyclic case, the entry in -// the cache is still necessarily incomplete, indicating a cycle. We -// perform the cycle check again to obtain the error message, and return -// the error. -// -// The result of using concurrency is about a 2.5x speedup for stdlib_test. diff --git a/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/golang.org/x/tools/go/loader/loader.go deleted file mode 100644 index bc12ca33..00000000 --- a/vendor/golang.org/x/tools/go/loader/loader.go +++ /dev/null @@ -1,1086 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package loader - -// See doc.go for package documentation and implementation notes. - -import ( - "errors" - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "go/types" - "os" - "path/filepath" - "sort" - "strings" - "sync" - "time" - - "golang.org/x/tools/go/ast/astutil" - "golang.org/x/tools/go/internal/cgo" -) - -var ignoreVendor build.ImportMode - -const trace = false // show timing info for type-checking - -// Config specifies the configuration for loading a whole program from -// Go source code. -// The zero value for Config is a ready-to-use default configuration. -type Config struct { - // Fset is the file set for the parser to use when loading the - // program. If nil, it may be lazily initialized by any - // method of Config. - Fset *token.FileSet - - // ParserMode specifies the mode to be used by the parser when - // loading source packages. - ParserMode parser.Mode - - // TypeChecker contains options relating to the type checker. - // - // The supplied IgnoreFuncBodies is not used; the effective - // value comes from the TypeCheckFuncBodies func below. - // The supplied Import function is not used either. - TypeChecker types.Config - - // TypeCheckFuncBodies is a predicate over package paths. - // A package for which the predicate is false will - // have its package-level declarations type checked, but not - // its function bodies; this can be used to quickly load - // dependencies from source. If nil, all func bodies are type - // checked. - TypeCheckFuncBodies func(path string) bool - - // If Build is non-nil, it is used to locate source packages. - // Otherwise &build.Default is used. - // - // By default, cgo is invoked to preprocess Go files that - // import the fake package "C". This behaviour can be - // disabled by setting CGO_ENABLED=0 in the environment prior - // to startup, or by setting Build.CgoEnabled=false. - Build *build.Context - - // The current directory, used for resolving relative package - // references such as "./go/loader". If empty, os.Getwd will be - // used instead. - Cwd string - - // If DisplayPath is non-nil, it is used to transform each - // file name obtained from Build.Import(). This can be used - // to prevent a virtualized build.Config's file names from - // leaking into the user interface. - DisplayPath func(path string) string - - // If AllowErrors is true, Load will return a Program even - // if some of the its packages contained I/O, parser or type - // errors; such errors are accessible via PackageInfo.Errors. If - // false, Load will fail if any package had an error. - AllowErrors bool - - // CreatePkgs specifies a list of non-importable initial - // packages to create. The resulting packages will appear in - // the corresponding elements of the Program.Created slice. - CreatePkgs []PkgSpec - - // ImportPkgs specifies a set of initial packages to load. - // The map keys are package paths. - // - // The map value indicates whether to load tests. If true, Load - // will add and type-check two lists of files to the package: - // non-test files followed by in-package *_test.go files. In - // addition, it will append the external test package (if any) - // to Program.Created. - ImportPkgs map[string]bool - - // FindPackage is called during Load to create the build.Package - // for a given import path from a given directory. - // If FindPackage is nil, (*build.Context).Import is used. - // A client may use this hook to adapt to a proprietary build - // system that does not follow the "go build" layout - // conventions, for example. - // - // It must be safe to call concurrently from multiple goroutines. - FindPackage func(ctxt *build.Context, importPath, fromDir string, mode build.ImportMode) (*build.Package, error) - - // AfterTypeCheck is called immediately after a list of files - // has been type-checked and appended to info.Files. - // - // This optional hook function is the earliest opportunity for - // the client to observe the output of the type checker, - // which may be useful to reduce analysis latency when loading - // a large program. - // - // The function is permitted to modify info.Info, for instance - // to clear data structures that are no longer needed, which can - // dramatically reduce peak memory consumption. - // - // The function may be called twice for the same PackageInfo: - // once for the files of the package and again for the - // in-package test files. - // - // It must be safe to call concurrently from multiple goroutines. - AfterTypeCheck func(info *PackageInfo, files []*ast.File) -} - -// A PkgSpec specifies a non-importable package to be created by Load. -// Files are processed first, but typically only one of Files and -// Filenames is provided. The path needn't be globally unique. -// -// For vendoring purposes, the package's directory is the one that -// contains the first file. -type PkgSpec struct { - Path string // package path ("" => use package declaration) - Files []*ast.File // ASTs of already-parsed files - Filenames []string // names of files to be parsed -} - -// A Program is a Go program loaded from source as specified by a Config. -type Program struct { - Fset *token.FileSet // the file set for this program - - // Created[i] contains the initial package whose ASTs or - // filenames were supplied by Config.CreatePkgs[i], followed by - // the external test package, if any, of each package in - // Config.ImportPkgs ordered by ImportPath. - // - // NOTE: these files must not import "C". Cgo preprocessing is - // only performed on imported packages, not ad hoc packages. - // - // TODO(adonovan): we need to copy and adapt the logic of - // goFilesPackage (from $GOROOT/src/cmd/go/build.go) and make - // Config.Import and Config.Create methods return the same kind - // of entity, essentially a build.Package. - // Perhaps we can even reuse that type directly. - Created []*PackageInfo - - // Imported contains the initially imported packages, - // as specified by Config.ImportPkgs. - Imported map[string]*PackageInfo - - // AllPackages contains the PackageInfo of every package - // encountered by Load: all initial packages and all - // dependencies, including incomplete ones. - AllPackages map[*types.Package]*PackageInfo - - // importMap is the canonical mapping of package paths to - // packages. It contains all Imported initial packages, but not - // Created ones, and all imported dependencies. - importMap map[string]*types.Package -} - -// PackageInfo holds the ASTs and facts derived by the type-checker -// for a single package. -// -// Not mutated once exposed via the API. -// -type PackageInfo struct { - Pkg *types.Package - Importable bool // true if 'import "Pkg.Path()"' would resolve to this - TransitivelyErrorFree bool // true if Pkg and all its dependencies are free of errors - Files []*ast.File // syntax trees for the package's files - Errors []error // non-nil if the package had errors - types.Info // type-checker deductions. - dir string // package directory - - checker *types.Checker // transient type-checker state - errorFunc func(error) -} - -func (info *PackageInfo) String() string { return info.Pkg.Path() } - -func (info *PackageInfo) appendError(err error) { - if info.errorFunc != nil { - info.errorFunc(err) - } else { - fmt.Fprintln(os.Stderr, err) - } - info.Errors = append(info.Errors, err) -} - -func (conf *Config) fset() *token.FileSet { - if conf.Fset == nil { - conf.Fset = token.NewFileSet() - } - return conf.Fset -} - -// ParseFile is a convenience function (intended for testing) that invokes -// the parser using the Config's FileSet, which is initialized if nil. -// -// src specifies the parser input as a string, []byte, or io.Reader, and -// filename is its apparent name. If src is nil, the contents of -// filename are read from the file system. -// -func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) { - // TODO(adonovan): use conf.build() etc like parseFiles does. - return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode) -} - -// FromArgsUsage is a partial usage message that applications calling -// FromArgs may wish to include in their -help output. -const FromArgsUsage = ` - is a list of arguments denoting a set of initial packages. -It may take one of two forms: - -1. A list of *.go source files. - - All of the specified files are loaded, parsed and type-checked - as a single package. All the files must belong to the same directory. - -2. A list of import paths, each denoting a package. - - The package's directory is found relative to the $GOROOT and - $GOPATH using similar logic to 'go build', and the *.go files in - that directory are loaded, parsed and type-checked as a single - package. - - In addition, all *_test.go files in the directory are then loaded - and parsed. Those files whose package declaration equals that of - the non-*_test.go files are included in the primary package. Test - files whose package declaration ends with "_test" are type-checked - as another package, the 'external' test package, so that a single - import path may denote two packages. (Whether this behaviour is - enabled is tool-specific, and may depend on additional flags.) - -A '--' argument terminates the list of packages. -` - -// FromArgs interprets args as a set of initial packages to load from -// source and updates the configuration. It returns the list of -// unconsumed arguments. -// -// It is intended for use in command-line interfaces that require a -// set of initial packages to be specified; see FromArgsUsage message -// for details. -// -// Only superficial errors are reported at this stage; errors dependent -// on I/O are detected during Load. -// -func (conf *Config) FromArgs(args []string, xtest bool) ([]string, error) { - var rest []string - for i, arg := range args { - if arg == "--" { - rest = args[i+1:] - args = args[:i] - break // consume "--" and return the remaining args - } - } - - if len(args) > 0 && strings.HasSuffix(args[0], ".go") { - // Assume args is a list of a *.go files - // denoting a single ad hoc package. - for _, arg := range args { - if !strings.HasSuffix(arg, ".go") { - return nil, fmt.Errorf("named files must be .go files: %s", arg) - } - } - conf.CreateFromFilenames("", args...) - } else { - // Assume args are directories each denoting a - // package and (perhaps) an external test, iff xtest. - for _, arg := range args { - if xtest { - conf.ImportWithTests(arg) - } else { - conf.Import(arg) - } - } - } - - return rest, nil -} - -// CreateFromFilenames is a convenience function that adds -// a conf.CreatePkgs entry to create a package of the specified *.go -// files. -// -func (conf *Config) CreateFromFilenames(path string, filenames ...string) { - conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Filenames: filenames}) -} - -// CreateFromFiles is a convenience function that adds a conf.CreatePkgs -// entry to create package of the specified path and parsed files. -// -func (conf *Config) CreateFromFiles(path string, files ...*ast.File) { - conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Files: files}) -} - -// ImportWithTests is a convenience function that adds path to -// ImportPkgs, the set of initial source packages located relative to -// $GOPATH. The package will be augmented by any *_test.go files in -// its directory that contain a "package x" (not "package x_test") -// declaration. -// -// In addition, if any *_test.go files contain a "package x_test" -// declaration, an additional package comprising just those files will -// be added to CreatePkgs. -// -func (conf *Config) ImportWithTests(path string) { conf.addImport(path, true) } - -// Import is a convenience function that adds path to ImportPkgs, the -// set of initial packages that will be imported from source. -// -func (conf *Config) Import(path string) { conf.addImport(path, false) } - -func (conf *Config) addImport(path string, tests bool) { - if path == "C" { - return // ignore; not a real package - } - if conf.ImportPkgs == nil { - conf.ImportPkgs = make(map[string]bool) - } - conf.ImportPkgs[path] = conf.ImportPkgs[path] || tests -} - -// PathEnclosingInterval returns the PackageInfo and ast.Node that -// contain source interval [start, end), and all the node's ancestors -// up to the AST root. It searches all ast.Files of all packages in prog. -// exact is defined as for astutil.PathEnclosingInterval. -// -// The zero value is returned if not found. -// -func (prog *Program) PathEnclosingInterval(start, end token.Pos) (pkg *PackageInfo, path []ast.Node, exact bool) { - for _, info := range prog.AllPackages { - for _, f := range info.Files { - if f.Pos() == token.NoPos { - // This can happen if the parser saw - // too many errors and bailed out. - // (Use parser.AllErrors to prevent that.) - continue - } - if !tokenFileContainsPos(prog.Fset.File(f.Pos()), start) { - continue - } - if path, exact := astutil.PathEnclosingInterval(f, start, end); path != nil { - return info, path, exact - } - } - } - return nil, nil, false -} - -// InitialPackages returns a new slice containing the set of initial -// packages (Created + Imported) in unspecified order. -// -func (prog *Program) InitialPackages() []*PackageInfo { - infos := make([]*PackageInfo, 0, len(prog.Created)+len(prog.Imported)) - infos = append(infos, prog.Created...) - for _, info := range prog.Imported { - infos = append(infos, info) - } - return infos -} - -// Package returns the ASTs and results of type checking for the -// specified package. -func (prog *Program) Package(path string) *PackageInfo { - if info, ok := prog.AllPackages[prog.importMap[path]]; ok { - return info - } - for _, info := range prog.Created { - if path == info.Pkg.Path() { - return info - } - } - return nil -} - -// ---------- Implementation ---------- - -// importer holds the working state of the algorithm. -type importer struct { - conf *Config // the client configuration - start time.Time // for logging - - progMu sync.Mutex // guards prog - prog *Program // the resulting program - - // findpkg is a memoization of FindPackage. - findpkgMu sync.Mutex // guards findpkg - findpkg map[findpkgKey]*findpkgValue - - importedMu sync.Mutex // guards imported - imported map[string]*importInfo // all imported packages (incl. failures) by import path - - // import dependency graph: graph[x][y] => x imports y - // - // Since non-importable packages cannot be cyclic, we ignore - // their imports, thus we only need the subgraph over importable - // packages. Nodes are identified by their import paths. - graphMu sync.Mutex - graph map[string]map[string]bool -} - -type findpkgKey struct { - importPath string - fromDir string - mode build.ImportMode -} - -type findpkgValue struct { - ready chan struct{} // closed to broadcast readiness - bp *build.Package - err error -} - -// importInfo tracks the success or failure of a single import. -// -// Upon completion, exactly one of info and err is non-nil: -// info on successful creation of a package, err otherwise. -// A successful package may still contain type errors. -// -type importInfo struct { - path string // import path - info *PackageInfo // results of typechecking (including errors) - complete chan struct{} // closed to broadcast that info is set. -} - -// awaitCompletion blocks until ii is complete, -// i.e. the info field is safe to inspect. -func (ii *importInfo) awaitCompletion() { - <-ii.complete // wait for close -} - -// Complete marks ii as complete. -// Its info and err fields will not be subsequently updated. -func (ii *importInfo) Complete(info *PackageInfo) { - if info == nil { - panic("info == nil") - } - ii.info = info - close(ii.complete) -} - -type importError struct { - path string // import path - err error // reason for failure to create a package -} - -// Load creates the initial packages specified by conf.{Create,Import}Pkgs, -// loading their dependencies packages as needed. -// -// On success, Load returns a Program containing a PackageInfo for -// each package. On failure, it returns an error. -// -// If AllowErrors is true, Load will return a Program even if some -// packages contained I/O, parser or type errors, or if dependencies -// were missing. (Such errors are accessible via PackageInfo.Errors. If -// false, Load will fail if any package had an error. -// -// It is an error if no packages were loaded. -// -func (conf *Config) Load() (*Program, error) { - // Create a simple default error handler for parse/type errors. - if conf.TypeChecker.Error == nil { - conf.TypeChecker.Error = func(e error) { fmt.Fprintln(os.Stderr, e) } - } - - // Set default working directory for relative package references. - if conf.Cwd == "" { - var err error - conf.Cwd, err = os.Getwd() - if err != nil { - return nil, err - } - } - - // Install default FindPackage hook using go/build logic. - if conf.FindPackage == nil { - conf.FindPackage = (*build.Context).Import - } - - prog := &Program{ - Fset: conf.fset(), - Imported: make(map[string]*PackageInfo), - importMap: make(map[string]*types.Package), - AllPackages: make(map[*types.Package]*PackageInfo), - } - - imp := importer{ - conf: conf, - prog: prog, - findpkg: make(map[findpkgKey]*findpkgValue), - imported: make(map[string]*importInfo), - start: time.Now(), - graph: make(map[string]map[string]bool), - } - - // -- loading proper (concurrent phase) -------------------------------- - - var errpkgs []string // packages that contained errors - - // Load the initially imported packages and their dependencies, - // in parallel. - // No vendor check on packages imported from the command line. - infos, importErrors := imp.importAll("", conf.Cwd, conf.ImportPkgs, ignoreVendor) - for _, ie := range importErrors { - conf.TypeChecker.Error(ie.err) // failed to create package - errpkgs = append(errpkgs, ie.path) - } - for _, info := range infos { - prog.Imported[info.Pkg.Path()] = info - } - - // Augment the designated initial packages by their tests. - // Dependencies are loaded in parallel. - var xtestPkgs []*build.Package - for importPath, augment := range conf.ImportPkgs { - if !augment { - continue - } - - // No vendor check on packages imported from command line. - bp, err := imp.findPackage(importPath, conf.Cwd, ignoreVendor) - if err != nil { - // Package not found, or can't even parse package declaration. - // Already reported by previous loop; ignore it. - continue - } - - // Needs external test package? - if len(bp.XTestGoFiles) > 0 { - xtestPkgs = append(xtestPkgs, bp) - } - - // Consult the cache using the canonical package path. - path := bp.ImportPath - imp.importedMu.Lock() // (unnecessary, we're sequential here) - ii, ok := imp.imported[path] - // Paranoid checks added due to issue #11012. - if !ok { - // Unreachable. - // The previous loop called importAll and thus - // startLoad for each path in ImportPkgs, which - // populates imp.imported[path] with a non-zero value. - panic(fmt.Sprintf("imported[%q] not found", path)) - } - if ii == nil { - // Unreachable. - // The ii values in this loop are the same as in - // the previous loop, which enforced the invariant - // that at least one of ii.err and ii.info is non-nil. - panic(fmt.Sprintf("imported[%q] == nil", path)) - } - if ii.info == nil { - // Unreachable. - // awaitCompletion has the postcondition - // ii.info != nil. - panic(fmt.Sprintf("imported[%q].info = nil", path)) - } - info := ii.info - imp.importedMu.Unlock() - - // Parse the in-package test files. - files, errs := imp.conf.parsePackageFiles(bp, 't') - for _, err := range errs { - info.appendError(err) - } - - // The test files augmenting package P cannot be imported, - // but may import packages that import P, - // so we must disable the cycle check. - imp.addFiles(info, files, false) - } - - createPkg := func(path, dir string, files []*ast.File, errs []error) { - info := imp.newPackageInfo(path, dir) - for _, err := range errs { - info.appendError(err) - } - - // Ad hoc packages are non-importable, - // so no cycle check is needed. - // addFiles loads dependencies in parallel. - imp.addFiles(info, files, false) - prog.Created = append(prog.Created, info) - } - - // Create packages specified by conf.CreatePkgs. - for _, cp := range conf.CreatePkgs { - files, errs := parseFiles(conf.fset(), conf.build(), nil, conf.Cwd, cp.Filenames, conf.ParserMode) - files = append(files, cp.Files...) - - path := cp.Path - if path == "" { - if len(files) > 0 { - path = files[0].Name.Name - } else { - path = "(unnamed)" - } - } - - dir := conf.Cwd - if len(files) > 0 && files[0].Pos().IsValid() { - dir = filepath.Dir(conf.fset().File(files[0].Pos()).Name()) - } - createPkg(path, dir, files, errs) - } - - // Create external test packages. - sort.Sort(byImportPath(xtestPkgs)) - for _, bp := range xtestPkgs { - files, errs := imp.conf.parsePackageFiles(bp, 'x') - createPkg(bp.ImportPath+"_test", bp.Dir, files, errs) - } - - // -- finishing up (sequential) ---------------------------------------- - - if len(prog.Imported)+len(prog.Created) == 0 { - return nil, errors.New("no initial packages were loaded") - } - - // Create infos for indirectly imported packages. - // e.g. incomplete packages without syntax, loaded from export data. - for _, obj := range prog.importMap { - info := prog.AllPackages[obj] - if info == nil { - prog.AllPackages[obj] = &PackageInfo{Pkg: obj, Importable: true} - } else { - // finished - info.checker = nil - info.errorFunc = nil - } - } - - if !conf.AllowErrors { - // Report errors in indirectly imported packages. - for _, info := range prog.AllPackages { - if len(info.Errors) > 0 { - errpkgs = append(errpkgs, info.Pkg.Path()) - } - } - if errpkgs != nil { - var more string - if len(errpkgs) > 3 { - more = fmt.Sprintf(" and %d more", len(errpkgs)-3) - errpkgs = errpkgs[:3] - } - return nil, fmt.Errorf("couldn't load packages due to errors: %s%s", - strings.Join(errpkgs, ", "), more) - } - } - - markErrorFreePackages(prog.AllPackages) - - return prog, nil -} - -type byImportPath []*build.Package - -func (b byImportPath) Len() int { return len(b) } -func (b byImportPath) Less(i, j int) bool { return b[i].ImportPath < b[j].ImportPath } -func (b byImportPath) Swap(i, j int) { b[i], b[j] = b[j], b[i] } - -// markErrorFreePackages sets the TransitivelyErrorFree flag on all -// applicable packages. -func markErrorFreePackages(allPackages map[*types.Package]*PackageInfo) { - // Build the transpose of the import graph. - importedBy := make(map[*types.Package]map[*types.Package]bool) - for P := range allPackages { - for _, Q := range P.Imports() { - clients, ok := importedBy[Q] - if !ok { - clients = make(map[*types.Package]bool) - importedBy[Q] = clients - } - clients[P] = true - } - } - - // Find all packages reachable from some error package. - reachable := make(map[*types.Package]bool) - var visit func(*types.Package) - visit = func(p *types.Package) { - if !reachable[p] { - reachable[p] = true - for q := range importedBy[p] { - visit(q) - } - } - } - for _, info := range allPackages { - if len(info.Errors) > 0 { - visit(info.Pkg) - } - } - - // Mark the others as "transitively error-free". - for _, info := range allPackages { - if !reachable[info.Pkg] { - info.TransitivelyErrorFree = true - } - } -} - -// build returns the effective build context. -func (conf *Config) build() *build.Context { - if conf.Build != nil { - return conf.Build - } - return &build.Default -} - -// parsePackageFiles enumerates the files belonging to package path, -// then loads, parses and returns them, plus a list of I/O or parse -// errors that were encountered. -// -// 'which' indicates which files to include: -// 'g': include non-test *.go source files (GoFiles + processed CgoFiles) -// 't': include in-package *_test.go source files (TestGoFiles) -// 'x': include external *_test.go source files. (XTestGoFiles) -// -func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.File, []error) { - if bp.ImportPath == "unsafe" { - return nil, nil - } - var filenames []string - switch which { - case 'g': - filenames = bp.GoFiles - case 't': - filenames = bp.TestGoFiles - case 'x': - filenames = bp.XTestGoFiles - default: - panic(which) - } - - files, errs := parseFiles(conf.fset(), conf.build(), conf.DisplayPath, bp.Dir, filenames, conf.ParserMode) - - // Preprocess CgoFiles and parse the outputs (sequentially). - if which == 'g' && bp.CgoFiles != nil { - cgofiles, err := cgo.ProcessFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) - if err != nil { - errs = append(errs, err) - } else { - files = append(files, cgofiles...) - } - } - - return files, errs -} - -// doImport imports the package denoted by path. -// It implements the types.Importer signature. -// -// It returns an error if a package could not be created -// (e.g. go/build or parse error), but type errors are reported via -// the types.Config.Error callback (the first of which is also saved -// in the package's PackageInfo). -// -// Idempotent. -// -func (imp *importer) doImport(from *PackageInfo, to string) (*types.Package, error) { - if to == "C" { - // This should be unreachable, but ad hoc packages are - // not currently subject to cgo preprocessing. - // See https://golang.org/issue/11627. - return nil, fmt.Errorf(`the loader doesn't cgo-process ad hoc packages like %q; see Go issue 11627`, - from.Pkg.Path()) - } - - bp, err := imp.findPackage(to, from.dir, 0) - if err != nil { - return nil, err - } - - // The standard unsafe package is handled specially, - // and has no PackageInfo. - if bp.ImportPath == "unsafe" { - return types.Unsafe, nil - } - - // Look for the package in the cache using its canonical path. - path := bp.ImportPath - imp.importedMu.Lock() - ii := imp.imported[path] - imp.importedMu.Unlock() - if ii == nil { - panic("internal error: unexpected import: " + path) - } - if ii.info != nil { - return ii.info.Pkg, nil - } - - // Import of incomplete package: this indicates a cycle. - fromPath := from.Pkg.Path() - if cycle := imp.findPath(path, fromPath); cycle != nil { - // Normalize cycle: start from alphabetically largest node. - pos, start := -1, "" - for i, s := range cycle { - if pos < 0 || s > start { - pos, start = i, s - } - } - cycle = append(cycle, cycle[:pos]...)[pos:] // rotate cycle to start from largest - cycle = append(cycle, cycle[0]) // add start node to end to show cycliness - return nil, fmt.Errorf("import cycle: %s", strings.Join(cycle, " -> ")) - } - - panic("internal error: import of incomplete (yet acyclic) package: " + fromPath) -} - -// findPackage locates the package denoted by the importPath in the -// specified directory. -func (imp *importer) findPackage(importPath, fromDir string, mode build.ImportMode) (*build.Package, error) { - // We use a non-blocking duplicate-suppressing cache (gopl.io §9.7) - // to avoid holding the lock around FindPackage. - key := findpkgKey{importPath, fromDir, mode} - imp.findpkgMu.Lock() - v, ok := imp.findpkg[key] - if ok { - // cache hit - imp.findpkgMu.Unlock() - - <-v.ready // wait for entry to become ready - } else { - // Cache miss: this goroutine becomes responsible for - // populating the map entry and broadcasting its readiness. - v = &findpkgValue{ready: make(chan struct{})} - imp.findpkg[key] = v - imp.findpkgMu.Unlock() - - ioLimit <- true - v.bp, v.err = imp.conf.FindPackage(imp.conf.build(), importPath, fromDir, mode) - <-ioLimit - - if _, ok := v.err.(*build.NoGoError); ok { - v.err = nil // empty directory is not an error - } - - close(v.ready) // broadcast ready condition - } - return v.bp, v.err -} - -// importAll loads, parses, and type-checks the specified packages in -// parallel and returns their completed importInfos in unspecified order. -// -// fromPath is the package path of the importing package, if it is -// importable, "" otherwise. It is used for cycle detection. -// -// fromDir is the directory containing the import declaration that -// caused these imports. -// -func (imp *importer) importAll(fromPath, fromDir string, imports map[string]bool, mode build.ImportMode) (infos []*PackageInfo, errors []importError) { - // TODO(adonovan): opt: do the loop in parallel once - // findPackage is non-blocking. - var pending []*importInfo - for importPath := range imports { - bp, err := imp.findPackage(importPath, fromDir, mode) - if err != nil { - errors = append(errors, importError{ - path: importPath, - err: err, - }) - continue - } - pending = append(pending, imp.startLoad(bp)) - } - - if fromPath != "" { - // We're loading a set of imports. - // - // We must record graph edges from the importing package - // to its dependencies, and check for cycles. - imp.graphMu.Lock() - deps, ok := imp.graph[fromPath] - if !ok { - deps = make(map[string]bool) - imp.graph[fromPath] = deps - } - for _, ii := range pending { - deps[ii.path] = true - } - imp.graphMu.Unlock() - } - - for _, ii := range pending { - if fromPath != "" { - if cycle := imp.findPath(ii.path, fromPath); cycle != nil { - // Cycle-forming import: we must not await its - // completion since it would deadlock. - // - // We don't record the error in ii since - // the error is really associated with the - // cycle-forming edge, not the package itself. - // (Also it would complicate the - // invariants of importPath completion.) - if trace { - fmt.Fprintf(os.Stderr, "import cycle: %q\n", cycle) - } - continue - } - } - ii.awaitCompletion() - infos = append(infos, ii.info) - } - - return infos, errors -} - -// findPath returns an arbitrary path from 'from' to 'to' in the import -// graph, or nil if there was none. -func (imp *importer) findPath(from, to string) []string { - imp.graphMu.Lock() - defer imp.graphMu.Unlock() - - seen := make(map[string]bool) - var search func(stack []string, importPath string) []string - search = func(stack []string, importPath string) []string { - if !seen[importPath] { - seen[importPath] = true - stack = append(stack, importPath) - if importPath == to { - return stack - } - for x := range imp.graph[importPath] { - if p := search(stack, x); p != nil { - return p - } - } - } - return nil - } - return search(make([]string, 0, 20), from) -} - -// startLoad initiates the loading, parsing and type-checking of the -// specified package and its dependencies, if it has not already begun. -// -// It returns an importInfo, not necessarily in a completed state. The -// caller must call awaitCompletion() before accessing its info field. -// -// startLoad is concurrency-safe and idempotent. -// -func (imp *importer) startLoad(bp *build.Package) *importInfo { - path := bp.ImportPath - imp.importedMu.Lock() - ii, ok := imp.imported[path] - if !ok { - ii = &importInfo{path: path, complete: make(chan struct{})} - imp.imported[path] = ii - go func() { - info := imp.load(bp) - ii.Complete(info) - }() - } - imp.importedMu.Unlock() - - return ii -} - -// load implements package loading by parsing Go source files -// located by go/build. -func (imp *importer) load(bp *build.Package) *PackageInfo { - info := imp.newPackageInfo(bp.ImportPath, bp.Dir) - info.Importable = true - files, errs := imp.conf.parsePackageFiles(bp, 'g') - for _, err := range errs { - info.appendError(err) - } - - imp.addFiles(info, files, true) - - imp.progMu.Lock() - imp.prog.importMap[bp.ImportPath] = info.Pkg - imp.progMu.Unlock() - - return info -} - -// addFiles adds and type-checks the specified files to info, loading -// their dependencies if needed. The order of files determines the -// package initialization order. It may be called multiple times on the -// same package. Errors are appended to the info.Errors field. -// -// cycleCheck determines whether the imports within files create -// dependency edges that should be checked for potential cycles. -// -func (imp *importer) addFiles(info *PackageInfo, files []*ast.File, cycleCheck bool) { - // Ensure the dependencies are loaded, in parallel. - var fromPath string - if cycleCheck { - fromPath = info.Pkg.Path() - } - // TODO(adonovan): opt: make the caller do scanImports. - // Callers with a build.Package can skip it. - imp.importAll(fromPath, info.dir, scanImports(files), 0) - - if trace { - fmt.Fprintf(os.Stderr, "%s: start %q (%d)\n", - time.Since(imp.start), info.Pkg.Path(), len(files)) - } - - // Don't call checker.Files on Unsafe, even with zero files, - // because it would mutate the package, which is a global. - if info.Pkg == types.Unsafe { - if len(files) > 0 { - panic(`"unsafe" package contains unexpected files`) - } - } else { - // Ignore the returned (first) error since we - // already collect them all in the PackageInfo. - info.checker.Files(files) - info.Files = append(info.Files, files...) - } - - if imp.conf.AfterTypeCheck != nil { - imp.conf.AfterTypeCheck(info, files) - } - - if trace { - fmt.Fprintf(os.Stderr, "%s: stop %q\n", - time.Since(imp.start), info.Pkg.Path()) - } -} - -func (imp *importer) newPackageInfo(path, dir string) *PackageInfo { - var pkg *types.Package - if path == "unsafe" { - pkg = types.Unsafe - } else { - pkg = types.NewPackage(path, "") - } - info := &PackageInfo{ - Pkg: pkg, - Info: types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - }, - errorFunc: imp.conf.TypeChecker.Error, - dir: dir, - } - - // Copy the types.Config so we can vary it across PackageInfos. - tc := imp.conf.TypeChecker - tc.IgnoreFuncBodies = false - if f := imp.conf.TypeCheckFuncBodies; f != nil { - tc.IgnoreFuncBodies = !f(path) - } - tc.Importer = closure{imp, info} - tc.Error = info.appendError // appendError wraps the user's Error function - - info.checker = types.NewChecker(&tc, imp.conf.fset(), pkg, &info.Info) - imp.progMu.Lock() - imp.prog.AllPackages[pkg] = info - imp.progMu.Unlock() - return info -} - -type closure struct { - imp *importer - info *PackageInfo -} - -func (c closure) Import(to string) (*types.Package, error) { return c.imp.doImport(c.info, to) } diff --git a/vendor/golang.org/x/tools/go/loader/util.go b/vendor/golang.org/x/tools/go/loader/util.go deleted file mode 100644 index 7f38dd74..00000000 --- a/vendor/golang.org/x/tools/go/loader/util.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package loader - -import ( - "go/ast" - "go/build" - "go/parser" - "go/token" - "io" - "os" - "strconv" - "sync" - - "golang.org/x/tools/go/buildutil" -) - -// We use a counting semaphore to limit -// the number of parallel I/O calls per process. -var ioLimit = make(chan bool, 10) - -// parseFiles parses the Go source files within directory dir and -// returns the ASTs of the ones that could be at least partially parsed, -// along with a list of I/O and parse errors encountered. -// -// I/O is done via ctxt, which may specify a virtual file system. -// displayPath is used to transform the filenames attached to the ASTs. -// -func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, files []string, mode parser.Mode) ([]*ast.File, []error) { - if displayPath == nil { - displayPath = func(path string) string { return path } - } - var wg sync.WaitGroup - n := len(files) - parsed := make([]*ast.File, n) - errors := make([]error, n) - for i, file := range files { - if !buildutil.IsAbsPath(ctxt, file) { - file = buildutil.JoinPath(ctxt, dir, file) - } - wg.Add(1) - go func(i int, file string) { - ioLimit <- true // wait - defer func() { - wg.Done() - <-ioLimit // signal - }() - var rd io.ReadCloser - var err error - if ctxt.OpenFile != nil { - rd, err = ctxt.OpenFile(file) - } else { - rd, err = os.Open(file) - } - if err != nil { - errors[i] = err // open failed - return - } - - // ParseFile may return both an AST and an error. - parsed[i], errors[i] = parser.ParseFile(fset, displayPath(file), rd, mode) - rd.Close() - }(i, file) - } - wg.Wait() - - // Eliminate nils, preserving order. - var o int - for _, f := range parsed { - if f != nil { - parsed[o] = f - o++ - } - } - parsed = parsed[:o] - - o = 0 - for _, err := range errors { - if err != nil { - errors[o] = err - o++ - } - } - errors = errors[:o] - - return parsed, errors -} - -// scanImports returns the set of all import paths from all -// import specs in the specified files. -func scanImports(files []*ast.File) map[string]bool { - imports := make(map[string]bool) - for _, f := range files { - for _, decl := range f.Decls { - if decl, ok := decl.(*ast.GenDecl); ok && decl.Tok == token.IMPORT { - for _, spec := range decl.Specs { - spec := spec.(*ast.ImportSpec) - - // NB: do not assume the program is well-formed! - path, err := strconv.Unquote(spec.Path.Value) - if err != nil { - continue // quietly ignore the error - } - if path == "C" { - continue // skip pseudopackage - } - imports[path] = true - } - } - } - } - return imports -} - -// ---------- Internal helpers ---------- - -// TODO(adonovan): make this a method: func (*token.File) Contains(token.Pos) -func tokenFileContainsPos(f *token.File, pos token.Pos) bool { - p := int(pos) - base := f.Base() - return base <= p && p < base+f.Size() -} diff --git a/vendor/golang.org/x/xerrors/LICENSE b/vendor/golang.org/x/xerrors/LICENSE deleted file mode 100644 index e4a47e17..00000000 --- a/vendor/golang.org/x/xerrors/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2019 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/xerrors/PATENTS b/vendor/golang.org/x/xerrors/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/xerrors/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/xerrors/README b/vendor/golang.org/x/xerrors/README deleted file mode 100644 index aac7867a..00000000 --- a/vendor/golang.org/x/xerrors/README +++ /dev/null @@ -1,2 +0,0 @@ -This repository holds the transition packages for the new Go 1.13 error values. -See golang.org/design/29934-error-values. diff --git a/vendor/golang.org/x/xerrors/adaptor.go b/vendor/golang.org/x/xerrors/adaptor.go deleted file mode 100644 index 4317f248..00000000 --- a/vendor/golang.org/x/xerrors/adaptor.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import ( - "bytes" - "fmt" - "io" - "reflect" - "strconv" -) - -// FormatError calls the FormatError method of f with an errors.Printer -// configured according to s and verb, and writes the result to s. -func FormatError(f Formatter, s fmt.State, verb rune) { - // Assuming this function is only called from the Format method, and given - // that FormatError takes precedence over Format, it cannot be called from - // any package that supports errors.Formatter. It is therefore safe to - // disregard that State may be a specific printer implementation and use one - // of our choice instead. - - // limitations: does not support printing error as Go struct. - - var ( - sep = " " // separator before next error - p = &state{State: s} - direct = true - ) - - var err error = f - - switch verb { - // Note that this switch must match the preference order - // for ordinary string printing (%#v before %+v, and so on). - - case 'v': - if s.Flag('#') { - if stringer, ok := err.(fmt.GoStringer); ok { - io.WriteString(&p.buf, stringer.GoString()) - goto exit - } - // proceed as if it were %v - } else if s.Flag('+') { - p.printDetail = true - sep = "\n - " - } - case 's': - case 'q', 'x', 'X': - // Use an intermediate buffer in the rare cases that precision, - // truncation, or one of the alternative verbs (q, x, and X) are - // specified. - direct = false - - default: - p.buf.WriteString("%!") - p.buf.WriteRune(verb) - p.buf.WriteByte('(') - switch { - case err != nil: - p.buf.WriteString(reflect.TypeOf(f).String()) - default: - p.buf.WriteString("") - } - p.buf.WriteByte(')') - io.Copy(s, &p.buf) - return - } - -loop: - for { - switch v := err.(type) { - case Formatter: - err = v.FormatError((*printer)(p)) - case fmt.Formatter: - v.Format(p, 'v') - break loop - default: - io.WriteString(&p.buf, v.Error()) - break loop - } - if err == nil { - break - } - if p.needColon || !p.printDetail { - p.buf.WriteByte(':') - p.needColon = false - } - p.buf.WriteString(sep) - p.inDetail = false - p.needNewline = false - } - -exit: - width, okW := s.Width() - prec, okP := s.Precision() - - if !direct || (okW && width > 0) || okP { - // Construct format string from State s. - format := []byte{'%'} - if s.Flag('-') { - format = append(format, '-') - } - if s.Flag('+') { - format = append(format, '+') - } - if s.Flag(' ') { - format = append(format, ' ') - } - if okW { - format = strconv.AppendInt(format, int64(width), 10) - } - if okP { - format = append(format, '.') - format = strconv.AppendInt(format, int64(prec), 10) - } - format = append(format, string(verb)...) - fmt.Fprintf(s, string(format), p.buf.String()) - } else { - io.Copy(s, &p.buf) - } -} - -var detailSep = []byte("\n ") - -// state tracks error printing state. It implements fmt.State. -type state struct { - fmt.State - buf bytes.Buffer - - printDetail bool - inDetail bool - needColon bool - needNewline bool -} - -func (s *state) Write(b []byte) (n int, err error) { - if s.printDetail { - if len(b) == 0 { - return 0, nil - } - if s.inDetail && s.needColon { - s.needNewline = true - if b[0] == '\n' { - b = b[1:] - } - } - k := 0 - for i, c := range b { - if s.needNewline { - if s.inDetail && s.needColon { - s.buf.WriteByte(':') - s.needColon = false - } - s.buf.Write(detailSep) - s.needNewline = false - } - if c == '\n' { - s.buf.Write(b[k:i]) - k = i + 1 - s.needNewline = true - } - } - s.buf.Write(b[k:]) - if !s.inDetail { - s.needColon = true - } - } else if !s.inDetail { - s.buf.Write(b) - } - return len(b), nil -} - -// printer wraps a state to implement an xerrors.Printer. -type printer state - -func (s *printer) Print(args ...interface{}) { - if !s.inDetail || s.printDetail { - fmt.Fprint((*state)(s), args...) - } -} - -func (s *printer) Printf(format string, args ...interface{}) { - if !s.inDetail || s.printDetail { - fmt.Fprintf((*state)(s), format, args...) - } -} - -func (s *printer) Detail() bool { - s.inDetail = true - return s.printDetail -} diff --git a/vendor/golang.org/x/xerrors/codereview.cfg b/vendor/golang.org/x/xerrors/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/xerrors/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/xerrors/doc.go b/vendor/golang.org/x/xerrors/doc.go deleted file mode 100644 index eef99d9d..00000000 --- a/vendor/golang.org/x/xerrors/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xerrors implements functions to manipulate errors. -// -// This package is based on the Go 2 proposal for error values: -// https://golang.org/design/29934-error-values -// -// These functions were incorporated into the standard library's errors package -// in Go 1.13: -// - Is -// - As -// - Unwrap -// -// Also, Errorf's %w verb was incorporated into fmt.Errorf. -// -// Use this package to get equivalent behavior in all supported Go versions. -// -// No other features of this package were included in Go 1.13, and at present -// there are no plans to include any of them. -package xerrors // import "golang.org/x/xerrors" diff --git a/vendor/golang.org/x/xerrors/errors.go b/vendor/golang.org/x/xerrors/errors.go deleted file mode 100644 index e88d3772..00000000 --- a/vendor/golang.org/x/xerrors/errors.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import "fmt" - -// errorString is a trivial implementation of error. -type errorString struct { - s string - frame Frame -} - -// New returns an error that formats as the given text. -// -// The returned error contains a Frame set to the caller's location and -// implements Formatter to show this information when printed with details. -func New(text string) error { - return &errorString{text, Caller(1)} -} - -func (e *errorString) Error() string { - return e.s -} - -func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *errorString) FormatError(p Printer) (next error) { - p.Print(e.s) - e.frame.Format(p) - return nil -} diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go deleted file mode 100644 index 829862dd..00000000 --- a/vendor/golang.org/x/xerrors/fmt.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import ( - "fmt" - "strings" - "unicode" - "unicode/utf8" - - "golang.org/x/xerrors/internal" -) - -const percentBangString = "%!" - -// Errorf formats according to a format specifier and returns the string as a -// value that satisfies error. -// -// The returned error includes the file and line number of the caller when -// formatted with additional detail enabled. If the last argument is an error -// the returned error's Format method will return it if the format string ends -// with ": %s", ": %v", or ": %w". If the last argument is an error and the -// format string ends with ": %w", the returned error implements an Unwrap -// method returning it. -// -// If the format specifier includes a %w verb with an error operand in a -// position other than at the end, the returned error will still implement an -// Unwrap method returning the operand, but the error's Format method will not -// return the wrapped error. -// -// It is invalid to include more than one %w verb or to supply it with an -// operand that does not implement the error interface. The %w verb is otherwise -// a synonym for %v. -func Errorf(format string, a ...interface{}) error { - format = formatPlusW(format) - // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. - wrap := strings.HasSuffix(format, ": %w") - idx, format2, ok := parsePercentW(format) - percentWElsewhere := !wrap && idx >= 0 - if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { - err := errorAt(a, len(a)-1) - if err == nil { - return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} - } - // TODO: this is not entirely correct. The error value could be - // printed elsewhere in format if it mixes numbered with unnumbered - // substitutions. With relatively small changes to doPrintf we can - // have it optionally ignore extra arguments and pass the argument - // list in its entirety. - msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) - frame := Frame{} - if internal.EnableTrace { - frame = Caller(1) - } - if wrap { - return &wrapError{msg, err, frame} - } - return &noWrapError{msg, err, frame} - } - // Support %w anywhere. - // TODO: don't repeat the wrapped error's message when %w occurs in the middle. - msg := fmt.Sprintf(format2, a...) - if idx < 0 { - return &noWrapError{msg, nil, Caller(1)} - } - err := errorAt(a, idx) - if !ok || err == nil { - // Too many %ws or argument of %w is not an error. Approximate the Go - // 1.13 fmt.Errorf message. - return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} - } - frame := Frame{} - if internal.EnableTrace { - frame = Caller(1) - } - return &wrapError{msg, err, frame} -} - -func errorAt(args []interface{}, i int) error { - if i < 0 || i >= len(args) { - return nil - } - err, ok := args[i].(error) - if !ok { - return nil - } - return err -} - -// formatPlusW is used to avoid the vet check that will barf at %w. -func formatPlusW(s string) string { - return s -} - -// Return the index of the only %w in format, or -1 if none. -// Also return a rewritten format string with %w replaced by %v, and -// false if there is more than one %w. -// TODO: handle "%[N]w". -func parsePercentW(format string) (idx int, newFormat string, ok bool) { - // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. - idx = -1 - ok = true - n := 0 - sz := 0 - var isW bool - for i := 0; i < len(format); i += sz { - if format[i] != '%' { - sz = 1 - continue - } - // "%%" is not a format directive. - if i+1 < len(format) && format[i+1] == '%' { - sz = 2 - continue - } - sz, isW = parsePrintfVerb(format[i:]) - if isW { - if idx >= 0 { - ok = false - } else { - idx = n - } - // "Replace" the last character, the 'w', with a 'v'. - p := i + sz - 1 - format = format[:p] + "v" + format[p+1:] - } - n++ - } - return idx, format, ok -} - -// Parse the printf verb starting with a % at s[0]. -// Return how many bytes it occupies and whether the verb is 'w'. -func parsePrintfVerb(s string) (int, bool) { - // Assume only that the directive is a sequence of non-letters followed by a single letter. - sz := 0 - var r rune - for i := 1; i < len(s); i += sz { - r, sz = utf8.DecodeRuneInString(s[i:]) - if unicode.IsLetter(r) { - return i + sz, r == 'w' - } - } - return len(s), false -} - -type noWrapError struct { - msg string - err error - frame Frame -} - -func (e *noWrapError) Error() string { - return fmt.Sprint(e) -} - -func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *noWrapError) FormatError(p Printer) (next error) { - p.Print(e.msg) - e.frame.Format(p) - return e.err -} - -type wrapError struct { - msg string - err error - frame Frame -} - -func (e *wrapError) Error() string { - return fmt.Sprint(e) -} - -func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *wrapError) FormatError(p Printer) (next error) { - p.Print(e.msg) - e.frame.Format(p) - return e.err -} - -func (e *wrapError) Unwrap() error { - return e.err -} diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go deleted file mode 100644 index 1bc9c26b..00000000 --- a/vendor/golang.org/x/xerrors/format.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -// A Formatter formats error messages. -type Formatter interface { - error - - // FormatError prints the receiver's first error and returns the next error in - // the error chain, if any. - FormatError(p Printer) (next error) -} - -// A Printer formats error messages. -// -// The most common implementation of Printer is the one provided by package fmt -// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message -// typically provide their own implementations. -type Printer interface { - // Print appends args to the message output. - Print(args ...interface{}) - - // Printf writes a formatted string. - Printf(format string, args ...interface{}) - - // Detail reports whether error detail is requested. - // After the first call to Detail, all text written to the Printer - // is formatted as additional detail, or ignored when - // detail has not been requested. - // If Detail returns false, the caller can avoid printing the detail at all. - Detail() bool -} diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go deleted file mode 100644 index 0de628ec..00000000 --- a/vendor/golang.org/x/xerrors/frame.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import ( - "runtime" -) - -// A Frame contains part of a call stack. -type Frame struct { - // Make room for three PCs: the one we were asked for, what it called, - // and possibly a PC for skipPleaseUseCallersFrames. See: - // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 - frames [3]uintptr -} - -// Caller returns a Frame that describes a frame on the caller's stack. -// The argument skip is the number of frames to skip over. -// Caller(0) returns the frame for the caller of Caller. -func Caller(skip int) Frame { - var s Frame - runtime.Callers(skip+1, s.frames[:]) - return s -} - -// location reports the file, line, and function of a frame. -// -// The returned function may be "" even if file and line are not. -func (f Frame) location() (function, file string, line int) { - frames := runtime.CallersFrames(f.frames[:]) - if _, ok := frames.Next(); !ok { - return "", "", 0 - } - fr, ok := frames.Next() - if !ok { - return "", "", 0 - } - return fr.Function, fr.File, fr.Line -} - -// Format prints the stack as error detail. -// It should be called from an error's Format implementation -// after printing any other error detail. -func (f Frame) Format(p Printer) { - if p.Detail() { - function, file, line := f.location() - if function != "" { - p.Printf("%s\n ", function) - } - if file != "" { - p.Printf("%s:%d\n", file, line) - } - } -} diff --git a/vendor/golang.org/x/xerrors/go.mod b/vendor/golang.org/x/xerrors/go.mod deleted file mode 100644 index 870d4f61..00000000 --- a/vendor/golang.org/x/xerrors/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module golang.org/x/xerrors - -go 1.11 diff --git a/vendor/golang.org/x/xerrors/internal/internal.go b/vendor/golang.org/x/xerrors/internal/internal.go deleted file mode 100644 index 89f4eca5..00000000 --- a/vendor/golang.org/x/xerrors/internal/internal.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -// EnableTrace indicates whether stack information should be recorded in errors. -var EnableTrace = true diff --git a/vendor/golang.org/x/xerrors/wrap.go b/vendor/golang.org/x/xerrors/wrap.go deleted file mode 100644 index 9a3b5103..00000000 --- a/vendor/golang.org/x/xerrors/wrap.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import ( - "reflect" -) - -// A Wrapper provides context around another error. -type Wrapper interface { - // Unwrap returns the next error in the error chain. - // If there is no next error, Unwrap returns nil. - Unwrap() error -} - -// Opaque returns an error with the same error formatting as err -// but that does not match err and cannot be unwrapped. -func Opaque(err error) error { - return noWrapper{err} -} - -type noWrapper struct { - error -} - -func (e noWrapper) FormatError(p Printer) (next error) { - if f, ok := e.error.(Formatter); ok { - return f.FormatError(p) - } - p.Print(e.error) - return nil -} - -// Unwrap returns the result of calling the Unwrap method on err, if err implements -// Unwrap. Otherwise, Unwrap returns nil. -func Unwrap(err error) error { - u, ok := err.(Wrapper) - if !ok { - return nil - } - return u.Unwrap() -} - -// Is reports whether any error in err's chain matches target. -// -// An error is considered to match a target if it is equal to that target or if -// it implements a method Is(error) bool such that Is(target) returns true. -func Is(err, target error) bool { - if target == nil { - return err == target - } - - isComparable := reflect.TypeOf(target).Comparable() - for { - if isComparable && err == target { - return true - } - if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { - return true - } - // TODO: consider supporing target.Is(err). This would allow - // user-definable predicates, but also may allow for coping with sloppy - // APIs, thereby making it easier to get away with them. - if err = Unwrap(err); err == nil { - return false - } - } -} - -// As finds the first error in err's chain that matches the type to which target -// points, and if so, sets the target to its value and returns true. An error -// matches a type if it is assignable to the target type, or if it has a method -// As(interface{}) bool such that As(target) returns true. As will panic if target -// is not a non-nil pointer to a type which implements error or is of interface type. -// -// The As method should set the target to its value and return true if err -// matches the type to which target points. -func As(err error, target interface{}) bool { - if target == nil { - panic("errors: target cannot be nil") - } - val := reflect.ValueOf(target) - typ := val.Type() - if typ.Kind() != reflect.Ptr || val.IsNil() { - panic("errors: target must be a non-nil pointer") - } - if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) { - panic("errors: *target must be interface or implement error") - } - targetType := typ.Elem() - for err != nil { - if reflect.TypeOf(err).AssignableTo(targetType) { - val.Elem().Set(reflect.ValueOf(err)) - return true - } - if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) { - return true - } - err = Unwrap(err) - } - return false -} - -var errorType = reflect.TypeOf((*error)(nil)).Elem() diff --git a/vendor/modules.txt b/vendor/modules.txt deleted file mode 100644 index 49b498ad..00000000 --- a/vendor/modules.txt +++ /dev/null @@ -1,24 +0,0 @@ -# github.com/visualfc/fastmod v1.3.6 -github.com/visualfc/fastmod -# github.com/visualfc/gotools v1.3.3 -github.com/visualfc/gotools/pkg/buildctx -github.com/visualfc/gotools/pkg/command -github.com/visualfc/gotools/pkg/pkgutil -github.com/visualfc/gotools/pkg/stdlib -github.com/visualfc/gotools/pkgs -github.com/visualfc/gotools/types -# golang.org/x/mod v0.2.0 -golang.org/x/mod/internal/lazyregexp -golang.org/x/mod/modfile -golang.org/x/mod/module -golang.org/x/mod/semver -# golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 -golang.org/x/tools/go/ast/astutil -golang.org/x/tools/go/buildutil -golang.org/x/tools/go/gcexportdata -golang.org/x/tools/go/internal/cgo -golang.org/x/tools/go/internal/gcimporter -golang.org/x/tools/go/loader -# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 -golang.org/x/xerrors -golang.org/x/xerrors/internal From 901895f2a8865b4fc114cf32ccd526e272c4a863 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 11 May 2022 20:51:55 +0800 Subject: [PATCH 086/133] use github.com/visualfc/gomod for fix go.work --- autocompletecontext.go | 6 +++--- go.mod | 4 ++-- go.sum | 37 +++++++++++++++++++------------------ 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 4f50f57f..e93a56a6 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -302,7 +302,7 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - if c.walker.ModPkg != nil { + if c.walker.Mod != nil { //goroot for _, index := range c.pkgindex.Indexs { for _, pkg := range index.Pkgs { @@ -324,9 +324,9 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf } } //mod deps - deps := c.walker.ModPkg.DepImportList(true, true) + deps := c.walker.Mod.DepImportList() //local path - locals := c.walker.ModPkg.LocalImportList(true) + locals := c.walker.Mod.LocalImportList(true) for _, dep := range deps { if !has_prefix(dep, partial, b.ignorecase) { continue diff --git a/go.mod b/go.mod index 4e39d184..8397c829 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.4 - golang.org/x/tools v0.1.0 + github.com/visualfc/gotools v1.3.7 + golang.org/x/tools v0.1.8 ) diff --git a/go.sum b/go.sum index 5b40181e..085190b5 100644 --- a/go.sum +++ b/go.sum @@ -1,33 +1,34 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/visualfc/fastmod v1.3.7 h1:ITUMsKz0Kj0Qu0i8hUuW89xNQxn8GF+L6a2/OBFwXkM= -github.com/visualfc/fastmod v1.3.7/go.mod h1:JANyMjj5gFPsnwOMg9fFs21GR8mGS6dm8dYCaQ1zrJU= -github.com/visualfc/gotools v1.3.4 h1:WS0cwIsIyJpMy17RXFK7a7b9tqyeL/wcELGdKsUrzOA= -github.com/visualfc/gotools v1.3.4/go.mod h1:bmLKjKD3ZCnAV4WKKWiMUgYVnfZYoPq193egahhrNeI= -github.com/visualfc/goversion v1.0.1/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/visualfc/gomod v0.0.2 h1:smmvGXKyg8Doe2MlqN4VkNgM5Ev9CrJpUwlFQfBRrNo= +github.com/visualfc/gomod v0.0.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= +github.com/visualfc/gotools v1.3.7 h1:Y/QGZaeIrUZQ/mHo5yUSqwGzWuotuHRVsJDd7KwHfo4= +github.com/visualfc/gotools v1.3.7/go.mod h1:/f8j7GwWVd9M8MTmRbWW+q8vhVN705v3kbFCHZ8kg9Y= +github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= From 7e55e0f245b640962335d0247b88f87eda2847e5 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 12 May 2022 07:54:51 +0800 Subject: [PATCH 087/133] unsafe: add .Add .Slice --- go.mod | 4 +++- go.sum | 16 ++++++++++++---- package.go | 3 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8397c829..f80b92b2 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,7 @@ go 1.13 require ( github.com/visualfc/gotools v1.3.7 - golang.org/x/tools v0.1.8 + golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect + golang.org/x/tools v0.1.10 + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect ) diff --git a/go.sum b/go.sum index 085190b5..d0d077fd 100644 --- a/go.sum +++ b/go.sum @@ -8,10 +8,13 @@ github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnF github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -19,17 +22,22 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/package.go b/package.go index 0702592b..b658cf53 100644 --- a/package.go +++ b/package.go @@ -354,7 +354,8 @@ package unsafe func @"".Offsetof (? any) uintptr func @"".Sizeof (? any) uintptr func @"".Alignof (? any) uintptr - + func @"".Add(ptr Pointer, len IntegerType) Pointer + func @"".Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType $$ `) From 28fbae56c6aa7520c6279efd59e6ac2d3a7c61cd Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 20 May 2022 10:18:34 +0800 Subject: [PATCH 088/133] update gotools, fix imports skip no goroot for GOMOD project --- autocompletecontext.go | 8 +++++--- go.mod | 2 +- go.sum | 9 ++------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index e93a56a6..be5b5170 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -305,13 +305,13 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf if c.walker.Mod != nil { //goroot for _, index := range c.pkgindex.Indexs { + if !index.Goroot { + continue + } for _, pkg := range index.Pkgs { if pkg.IsCommand() { continue } - if !pkg.Goroot { - continue - } if strings.HasPrefix(pkg.ImportPath, "cmd/") || strings.Contains(pkg.ImportPath, "vendor/") || strings.Contains(pkg.ImportPath, "internal") { @@ -323,6 +323,8 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf resultSet[pkg.ImportPath] = struct{}{} } } + //mod path + resultSet[c.walker.Mod.Root().Path] = struct{}{} //mod deps deps := c.walker.Mod.DepImportList() //local path diff --git a/go.mod b/go.mod index f80b92b2..3da58e2c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.7 + github.com/visualfc/gotools v1.3.8 golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect golang.org/x/tools v0.1.10 golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect diff --git a/go.sum b/go.sum index d0d077fd..658d2a23 100644 --- a/go.sum +++ b/go.sum @@ -2,24 +2,20 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/visualfc/gomod v0.0.2 h1:smmvGXKyg8Doe2MlqN4VkNgM5Ev9CrJpUwlFQfBRrNo= github.com/visualfc/gomod v0.0.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.3.7 h1:Y/QGZaeIrUZQ/mHo5yUSqwGzWuotuHRVsJDd7KwHfo4= -github.com/visualfc/gotools v1.3.7/go.mod h1:/f8j7GwWVd9M8MTmRbWW+q8vhVN705v3kbFCHZ8kg9Y= +github.com/visualfc/gotools v1.3.8 h1:/vPeCg3FS6JOlgsvIaWvWPMM76F3SSwM1rJktQV2wiQ= +github.com/visualfc/gotools v1.3.8/go.mod h1:k7Wwas16+t1d80V4Pe7SaczohwcmxpqErLWyaXuxH6k= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -33,7 +29,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 3d7cb2afefaf7ac7afde8fd1ca9d412d0062a61b Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 20 May 2022 10:49:10 +0800 Subject: [PATCH 089/133] gotools v1.3.9, update dep import path --- autocompletecontext.go | 2 +- go.mod | 4 +--- go.sum | 14 ++++++-------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index be5b5170..17e0eaed 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -326,7 +326,7 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf //mod path resultSet[c.walker.Mod.Root().Path] = struct{}{} //mod deps - deps := c.walker.Mod.DepImportList() + deps := c.walker.Mod.DepImportList(true, true) //local path locals := c.walker.Mod.LocalImportList(true) for _, dep := range deps { diff --git a/go.mod b/go.mod index 3da58e2c..491bf23b 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.8 - golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect + github.com/visualfc/gotools v1.3.9 golang.org/x/tools v0.1.10 - golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect ) diff --git a/go.sum b/go.sum index 658d2a23..0614d7d5 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/visualfc/gomod v0.0.2 h1:smmvGXKyg8Doe2MlqN4VkNgM5Ev9CrJpUwlFQfBRrNo= -github.com/visualfc/gomod v0.0.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.3.8 h1:/vPeCg3FS6JOlgsvIaWvWPMM76F3SSwM1rJktQV2wiQ= -github.com/visualfc/gotools v1.3.8/go.mod h1:k7Wwas16+t1d80V4Pe7SaczohwcmxpqErLWyaXuxH6k= +github.com/visualfc/gomod v0.1.0 h1:qSGKJnTu9FjErza0e+ERm+uZYmqPSzjNq2pfEUIx0rQ= +github.com/visualfc/gomod v0.1.0/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= +github.com/visualfc/gotools v1.3.9 h1:E9lcjBev0lGVWy4NCfGXSBaKwbSpYaoqwMhwwM+uH1g= +github.com/visualfc/gotools v1.3.9/go.mod h1:cZAKWQjyobF6ZCZdsAp7wZ1AmBNZmjgjO3FJyqrthxM= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -19,9 +19,8 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -33,6 +32,5 @@ golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 4777407c93af1b11105f610256f27b96255c5a64 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 20 May 2022 11:04:05 +0800 Subject: [PATCH 090/133] gotools v1.3.10 --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 491bf23b..e08cf19c 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.3.9 + github.com/visualfc/gotools v1.3.10 golang.org/x/tools v0.1.10 ) diff --git a/go.sum b/go.sum index 0614d7d5..b16bc9f4 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/visualfc/gomod v0.1.0 h1:qSGKJnTu9FjErza0e+ERm+uZYmqPSzjNq2pfEUIx0rQ= -github.com/visualfc/gomod v0.1.0/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.3.9 h1:E9lcjBev0lGVWy4NCfGXSBaKwbSpYaoqwMhwwM+uH1g= -github.com/visualfc/gotools v1.3.9/go.mod h1:cZAKWQjyobF6ZCZdsAp7wZ1AmBNZmjgjO3FJyqrthxM= +github.com/visualfc/gomod v0.1.1 h1:17IpmvYEWjH+owa+J9gZPG0lFXL9f5wIBDGF0q3ut8g= +github.com/visualfc/gomod v0.1.1/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= +github.com/visualfc/gotools v1.3.10 h1:dSPxoCAXZ6iSYRGsx74xsCqGNthiZAbuPXwxfeJ3Rv4= +github.com/visualfc/gotools v1.3.10/go.mod h1:CXKhMSUJoq9VN5wEoniBZ82fO6qtRoDZIoN1NdGhJNM= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From e3faf2f2705e132bdda23d7876c4c9052742f93b Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 29 Nov 2022 16:59:15 +0800 Subject: [PATCH 091/133] fix typeparam for go118 --- go.mod | 2 +- go.sum | 23 +++++++++++++++++++---- internal/gcimporter/bexport.go | 5 +++++ internal/gcimporter/bexport_test.go | 2 +- internal/gcimporter/bimport.go | 1 + internal/gcimporter/iexport_test.go | 3 ++- internal/gcimporter/typeparams_go117.go | 20 ++++++++++++++++++++ internal/gcimporter/typeparams_go118.go | 10 ++++++++++ package_bin.go | 3 ++- 9 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 internal/gcimporter/typeparams_go117.go create mode 100644 internal/gcimporter/typeparams_go118.go diff --git a/go.mod b/go.mod index e08cf19c..9cb8b632 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.13 require ( github.com/visualfc/gotools v1.3.10 - golang.org/x/tools v0.1.10 + golang.org/x/tools v0.3.0 ) diff --git a/go.sum b/go.sum index b16bc9f4..16f6df5e 100644 --- a/go.sum +++ b/go.sum @@ -6,31 +6,46 @@ github.com/visualfc/gotools v1.3.10 h1:dSPxoCAXZ6iSYRGsx74xsCqGNthiZAbuPXwxfeJ3R github.com/visualfc/gotools v1.3.10/go.mod h1:CXKhMSUJoq9VN5wEoniBZ82fO6qtRoDZIoN1NdGhJNM= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/gcimporter/bexport.go b/internal/gcimporter/bexport.go index a807d0aa..ca674933 100644 --- a/internal/gcimporter/bexport.go +++ b/internal/gcimporter/bexport.go @@ -379,6 +379,11 @@ func (p *exporter) typ(t types.Type) { p.int(int(3 - t.Dir())) // hack p.typ(t.Elem()) + case *TypeParam: + p.tag(typeParamTag) + p.pos(t.Obj()) + p.qualifiedName(t.Obj()) + p.typ(t.Underlying()) default: panic(internalErrorf("unexpected type %T: %s", t, t)) } diff --git a/internal/gcimporter/bexport_test.go b/internal/gcimporter/bexport_test.go index 89870b1a..82a0806a 100644 --- a/internal/gcimporter/bexport_test.go +++ b/internal/gcimporter/bexport_test.go @@ -17,8 +17,8 @@ import ( "strings" "testing" + "github.com/visualfc/gocode/internal/gcimporter" "golang.org/x/tools/go/buildutil" - "golang.org/x/tools/go/internal/gcimporter" "golang.org/x/tools/go/loader" ) diff --git a/internal/gcimporter/bimport.go b/internal/gcimporter/bimport.go index e3c31078..7930fc13 100644 --- a/internal/gcimporter/bimport.go +++ b/internal/gcimporter/bimport.go @@ -951,6 +951,7 @@ const ( // Types namedTag + typeParamTag arrayTag sliceTag dddTag diff --git a/internal/gcimporter/iexport_test.go b/internal/gcimporter/iexport_test.go index 3c918108..c3cd3efc 100644 --- a/internal/gcimporter/iexport_test.go +++ b/internal/gcimporter/iexport_test.go @@ -4,6 +4,7 @@ // This is a copy of bexport_test.go for iexport.go. +//go:build go1.11 // +build go1.11 package gcimporter_test @@ -23,8 +24,8 @@ import ( "strings" "testing" + "github.com/visualfc/gocode/internal/gcimporter" "golang.org/x/tools/go/buildutil" - "golang.org/x/tools/go/internal/gcimporter" "golang.org/x/tools/go/loader" ) diff --git a/internal/gcimporter/typeparams_go117.go b/internal/gcimporter/typeparams_go117.go new file mode 100644 index 00000000..9101a843 --- /dev/null +++ b/internal/gcimporter/typeparams_go117.go @@ -0,0 +1,20 @@ +//go:build !go1.18 +// +build !go1.18 + +package gcimporter + +import ( + "go/types" +) + +func unsupported() { + panic("type parameters are unsupported at this go version") +} + +// TypeParam is a placeholder type, as type parameters are not supported at +// this Go version. Its methods panic on use. +type TypeParam struct{ types.Type } + +func (*TypeParam) Index() int { unsupported(); return 0 } +func (*TypeParam) Constraint() types.Type { unsupported(); return nil } +func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil } diff --git a/internal/gcimporter/typeparams_go118.go b/internal/gcimporter/typeparams_go118.go new file mode 100644 index 00000000..06f8989e --- /dev/null +++ b/internal/gcimporter/typeparams_go118.go @@ -0,0 +1,10 @@ +//go:build go1.18 +// +build go1.18 + +package gcimporter + +import ( + "go/types" +) + +type TypeParam = types.TypeParam diff --git a/package_bin.go b/package_bin.go index 6efce740..aab83bfa 100644 --- a/package_bin.go +++ b/package_bin.go @@ -351,7 +351,7 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { // otherwise, i is the type tag (< 0) switch i { - case namedTag: + case namedTag, typeParamTag: // read type object p.pos() parent, name := p.qualifiedName() @@ -777,6 +777,7 @@ const ( // Types namedTag + typeParamTag arrayTag sliceTag dddTag From f3ba0c4222a03d0574a7de0f41e001da3f6c48ac Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 26 Dec 2022 20:47:46 +0800 Subject: [PATCH 092/133] get_type_path support ast.IndexExpr/ast.IndexListExpr --- decl.go | 24 ------------------------ types_go117.go | 30 ++++++++++++++++++++++++++++++ types_go118.go | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 types_go117.go create mode 100644 types_go118.go diff --git a/decl.go b/decl.go index 3f6b9463..6293b42e 100644 --- a/decl.go +++ b/decl.go @@ -534,30 +534,6 @@ func (tp *type_path) is_nil() bool { return tp.pkg == "" && tp.name == "" } -// converts type expressions like: -// ast.Expr -// *ast.Expr -// $ast$go/ast.Expr -// to a path that can be used to lookup a type related Decl -func get_type_path(e ast.Expr) (r type_path) { - if e == nil { - return type_path{"", ""} - } - - switch t := e.(type) { - case *ast.Ident: - r.name = t.Name - case *ast.StarExpr: - r = get_type_path(t.X) - case *ast.SelectorExpr: - if ident, ok := t.X.(*ast.Ident); ok { - r.pkg = ident.Name - } - r.name = t.Sel.Name - } - return -} - func lookup_path(tp type_path, scope *scope) *decl { if tp.is_nil() { return nil diff --git a/types_go117.go b/types_go117.go new file mode 100644 index 00000000..c76f704b --- /dev/null +++ b/types_go117.go @@ -0,0 +1,30 @@ +//go:build !go1.18 +// +build !go1.18 + +package main + +import "go/ast" + +// converts type expressions like: +// ast.Expr +// *ast.Expr +// $ast$go/ast.Expr +// to a path that can be used to lookup a type related Decl +func get_type_path(e ast.Expr) (r type_path) { + if e == nil { + return type_path{"", ""} + } + + switch t := e.(type) { + case *ast.Ident: + r.name = t.Name + case *ast.StarExpr: + r = get_type_path(t.X) + case *ast.SelectorExpr: + if ident, ok := t.X.(*ast.Ident); ok { + r.pkg = ident.Name + } + r.name = t.Sel.Name + } + return +} diff --git a/types_go118.go b/types_go118.go new file mode 100644 index 00000000..fd873504 --- /dev/null +++ b/types_go118.go @@ -0,0 +1,36 @@ +//go:build go1.18 +// +build go1.18 + +package main + +import ( + "go/ast" +) + +// converts type expressions like: +// ast.Expr +// *ast.Expr +// $ast$go/ast.Expr +// to a path that can be used to lookup a type related Decl +func get_type_path(e ast.Expr) (r type_path) { + if e == nil { + return type_path{"", ""} + } + + switch t := e.(type) { + case *ast.Ident: + r.name = t.Name + case *ast.StarExpr: + r = get_type_path(t.X) + case *ast.SelectorExpr: + if ident, ok := t.X.(*ast.Ident); ok { + r.pkg = ident.Name + } + r.name = t.Sel.Name + case *ast.IndexExpr: + r = get_type_path(t.X) + case *ast.IndexListExpr: + r = get_type_path(t.X) + } + return +} From e847e008f0a122cdbf500e32d9f205e8c05f75e3 Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 26 Dec 2022 21:44:18 +0800 Subject: [PATCH 093/133] ast_decl_typeparams --- autocompletefile.go | 2 ++ decl.go | 9 +++++++-- declcache.go | 2 ++ package.go | 2 ++ types_go117.go | 4 ++++ types_go118.go | 21 ++++++++++++++++++++- 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/autocompletefile.go b/autocompletefile.go index e8d72ab4..26cf0781 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -150,6 +150,7 @@ func (f *auto_complete_file) process_decl(decl ast.Decl) { prevscope := f.scope foreach_decl(decl, func(data *foreach_decl_struct) { class := ast_decl_class(data.decl) + typeparams := ast_decl_typeparams(data.decl) if class != decl_type { f.scope, prevscope = advance_scope(f.scope) } @@ -160,6 +161,7 @@ func (f *auto_complete_file) process_decl(decl ast.Decl) { if d == nil { continue } + d.typeparams = typeparams f.scope.add_named_decl(d) } diff --git a/decl.go b/decl.go index 6293b42e..15ca3e75 100644 --- a/decl.go +++ b/decl.go @@ -85,6 +85,9 @@ type decl struct { class decl_class flags decl_flags + // typeparams + typeparams *ast.FieldList + // functions for interface type, fields+methods for struct type children map[string]*decl @@ -526,8 +529,9 @@ func func_return_type(f *ast.FuncType, index int) ast.Expr { } type type_path struct { - pkg string - name string + pkg string + name string + indices []ast.Expr // typeparam index } func (tp *type_path) is_nil() bool { @@ -580,6 +584,7 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } tp := get_type_path(t) d := lookup_path(tp, scope) + if d != nil && d.class == decl_var { // weird variable declaration pointing to itself return nil diff --git a/declcache.go b/declcache.go index 36c0b60e..912c97de 100644 --- a/declcache.go +++ b/declcache.go @@ -120,6 +120,7 @@ func (f *decl_file_cache) process_data(data []byte) { func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) { foreach_decl(decl, func(data *foreach_decl_struct) { class := ast_decl_class(data.decl) + typeparams := ast_decl_typeparams(data.decl) for i, name := range data.names { typ, v, vi := data.type_value_index(i) @@ -127,6 +128,7 @@ func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) { if d == nil { continue } + d.typeparams = typeparams methodof := method_of(decl) if methodof != "" { diff --git a/package.go b/package.go index b658cf53..106f0c00 100644 --- a/package.go +++ b/package.go @@ -279,6 +279,7 @@ func (m *package_file_cache) add_package_to_scope(alias, realname string) { func add_ast_decl_to_package(pkg *decl, decl ast.Decl, scope *scope) { foreach_decl(decl, func(data *foreach_decl_struct) { class := ast_decl_class(data.decl) + typeparams := ast_decl_typeparams(data.decl) for i, name := range data.names { typ, v, vi := data.type_value_index(i) @@ -286,6 +287,7 @@ func add_ast_decl_to_package(pkg *decl, decl ast.Decl, scope *scope) { if d == nil { continue } + d.typeparams = typeparams if !name.IsExported() && d.class != decl_type { return diff --git a/types_go117.go b/types_go117.go index c76f704b..16401391 100644 --- a/types_go117.go +++ b/types_go117.go @@ -28,3 +28,7 @@ func get_type_path(e ast.Expr) (r type_path) { } return } + +func ast_decl_typeparams(decl ast.Decl) *ast.FieldList { + return nil +} diff --git a/types_go118.go b/types_go118.go index fd873504..9b1f8fd6 100644 --- a/types_go118.go +++ b/types_go118.go @@ -5,6 +5,7 @@ package main import ( "go/ast" + "go/token" ) // converts type expressions like: @@ -14,7 +15,7 @@ import ( // to a path that can be used to lookup a type related Decl func get_type_path(e ast.Expr) (r type_path) { if e == nil { - return type_path{"", ""} + return type_path{"", "", nil} } switch t := e.(type) { @@ -29,8 +30,26 @@ func get_type_path(e ast.Expr) (r type_path) { r.name = t.Sel.Name case *ast.IndexExpr: r = get_type_path(t.X) + r.indices = []ast.Expr{t.Index} case *ast.IndexListExpr: r = get_type_path(t.X) + r.indices = t.Indices } return } + +func ast_decl_typeparams(decl ast.Decl) *ast.FieldList { + switch t := decl.(type) { + case *ast.GenDecl: + if t.Tok == token.TYPE { + if len(t.Specs) > 0 { + if spec, ok := t.Specs[0].(*ast.TypeSpec); ok { + return spec.TypeParams + } + } + } + case *ast.FuncDecl: + return t.Type.TypeParams + } + return nil +} From c4a98f94a1d6199ee212ce617e00ca96fc9a6255 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 27 Dec 2022 22:10:55 +0800 Subject: [PATCH 094/133] type_to_decl: check typeparams instance --- ast.go | 257 +++++++++++++++++++++++++++++++++++++++++ autocompletecontext.go | 1 + decl.go | 47 +++++++- server.go | 4 +- types_go118.go | 7 +- 5 files changed, 309 insertions(+), 7 deletions(-) create mode 100644 ast.go diff --git a/ast.go b/ast.go new file mode 100644 index 00000000..a86ab917 --- /dev/null +++ b/ast.go @@ -0,0 +1,257 @@ +/* + Copyright 2021 The GoPlus Authors (goplus.org) + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package main + +import ( + "go/ast" + "go/token" + "go/types" + "log" + "reflect" + "strconv" +) + +var ( + underscore = &ast.Ident{Name: "_"} +) + +var ( + identTrue = ident("true") + identFalse = ident("false") + identNil = ident("nil") + identAppend = ident("append") + identLen = ident("len") + identCap = ident("cap") + identNew = ident("new") + identMake = ident("make") + identIota = ident("iota") +) + +func ident(name string) *ast.Ident { + return &ast.Ident{Name: name} +} + +func boolean(v bool) *ast.Ident { + if v { + return identTrue + } + return identFalse +} + +func toRecv(pkg *types.Package, recv *types.Var) *ast.FieldList { + var names []*ast.Ident + if name := recv.Name(); name != "" { + names = []*ast.Ident{ident(name)} + } + fld := &ast.Field{Names: names, Type: toType(pkg, recv.Type())} + return &ast.FieldList{List: []*ast.Field{fld}} +} + +// ----------------------------------------------------------------------------- +// function type + +func toFieldList(pkg *types.Package, t *types.Tuple) []*ast.Field { + if t == nil { + return nil + } + n := t.Len() + flds := make([]*ast.Field, n) + for i := 0; i < n; i++ { + item := t.At(i) + var names []*ast.Ident + if name := item.Name(); name != "" { + names = []*ast.Ident{ident(name)} + } + typ := toType(pkg, item.Type()) + flds[i] = &ast.Field{Names: names, Type: typ} + } + return flds +} + +func toFields(pkg *types.Package, t *types.Struct) []*ast.Field { + n := t.NumFields() + flds := make([]*ast.Field, n) + for i := 0; i < n; i++ { + item := t.Field(i) + var names []*ast.Ident + if !item.Embedded() { + names = []*ast.Ident{{Name: item.Name()}} + } + typ := toType(pkg, item.Type()) + fld := &ast.Field{Names: names, Type: typ} + if tag := t.Tag(i); tag != "" { + fld.Tag = &ast.BasicLit{Kind: token.STRING, Value: strconv.Quote(tag)} + } + flds[i] = fld + } + return flds +} + +func toVariadic(fld *ast.Field) { + t, ok := fld.Type.(*ast.ArrayType) + if !ok || t.Len != nil { + panic("TODO: not a slice type") + } + fld.Type = &ast.Ellipsis{Elt: t.Elt} +} + +func toFuncType(pkg *types.Package, sig *types.Signature) *ast.FuncType { + params := toFieldList(pkg, sig.Params()) + results := toFieldList(pkg, sig.Results()) + if sig.Variadic() { + n := len(params) + if n == 0 { + panic("TODO: toFuncType error") + } + toVariadic(params[n-1]) + } + return &ast.FuncType{ + Params: &ast.FieldList{List: params}, + Results: &ast.FieldList{List: results}, + } +} + +// ----------------------------------------------------------------------------- + +func toType(pkg *types.Package, typ types.Type) ast.Expr { + switch t := typ.(type) { + case *types.Basic: // bool, int, etc + return toBasicType(pkg, t) + case *types.Pointer: + return &ast.StarExpr{X: toType(pkg, t.Elem())} + case *types.Named: + return toNamedType(pkg, t) + case *types.Interface: + return toInterface(pkg, t) + case *types.Slice: + return toSliceType(pkg, t) + case *types.Array: + return toArrayType(pkg, t) + case *types.Map: + return toMapType(pkg, t) + case *types.Struct: + return toStructType(pkg, t) + case *types.Chan: + return toChanType(pkg, t) + case *types.Signature: + return toFuncType(pkg, t) + } + log.Panicln("TODO: toType -", reflect.TypeOf(typ)) + return nil +} + +func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { + expr := toObjectExpr(pkg, t.Obj()) + if targs := t.TypeArgs(); targs != nil { + n := targs.Len() + indices := make([]ast.Expr, n) + for i := 0; i < n; i++ { + indices[i] = toType(pkg, targs.At(i)) + } + if n == 1 { + expr = &ast.IndexExpr{ + X: expr, + Index: indices[0], + } + } else { + expr = &ast.IndexListExpr{ + X: expr, + Indices: indices, + } + } + } + return expr +} + +func toObjectExpr(pkg *types.Package, v types.Object) ast.Expr { + atPkg, name := v.Pkg(), v.Name() + if atPkg == nil || atPkg == pkg { // at universe or at this package + return ident(name) + } + x := ident(atPkg.Name()) + return &ast.SelectorExpr{ + X: x, + Sel: ident(v.Name()), + } +} + +func toBasicType(pkg *types.Package, t *types.Basic) ast.Expr { + if t.Kind() == types.UnsafePointer { + return &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")} + } + if (t.Info() & types.IsUntyped) != 0 { + panic("unexpected: untyped type") + } + return &ast.Ident{Name: t.Name()} +} + +func isUntyped(pkg *types.Package, typ types.Type) bool { + switch t := typ.(type) { + case *types.Basic: + return (t.Info() & types.IsUntyped) != 0 + } + return false +} + +func toChanType(pkg *types.Package, t *types.Chan) ast.Expr { + return &ast.ChanType{Value: toType(pkg, t.Elem()), Dir: chanDirs[t.Dir()]} +} + +var ( + chanDirs = [...]ast.ChanDir{ + types.SendRecv: ast.SEND | ast.RECV, + types.SendOnly: ast.SEND, + types.RecvOnly: ast.RECV, + } +) + +func toStructType(pkg *types.Package, t *types.Struct) ast.Expr { + list := toFields(pkg, t) + return &ast.StructType{Fields: &ast.FieldList{List: list}} +} + +func toArrayType(pkg *types.Package, t *types.Array) ast.Expr { + var len ast.Expr + if n := t.Len(); n < 0 { + len = &ast.Ellipsis{} + } else { + len = &ast.BasicLit{Kind: token.INT, Value: strconv.FormatInt(t.Len(), 10)} + } + return &ast.ArrayType{Len: len, Elt: toType(pkg, t.Elem())} +} + +func toSliceType(pkg *types.Package, t *types.Slice) ast.Expr { + return &ast.ArrayType{Elt: toType(pkg, t.Elem())} +} + +func toMapType(pkg *types.Package, t *types.Map) ast.Expr { + return &ast.MapType{Key: toType(pkg, t.Key()), Value: toType(pkg, t.Elem())} +} + +func toInterface(pkg *types.Package, t *types.Interface) ast.Expr { + var flds []*ast.Field + for i, n := 0, t.NumEmbeddeds(); i < n; i++ { + typ := toType(pkg, t.EmbeddedType(i)) + fld := &ast.Field{Type: typ} + flds = append(flds, fld) + } + for i, n := 0, t.NumExplicitMethods(); i < n; i++ { + fn := t.ExplicitMethod(i) + name := ident(fn.Name()) + typ := toFuncType(pkg, fn.Type().(*types.Signature)) + fld := &ast.Field{Names: []*ast.Ident{name}, Type: typ} + flds = append(flds, fld) + } + return &ast.InterfaceType{Methods: &ast.FieldList{List: flds}} +} diff --git a/autocompletecontext.go b/autocompletecontext.go index 17e0eaed..d0a5b176 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -158,6 +158,7 @@ type auto_complete_context struct { declcache *decl_cache // top-level declarations cache fset *token.FileSet walker *pkgwalk.PkgWalker + conf *pkgwalk.PkgConfig pkgindex *pkgs.PathPkgsIndex mutex sync.Mutex } diff --git a/decl.go b/decl.go index 15ca3e75..6b6f67a3 100644 --- a/decl.go +++ b/decl.go @@ -5,10 +5,13 @@ import ( "fmt" "go/ast" "go/token" + "go/types" "io" "reflect" "strings" "sync" + + "golang.org/x/tools/go/types/typeutil" ) // decl.class @@ -529,9 +532,9 @@ func func_return_type(f *ast.FuncType, index int) ast.Expr { } type type_path struct { - pkg string - name string - indices []ast.Expr // typeparam index + pkg string + name string + targs []ast.Expr // typeparam index } func (tp *type_path) is_nil() bool { @@ -577,6 +580,20 @@ func lookup_pkg(tp type_path, scope *scope) string { return decl.name } +func instance_decl(d *decl, typ ast.Expr, targs []ast.Expr) *decl { + return new_decl_full(d.name, d.class, d.flags, typ, d.value, d.value_index, d.scope) +} + +func lookup_types(t ast.Expr) types.Type { + text := types.ExprString(t) + for k, v := range g_daemon.autocomplete.conf.Info.Types { + if text == types.ExprString(k) { + return v.Type + } + } + return nil +} + func type_to_decl(t ast.Expr, scope *scope) *decl { if t == nil { //TODO @@ -584,6 +601,30 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } tp := get_type_path(t) d := lookup_path(tp, scope) + if d == nil { + // typeparams targs struct type: Typ[struct{...}] + if typ := lookup_types(t); typ != nil { + if _, ok := typ.(*types.Struct); ok { + dt := toType(nil, typ) + d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) + } + } + } else if d.typeparams != nil { + // typeparams named type instance + if typ := lookup_types(t); typ != nil { + if named, ok := typ.(*types.Named); ok { + pkg := named.Obj().Pkg() + dt := toType(pkg, named.Underlying()) + d = new_decl_full(named.Obj().Name(), decl_type, 0, dt, nil, -1, scope) + // add methods + for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { + ft := toType(pkg, sel.Type()) + method := sel.Obj().Name() + d.children[method] = new_decl_full(method, decl_methods_stub, 0, ft, nil, -1, scope) + } + } + } + } if d != nil && d.class == decl_var { // weird variable declaration pointing to itself diff --git a/server.go b/server.go index 55ae6b8c..60870dca 100644 --- a/server.go +++ b/server.go @@ -270,12 +270,12 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack //g_daemon.modList = gomod.LooupModList(dir) - conf := pkgwalk.DefaultPkgConfig() + g_daemon.autocomplete.conf = pkgwalk.DefaultPkgConfig() cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) } - g_daemon.autocomplete.walker.Check(dir, conf, cursor) + g_daemon.autocomplete.walker.Check(dir, g_daemon.autocomplete.conf, cursor) } if *g_debug { var buf bytes.Buffer diff --git a/types_go118.go b/types_go118.go index 9b1f8fd6..ed6be0a6 100644 --- a/types_go118.go +++ b/types_go118.go @@ -26,14 +26,17 @@ func get_type_path(e ast.Expr) (r type_path) { case *ast.SelectorExpr: if ident, ok := t.X.(*ast.Ident); ok { r.pkg = ident.Name + if r.pkg == "main" { + r.pkg = "" + } } r.name = t.Sel.Name case *ast.IndexExpr: r = get_type_path(t.X) - r.indices = []ast.Expr{t.Index} + r.targs = []ast.Expr{t.Index} case *ast.IndexListExpr: r = get_type_path(t.X) - r.indices = t.Indices + r.targs = t.Indices } return } From 6ba492818a50a9e86315a2086151eb38aa7629d4 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 16:20:00 +0800 Subject: [PATCH 095/133] deduce_cursor_context check token.RBRACK --- cursorcontext.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cursorcontext.go b/cursorcontext.go index f943b11d..032c0dbd 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -227,8 +227,8 @@ loop: break loop } this.skip_to_balanced_pair() - case token.RPAREN, token.RBRACK: - // After ']' and ')' their opening counterparts are valid '[', '(', + case token.RPAREN: + // After ')' their opening counterparts are valid '[', '(', // as well as the dot. switch prev { case token.PERIOD, token.LBRACK, token.LPAREN: @@ -237,6 +237,16 @@ loop: break loop } this.skip_to_balanced_pair() + case token.RBRACK: + // After ']' their opening counterparts are valid '[', '(', '{', + // as well as the dot. + switch prev { + case token.PERIOD, token.LBRACK, token.LPAREN, token.LBRACE: + // all ok + default: + break loop + } + this.skip_to_balanced_pair() default: break loop } From 8797c5a3044464f5c74164e1f9c70e41560f86a6 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 16:29:37 +0800 Subject: [PATCH 096/133] lookup_types support lookup ident/instance --- ast.go | 23 ------------ autocompletecontext.go | 1 + decl.go | 69 ++++++++++++++++++++++++++++++++++- server.go | 3 +- types_go117.go | 43 ++++++++++++++++++++-- types_go118.go | 81 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 193 insertions(+), 27 deletions(-) diff --git a/ast.go b/ast.go index a86ab917..5f84ee32 100644 --- a/ast.go +++ b/ast.go @@ -151,29 +151,6 @@ func toType(pkg *types.Package, typ types.Type) ast.Expr { return nil } -func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { - expr := toObjectExpr(pkg, t.Obj()) - if targs := t.TypeArgs(); targs != nil { - n := targs.Len() - indices := make([]ast.Expr, n) - for i := 0; i < n; i++ { - indices[i] = toType(pkg, targs.At(i)) - } - if n == 1 { - expr = &ast.IndexExpr{ - X: expr, - Index: indices[0], - } - } else { - expr = &ast.IndexListExpr{ - X: expr, - Indices: indices, - } - } - } - return expr -} - func toObjectExpr(pkg *types.Package, v types.Object) ast.Expr { atPkg, name := v.Pkg(), v.Name() if atPkg == nil || atPkg == pkg { // at universe or at this package diff --git a/autocompletecontext.go b/autocompletecontext.go index d0a5b176..53665f3a 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -159,6 +159,7 @@ type auto_complete_context struct { fset *token.FileSet walker *pkgwalk.PkgWalker conf *pkgwalk.PkgConfig + cursor int pkgindex *pkgs.PathPkgsIndex mutex sync.Mutex } diff --git a/decl.go b/decl.go index 6b6f67a3..cee78e94 100644 --- a/decl.go +++ b/decl.go @@ -585,8 +585,66 @@ func instance_decl(d *decl, typ ast.Expr, targs []ast.Expr) *decl { } func lookup_types(t ast.Expr) types.Type { + conf := g_daemon.autocomplete.conf + pos := token.Pos(g_daemon.autocomplete.cursor) + + if ident, ok := t.(*ast.Ident); ok { + if typ := lookup_types_ident(ident, pos, conf.Info); typ != nil { + return typ + } + if conf.XInfo != nil { + if typ := lookup_types_ident(ident, pos, conf.XInfo); typ != nil { + return typ + } + } + } + if typ := lookup_types_expr(t, conf.Info); typ != nil { + return typ + } + if conf.XInfo != nil { + if typ := lookup_types_expr(t, conf.XInfo); typ != nil { + return typ + } + } + return nil +} + +func lookup_types_scope(pos token.Pos, info *types.Info) *types.Scope { + for node, scope := range info.Scopes { + if pos >= node.Pos() && pos < node.End() { + return scope.Innermost(pos) + } + } + return nil +} + +type typ_distance struct { + pos token.Pos + typ types.Type +} + +// lookup type by ident, from scope or near instance +func lookup_types_ident(ident *ast.Ident, pos token.Pos, info *types.Info) types.Type { + var typ types.Type + if scope := lookup_types_scope(pos, info); scope != nil { + if obj := scope.Lookup(ident.Name); obj != nil { + typ = obj.Type() + } + if _, obj := scope.LookupParent(ident.Name, pos); obj != nil { + typ = obj.Type() + } + } + // is typeparams lookup instance + if hasTypeParams(typ) { + return lookup_types_near_instance(ident, pos, info) + } + return typ +} + +// lookup type by type, from type. +func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { text := types.ExprString(t) - for k, v := range g_daemon.autocomplete.conf.Info.Types { + for k, v := range info.Types { if text == types.ExprString(k) { return v.Type } @@ -787,6 +845,14 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if d.class == decl_package { return ast.NewIdent(t.Name), scope, false } + if d.typ == nil || d.typeparams != nil { + typ := lookup_types(v) + if named, ok := typ.(*types.Named); ok { + return toType(named.Obj().Pkg(), typ), scope, true + } else { + d.typ = toType(nil, typ) + } + } //check type, fix bug test.0055 if i, ok := d.typ.(*ast.Ident); ok { if i.Obj != nil && i.Obj.Decl != nil { @@ -1015,6 +1081,7 @@ func (d *decl) infer_type() (ast.Expr, *scope) { var scope *scope d.typ, scope, _ = infer_type(d.value, d.scope, d.value_index) + return d.typ, scope } diff --git a/server.go b/server.go index 60870dca..45832340 100644 --- a/server.go +++ b/server.go @@ -270,7 +270,8 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack //g_daemon.modList = gomod.LooupModList(dir) - g_daemon.autocomplete.conf = pkgwalk.DefaultPkgConfig() + g_daemon.autocomplete.conf = DefaultPkgConfig() + g_daemon.autocomplete.cursor = cursor cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) diff --git a/types_go117.go b/types_go117.go index 16401391..f94991c5 100644 --- a/types_go117.go +++ b/types_go117.go @@ -3,7 +3,13 @@ package main -import "go/ast" +import ( + "go/ast" + "go/token" + "go/types" + + pkgwalk "github.com/visualfc/gotools/types" +) // converts type expressions like: // ast.Expr @@ -12,7 +18,7 @@ import "go/ast" // to a path that can be used to lookup a type related Decl func get_type_path(e ast.Expr) (r type_path) { if e == nil { - return type_path{"", ""} + return type_path{"", "", nil} } switch t := e.(type) { @@ -32,3 +38,36 @@ func get_type_path(e ast.Expr) (r type_path) { func ast_decl_typeparams(decl ast.Decl) *ast.FieldList { return nil } + +func hasTypeParams(typ types.Type) bool { + return false +} + +func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { + return toObjectExpr(pkg, t.Obj()) +} + +func lookup_types_near_instance(ident *ast.Ident, pos token.Pos, info *types.Info) types.Type { + return nil +} + +func DefaultPkgConfig() *pkgwalk.PkgConfig { + conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), + } + return conf +} diff --git a/types_go118.go b/types_go118.go index ed6be0a6..681a208f 100644 --- a/types_go118.go +++ b/types_go118.go @@ -6,6 +6,10 @@ package main import ( "go/ast" "go/token" + "go/types" + "sort" + + pkgwalk "github.com/visualfc/gotools/types" ) // converts type expressions like: @@ -56,3 +60,80 @@ func ast_decl_typeparams(decl ast.Decl) *ast.FieldList { } return nil } + +func hasTypeParams(typ types.Type) bool { + switch t := typ.(type) { + case *types.Named: + return t.TypeParams() != nil && (t.Origin() == t) + case *types.Signature: + return t.TypeParams() != nil + } + return false +} + +func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { + expr := toObjectExpr(pkg, t.Obj()) + if targs := t.TypeArgs(); targs != nil { + n := targs.Len() + indices := make([]ast.Expr, n) + for i := 0; i < n; i++ { + indices[i] = toType(pkg, targs.At(i)) + } + if n == 1 { + expr = &ast.IndexExpr{ + X: expr, + Index: indices[0], + } + } else { + expr = &ast.IndexListExpr{ + X: expr, + Indices: indices, + } + } + } + return expr +} + +func lookup_types_near_instance(ident *ast.Ident, pos token.Pos, info *types.Info) types.Type { + var ar []*typ_distance + for k, v := range info.Instances { + if ident.Name == k.Name && pos > k.End() { + ar = append(ar, &typ_distance{k.End(), v.Type}) + } + } + switch len(ar) { + case 0: + return nil + case 1: + return ar[0].typ + default: + sort.Slice(ar, func(i, j int) bool { + return ar[i].pos < ar[j].pos + }) + return ar[0].typ + } + return nil +} + +func DefaultPkgConfig() *pkgwalk.PkgConfig { + conf := &pkgwalk.PkgConfig{IgnoreFuncBodies: false, AllowBinary: true, WithTestFiles: true} + conf.Info = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), + Instances: make(map[*ast.Ident]types.Instance), + } + conf.XInfo = &types.Info{ + Uses: make(map[*ast.Ident]types.Object), + Defs: make(map[*ast.Ident]types.Object), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + Types: make(map[ast.Expr]types.TypeAndValue), + Scopes: make(map[ast.Node]*types.Scope), + Implicits: make(map[ast.Node]types.Object), + Instances: make(map[*ast.Ident]types.Instance), + } + return conf +} From d6a66b8d49e946f15c7b032cf8610d5052e93e69 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 18:29:34 +0800 Subject: [PATCH 097/133] token_items_to_string split two IDENT --- cursorcontext.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cursorcontext.go b/cursorcontext.go index 032c0dbd..ad47fc5b 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -263,8 +263,13 @@ loop: // expression. func token_items_to_string(tokens []token_item) string { var buf bytes.Buffer + var last token_item for _, t := range tokens { + if t.tok == token.IDENT && last.tok == token.IDENT { + buf.WriteString(" ") + } buf.WriteString(t.literal()) + last = t } return buf.String() } From b563def91e7b33af890b103d13266cb38bfebee9 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 19:02:12 +0800 Subject: [PATCH 098/133] token_iterator.extract_go_expr check struct --- cursorcontext.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cursorcontext.go b/cursorcontext.go index ad47fc5b..a0ffc5c8 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -211,6 +211,14 @@ loop: if prev != token.IDENT { break loop } + case token.STRUCT: + // struct { + switch prev { + case token.LBRACE: + // all ok + default: + break loop + } case token.IDENT: // Valid tokens after IDENT are '.', '[', '{' and '('. switch prev { @@ -223,7 +231,11 @@ loop: // This one can only be a part of type initialization, like: // Dummy{}.Hello() // It is valid Go if Hello method is defined on a non-pointer receiver. - if prev != token.PERIOD { + // struct {...}{} + switch prev { + case token.PERIOD, token.LBRACE: + // all ok + default: break loop } this.skip_to_balanced_pair() From 62f21e8352f30f28a2edae9a114f904b4019a834 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 19:11:55 +0800 Subject: [PATCH 099/133] update _testing --- _testing/test.0008/out.expected | 3 ++- _testing/test.0009/out.expected | 3 ++- _testing/test.0011/out.expected | 11 ++++++++++- _testing/test.0020/out.expected | 3 ++- _testing/test.0025/out.expected | 4 +++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/_testing/test.0008/out.expected b/_testing/test.0008/out.expected index 0f46ccc9..ab1a14b0 100644 --- a/_testing/test.0008/out.expected +++ b/_testing/test.0008/out.expected @@ -1,5 +1,6 @@ -Found 6 candidates: +Found 7 candidates: func Lock() + func TryLock() bool func Unlock() var Mutex sync.Mutex var data map[string][]string diff --git a/_testing/test.0009/out.expected b/_testing/test.0009/out.expected index e7f998c1..70535d97 100644 --- a/_testing/test.0009/out.expected +++ b/_testing/test.0009/out.expected @@ -1,3 +1,4 @@ -Found 2 candidates: +Found 3 candidates: func Lock() + func TryLock() bool func Unlock() diff --git a/_testing/test.0011/out.expected b/_testing/test.0011/out.expected index 8a9d1b4c..03c24f8d 100644 --- a/_testing/test.0011/out.expected +++ b/_testing/test.0011/out.expected @@ -1,12 +1,17 @@ -Found 61 candidates: +Found 70 candidates: func Addr() reflect.Value func Bool() bool func Bytes() []byte func Call(in []reflect.Value) []reflect.Value func CallSlice(in []reflect.Value) []reflect.Value func CanAddr() bool + func CanComplex() bool + func CanConvert(t reflect.Type) bool + func CanFloat() bool + func CanInt() bool func CanInterface() bool func CanSet() bool + func CanUint() bool func Cap() int func Close() func Complex() complex128 @@ -14,6 +19,7 @@ Found 61 candidates: func Elem() reflect.Value func Field(i int) reflect.Value func FieldByIndex(index []int) reflect.Value + func FieldByIndexErr(index []int) (reflect.Value, error) func FieldByName(name string) reflect.Value func FieldByNameFunc(match func(string) bool) reflect.Value func Float() float64 @@ -47,6 +53,8 @@ Found 61 candidates: func SetComplex(x complex128) func SetFloat(x float64) func SetInt(x int64) + func SetIterKey(iter *reflect.MapIter) + func SetIterValue(iter *reflect.MapIter) func SetLen(n int) func SetMapIndex(key reflect.Value, elem reflect.Value) func SetPointer(x unsafe.Pointer) @@ -60,3 +68,4 @@ Found 61 candidates: func Type() reflect.Type func Uint() uint64 func UnsafeAddr() uintptr + func UnsafePointer() unsafe.Pointer diff --git a/_testing/test.0020/out.expected b/_testing/test.0020/out.expected index d5d01e90..fcd7b3f6 100644 --- a/_testing/test.0020/out.expected +++ b/_testing/test.0020/out.expected @@ -1,5 +1,6 @@ -Found 4 candidates: +Found 5 candidates: func Lock() + func TryLock() bool func Unlock() var Dummy Dummy var Mutex sync.Mutex diff --git a/_testing/test.0025/out.expected b/_testing/test.0025/out.expected index 9f67c8bc..bc27d868 100644 --- a/_testing/test.0025/out.expected +++ b/_testing/test.0025/out.expected @@ -1,5 +1,7 @@ -Found 4 candidates: +Found 6 candidates: + func Add(ptr Pointer, len IntegerType) Pointer func Alignof(any) uintptr func Offsetof(any) uintptr func Sizeof(any) uintptr + func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType type Pointer uintptr From be48c6c4c0f8efdf202e24b3152da752ed2276de Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 20:07:15 +0800 Subject: [PATCH 100/133] inter_type: remove lookup_types --- _testing/test.0059/out.expected | 2 +- decl.go | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/_testing/test.0059/out.expected b/_testing/test.0059/out.expected index 3bf8bfb2..abfde3a3 100644 --- a/_testing/test.0059/out.expected +++ b/_testing/test.0059/out.expected @@ -1,2 +1,2 @@ Found 1 candidates: - func NewReader(r io.Reader) io.Reader + func NewReader(r myio.Reader) myio.Reader diff --git a/decl.go b/decl.go index cee78e94..23a0fcdb 100644 --- a/decl.go +++ b/decl.go @@ -597,6 +597,7 @@ func lookup_types(t ast.Expr) types.Type { return typ } } + return nil } if typ := lookup_types_expr(t, conf.Info); typ != nil { return typ @@ -845,14 +846,6 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if d.class == decl_package { return ast.NewIdent(t.Name), scope, false } - if d.typ == nil || d.typeparams != nil { - typ := lookup_types(v) - if named, ok := typ.(*types.Named); ok { - return toType(named.Obj().Pkg(), typ), scope, true - } else { - d.typ = toType(nil, typ) - } - } //check type, fix bug test.0055 if i, ok := d.typ.(*ast.Ident); ok { if i.Obj != nil && i.Obj.Decl != nil { From a857f63a66263a4e7b81da076396f6e19151c31d Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 20:53:26 +0800 Subject: [PATCH 101/133] type_to_decl: named child decl_func --- decl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decl.go b/decl.go index 23a0fcdb..8ab8f0ed 100644 --- a/decl.go +++ b/decl.go @@ -673,13 +673,13 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { if typ := lookup_types(t); typ != nil { if named, ok := typ.(*types.Named); ok { pkg := named.Obj().Pkg() - dt := toType(pkg, named.Underlying()) + dt := toType(pkg, typ.Underlying()) d = new_decl_full(named.Obj().Name(), decl_type, 0, dt, nil, -1, scope) // add methods for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { ft := toType(pkg, sel.Type()) method := sel.Obj().Name() - d.children[method] = new_decl_full(method, decl_methods_stub, 0, ft, nil, -1, scope) + d.add_child(new_decl_full(method, decl_func, 0, ft, nil, -1, scope)) } } } From ca5a6ba0a655e36856ee13ef97468d0d7bdb9c57 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 28 Dec 2022 21:42:45 +0800 Subject: [PATCH 102/133] infer_type check ast.CallExpr typeargs/typeparams --- decl.go | 16 ++++++++++++++++ types_go117.go | 4 ++++ types_go118.go | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/decl.go b/decl.go index 8ab8f0ed..e26fbcc9 100644 --- a/decl.go +++ b/decl.go @@ -971,6 +971,22 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { // this is a function call or a type cast: // myFunc(1,2,3) or int16(myvar) it, s, is_type := infer_type(t.Fun, scope, -1) + + if it == nil { + // func[targs](params) + if typ := lookup_types(t.Fun); typ != nil { + it = toType(nil, typ) + s = scope + } + } else if ct, ok := it.(*ast.FuncType); ok { + // ast.FuncType.TypeParams != nil + if funcHasTypeParams(ct) { + if typ := lookup_types(t.Fun); typ != nil { + it = toType(nil, typ) + } + } + } + if it == nil { break } diff --git a/types_go117.go b/types_go117.go index f94991c5..1cc19941 100644 --- a/types_go117.go +++ b/types_go117.go @@ -43,6 +43,10 @@ func hasTypeParams(typ types.Type) bool { return false } +func funcHasTypeParams(typ *ast.FuncType) bool { + return false +} + func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { return toObjectExpr(pkg, t.Obj()) } diff --git a/types_go118.go b/types_go118.go index 681a208f..ff6ff8e0 100644 --- a/types_go118.go +++ b/types_go118.go @@ -71,6 +71,10 @@ func hasTypeParams(typ types.Type) bool { return false } +func funcHasTypeParams(typ *ast.FuncType) bool { + return typ.TypeParams != nil +} + func toNamedType(pkg *types.Package, t *types.Named) ast.Expr { expr := toObjectExpr(pkg, t.Obj()) if targs := t.TypeArgs(); targs != nil { From 02d636c151b5935222515301b664131d30f638b7 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 29 Dec 2022 07:50:38 +0800 Subject: [PATCH 103/133] types lookup scope by pkg --- autocompletecontext.go | 21 +++++++++++---------- autocompletefile.go | 4 ++-- decl.go | 18 +++++++----------- declcache.go | 2 +- package.go | 4 ++-- package_types.go | 4 ++-- server.go | 18 +++++++++--------- types_go118.go | 2 +- 8 files changed, 35 insertions(+), 38 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 53665f3a..22622d00 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -6,6 +6,7 @@ import ( "go/ast" "go/parser" "go/token" + "go/types" "log" "os" "path/filepath" @@ -156,12 +157,13 @@ type auto_complete_context struct { pcache package_cache // packages cache declcache *decl_cache // top-level declarations cache - fset *token.FileSet - walker *pkgwalk.PkgWalker - conf *pkgwalk.PkgConfig - cursor int pkgindex *pkgs.PathPkgsIndex mutex sync.Mutex + // types + typesWalker *pkgwalk.PkgWalker + typesConf *pkgwalk.PkgConfig + typesPkg *types.Package + typesCursor int } func new_auto_complete_context(ctx *package_lookup_context, pcache package_cache, declcache *decl_cache) *auto_complete_context { @@ -169,8 +171,7 @@ func new_auto_complete_context(ctx *package_lookup_context, pcache package_cache c.current = new_auto_complete_file("", declcache.context) c.pcache = pcache c.declcache = declcache - c.fset = token.NewFileSet() - c.walker = pkgwalk.NewPkgWalker(&ctx.Context) + c.typesWalker = pkgwalk.NewPkgWalker(&ctx.Context) c.pkgindex = nil //go func(c *auto_complete_context, ctx build.Context) { var indexs pkgs.PathPkgsIndex @@ -304,7 +305,7 @@ func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, clas func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) { currentPackagePath, pkgdirs := g_daemon.context.pkg_dirs() resultSet := map[string]struct{}{} - if c.walker.Mod != nil { + if c.typesWalker.Mod != nil { //goroot for _, index := range c.pkgindex.Indexs { if !index.Goroot { @@ -326,11 +327,11 @@ func (c *auto_complete_context) get_import_candidates(partial string, b *out_buf } } //mod path - resultSet[c.walker.Mod.Root().Path] = struct{}{} + resultSet[c.typesWalker.Mod.Root().Path] = struct{}{} //mod deps - deps := c.walker.Mod.DepImportList(true, true) + deps := c.typesWalker.Mod.DepImportList(true, true) //local path - locals := c.walker.Mod.LocalImportList(true) + locals := c.typesWalker.Mod.LocalImportList(true) for _, dep := range deps { if !has_prefix(dep, partial, b.ignorecase) { continue diff --git a/autocompletefile.go b/autocompletefile.go index 26cf0781..889c1372 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -68,8 +68,8 @@ func (f *auto_complete_file) process_data(data []byte, ctx *auto_complete_contex // topLevelTok fix rip_off_decl on multi var decl // var (\n jsData = `{ }`\n file2 *File = func() *File { var topLevelTok token.Token - if cf, ok := ctx.walker.ParsedFileCache[f.name]; ok { - pos := token.Pos(ctx.walker.FileSet.File(cf.Pos()).Base()) + token.Pos(f.cursor) + if cf, ok := ctx.typesWalker.ParsedFileCache[f.name]; ok { + pos := token.Pos(ctx.typesWalker.FileSet.File(cf.Pos()).Base()) + token.Pos(f.cursor) for _, decl := range cf.Decls { if pos >= decl.Pos() && pos <= decl.End() { if decl, ok := decl.(*ast.GenDecl); ok { diff --git a/decl.go b/decl.go index e26fbcc9..804f2294 100644 --- a/decl.go +++ b/decl.go @@ -585,8 +585,8 @@ func instance_decl(d *decl, typ ast.Expr, targs []ast.Expr) *decl { } func lookup_types(t ast.Expr) types.Type { - conf := g_daemon.autocomplete.conf - pos := token.Pos(g_daemon.autocomplete.cursor) + conf := g_daemon.autocomplete.typesConf + pos := token.Pos(g_daemon.autocomplete.typesCursor) if ident, ok := t.(*ast.Ident); ok { if typ := lookup_types_ident(ident, pos, conf.Info); typ != nil { @@ -610,13 +610,8 @@ func lookup_types(t ast.Expr) types.Type { return nil } -func lookup_types_scope(pos token.Pos, info *types.Info) *types.Scope { - for node, scope := range info.Scopes { - if pos >= node.Pos() && pos < node.End() { - return scope.Innermost(pos) - } - } - return nil +func lookup_types_scope(pos token.Pos) *types.Scope { + return g_daemon.autocomplete.typesPkg.Scope().Innermost(pos) } type typ_distance struct { @@ -627,7 +622,7 @@ type typ_distance struct { // lookup type by ident, from scope or near instance func lookup_types_ident(ident *ast.Ident, pos token.Pos, info *types.Info) types.Type { var typ types.Type - if scope := lookup_types_scope(pos, info); scope != nil { + if scope := lookup_types_scope(pos); scope != nil { if obj := scope.Lookup(ident.Name); obj != nil { typ = obj.Type() } @@ -971,18 +966,19 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { // this is a function call or a type cast: // myFunc(1,2,3) or int16(myvar) it, s, is_type := infer_type(t.Fun, scope, -1) - if it == nil { // func[targs](params) if typ := lookup_types(t.Fun); typ != nil { it = toType(nil, typ) s = scope + is_type = false } } else if ct, ok := it.(*ast.FuncType); ok { // ast.FuncType.TypeParams != nil if funcHasTypeParams(ct) { if typ := lookup_types(t.Fun); typ != nil { it = toType(nil, typ) + is_type = false } } } diff --git a/declcache.go b/declcache.go index 912c97de..8fa5a46b 100644 --- a/declcache.go +++ b/declcache.go @@ -395,7 +395,7 @@ func find_global_file(imp string, context *package_lookup_context) (string, stri } } - for _, v := range g_daemon.autocomplete.walker.Imported { + for _, v := range g_daemon.autocomplete.typesWalker.Imported { if v.Path() == imp { return imp, v.Path(), true } diff --git a/package.go b/package.go index 106f0c00..e846b020 100644 --- a/package.go +++ b/package.go @@ -92,12 +92,12 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.vendor_name != "" { import_path = m.vendor_name } - if pkg := c.walker.Imported[import_path]; pkg != nil { + if pkg := c.typesWalker.Imported[import_path]; pkg != nil { if pkg.Name() == "" { log.Println("error parser", import_path) return } - if chk, ok := c.walker.ImportedFilesCheck[import_path]; ok { + if chk, ok := c.typesWalker.ImportedFilesCheck[import_path]; ok { if m.mtime == chk.ModTime { return } diff --git a/package_types.go b/package_types.go index 244831f2..cd131ab7 100644 --- a/package_types.go +++ b/package_types.go @@ -42,7 +42,7 @@ func (p *types_parser) initSource(import_path string, path string, dir string, p c.mutex.Lock() defer c.mutex.Unlock() conf := pkgwalk.DefaultPkgConfig() - pkg, _, err := c.walker.ImportHelper(".", path, import_path, conf, nil) + pkg, _, err := c.typesWalker.ImportHelper(".", path, import_path, conf, nil) if err != nil { log.Println(err) } @@ -62,7 +62,7 @@ func (p *types_parser) initData(path string, data []byte, pfc *package_file_cach }).Import(path) p.pfc = pfc if p.pkg != nil { - c.walker.Imported[p.pkg.Path()] = p.pkg + c.typesWalker.Imported[p.pkg.Path()] = p.pkg } } diff --git a/server.go b/server.go index 45832340..6871c10b 100644 --- a/server.go +++ b/server.go @@ -199,14 +199,14 @@ func server_types_info(file []byte, filename string, cursor int, addin string, c cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) cursor.SetText(addin) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) + g_daemon.autocomplete.typesWalker.UpdateSourceData(filename, file, true) } var stdout, stderr TypesInfo - g_daemon.autocomplete.walker.SetOutput(&stdout, &stderr) - g_daemon.autocomplete.walker.SetFindMode(&pkgwalk.FindMode{Info: true, Doc: true, Define: true}) - wpkg, conf, _ := g_daemon.autocomplete.walker.Check(dir, conf, cursor) + g_daemon.autocomplete.typesWalker.SetOutput(&stdout, &stderr) + g_daemon.autocomplete.typesWalker.SetFindMode(&pkgwalk.FindMode{Info: true, Doc: true, Define: true}) + wpkg, conf, _ := g_daemon.autocomplete.typesWalker.Check(dir, conf, cursor) if wpkg != nil { - g_daemon.autocomplete.walker.LookupCursor(wpkg, conf, cursor) + g_daemon.autocomplete.typesWalker.LookupCursor(wpkg, conf, cursor) return stdout.ar, len(stdout.ar) } } @@ -270,13 +270,13 @@ func server_auto_complete(file []byte, filename string, cursor int, context_pack //g_daemon.modList = gomod.LooupModList(dir) - g_daemon.autocomplete.conf = DefaultPkgConfig() - g_daemon.autocomplete.cursor = cursor + conf := DefaultPkgConfig() + g_daemon.autocomplete.typesCursor = cursor + g_daemon.autocomplete.typesWalker.FileSet.Base() - 1 cursor := pkgwalk.NewFileCursor(file, dir, fname, cursor) if file != nil { - g_daemon.autocomplete.walker.UpdateSourceData(filename, file, true) + g_daemon.autocomplete.typesWalker.UpdateSourceData(filename, file, true) } - g_daemon.autocomplete.walker.Check(dir, g_daemon.autocomplete.conf, cursor) + g_daemon.autocomplete.typesPkg, g_daemon.autocomplete.typesConf, _ = g_daemon.autocomplete.typesWalker.Check(dir, conf, cursor) } if *g_debug { var buf bytes.Buffer diff --git a/types_go118.go b/types_go118.go index ff6ff8e0..e2044721 100644 --- a/types_go118.go +++ b/types_go118.go @@ -102,7 +102,7 @@ func lookup_types_near_instance(ident *ast.Ident, pos token.Pos, info *types.Inf var ar []*typ_distance for k, v := range info.Instances { if ident.Name == k.Name && pos > k.End() { - ar = append(ar, &typ_distance{k.End(), v.Type}) + ar = append(ar, &typ_distance{pos - k.End(), v.Type}) } } switch len(ar) { From 49962609d4843221b687897f306e00b6f0b534f0 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 29 Dec 2022 08:23:13 +0800 Subject: [PATCH 104/133] toObjectExpr: check current pkg --- ast.go | 9 ++++----- decl.go | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ast.go b/ast.go index 5f84ee32..c599d76c 100644 --- a/ast.go +++ b/ast.go @@ -152,14 +152,13 @@ func toType(pkg *types.Package, typ types.Type) ast.Expr { } func toObjectExpr(pkg *types.Package, v types.Object) ast.Expr { - atPkg, name := v.Pkg(), v.Name() - if atPkg == nil || atPkg == pkg { // at universe or at this package + vpkg, name := v.Pkg(), v.Name() + if vpkg == nil || vpkg == g_daemon.autocomplete.typesPkg { // at universe or at this package return ident(name) } - x := ident(atPkg.Name()) return &ast.SelectorExpr{ - X: x, - Sel: ident(v.Name()), + X: ident(vpkg.Name()), + Sel: ident(name), } } diff --git a/decl.go b/decl.go index 804f2294..4dde0584 100644 --- a/decl.go +++ b/decl.go @@ -663,7 +663,7 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) } } - } else if d.typeparams != nil { + } else if d.typeparams != nil || tp.targs != nil { // typeparams named type instance if typ := lookup_types(t); typ != nil { if named, ok := typ.(*types.Named); ok { From a0092c58fe2cd6f84363b1f6db7343db4b6604dc Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 30 Dec 2022 09:35:19 +0800 Subject: [PATCH 105/133] pkg import/export support named2Tags/func2Tag --- ast.go | 23 ++----- decl.go | 3 +- internal/gcimporter/bexport.go | 18 ++++- internal/gcimporter/bimport.go | 6 +- internal/gcimporter/typeparams_go117.go | 21 ++++++ internal/gcimporter/typeparams_go118.go | 27 ++++++++ package.go | 87 +++++++++++++++++++++++++ package_bin.go | 31 +++++---- types_go117.go | 63 ++++++++++++++++++ types_go118.go | 82 +++++++++++++++++++++++ 10 files changed, 327 insertions(+), 34 deletions(-) diff --git a/ast.go b/ast.go index c599d76c..5f9862b0 100644 --- a/ast.go +++ b/ast.go @@ -50,6 +50,9 @@ func boolean(v bool) *ast.Ident { } func toRecv(pkg *types.Package, recv *types.Var) *ast.FieldList { + if recv == nil { + return nil + } var names []*ast.Ident if name := recv.Name(); name != "" { names = []*ast.Ident{ident(name)} @@ -106,22 +109,6 @@ func toVariadic(fld *ast.Field) { fld.Type = &ast.Ellipsis{Elt: t.Elt} } -func toFuncType(pkg *types.Package, sig *types.Signature) *ast.FuncType { - params := toFieldList(pkg, sig.Params()) - results := toFieldList(pkg, sig.Results()) - if sig.Variadic() { - n := len(params) - if n == 0 { - panic("TODO: toFuncType error") - } - toVariadic(params[n-1]) - } - return &ast.FuncType{ - Params: &ast.FieldList{List: params}, - Results: &ast.FieldList{List: results}, - } -} - // ----------------------------------------------------------------------------- func toType(pkg *types.Package, typ types.Type) ast.Expr { @@ -146,6 +133,8 @@ func toType(pkg *types.Package, typ types.Type) ast.Expr { return toChanType(pkg, t) case *types.Signature: return toFuncType(pkg, t) + case *TypeParam: + return toTypeParam(pkg, t) } log.Panicln("TODO: toType -", reflect.TypeOf(typ)) return nil @@ -167,7 +156,7 @@ func toBasicType(pkg *types.Package, t *types.Basic) ast.Expr { return &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")} } if (t.Info() & types.IsUntyped) != 0 { - panic("unexpected: untyped type") + //panic("unexpected: untyped type") } return &ast.Ident{Name: t.Name()} } diff --git a/decl.go b/decl.go index 4dde0584..23653d29 100644 --- a/decl.go +++ b/decl.go @@ -663,7 +663,7 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) } } - } else if d.typeparams != nil || tp.targs != nil { + } else if d.typeparams != nil { // typeparams named type instance if typ := lookup_types(t); typ != nil { if named, ok := typ.(*types.Named); ok { @@ -978,6 +978,7 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { if funcHasTypeParams(ct) { if typ := lookup_types(t.Fun); typ != nil { it = toType(nil, typ) + s = scope is_type = false } } diff --git a/internal/gcimporter/bexport.go b/internal/gcimporter/bexport.go index ca674933..36316da7 100644 --- a/internal/gcimporter/bexport.go +++ b/internal/gcimporter/bexport.go @@ -225,10 +225,16 @@ func (p *exporter) obj(obj types.Object) { p.typ(obj.Type()) case *types.Func: - p.tag(funcTag) + sig := obj.Type().(*types.Signature) + tp := typeParamsForSig(sig) + if tp != nil { + p.tag(func2Tag) + p.paramList(typeParamsToTuple(tp), false) + } else { + p.tag(funcTag) + } p.pos(obj) p.qualifiedName(obj) - sig := obj.Type().(*types.Signature) p.paramList(sig.Params(), sig.Variadic()) p.paramList(sig.Results(), false) @@ -331,7 +337,13 @@ func (p *exporter) typ(t types.Type) { p.typIndex[t] = len(p.typIndex) } - p.tag(namedTag) + tp := typeParamsForNamed(t) + if tp != nil { + p.tag(named2Tag) + p.paramList(typeParamsToTuple(tp), false) + } else { + p.tag(namedTag) + } p.pos(t.Obj()) p.qualifiedName(t.Obj()) p.typ(t.Underlying()) diff --git a/internal/gcimporter/bimport.go b/internal/gcimporter/bimport.go index 7930fc13..0cf4d30d 100644 --- a/internal/gcimporter/bimport.go +++ b/internal/gcimporter/bimport.go @@ -951,7 +951,6 @@ const ( // Types namedTag - typeParamTag arrayTag sliceTag dddTag @@ -975,6 +974,11 @@ const ( // Type aliases aliasTag + + typeParamTag + named2Tag // has typeparams + func2Tag // has typeparams + signature2Tag // has typeparams ) var predecl []types.Type // initialized lazily diff --git a/internal/gcimporter/typeparams_go117.go b/internal/gcimporter/typeparams_go117.go index 9101a843..ed293899 100644 --- a/internal/gcimporter/typeparams_go117.go +++ b/internal/gcimporter/typeparams_go117.go @@ -18,3 +18,24 @@ type TypeParam struct{ types.Type } func (*TypeParam) Index() int { unsupported(); return 0 } func (*TypeParam) Constraint() types.Type { unsupported(); return nil } func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil } + +type TypeParamList struct{} + +func (*TypeParamList) Len() int { return 0 } +func (*TypeParamList) At(int) *TypeParam { unsupported(); return nil } + +func typeParamsForNamed(named *types.Named) *TypeParamList { + return nil +} + +func typeParamsForRecv(sig *types.Signature) *TypeParamList { + return nil +} + +func typeParamsForSig(sig *types.Signature) *TypeParamList { + return nil +} + +func typeParamsToTuple(tparams *TypeParamList) *types.Tuple { + return types.NewTuple() +} diff --git a/internal/gcimporter/typeparams_go118.go b/internal/gcimporter/typeparams_go118.go index 06f8989e..4e6bdb61 100644 --- a/internal/gcimporter/typeparams_go118.go +++ b/internal/gcimporter/typeparams_go118.go @@ -8,3 +8,30 @@ import ( ) type TypeParam = types.TypeParam +type TypeParamList = types.TypeParamList + +func typeParamsForNamed(named *types.Named) *types.TypeParamList { + return named.TypeParams() +} + +func typeParamsForRecv(sig *types.Signature) *types.TypeParamList { + return sig.RecvTypeParams() +} + +func typeParamsForSig(sig *types.Signature) *types.TypeParamList { + return sig.TypeParams() +} + +func typeParamsToTuple(tparams *types.TypeParamList) *types.Tuple { + if tparams == nil { + return types.NewTuple() + } + n := tparams.Len() + ar := make([]*types.Var, n) + for i := 0; i < n; i++ { + tp := tparams.At(i) + obj := tp.Obj() + ar[i] = types.NewVar(obj.Pos(), obj.Pkg(), obj.Name(), tp.Constraint()) + } + return types.NewTuple(ar...) +} diff --git a/package.go b/package.go index e846b020..d1230e0e 100644 --- a/package.go +++ b/package.go @@ -11,6 +11,7 @@ import ( "strings" "github.com/visualfc/gocode/internal/gcexportdata" + "golang.org/x/tools/go/types/typeutil" ) type package_parser interface { @@ -125,6 +126,91 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { } } +type types_export struct { + pkg *types.Package + pfc *package_file_cache +} + +func (p *types_export) init(pkg *types.Package, pfc *package_file_cache) { + p.pkg = pkg + p.pfc = pfc + pfc.defalias = pkg.Name() + for _, pkg := range p.pkg.Imports() { + pkgid := "!" + pkg.Path() + "!" + pkg.Name() + pfc.add_package_to_scope(pkgid, pkg.Path()) + } + pkgid := "!" + pkg.Path() + "!" + pkg.Name() + pfc.add_package_to_scope(pkgid, pkg.Path()) +} + +func (p *types_export) parse_export(callback func(pkg string, decl ast.Decl)) { + for _, pkg := range p.pkg.Imports() { + pkg_parse_export(pkg, p.pfc, callback) + } + pkg_parse_export(p.pkg, p.pfc, callback) +} + +func pkg_parse_export(pkg *types.Package, pfc *package_file_cache, callback func(pkg string, decl ast.Decl)) { + pkgid := "!" + pkg.Path() + "!" + pkg.Name() + //pfc.add_package_to_scope(pkgid, pkg.Path()) + + for _, name := range pkg.Scope().Names() { + if obj := pkg.Scope().Lookup(name); obj != nil { + if !obj.Exported() { + continue + } + name := obj.Name() + var decl ast.Decl + switch t := obj.(type) { + case *types.Const: + decl = &ast.GenDecl{ + Tok: token.CONST, + Specs: []ast.Spec{ + &ast.ValueSpec{ + Names: []*ast.Ident{ast.NewIdent(name)}, + Type: toType(pkg, t.Type()), + }, + }, + } + case *types.Var: + decl = &ast.GenDecl{ + Tok: token.VAR, + Specs: []ast.Spec{ + &ast.ValueSpec{ + Names: []*ast.Ident{ast.NewIdent(name)}, + Type: toType(pkg, t.Type()), + }, + }, + } + case *types.TypeName: + decl = &ast.GenDecl{ + Tok: token.TYPE, + Specs: []ast.Spec{toTypeSpec(pkg, t)}, + } + if named, ok := t.Type().(*types.Named); ok { + for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { + sig := sel.Type().(*types.Signature) + decl := &ast.FuncDecl{ + Recv: toRecv(pkg, sig.Recv()), + Name: ast.NewIdent(sel.Obj().Name()), + Type: toFuncType(pkg, sig), + } + callback(pkgid, decl) + } + } + case *types.Func: + sig := t.Type().(*types.Signature) + decl = &ast.FuncDecl{ + Recv: toRecv(pkg, sig.Recv()), + Name: ast.NewIdent(name), + Type: toFuncType(pkg, sig), + } + } + callback(pkgid, decl) + } + } +} + func (m *package_file_cache) process_package_types(c *auto_complete_context, pkg *types.Package) { m.scope = new_named_scope(g_universe_scope, m.name) @@ -142,6 +228,7 @@ func (m *package_file_cache) process_package_types(c *auto_complete_context, pkg pp = &p prefix := "!" + m.name + "!" + //log.Println("load pkg", pkg.Path(), pkg.Imports()) pp.parse_export(func(pkg string, decl ast.Decl) { anonymify_ast(decl, decl_foreign, m.scope) if pkg == "" || strings.HasPrefix(pkg, prefix) { diff --git a/package_bin.go b/package_bin.go index aab83bfa..996f6208 100644 --- a/package_bin.go +++ b/package_bin.go @@ -114,8 +114,7 @@ func (p *gc_bin_parser) parse_export(callback func(string, ast.Decl)) { // read version specific flags - extend as necessary switch p.version { // case 7: - // ... - // fallthrough + // fallthrough case 6, 5, 4, 3, 2, 1: p.debugFormat = p.rawStringln(p.rawByte()) == "debug" p.trackAllTypes = p.int() != 0 @@ -262,14 +261,18 @@ func (p *gc_bin_parser) obj(tag int) { }, }) - case funcTag: + case funcTag, func2Tag: + var tparams *ast.FieldList + if tag == func2Tag { + tparams = p.paramList() + } p.pos() pkg, name := p.qualifiedName() params := p.paramList() results := p.paramList() p.callback(pkg, &ast.FuncDecl{ Name: ast.NewIdent(name), - Type: &ast.FuncType{Params: params, Results: results}, + Type: newFuncType(tparams, params, results), }) default: @@ -351,16 +354,18 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { // otherwise, i is the type tag (< 0) switch i { - case namedTag, typeParamTag: + case namedTag, named2Tag, typeParamTag: + var typeParams *ast.FieldList + if i == named2Tag { + typeParams = p.paramList() + } // read type object p.pos() parent, name := p.qualifiedName() tdecl := &ast.GenDecl{ Tok: token.TYPE, Specs: []ast.Spec{ - &ast.TypeSpec{ - Name: ast.NewIdent(name), - }, + newTypeSpec(name, typeParams), }, } @@ -387,17 +392,15 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { if !exported(name) { p.pkg() } - recv := p.paramList() params := p.paramList() results := p.paramList() p.int() // go:nointerface pragma - discarded - strip_method_receiver(recv) p.callback(parent, &ast.FuncDecl{ Recv: recv, Name: ast.NewIdent(name), - Type: &ast.FuncType{Params: params, Results: results}, + Type: newFuncType(nil, params, results), }) } return t @@ -777,7 +780,6 @@ const ( // Types namedTag - typeParamTag arrayTag sliceTag dddTag @@ -801,6 +803,11 @@ const ( // Type aliases aliasTag + + typeParamTag + named2Tag // has typeparams + func2Tag // has typeparams + signature2Tag // has typeparams ) var predeclared = []ast.Expr{ diff --git a/types_go117.go b/types_go117.go index 1cc19941..e913b763 100644 --- a/types_go117.go +++ b/types_go117.go @@ -11,6 +11,69 @@ import ( pkgwalk "github.com/visualfc/gotools/types" ) +func unsupported() { + panic("type parameters are unsupported at this go version") +} + +type TypeParam struct{ types.Type } + +func (*TypeParam) String() string { unsupported(); return "" } +func (*TypeParam) Underlying() types.Type { unsupported(); return nil } +func (*TypeParam) Index() int { unsupported(); return 0 } +func (*TypeParam) Constraint() types.Type { unsupported(); return nil } +func (*TypeParam) SetConstraint(types.Type) { unsupported() } +func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil } + +// TypeParamList is a placeholder for an empty type parameter list. +type TypeParamList struct{} + +func (*TypeParamList) Len() int { return 0 } +func (*TypeParamList) At(int) *TypeParam { unsupported(); return nil } + +func newFuncType(tparams, params, results *ast.FieldList) *ast.FuncType { + return &ast.FuncType{Params: params, Results: results} +} + +func newTypeSpec(name string, tparams *ast.FieldList) *ast.TypeSpec { + return &ast.TypeSpec{ + Name: ast.NewIdent(name), + } +} + +func toTypeParam(pkg *types.Package, t *TypeParam) ast.Expr { + unsupported() + return nil +} + +func toTypeSpec(pkg *types.Package, t *types.TypeName) *ast.TypeSpec { + var assign token.Pos + if t.IsAlias() { + assign = 1 + } + typ := t.Type() + return &ast.TypeSpec{ + Name: ast.NewIdent(t.Name()), + Assign: assign, + Type: toType(pkg, typ.Underlying()), + } +} + +func toFuncType(pkg *types.Package, sig *types.Signature) *ast.FuncType { + params := toFieldList(pkg, sig.Params()) + results := toFieldList(pkg, sig.Results()) + if sig.Variadic() { + n := len(params) + if n == 0 { + panic("TODO: toFuncType error") + } + toVariadic(params[n-1]) + } + return &ast.FuncType{ + Params: &ast.FieldList{List: params}, + Results: &ast.FieldList{List: results}, + } +} + // converts type expressions like: // ast.Expr // *ast.Expr diff --git a/types_go118.go b/types_go118.go index e2044721..e57562c5 100644 --- a/types_go118.go +++ b/types_go118.go @@ -12,6 +12,88 @@ import ( pkgwalk "github.com/visualfc/gotools/types" ) +type TypeParam = types.TypeParam +type TypeParamList = types.TypeParamList + +func newFuncType(tparams, params, results *ast.FieldList) *ast.FuncType { + return &ast.FuncType{TypeParams: tparams, Params: params, Results: results} +} + +func newTypeSpec(name string, tparams *ast.FieldList) *ast.TypeSpec { + return &ast.TypeSpec{ + Name: ast.NewIdent(name), + TypeParams: tparams, + } +} + +func toTypeParam(pkg *types.Package, t *TypeParam) ast.Expr { + return toType(pkg, t.Constraint()) +} + +func ForSignature(sig *types.Signature) *TypeParamList { + return sig.TypeParams() +} + +// RecvTypeParams returns a nil slice. +func RecvTypeParams(sig *types.Signature) *TypeParamList { + return sig.RecvTypeParams() +} + +func ForNamed(named *types.Named) *TypeParamList { + return named.TypeParams() +} + +func toFieldListX(pkg *types.Package, t *types.TypeParamList) *ast.FieldList { + if t == nil { + return nil + } + n := t.Len() + flds := make([]*ast.Field, n) + for i := 0; i < n; i++ { + item := t.At(i) + names := []*ast.Ident{ast.NewIdent(item.Obj().Name())} + typ := toType(pkg, item.Constraint()) + flds[i] = &ast.Field{Names: names, Type: typ} + } + return &ast.FieldList{ + List: flds, + } +} + +func toFuncType(pkg *types.Package, sig *types.Signature) *ast.FuncType { + params := toFieldList(pkg, sig.Params()) + results := toFieldList(pkg, sig.Results()) + if sig.Variadic() { + n := len(params) + if n == 0 { + panic("TODO: toFuncType error") + } + toVariadic(params[n-1]) + } + return &ast.FuncType{ + TypeParams: toFieldListX(pkg, sig.TypeParams()), + Params: &ast.FieldList{List: params}, + Results: &ast.FieldList{List: results}, + } +} + +func toTypeSpec(pkg *types.Package, t *types.TypeName) *ast.TypeSpec { + var assign token.Pos + if t.IsAlias() { + assign = 1 + } + typ := t.Type() + ts := &ast.TypeSpec{ + Name: ast.NewIdent(t.Name()), + Assign: assign, + Type: toType(pkg, typ.Underlying()), + } + if named, ok := typ.(*types.Named); ok { + ts.TypeParams = toFieldListX(pkg, named.TypeParams()) + } + return ts +} + // converts type expressions like: // ast.Expr // *ast.Expr From 9f84f725a6d58cc591f39bc4b46b4e03ee15c714 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 30 Dec 2022 17:04:58 +0800 Subject: [PATCH 106/133] pkg import/export support types.Interface embeddeds and types.Union --- internal/gcimporter/bexport.go | 25 +++++++++++--- internal/gcimporter/bimport.go | 2 ++ internal/gcimporter/typeparams_go117.go | 34 +++++++++++++++++++ internal/gcimporter/typeparams_go118.go | 10 ++++++ package.go | 10 +++--- package_bin.go | 45 +++++++++++++++++++------ types_go117.go | 2 ++ types_go118.go | 2 ++ 8 files changed, 109 insertions(+), 21 deletions(-) diff --git a/internal/gcimporter/bexport.go b/internal/gcimporter/bexport.go index 36316da7..8ae52272 100644 --- a/internal/gcimporter/bexport.go +++ b/internal/gcimporter/bexport.go @@ -306,6 +306,9 @@ func (p *exporter) typ(t types.Type) { panic(internalError("nil type")) } + // check named.Origin + t = originType(t) + // Possible optimization: Anonymous pointer types *T where // T is a named type are common. We could canonicalize all // such types *T to a single type PT = *T. This would lead @@ -316,6 +319,7 @@ func (p *exporter) typ(t types.Type) { // this later, without encoding format change. // if we saw the type before, write its index (>= 0) + if i, ok := p.typIndex[t]; ok { p.index('T', i) return @@ -393,9 +397,16 @@ func (p *exporter) typ(t types.Type) { case *TypeParam: p.tag(typeParamTag) - p.pos(t.Obj()) - p.qualifiedName(t.Obj()) - p.typ(t.Underlying()) + p.typ(t.Constraint()) + case *Union: + p.tag(unionTag) + n := t.Len() + p.int(n) + for i := 0; i < n; i++ { + term := t.Term(i) + p.bool(term.Tilde()) + p.typ(term.Type()) + } default: panic(internalErrorf("unexpected type %T: %s", t, t)) } @@ -474,9 +485,13 @@ func (p *exporter) field(f *types.Var) { func (p *exporter) iface(t *types.Interface) { // TODO(gri): enable importer to load embedded interfaces, // then emit Embeddeds and ExplicitMethods separately here. - p.int(0) + n := t.NumEmbeddeds() + p.int(n) + for i := 0; i < n; i++ { + p.typ(t.EmbeddedType(i)) + } - n := t.NumMethods() + n = t.NumMethods() if trace && n > 0 { p.tracef("methods {>\n") defer p.tracef("<\n} ") diff --git a/internal/gcimporter/bimport.go b/internal/gcimporter/bimport.go index 0cf4d30d..cdd1da6b 100644 --- a/internal/gcimporter/bimport.go +++ b/internal/gcimporter/bimport.go @@ -976,9 +976,11 @@ const ( aliasTag typeParamTag + unionTag // types.Union named2Tag // has typeparams func2Tag // has typeparams signature2Tag // has typeparams + interface2Tag // has embeddeds ) var predecl []types.Type // initialized lazily diff --git a/internal/gcimporter/typeparams_go117.go b/internal/gcimporter/typeparams_go117.go index ed293899..48e371b9 100644 --- a/internal/gcimporter/typeparams_go117.go +++ b/internal/gcimporter/typeparams_go117.go @@ -39,3 +39,37 @@ func typeParamsForSig(sig *types.Signature) *TypeParamList { func typeParamsToTuple(tparams *TypeParamList) *types.Tuple { return types.NewTuple() } + +func originType(t types.Type) types.Type { + return t +} + +// Term holds information about a structural type restriction. +type Term struct { + tilde bool + typ types.Type +} + +func (m *Term) Tilde() bool { return m.tilde } +func (m *Term) Type() types.Type { return m.typ } +func (m *Term) String() string { + pre := "" + if m.tilde { + pre = "~" + } + return pre + m.typ.String() +} + +// NewTerm creates a new placeholder term type. +func NewTerm(tilde bool, typ types.Type) *Term { + return &Term{tilde, typ} +} + +// Union is a placeholder type, as type parameters are not supported at this Go +// version. Its methods panic on use. +type Union struct{ types.Type } + +func (*Union) String() string { unsupported(); return "" } +func (*Union) Underlying() types.Type { unsupported(); return nil } +func (*Union) Len() int { return 0 } +func (*Union) Term(i int) *Term { unsupported(); return nil } diff --git a/internal/gcimporter/typeparams_go118.go b/internal/gcimporter/typeparams_go118.go index 4e6bdb61..c167177d 100644 --- a/internal/gcimporter/typeparams_go118.go +++ b/internal/gcimporter/typeparams_go118.go @@ -35,3 +35,13 @@ func typeParamsToTuple(tparams *types.TypeParamList) *types.Tuple { } return types.NewTuple(ar...) } + +func originType(t types.Type) types.Type { + if named, ok := t.(*types.Named); ok { + t = named.Origin() + } + return t +} + +type Union = types.Union +type Term = types.Term diff --git a/package.go b/package.go index d1230e0e..1bc1aa38 100644 --- a/package.go +++ b/package.go @@ -83,11 +83,11 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { if m.mtime == -1 { return } - defer func() { - if err := recover(); err != nil { - log.Println("update_cache recover error:", err) - } - }() + // defer func() { + // if err := recover(); err != nil { + // log.Println("update_cache recover error:", err) + // } + // }() import_path := m.import_name if m.vendor_name != "" { diff --git a/package_bin.go b/package_bin.go index 996f6208..84b8f6b2 100644 --- a/package_bin.go +++ b/package_bin.go @@ -354,7 +354,7 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { // otherwise, i is the type tag (< 0) switch i { - case namedTag, named2Tag, typeParamTag: + case namedTag, named2Tag: var typeParams *ast.FieldList if i == named2Tag { typeParams = p.paramList() @@ -440,18 +440,16 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { case interfaceTag: i := p.reserveMaybe() - var embeddeds []*ast.SelectorExpr - for n := p.int(); n > 0; n-- { - p.pos() - if named, ok := p.typ(parent).(*ast.SelectorExpr); ok { - embeddeds = append(embeddeds, named) + var embeddeds []*ast.Field + n := p.int() + if n > 0 { + embeddeds = make([]*ast.Field, n) + for i := 0; i < n; i++ { + embeddeds[i] = &ast.Field{Type: p.typ(parent)} } } methods := p.methodList(parent) - for _, field := range embeddeds { - methods = append(methods, &ast.Field{Type: field}) - } - return p.recordMaybe(i, &ast.InterfaceType{Methods: &ast.FieldList{List: methods}}) + return p.recordMaybe(i, &ast.InterfaceType{Methods: &ast.FieldList{List: append(embeddeds, methods...)}}) case mapTag: i := p.reserveMaybe() @@ -474,7 +472,31 @@ func (p *gc_bin_parser) typ(parent string) ast.Expr { } elt := p.typ(parent) return p.recordMaybe(i, &ast.ChanType{Dir: dir, Value: elt}) - + case typeParamTag: + i := p.reserveMaybe() + t0 := p.typ(parent) + return p.recordMaybe(i, t0) + case unionTag: + i := p.reserveMaybe() + n := p.int() + var expr ast.Expr + for i := 0; i < n; i++ { + title := p.int() != 0 + t0 := p.typ(parent) + if title { + t0 = &ast.UnaryExpr{Op: TILDE, X: t0} + } + if i == 0 { + expr = t0 + } else { + expr = &ast.BinaryExpr{ + X: expr, + Op: token.OR, + Y: t0, + } + } + } + return p.recordMaybe(i, expr) default: panic(fmt.Sprintf("unexpected type tag %d", i)) } @@ -805,6 +827,7 @@ const ( aliasTag typeParamTag + unionTag // types.Union named2Tag // has typeparams func2Tag // has typeparams signature2Tag // has typeparams diff --git a/types_go117.go b/types_go117.go index e913b763..68d9e4e3 100644 --- a/types_go117.go +++ b/types_go117.go @@ -15,6 +15,8 @@ func unsupported() { panic("type parameters are unsupported at this go version") } +var TILDE = token.VAR + 3 + type TypeParam struct{ types.Type } func (*TypeParam) String() string { unsupported(); return "" } diff --git a/types_go118.go b/types_go118.go index e57562c5..9088e572 100644 --- a/types_go118.go +++ b/types_go118.go @@ -15,6 +15,8 @@ import ( type TypeParam = types.TypeParam type TypeParamList = types.TypeParamList +var TILDE = token.TILDE + func newFuncType(tparams, params, results *ast.FieldList) *ast.FuncType { return &ast.FuncType{TypeParams: tparams, Params: params, Results: results} } From da7a59e9fcb36f8d0df53064a890f27bcd384360 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 30 Dec 2022 20:17:46 +0800 Subject: [PATCH 107/133] type_to_decl: check TypeParam --- decl.go | 6 +++++- types_go118.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/decl.go b/decl.go index 23653d29..85720a11 100644 --- a/decl.go +++ b/decl.go @@ -658,9 +658,13 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { if d == nil { // typeparams targs struct type: Typ[struct{...}] if typ := lookup_types(t); typ != nil { - if _, ok := typ.(*types.Struct); ok { + switch st := typ.(type) { + case *types.Struct: dt := toType(nil, typ) d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) + case *TypeParam: + dt := toType(nil, st.Constraint().Underlying()) + d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) } } } else if d.typeparams != nil { diff --git a/types_go118.go b/types_go118.go index 9088e572..38aaebab 100644 --- a/types_go118.go +++ b/types_go118.go @@ -29,7 +29,7 @@ func newTypeSpec(name string, tparams *ast.FieldList) *ast.TypeSpec { } func toTypeParam(pkg *types.Package, t *TypeParam) ast.Expr { - return toType(pkg, t.Constraint()) + return toObjectExpr(pkg, t.Obj()) } func ForSignature(sig *types.Signature) *TypeParamList { From ec53e8237255fd47eecbf3ffa10b8833ae815875 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 31 Dec 2022 09:53:01 +0800 Subject: [PATCH 108/133] advance_type_to_decl --- decl.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/decl.go b/decl.go index 85720a11..5971a3ed 100644 --- a/decl.go +++ b/decl.go @@ -691,6 +691,20 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { return d } +func advance_type_to_decl(t ast.Expr, scope *scope) *decl { + if t == nil { + //TODO + return nil + } + tp := get_type_path(t) + d := lookup_path(tp, scope) + if d != nil && d.class == decl_var { + // weird variable declaration pointing to itself + return nil + } + return d +} + func expr_to_decl(e ast.Expr, scope *scope) *decl { t, scope, _ := infer_type(e, scope, -1) return type_to_decl(t, scope) @@ -707,7 +721,7 @@ func advance_to_type(pred type_predicate, v ast.Expr, scope *scope) (ast.Expr, * return v, scope } - decl := type_to_decl(v, scope) + decl := advance_type_to_decl(v, scope) if decl == nil { return nil, nil } From a1a823864996fc2baf72828b9fbbfcb24aaeb88d Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 1 Jan 2023 21:05:56 +0800 Subject: [PATCH 109/133] process_field_list_typeparams --- autocompletefile.go | 41 ++++++++++++++++++++++++++++++ decl.go | 61 +++++++++++++++++++++++++++++++++++---------- types_go117.go | 4 +++ types_go118.go | 4 +++ 4 files changed, 97 insertions(+), 13 deletions(-) diff --git a/autocompletefile.go b/autocompletefile.go index 889c1372..d0275247 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -6,7 +6,10 @@ import ( "go/parser" "go/scanner" "go/token" + "go/types" "log" + + "golang.org/x/tools/go/types/typeutil" ) func parse_decl_list(fset *token.FileSet, data []byte) ([]ast.Decl, error) { @@ -131,6 +134,7 @@ func (f *auto_complete_file) process_decl_locals(decl ast.Decl) { s := f.scope f.scope = new_scope(f.scope) + f.process_field_list_typeparams(ForFuncType(t.Type), s) f.process_field_list(t.Recv, s) f.process_field_list(t.Type.Params, s) f.process_field_list(t.Type.Results, s) @@ -400,6 +404,43 @@ func (f *auto_complete_file) process_field_list(field_list *ast.FieldList, s *sc } } +func (f *auto_complete_file) process_field_list_typeparams(field_list *ast.FieldList, s *scope) { + if field_list == nil { + return + } + for _, tp := range field_list.List { + for _, name := range tp.Names { + if typ := g_daemon.autocomplete.lookup_types(tp.Type); typ != nil { + switch st := typ.(type) { + case *TypeParam: + dt := toType(nil, st.Constraint().Underlying()) + d := new_decl_full(name.Name, decl_type, 0, dt, nil, -1, s) + s.add_named_decl(d) + case *types.Named: + named := st + pkg := named.Obj().Pkg() + dt := toType(pkg, typ.Underlying()) + d := new_decl_full(name.Name, decl_type, 0, dt, nil, -1, s) + // add methods + for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { + ft := toType(pkg, sel.Type()) + method := sel.Obj().Name() + d.add_child(new_decl_full(method, decl_func, 0, ft, nil, -1, s)) + } + s.add_named_decl(d) + default: + dt := toType(nil, typ) + d := new_decl_full(name.Name, decl_type, 0, dt, nil, -1, s) + s.add_named_decl(d) + } + } else { + d := new_decl_full(name.Name, decl_type, 0, tp.Type, nil, -1, s) + s.add_named_decl(d) + } + } + } +} + func (f *auto_complete_file) cursor_in_if_head(s *ast.IfStmt) bool { if f.cursor > f.offset(s.If) && f.cursor <= f.offset(s.Body.Lbrace) { return true diff --git a/decl.go b/decl.go index 5971a3ed..1ca56e08 100644 --- a/decl.go +++ b/decl.go @@ -584,6 +584,37 @@ func instance_decl(d *decl, typ ast.Expr, targs []ast.Expr) *decl { return new_decl_full(d.name, d.class, d.flags, typ, d.value, d.value_index, d.scope) } +func (c *auto_complete_context) lookup_types(t ast.Expr) types.Type { + conf := c.typesConf + + if typ := lookup_types_expr(t, conf.Info); typ != nil { + return typ + } + if conf.XInfo != nil { + if typ := lookup_types_expr(t, conf.XInfo); typ != nil { + return typ + } + } + return nil +} + +func (c *auto_complete_context) lookup_ident(t ast.Expr) types.Type { + conf := c.typesConf + pos := token.Pos(c.typesCursor) + + if ident, ok := t.(*ast.Ident); ok { + if typ := lookup_types_ident(ident, pos, conf.Info); typ != nil { + return typ + } + if conf.XInfo != nil { + if typ := lookup_types_ident(ident, pos, conf.XInfo); typ != nil { + return typ + } + } + } + return nil +} + func lookup_types(t ast.Expr) types.Type { conf := g_daemon.autocomplete.typesConf pos := token.Pos(g_daemon.autocomplete.typesCursor) @@ -655,25 +686,29 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } tp := get_type_path(t) d := lookup_path(tp, scope) + if d == nil { - // typeparams targs struct type: Typ[struct{...}] - if typ := lookup_types(t); typ != nil { - switch st := typ.(type) { - case *types.Struct: - dt := toType(nil, typ) - d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) - case *TypeParam: - dt := toType(nil, st.Constraint().Underlying()) - d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) - } + if st, ok := t.(*ast.StructType); ok { + d = new_decl_full(types.ExprString(t), decl_type, 0, st, nil, -1, scope) } + // typeparams targs struct type: Typ[struct{...}] + // if typ := g_daemon.autocomplete.lookup_types(t); typ != nil { + // switch st := typ.(type) { + // case *types.Struct: + // dt := toType(nil, typ) + // d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) + // case *TypeParam: + // dt := toType(nil, st.Constraint().Underlying()) + // d = new_decl_full(typ.String(), decl_type, 0, dt, nil, -1, scope) + // } + // } } else if d.typeparams != nil { // typeparams named type instance - if typ := lookup_types(t); typ != nil { + if typ := g_daemon.autocomplete.lookup_types(t); typ != nil { if named, ok := typ.(*types.Named); ok { pkg := named.Obj().Pkg() dt := toType(pkg, typ.Underlying()) - d = new_decl_full(named.Obj().Name(), decl_type, 0, dt, nil, -1, scope) + d = new_decl_full(types.ExprString(t), decl_type, 0, dt, nil, -1, scope) // add methods for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { ft := toType(pkg, sel.Type()) @@ -994,7 +1029,7 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { } else if ct, ok := it.(*ast.FuncType); ok { // ast.FuncType.TypeParams != nil if funcHasTypeParams(ct) { - if typ := lookup_types(t.Fun); typ != nil { + if typ := g_daemon.autocomplete.lookup_types(t.Fun); typ != nil { it = toType(nil, typ) s = scope is_type = false diff --git a/types_go117.go b/types_go117.go index 68d9e4e3..616378ae 100644 --- a/types_go117.go +++ b/types_go117.go @@ -76,6 +76,10 @@ func toFuncType(pkg *types.Package, sig *types.Signature) *ast.FuncType { } } +func ForFuncType(typ *ast.FuncType) *ast.FieldList { + return nil +} + // converts type expressions like: // ast.Expr // *ast.Expr diff --git a/types_go118.go b/types_go118.go index 38aaebab..79993857 100644 --- a/types_go118.go +++ b/types_go118.go @@ -36,6 +36,10 @@ func ForSignature(sig *types.Signature) *TypeParamList { return sig.TypeParams() } +func ForFuncType(typ *ast.FuncType) *ast.FieldList { + return typ.TypeParams +} + // RecvTypeParams returns a nil slice. func RecvTypeParams(sig *types.Signature) *TypeParamList { return sig.RecvTypeParams() From fd1f0967de9cd4afc17b9772efcaa3c865c3cef0 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 1 Jan 2023 22:29:45 +0800 Subject: [PATCH 110/133] apropos lookup ident --- autocompletecontext.go | 30 +++++++++++++++++++++++++----- decl.go | 3 ++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/autocompletecontext.go b/autocompletecontext.go index 22622d00..64bddc50 100644 --- a/autocompletecontext.go +++ b/autocompletecontext.go @@ -18,6 +18,7 @@ import ( "github.com/visualfc/gotools/pkgs" pkgwalk "github.com/visualfc/gotools/types" + "golang.org/x/tools/go/types/typeutil" ) //------------------------------------------------------------------------- @@ -477,13 +478,32 @@ func (c *auto_complete_context) apropos(file []byte, filename string, cursor int } if !ok { var d *decl - if ident, ok := cc.expr.(*ast.Ident); ok && g_config.UnimportedPackages { - p := c.resolveKnownPackageIdent(ident.Name, c.current.name, c.current.context) - if p != nil { - c.pcache[p.name] = p - d = p.main + // lookup types + if ident, ok := cc.expr.(*ast.Ident); ok { + if g_config.UnimportedPackages { + p := c.resolveKnownPackageIdent(ident.Name, c.current.name, c.current.context) + if p != nil { + c.pcache[p.name] = p + d = p.main + } + } + if d == nil { + if typ := g_daemon.autocomplete.lookup_ident(ident); typ != nil { + if named, ok := typ.(*types.Named); ok { + pkg := named.Obj().Pkg() + dt := toType(pkg, typ.Underlying()) + d = new_decl_full(ident.Name, decl_type, 0, dt, nil, -1, nil) + // add methods + for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { + ft := toType(pkg, sel.Type()) + method := sel.Obj().Name() + d.add_child(new_decl_full(method, decl_func, 0, ft, nil, -1, nil)) + } + } + } } } + if d == nil { return nil, 0 } diff --git a/decl.go b/decl.go index 1ca56e08..8864372b 100644 --- a/decl.go +++ b/decl.go @@ -7,6 +7,7 @@ import ( "go/token" "go/types" "io" + "log" "reflect" "strings" "sync" @@ -686,7 +687,7 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } tp := get_type_path(t) d := lookup_path(tp, scope) - + log.Println("=======", t, d) if d == nil { if st, ok := t.(*ast.StructType); ok { d = new_decl_full(types.ExprString(t), decl_type, 0, st, nil, -1, scope) From 80ab3ed0f66bf7f43a2924d7b10b1935b3d537b9 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 14 Jan 2023 10:44:37 +0800 Subject: [PATCH 111/133] gomod v0.1.2 --- go.mod | 1 + go.sum | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 9cb8b632..cdde3620 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/visualfc/gocode go 1.13 require ( + github.com/visualfc/gomod v0.1.2 // indirect github.com/visualfc/gotools v1.3.10 golang.org/x/tools v0.3.0 ) diff --git a/go.sum b/go.sum index 16f6df5e..81505c26 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/visualfc/gomod v0.1.1 h1:17IpmvYEWjH+owa+J9gZPG0lFXL9f5wIBDGF0q3ut8g= github.com/visualfc/gomod v0.1.1/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= +github.com/visualfc/gomod v0.1.2 h1:7qfPmifcA8r/0ZTpTPZQqsm5aJUiQ/EeyHEENPyywDg= +github.com/visualfc/gomod v0.1.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= github.com/visualfc/gotools v1.3.10 h1:dSPxoCAXZ6iSYRGsx74xsCqGNthiZAbuPXwxfeJ3Rv4= github.com/visualfc/gotools v1.3.10/go.mod h1:CXKhMSUJoq9VN5wEoniBZ82fO6qtRoDZIoN1NdGhJNM= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= From bd4e5df9556b7c962f669d2fa902c8556f55f76a Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 15 Jan 2023 08:15:05 +0800 Subject: [PATCH 112/133] x --- _testing/test.0059/out.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_testing/test.0059/out.expected b/_testing/test.0059/out.expected index 3bf8bfb2..abfde3a3 100644 --- a/_testing/test.0059/out.expected +++ b/_testing/test.0059/out.expected @@ -1,2 +1,2 @@ Found 1 candidates: - func NewReader(r io.Reader) io.Reader + func NewReader(r myio.Reader) myio.Reader From d48c6604071345a2096ae3876261c6d9a8622f8c Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 15 Jan 2023 08:50:02 +0800 Subject: [PATCH 113/133] unsafe for go1.16/go1.17/go1.20 --- _testing/test.0025/out.expected | 8 ++++---- package.go | 13 ------------- unsafe_go116.go | 15 +++++++++++++++ unsafe_go117.go | 17 +++++++++++++++++ unsafe_go120.go | 20 ++++++++++++++++++++ 5 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 unsafe_go116.go create mode 100644 unsafe_go117.go create mode 100644 unsafe_go120.go diff --git a/_testing/test.0025/out.expected b/_testing/test.0025/out.expected index bc27d868..f19058aa 100644 --- a/_testing/test.0025/out.expected +++ b/_testing/test.0025/out.expected @@ -1,7 +1,7 @@ Found 6 candidates: func Add(ptr Pointer, len IntegerType) Pointer - func Alignof(any) uintptr - func Offsetof(any) uintptr - func Sizeof(any) uintptr + func Alignof(x ArbitraryType) uintptr + func Offsetof(x ArbitraryType) uintptr + func Sizeof(x ArbitraryType) uintptr func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType - type Pointer uintptr + type Pointer *ArbitraryType diff --git a/package.go b/package.go index 1bc1aa38..72b0f247 100644 --- a/package.go +++ b/package.go @@ -435,19 +435,6 @@ func (c package_cache) append_packages(ps map[string]*package_file_cache, pkgs [ } } -var g_builtin_unsafe_package = []byte(` -import -$$ -package unsafe - type @"".Pointer uintptr - func @"".Offsetof (? any) uintptr - func @"".Sizeof (? any) uintptr - func @"".Alignof (? any) uintptr - func @"".Add(ptr Pointer, len IntegerType) Pointer - func @"".Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType -$$ -`) - func (c package_cache) add_builtin_unsafe_package() { pkg := new_package_file_cache_forever("unsafe", "unsafe") pkg.process_package_data(nil, g_builtin_unsafe_package, false) diff --git a/unsafe_go116.go b/unsafe_go116.go new file mode 100644 index 00000000..b1187167 --- /dev/null +++ b/unsafe_go116.go @@ -0,0 +1,15 @@ +//go:build !go1.17 +// +build !go1.17 + +package main + +var g_builtin_unsafe_package = []byte(` +import +$$ +package unsafe + func @"".Alignof(x ArbitraryType) uintptr + func @"".Offsetof(x ArbitraryType) uintptr + func @"".Sizeof(x ArbitraryType) uintptr + type @"".Pointer *ArbitraryType +$$ +`) diff --git a/unsafe_go117.go b/unsafe_go117.go new file mode 100644 index 00000000..00ece5ca --- /dev/null +++ b/unsafe_go117.go @@ -0,0 +1,17 @@ +//go:build go1.17 && !go1.20 +// +build go1.17,!go1.20 + +package main + +var g_builtin_unsafe_package = []byte(` +import +$$ +package unsafe + func @"".Alignof(x ArbitraryType) uintptr + func @"".Offsetof(x ArbitraryType) uintptr + func @"".Sizeof(x ArbitraryType) uintptr + type @"".Pointer *ArbitraryType + func @"".Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType + func @"".Add(ptr Pointer, len IntegerType) Pointer +$$ +`) diff --git a/unsafe_go120.go b/unsafe_go120.go new file mode 100644 index 00000000..492317f8 --- /dev/null +++ b/unsafe_go120.go @@ -0,0 +1,20 @@ +//go:build go1.20 +// +build go1.20 + +package main + +var g_builtin_unsafe_package = []byte(` +import +$$ +package unsafe + func @"".Alignof(x ArbitraryType) uintptr + func @"".Offsetof(x ArbitraryType) uintptr + func @"".Sizeof(x ArbitraryType) uintptr + type @"".Pointer *ArbitraryType + func @"".Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType + func @"".SliceData(slice []ArbitraryType) *ArbitraryType + func @"".Add(ptr Pointer, len IntegerType) Pointer + func @"".String(ptr *byte, len IntegerType) string + func @"".StringData(str string) *byte +$$ +`) From fd17df0a0e904261e1922dc0b4614ab7d2926090 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 15 Jan 2023 08:53:29 +0800 Subject: [PATCH 114/133] workflows --- .github/workflows/go.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..34fb2454 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,26 @@ +name: gocode + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + Test: + strategy: + matrix: + go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x] + os: [ubuntu-latest, windows-latest, macos-11] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Build + run: go build -v + From 7e10d8ae004ff15f0df0b03fa47deb4723a507d8 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 15 Jan 2023 09:01:48 +0800 Subject: [PATCH 115/133] doc --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72119f55..40dd77c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ## An autocompletion daemon for the Go programming language -Now support Go1.11 Go modules. +- support Go1.11 Go modules. +- support Go1.18 generics. Gocode is a helper tool which is intended to be integrated with your source code editor, like vim, neovim and emacs. It provides several advanced capabilities, which currently includes: From 28f3d1a6826e01b458a08f02e1bcd4425359afd1 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 15 Jan 2023 09:11:57 +0800 Subject: [PATCH 116/133] doc --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40dd77c5..058b9ec5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,35 @@ -## An autocompletion daemon for the Go programming language +LiteIDE Gocode Tools +========= + +### LiteIDE + +_LiteIDE is a simple, open source, cross-platform Go IDE._ + +### Gocode +_Gocode is a golang code autocomplete support for LiteIDE._ + - support Go1.11 Go modules. - support Go1.18 generics. +``` +go install github.com/visualfc/gocode@latest + +Windows/Linux: copy GOPATH/bin gocode to liteide/bin +MacOS: copy GOPATH/bin gocode to LiteIDE.app/Contents/MacOS +``` + +### Website +* LiteIDE Source code + +* Gocode Source code + + + +*** + +## An autocompletion daemon for the Go programming language + Gocode is a helper tool which is intended to be integrated with your source code editor, like vim, neovim and emacs. It provides several advanced capabilities, which currently includes: - Context-sensitive autocompletion From 12ce183274b69b4d4246aeff90103aeffb3194ef Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 16 Jan 2023 19:50:10 +0800 Subject: [PATCH 117/133] gotools v1.4.0 --- go.mod | 5 ++--- go.sum | 29 +++++++++-------------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index cdde3620..58429b22 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gomod v0.1.2 // indirect - github.com/visualfc/gotools v1.3.10 - golang.org/x/tools v0.3.0 + github.com/visualfc/gotools v1.4.0 + golang.org/x/tools v0.5.0 ) diff --git a/go.sum b/go.sum index 81505c26..fa0110ce 100644 --- a/go.sum +++ b/go.sum @@ -1,52 +1,41 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/visualfc/gomod v0.1.1/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= github.com/visualfc/gomod v0.1.2 h1:7qfPmifcA8r/0ZTpTPZQqsm5aJUiQ/EeyHEENPyywDg= github.com/visualfc/gomod v0.1.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.3.10 h1:dSPxoCAXZ6iSYRGsx74xsCqGNthiZAbuPXwxfeJ3Rv4= -github.com/visualfc/gotools v1.3.10/go.mod h1:CXKhMSUJoq9VN5wEoniBZ82fO6qtRoDZIoN1NdGhJNM= +github.com/visualfc/gotools v1.4.0 h1:FCAIfzMBFFvaCzDCGVoxMYUYNMC1SaU7WpIXGx47GfY= +github.com/visualfc/gotools v1.4.0/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From e9187f51e85a4ca44de5ee5b73e457ac77fb0a4c Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 09:27:05 +0800 Subject: [PATCH 118/133] fix type_to_decl types.Pointer --- decl.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/decl.go b/decl.go index 8864372b..8ce6085c 100644 --- a/decl.go +++ b/decl.go @@ -7,7 +7,6 @@ import ( "go/token" "go/types" "io" - "log" "reflect" "strings" "sync" @@ -687,7 +686,6 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } tp := get_type_path(t) d := lookup_path(tp, scope) - log.Println("=======", t, d) if d == nil { if st, ok := t.(*ast.StructType); ok { d = new_decl_full(types.ExprString(t), decl_type, 0, st, nil, -1, scope) @@ -706,6 +704,9 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { } else if d.typeparams != nil { // typeparams named type instance if typ := g_daemon.autocomplete.lookup_types(t); typ != nil { + if t, ok := typ.(*types.Pointer); ok { + typ = t.Elem() + } if named, ok := typ.(*types.Named); ok { pkg := named.Obj().Pkg() dt := toType(pkg, typ.Underlying()) From 84bd5ce506ccb8334bc022e4c83307f2929893d5 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 09:42:58 +0800 Subject: [PATCH 119/133] type_to_decl: fix startexpr --- decl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/decl.go b/decl.go index 8ce6085c..236ac668 100644 --- a/decl.go +++ b/decl.go @@ -703,10 +703,10 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { // } } else if d.typeparams != nil { // typeparams named type instance + if x, ok := t.(*ast.StarExpr); ok { + t = x.X + } if typ := g_daemon.autocomplete.lookup_types(t); typ != nil { - if t, ok := typ.(*types.Pointer); ok { - typ = t.Elem() - } if named, ok := typ.(*types.Named); ok { pkg := named.Obj().Pkg() dt := toType(pkg, typ.Underlying()) From 2dd9080341dee89e71f891db017c0d93e04ce87b Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 11:19:34 +0800 Subject: [PATCH 120/133] lookup_types_expr: check instance sig result --- decl.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/decl.go b/decl.go index 236ac668..01b1a597 100644 --- a/decl.go +++ b/decl.go @@ -676,6 +676,20 @@ func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { return v.Type } } + for _, v := range info.Instances { + if sig, ok := v.Type.(*types.Signature); ok { + for i := 0; i < sig.Results().Len(); i++ { + typ := sig.Results().At(i).Type() + if star, ok := typ.(*types.Pointer); ok { + typ = star.Elem() + } + expr := toType(nil, typ) + if types.ExprString(expr) == text { + return typ + } + } + } + } return nil } From fd2e86c6e9240218e407cf2945e77bfbbb858999 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 11:25:15 +0800 Subject: [PATCH 121/133] lookup_types_instance_sig --- decl.go | 16 +--------------- types_go117.go | 4 ++++ types_go118.go | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/decl.go b/decl.go index 01b1a597..8fd604a4 100644 --- a/decl.go +++ b/decl.go @@ -676,21 +676,7 @@ func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { return v.Type } } - for _, v := range info.Instances { - if sig, ok := v.Type.(*types.Signature); ok { - for i := 0; i < sig.Results().Len(); i++ { - typ := sig.Results().At(i).Type() - if star, ok := typ.(*types.Pointer); ok { - typ = star.Elem() - } - expr := toType(nil, typ) - if types.ExprString(expr) == text { - return typ - } - } - } - } - return nil + return lookup_types_instance_sig(text, info) } func type_to_decl(t ast.Expr, scope *scope) *decl { diff --git a/types_go117.go b/types_go117.go index 616378ae..0fc9d268 100644 --- a/types_go117.go +++ b/types_go117.go @@ -144,3 +144,7 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { } return conf } + +func lookup_types_instance_sig(text string, info *types.Info) types.Type { + return nil +} diff --git a/types_go118.go b/types_go118.go index 79993857..2901a6f8 100644 --- a/types_go118.go +++ b/types_go118.go @@ -229,3 +229,21 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { } return conf } + +func lookup_types_instance_sig(text string, info *types.Info) types.Type { + for _, v := range info.Instances { + if sig, ok := v.Type.(*types.Signature); ok { + for i := 0; i < sig.Results().Len(); i++ { + typ := sig.Results().At(i).Type() + if star, ok := typ.(*types.Pointer); ok { + typ = star.Elem() + } + expr := toType(nil, typ) + if types.ExprString(expr) == text { + return typ + } + } + } + } + return nil +} From ba7e230a821304b1f925fda1986bed52a7e48baa Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 11:40:52 +0800 Subject: [PATCH 122/133] pretty_print_type_expr check ast.IndexExpr/ast.IndexListExpr --- decl.go | 97 ------------------------------------------ types_go117.go | 100 +++++++++++++++++++++++++++++++++++++++++++ types_go118.go | 113 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+), 97 deletions(-) diff --git a/decl.go b/decl.go index 8fd604a4..f70389b1 100644 --- a/decl.go +++ b/decl.go @@ -1,7 +1,6 @@ package main import ( - "bytes" "fmt" "go/ast" "go/token" @@ -1289,102 +1288,6 @@ func get_array_len(e ast.Expr) string { return "" } -func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { - switch t := e.(type) { - case *ast.StarExpr: - fmt.Fprintf(out, "*") - pretty_print_type_expr(out, t.X, canonical_aliases) - case *ast.Ident: - if strings.HasPrefix(t.Name, "$") { - // beautify anonymous types - switch t.Name[1] { - case 's': - fmt.Fprintf(out, "struct") - case 'i': - // ok, in most cases anonymous interface is an - // empty interface, I'll just pretend that - // it's always true - fmt.Fprintf(out, "interface{}") - } - } else if !*g_debug && strings.HasPrefix(t.Name, "!") { - // these are full package names for disambiguating and pretty - // printing packages within packages, e.g. - // !go/ast!ast vs. !github.com/nsf/my/ast!ast - // another ugly hack, if people are punished in hell for ugly hacks - // I'm screwed... - emarkIdx := strings.LastIndex(t.Name, "!") - path := t.Name[1:emarkIdx] - alias := canonical_aliases[path] - if alias == "" { - alias = t.Name[emarkIdx+1:] - } - fmt.Fprintf(out, alias) - } else { - fmt.Fprintf(out, t.Name) - } - case *ast.ArrayType: - al := "" - if t.Len != nil { - al = get_array_len(t.Len) - } - if al != "" { - fmt.Fprintf(out, "[%s]", al) - } else { - fmt.Fprintf(out, "[]") - } - pretty_print_type_expr(out, t.Elt, canonical_aliases) - case *ast.SelectorExpr: - pretty_print_type_expr(out, t.X, canonical_aliases) - fmt.Fprintf(out, ".%s", t.Sel.Name) - case *ast.FuncType: - fmt.Fprintf(out, "func(") - pretty_print_func_field_list(out, t.Params, canonical_aliases) - fmt.Fprintf(out, ")") - - buf := bytes.NewBuffer(make([]byte, 0, 256)) - nresults := pretty_print_func_field_list(buf, t.Results, canonical_aliases) - if nresults > 0 { - results := buf.String() - if strings.IndexAny(results, ", ") != -1 { - results = "(" + results + ")" - } - fmt.Fprintf(out, " %s", results) - } - case *ast.MapType: - fmt.Fprintf(out, "map[") - pretty_print_type_expr(out, t.Key, canonical_aliases) - fmt.Fprintf(out, "]") - pretty_print_type_expr(out, t.Value, canonical_aliases) - case *ast.InterfaceType: - fmt.Fprintf(out, "interface{}") - case *ast.Ellipsis: - fmt.Fprintf(out, "...") - pretty_print_type_expr(out, t.Elt, canonical_aliases) - case *ast.StructType: - fmt.Fprintf(out, "struct") - case *ast.ChanType: - switch t.Dir { - case ast.RECV: - fmt.Fprintf(out, "<-chan ") - case ast.SEND: - fmt.Fprintf(out, "chan<- ") - case ast.SEND | ast.RECV: - fmt.Fprintf(out, "chan ") - } - pretty_print_type_expr(out, t.Value, canonical_aliases) - case *ast.ParenExpr: - fmt.Fprintf(out, "(") - pretty_print_type_expr(out, t.X, canonical_aliases) - fmt.Fprintf(out, ")") - case *ast.BadExpr: - // TODO: probably I should check that in a separate function - // and simply discard declarations with BadExpr as a part of their - // type - default: - // the element has some weird type, just ignore it - } -} - func pretty_print_func_field_list(out io.Writer, f *ast.FieldList, canonical_aliases map[string]string) int { count := 0 if f == nil { diff --git a/types_go117.go b/types_go117.go index 0fc9d268..2ee62fce 100644 --- a/types_go117.go +++ b/types_go117.go @@ -4,9 +4,13 @@ package main import ( + "bytes" + "fmt" "go/ast" "go/token" "go/types" + "io" + "strings" pkgwalk "github.com/visualfc/gotools/types" ) @@ -148,3 +152,99 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { func lookup_types_instance_sig(text string, info *types.Info) types.Type { return nil } + +func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { + switch t := e.(type) { + case *ast.StarExpr: + fmt.Fprintf(out, "*") + pretty_print_type_expr(out, t.X, canonical_aliases) + case *ast.Ident: + if strings.HasPrefix(t.Name, "$") { + // beautify anonymous types + switch t.Name[1] { + case 's': + fmt.Fprintf(out, "struct") + case 'i': + // ok, in most cases anonymous interface is an + // empty interface, I'll just pretend that + // it's always true + fmt.Fprintf(out, "interface{}") + } + } else if !*g_debug && strings.HasPrefix(t.Name, "!") { + // these are full package names for disambiguating and pretty + // printing packages within packages, e.g. + // !go/ast!ast vs. !github.com/nsf/my/ast!ast + // another ugly hack, if people are punished in hell for ugly hacks + // I'm screwed... + emarkIdx := strings.LastIndex(t.Name, "!") + path := t.Name[1:emarkIdx] + alias := canonical_aliases[path] + if alias == "" { + alias = t.Name[emarkIdx+1:] + } + fmt.Fprintf(out, alias) + } else { + fmt.Fprintf(out, t.Name) + } + case *ast.ArrayType: + al := "" + if t.Len != nil { + al = get_array_len(t.Len) + } + if al != "" { + fmt.Fprintf(out, "[%s]", al) + } else { + fmt.Fprintf(out, "[]") + } + pretty_print_type_expr(out, t.Elt, canonical_aliases) + case *ast.SelectorExpr: + pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, ".%s", t.Sel.Name) + case *ast.FuncType: + fmt.Fprintf(out, "func(") + pretty_print_func_field_list(out, t.Params, canonical_aliases) + fmt.Fprintf(out, ")") + + buf := bytes.NewBuffer(make([]byte, 0, 256)) + nresults := pretty_print_func_field_list(buf, t.Results, canonical_aliases) + if nresults > 0 { + results := buf.String() + if strings.IndexAny(results, ", ") != -1 { + results = "(" + results + ")" + } + fmt.Fprintf(out, " %s", results) + } + case *ast.MapType: + fmt.Fprintf(out, "map[") + pretty_print_type_expr(out, t.Key, canonical_aliases) + fmt.Fprintf(out, "]") + pretty_print_type_expr(out, t.Value, canonical_aliases) + case *ast.InterfaceType: + fmt.Fprintf(out, "interface{}") + case *ast.Ellipsis: + fmt.Fprintf(out, "...") + pretty_print_type_expr(out, t.Elt, canonical_aliases) + case *ast.StructType: + fmt.Fprintf(out, "struct") + case *ast.ChanType: + switch t.Dir { + case ast.RECV: + fmt.Fprintf(out, "<-chan ") + case ast.SEND: + fmt.Fprintf(out, "chan<- ") + case ast.SEND | ast.RECV: + fmt.Fprintf(out, "chan ") + } + pretty_print_type_expr(out, t.Value, canonical_aliases) + case *ast.ParenExpr: + fmt.Fprintf(out, "(") + pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, ")") + case *ast.BadExpr: + // TODO: probably I should check that in a separate function + // and simply discard declarations with BadExpr as a part of their + // type + default: + // the element has some weird type, just ignore it + } +} diff --git a/types_go118.go b/types_go118.go index 2901a6f8..10e6d1d7 100644 --- a/types_go118.go +++ b/types_go118.go @@ -4,10 +4,14 @@ package main import ( + "bytes" + "fmt" "go/ast" "go/token" "go/types" + "io" "sort" + "strings" pkgwalk "github.com/visualfc/gotools/types" ) @@ -247,3 +251,112 @@ func lookup_types_instance_sig(text string, info *types.Info) types.Type { } return nil } + +func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { + switch t := e.(type) { + case *ast.StarExpr: + fmt.Fprintf(out, "*") + pretty_print_type_expr(out, t.X, canonical_aliases) + case *ast.Ident: + if strings.HasPrefix(t.Name, "$") { + // beautify anonymous types + switch t.Name[1] { + case 's': + fmt.Fprintf(out, "struct") + case 'i': + // ok, in most cases anonymous interface is an + // empty interface, I'll just pretend that + // it's always true + fmt.Fprintf(out, "interface{}") + } + } else if !*g_debug && strings.HasPrefix(t.Name, "!") { + // these are full package names for disambiguating and pretty + // printing packages within packages, e.g. + // !go/ast!ast vs. !github.com/nsf/my/ast!ast + // another ugly hack, if people are punished in hell for ugly hacks + // I'm screwed... + emarkIdx := strings.LastIndex(t.Name, "!") + path := t.Name[1:emarkIdx] + alias := canonical_aliases[path] + if alias == "" { + alias = t.Name[emarkIdx+1:] + } + fmt.Fprintf(out, alias) + } else { + fmt.Fprintf(out, t.Name) + } + case *ast.ArrayType: + al := "" + if t.Len != nil { + al = get_array_len(t.Len) + } + if al != "" { + fmt.Fprintf(out, "[%s]", al) + } else { + fmt.Fprintf(out, "[]") + } + pretty_print_type_expr(out, t.Elt, canonical_aliases) + case *ast.SelectorExpr: + pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, ".%s", t.Sel.Name) + case *ast.FuncType: + fmt.Fprintf(out, "func(") + pretty_print_func_field_list(out, t.Params, canonical_aliases) + fmt.Fprintf(out, ")") + + buf := bytes.NewBuffer(make([]byte, 0, 256)) + nresults := pretty_print_func_field_list(buf, t.Results, canonical_aliases) + if nresults > 0 { + results := buf.String() + if strings.IndexAny(results, ", ") != -1 { + results = "(" + results + ")" + } + fmt.Fprintf(out, " %s", results) + } + case *ast.MapType: + fmt.Fprintf(out, "map[") + pretty_print_type_expr(out, t.Key, canonical_aliases) + fmt.Fprintf(out, "]") + pretty_print_type_expr(out, t.Value, canonical_aliases) + case *ast.InterfaceType: + fmt.Fprintf(out, "interface{}") + case *ast.Ellipsis: + fmt.Fprintf(out, "...") + pretty_print_type_expr(out, t.Elt, canonical_aliases) + case *ast.StructType: + fmt.Fprintf(out, "struct") + case *ast.ChanType: + switch t.Dir { + case ast.RECV: + fmt.Fprintf(out, "<-chan ") + case ast.SEND: + fmt.Fprintf(out, "chan<- ") + case ast.SEND | ast.RECV: + fmt.Fprintf(out, "chan ") + } + pretty_print_type_expr(out, t.Value, canonical_aliases) + case *ast.ParenExpr: + fmt.Fprintf(out, "(") + pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, ")") + case *ast.IndexExpr: + fmt.Fprintf(out, "[") + pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, "]") + case *ast.IndexListExpr: + fmt.Fprintf(out, "[") + for i, index := range t.Indices { + if i != 0 { + fmt.Fprintf(out, ", ") + } + pretty_print_type_expr(out, index, canonical_aliases) + } + fmt.Fprintf(out, "]") + case *ast.BadExpr: + // TODO: probably I should check that in a separate function + // and simply discard declarations with BadExpr as a part of their + // type + default: + // the element has some weird type, just ignore it + } +} From a5ef30a720ac1d430aaae2d48860d55c3efbb499 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 11:44:51 +0800 Subject: [PATCH 123/133] x --- types_go118.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types_go118.go b/types_go118.go index 10e6d1d7..a0652604 100644 --- a/types_go118.go +++ b/types_go118.go @@ -340,10 +340,12 @@ func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[str pretty_print_type_expr(out, t.X, canonical_aliases) fmt.Fprintf(out, ")") case *ast.IndexExpr: - fmt.Fprintf(out, "[") pretty_print_type_expr(out, t.X, canonical_aliases) + fmt.Fprintf(out, "[") + pretty_print_type_expr(out, t.Index, canonical_aliases) fmt.Fprintf(out, "]") case *ast.IndexListExpr: + pretty_print_type_expr(out, t.X, canonical_aliases) fmt.Fprintf(out, "[") for i, index := range t.Indices { if i != 0 { From 62c99a58988619d0c5188de0d30d077782a87cd7 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 12:48:32 +0800 Subject: [PATCH 124/133] lookup_types_instance_sig: check struct field --- types_go118.go | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/types_go118.go b/types_go118.go index a0652604..28febe4e 100644 --- a/types_go118.go +++ b/types_go118.go @@ -236,22 +236,42 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { func lookup_types_instance_sig(text string, info *types.Info) types.Type { for _, v := range info.Instances { - if sig, ok := v.Type.(*types.Signature); ok { - for i := 0; i < sig.Results().Len(); i++ { - typ := sig.Results().At(i).Type() - if star, ok := typ.(*types.Pointer); ok { - typ = star.Elem() - } + switch t := v.Type.(type) { + case *types.Signature: + r := t.Results() + for i := 0; i < r.Len(); i++ { + typ := r.At(i).Type() + typ = toElem(typ) expr := toType(nil, typ) if types.ExprString(expr) == text { return typ } + if st, ok := typ.Underlying().(*types.Struct); ok { + for j := 0; j < st.NumFields(); j++ { + t := st.Field(j).Type() + t = toElem(t) + expr := toType(nil, t) + if types.ExprString(expr) == text { + return t + } + } + } } } } return nil } +func toElem(typ types.Type) types.Type { +retry: + switch t := typ.(type) { + case *types.Pointer: + typ = t.Elem() + goto retry + } + return typ +} + func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { switch t := e.(type) { case *ast.StarExpr: From 829f910fe43b89525b84df7d38fafb7b85b54756 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 13:19:15 +0800 Subject: [PATCH 125/133] lookup_types_text --- decl.go | 44 +++++++++++++++++++++++++++++++++++++++++++- types_go117.go | 4 ---- types_go118.go | 38 -------------------------------------- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/decl.go b/decl.go index f70389b1..53a9df83 100644 --- a/decl.go +++ b/decl.go @@ -667,15 +667,55 @@ func lookup_types_ident(ident *ast.Ident, pos token.Pos, info *types.Info) types return typ } +func lookup_types_text(text string, typ types.Type) types.Type { +retry: + switch t := typ.(type) { + case *types.Array: + typ = t.Elem() + goto retry + case *types.Map: + typ = t.Elem() + goto retry + case *types.Pointer: + typ = t.Elem() + goto retry + case *types.Slice: + typ = t.Elem() + goto retry + case *types.Chan: + typ = t.Elem() + goto retry + case *types.Named: + if text == types.ExprString(toType(nil, typ)) { + return typ + } + typ = t.Underlying() + goto retry + case *types.Struct: + for i := 0; i < t.NumFields(); i++ { + if r := lookup_types_text(text, t.Field(i).Type()); r != nil { + return r + } + } + } + return nil +} + // lookup type by type, from type. func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { text := types.ExprString(t) for k, v := range info.Types { + if v.Type == nil { + continue + } if text == types.ExprString(k) { return v.Type } + if t := lookup_types_text(text, v.Type); t != nil { + return t + } } - return lookup_types_instance_sig(text, info) + return nil } func type_to_decl(t ast.Expr, scope *scope) *decl { @@ -702,8 +742,10 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { // } } else if d.typeparams != nil { // typeparams named type instance + retry: if x, ok := t.(*ast.StarExpr); ok { t = x.X + goto retry } if typ := g_daemon.autocomplete.lookup_types(t); typ != nil { if named, ok := typ.(*types.Named); ok { diff --git a/types_go117.go b/types_go117.go index 2ee62fce..ad7ddc3d 100644 --- a/types_go117.go +++ b/types_go117.go @@ -149,10 +149,6 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { return conf } -func lookup_types_instance_sig(text string, info *types.Info) types.Type { - return nil -} - func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { switch t := e.(type) { case *ast.StarExpr: diff --git a/types_go118.go b/types_go118.go index 28febe4e..7b580b29 100644 --- a/types_go118.go +++ b/types_go118.go @@ -234,44 +234,6 @@ func DefaultPkgConfig() *pkgwalk.PkgConfig { return conf } -func lookup_types_instance_sig(text string, info *types.Info) types.Type { - for _, v := range info.Instances { - switch t := v.Type.(type) { - case *types.Signature: - r := t.Results() - for i := 0; i < r.Len(); i++ { - typ := r.At(i).Type() - typ = toElem(typ) - expr := toType(nil, typ) - if types.ExprString(expr) == text { - return typ - } - if st, ok := typ.Underlying().(*types.Struct); ok { - for j := 0; j < st.NumFields(); j++ { - t := st.Field(j).Type() - t = toElem(t) - expr := toType(nil, t) - if types.ExprString(expr) == text { - return t - } - } - } - } - } - } - return nil -} - -func toElem(typ types.Type) types.Type { -retry: - switch t := typ.(type) { - case *types.Pointer: - typ = t.Elem() - goto retry - } - return typ -} - func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[string]string) { switch t := e.(type) { case *ast.StarExpr: From f17ebe6daa8dd07e7e0818e3bc5744220200f51a Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 21:44:05 +0800 Subject: [PATCH 126/133] infer_type: check funHasTypeArgs --- decl.go | 3 +-- types_go117.go | 4 ++++ types_go118.go | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/decl.go b/decl.go index 53a9df83..e46e48fb 100644 --- a/decl.go +++ b/decl.go @@ -1062,8 +1062,7 @@ func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) { // this is a function call or a type cast: // myFunc(1,2,3) or int16(myvar) it, s, is_type := infer_type(t.Fun, scope, -1) - if it == nil { - // func[targs](params) + if it == nil && funHasTypeArgs(t.Fun) { if typ := lookup_types(t.Fun); typ != nil { it = toType(nil, typ) s = scope diff --git a/types_go117.go b/types_go117.go index ad7ddc3d..5fe70d65 100644 --- a/types_go117.go +++ b/types_go117.go @@ -244,3 +244,7 @@ func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[str // the element has some weird type, just ignore it } } + +func funHasTypeArgs(fun ast.Expr) bool { + return false +} diff --git a/types_go118.go b/types_go118.go index 7b580b29..25618134 100644 --- a/types_go118.go +++ b/types_go118.go @@ -344,3 +344,13 @@ func pretty_print_type_expr(out io.Writer, e ast.Expr, canonical_aliases map[str // the element has some weird type, just ignore it } } + +func funHasTypeArgs(fun ast.Expr) bool { + switch fun.(type) { + case *ast.IndexExpr: + return true + case *ast.IndexListExpr: + return true + } + return false +} From f1dfe298d427a4586554baef0c89c92e394934d2 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 17 Jan 2023 21:53:04 +0800 Subject: [PATCH 127/133] lookup_types_text skips --- decl.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/decl.go b/decl.go index e46e48fb..db122bbe 100644 --- a/decl.go +++ b/decl.go @@ -667,7 +667,7 @@ func lookup_types_ident(ident *ast.Ident, pos token.Pos, info *types.Info) types return typ } -func lookup_types_text(text string, typ types.Type) types.Type { +func lookup_types_text(text string, typ types.Type, skips map[types.Type]bool) types.Type { retry: switch t := typ.(type) { case *types.Array: @@ -689,11 +689,15 @@ retry: if text == types.ExprString(toType(nil, typ)) { return typ } + if skips[t] { + return nil + } + skips[t] = true typ = t.Underlying() goto retry case *types.Struct: for i := 0; i < t.NumFields(); i++ { - if r := lookup_types_text(text, t.Field(i).Type()); r != nil { + if r := lookup_types_text(text, t.Field(i).Type(), skips); r != nil { return r } } @@ -704,6 +708,7 @@ retry: // lookup type by type, from type. func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { text := types.ExprString(t) + skips := make(map[types.Type]bool) for k, v := range info.Types { if v.Type == nil { continue @@ -711,7 +716,7 @@ func lookup_types_expr(t ast.Expr, info *types.Info) types.Type { if text == types.ExprString(k) { return v.Type } - if t := lookup_types_text(text, v.Type); t != nil { + if t := lookup_types_text(text, v.Type, skips); t != nil { return t } } From 8ecbdaafab0815e14644e4984aba6b4e8fa7d11c Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 18 Jan 2023 12:55:28 +0800 Subject: [PATCH 128/133] init source check and skip invalid pkg --- package.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.go b/package.go index 72b0f247..8246c5de 100644 --- a/package.go +++ b/package.go @@ -277,6 +277,10 @@ func (m *package_file_cache) process_package_data(c *auto_complete_context, data importPath = m.vendor_name } tp.initSource(m.import_name, importPath, srcDir, m, c) + if tp.pkg != nil && tp.pkg.Name() == "" { + log.Println("error parser data source", importPath) + return + } data = tp.exportData() if *g_debug { log.Printf("parser source %q %q\n", importPath, srcDir) From ab85bc3cf7ba83ff819b6213243386a4fc28526a Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 18 Jan 2023 12:58:58 +0800 Subject: [PATCH 129/133] package: don't parser binary .a file --- package.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/package.go b/package.go index 8246c5de..516cb9b4 100644 --- a/package.go +++ b/package.go @@ -7,7 +7,6 @@ import ( "go/token" "go/types" "log" - "os" "strings" "github.com/visualfc/gocode/internal/gcexportdata" @@ -107,23 +106,24 @@ func (m *package_file_cache) update_cache(c *auto_complete_context) { m.process_package_types(c, pkg) return } - - fname := m.find_file() - stat, err := os.Stat(fname) - - if err != nil { - m.process_package_data(c, nil, true) - return - } - statmtime := stat.ModTime().UnixNano() - if m.mtime != statmtime { - m.mtime = statmtime - data, err := file_reader.read_file(fname) - if err != nil { - return - } - m.process_package_data(c, data, false) - } + m.process_package_data(c, nil, true) + + // fname := m.find_file() + // stat, err := os.Stat(fname) + + // if err != nil { + // m.process_package_data(c, nil, true) + // return + // } + // statmtime := stat.ModTime().UnixNano() + // if m.mtime != statmtime { + // m.mtime = statmtime + // data, err := file_reader.read_file(fname) + // if err != nil { + // return + // } + // m.process_package_data(c, data, false) + // } } type types_export struct { From 22e1999023dbbbab041a198cb6d32aa684f10abd Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 19 Jan 2023 11:39:14 +0800 Subject: [PATCH 130/133] type_to_decl: named has typeparams pass flags --- decl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decl.go b/decl.go index db122bbe..ec8126f5 100644 --- a/decl.go +++ b/decl.go @@ -756,7 +756,7 @@ func type_to_decl(t ast.Expr, scope *scope) *decl { if named, ok := typ.(*types.Named); ok { pkg := named.Obj().Pkg() dt := toType(pkg, typ.Underlying()) - d = new_decl_full(types.ExprString(t), decl_type, 0, dt, nil, -1, scope) + d = new_decl_full(types.ExprString(t), decl_type, d.flags, dt, nil, -1, scope) // add methods for _, sel := range typeutil.IntuitiveMethodSet(named, nil) { ft := toType(pkg, sel.Type()) From d7fe070924f756bb22207ab689d025c5ed48cb2f Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 7 Feb 2023 09:22:47 +0800 Subject: [PATCH 131/133] fix comparable type --- go.mod | 2 +- go.sum | 4 ++-- internal/gcimporter/bexport.go | 6 ++++-- internal/gcimporter/bimport.go | 1 + internal/gcimporter/typeparams_go117.go | 7 +++++++ internal/gcimporter/typeparams_go118.go | 3 +++ package_bin.go | 3 +++ 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 58429b22..09b4c417 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.4.0 + github.com/visualfc/gotools v1.5.1 golang.org/x/tools v0.5.0 ) diff --git a/go.sum b/go.sum index fa0110ce..84604618 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/visualfc/gomod v0.1.2 h1:7qfPmifcA8r/0ZTpTPZQqsm5aJUiQ/EeyHEENPyywDg= github.com/visualfc/gomod v0.1.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.4.0 h1:FCAIfzMBFFvaCzDCGVoxMYUYNMC1SaU7WpIXGx47GfY= -github.com/visualfc/gotools v1.4.0/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= +github.com/visualfc/gotools v1.5.1 h1:uICwSO7XKGMbg2XCYU4fjuu9JnIJsXMIrO1EDvJY6ks= +github.com/visualfc/gotools v1.5.1/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/internal/gcimporter/bexport.go b/internal/gcimporter/bexport.go index 8ae52272..06bafe3a 100644 --- a/internal/gcimporter/bexport.go +++ b/internal/gcimporter/bexport.go @@ -39,8 +39,10 @@ const trace = false // default: false // Current export format version. Increase with each format change. // Note: The latest binary (non-indexed) export format is at version 6. -// This exporter is still at level 4, but it doesn't matter since -// the binary importer can handle older versions just fine. +// +// This exporter is still at level 4, but it doesn't matter since +// the binary importer can handle older versions just fine. +// // 6: package height (CL 105038) -- NOT IMPLEMENTED HERE // 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE // 4: type name objects support type aliases, uses aliasTag diff --git a/internal/gcimporter/bimport.go b/internal/gcimporter/bimport.go index cdd1da6b..0bdb47b1 100644 --- a/internal/gcimporter/bimport.go +++ b/internal/gcimporter/bimport.go @@ -1032,6 +1032,7 @@ func predeclared() []types.Type { // used internally by gc; never used by this package or in .a files anyType{}, + comparableType, } } return predecl diff --git a/internal/gcimporter/typeparams_go117.go b/internal/gcimporter/typeparams_go117.go index 48e371b9..9d491144 100644 --- a/internal/gcimporter/typeparams_go117.go +++ b/internal/gcimporter/typeparams_go117.go @@ -73,3 +73,10 @@ func (*Union) String() string { unsupported(); return "" } func (*Union) Underlying() types.Type { unsupported(); return nil } func (*Union) Len() int { return 0 } func (*Union) Term(i int) *Term { unsupported(); return nil } + +var comparableType = comparable{} + +type comparable struct{} + +func (t comparable) Underlying() types.Type { return t } +func (t comparable) String() string { return "comparable" } diff --git a/internal/gcimporter/typeparams_go118.go b/internal/gcimporter/typeparams_go118.go index c167177d..c79f84c1 100644 --- a/internal/gcimporter/typeparams_go118.go +++ b/internal/gcimporter/typeparams_go118.go @@ -45,3 +45,6 @@ func originType(t types.Type) types.Type { type Union = types.Union type Term = types.Term + +// comparable +var comparableType = types.Universe.Lookup("comparable").Type() diff --git a/package_bin.go b/package_bin.go index 84b8f6b2..722bc1af 100644 --- a/package_bin.go +++ b/package_bin.go @@ -879,4 +879,7 @@ var predeclared = []ast.Expr{ // used internally by gc; never used by this package or in .a files ast.NewIdent("any"), + + // comparable + ast.NewIdent("comparable"), } From 83d0ac73f231175d4d14c873426a3010cc13f2a9 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 10 Feb 2023 20:35:11 +0800 Subject: [PATCH 132/133] update gotools --- go.mod | 4 ++-- go.sum | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 09b4c417..8450ee9a 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.5.1 + github.com/visualfc/gotools v1.5.2 golang.org/x/tools v0.5.0 -) +) \ No newline at end of file diff --git a/go.sum b/go.sum index 84604618..298b6608 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,16 @@ +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/visualfc/gomod v0.1.2 h1:7qfPmifcA8r/0ZTpTPZQqsm5aJUiQ/EeyHEENPyywDg= github.com/visualfc/gomod v0.1.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= github.com/visualfc/gotools v1.5.1 h1:uICwSO7XKGMbg2XCYU4fjuu9JnIJsXMIrO1EDvJY6ks= github.com/visualfc/gotools v1.5.1/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= +github.com/visualfc/gotools v1.5.2 h1:uHHnTwZzIGTgd3vmKFSiq9aHCdRXv6p+a2gxlbCHG/M= +github.com/visualfc/gotools v1.5.2/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= +github.com/visualfc/goversion v1.1.0 h1:EN0YQGRkeGoWTPxPNTnbhyNQyas5leKH5U5lL4t8lRE= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= From cc5b863525681d0edf25312ed4dd4a797bc2b128 Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 13 Feb 2023 09:31:44 +0800 Subject: [PATCH 133/133] update dep --- go.mod | 4 ++-- go.sum | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 8450ee9a..ae16e170 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/visualfc/gocode go 1.13 require ( - github.com/visualfc/gotools v1.5.2 + github.com/visualfc/gotools v1.5.3 golang.org/x/tools v0.5.0 -) \ No newline at end of file +) diff --git a/go.sum b/go.sum index 298b6608..a7ae3a19 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,10 @@ -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/visualfc/gomod v0.1.2 h1:7qfPmifcA8r/0ZTpTPZQqsm5aJUiQ/EeyHEENPyywDg= github.com/visualfc/gomod v0.1.2/go.mod h1:rV5goiA/Ul6yT8X2eDnc/dl0dVy0cDHJLZVOuJ8PdmM= -github.com/visualfc/gotools v1.5.1 h1:uICwSO7XKGMbg2XCYU4fjuu9JnIJsXMIrO1EDvJY6ks= -github.com/visualfc/gotools v1.5.1/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= -github.com/visualfc/gotools v1.5.2 h1:uHHnTwZzIGTgd3vmKFSiq9aHCdRXv6p+a2gxlbCHG/M= -github.com/visualfc/gotools v1.5.2/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= -github.com/visualfc/goversion v1.1.0 h1:EN0YQGRkeGoWTPxPNTnbhyNQyas5leKH5U5lL4t8lRE= +github.com/visualfc/gotools v1.5.3 h1:22TyNM6i+/psP07vjveWy6PhhMGNtwWEbDL8PrW4jms= +github.com/visualfc/gotools v1.5.3/go.mod h1:VlP59ccCsSmRbFZTbuHgQDrTOi40EGKvyFK2Cq2Far8= github.com/visualfc/goversion v1.1.0/go.mod h1:Gr3s6bW8NTomhheImwAttqno97Mw6pAnFn2dU8/EMa8= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=