fix: vendor deps and fix CI go-version, timeout, GOTOOLCHAIN (HAN-414)
- Run go mod vendor to eliminate proxy.golang.org network dependency - Set GOFLAGS=-mod=vendor at job env level so all go commands use vendor/ - Fix go-version from 1.23 to 1.24.0 to match go.mod - Move GOTOOLCHAIN=local to job-level env (not per-step inline) - Set cache: false on setup-go (cache is irrelevant with vendoring) - Add timeout-minutes: 15 so failures are caught quickly instead of 3h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Copilot
multica-agent
parent
1f23f482c1
commit
db806835aa
+525
@@ -0,0 +1,525 @@
|
||||
// Copyright 2025 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.
|
||||
|
||||
// Code generated by generate.go. DO NOT EDIT.
|
||||
|
||||
package stdlib
|
||||
|
||||
type pkginfo struct {
|
||||
name string
|
||||
deps string // list of indices of dependencies, as varint-encoded deltas
|
||||
}
|
||||
|
||||
var deps = [...]pkginfo{
|
||||
{"archive/tar", "\x03p\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"},
|
||||
{"archive/zip", "\x02\x04f\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0e\x04"},
|
||||
{"bufio", "\x03p\x86\x01D\x14"},
|
||||
{"bytes", "s+[\x03\fG\x02\x02"},
|
||||
{"cmp", ""},
|
||||
{"compress/bzip2", "\x02\x02\xf5\x01A"},
|
||||
{"compress/flate", "\x02q\x03\x83\x01\f\x033\x01\x03"},
|
||||
{"compress/gzip", "\x02\x04f\a\x03\x15nT"},
|
||||
{"compress/lzw", "\x02q\x03\x83\x01"},
|
||||
{"compress/zlib", "\x02\x04f\a\x03\x13\x01o"},
|
||||
{"container/heap", "\xbb\x02"},
|
||||
{"container/list", ""},
|
||||
{"container/ring", ""},
|
||||
{"context", "s\\p\x01\r"},
|
||||
{"crypto", "\x89\x01pC"},
|
||||
{"crypto/aes", "\x10\n\t\x99\x02"},
|
||||
{"crypto/cipher", "\x03 \x01\x01 \x12\x1c,Z"},
|
||||
{"crypto/des", "\x10\x15 .,\x9d\x01\x03"},
|
||||
{"crypto/dsa", "E\x04*\x86\x01\r"},
|
||||
{"crypto/ecdh", "\x03\v\f\x10\x04\x17\x04\x0e\x1c\x86\x01"},
|
||||
{"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\b\v\x06\x01\x04\r\x01\x1c\x86\x01\r\x05K\x01"},
|
||||
{"crypto/ed25519", "\x0e\x1e\x12\a\v\a\x1c\x86\x01C"},
|
||||
{"crypto/elliptic", "3@\x86\x01\r9"},
|
||||
{"crypto/fips140", "\"\x05"},
|
||||
{"crypto/hkdf", "/\x15\x01.\x16"},
|
||||
{"crypto/hmac", "\x1a\x16\x14\x01\x122"},
|
||||
{"crypto/internal/boring", "\x0e\x02\rl"},
|
||||
{"crypto/internal/boring/bbig", "\x1a\xec\x01M"},
|
||||
{"crypto/internal/boring/bcache", "\xc0\x02\x13"},
|
||||
{"crypto/internal/boring/sig", ""},
|
||||
{"crypto/internal/constanttime", ""},
|
||||
{"crypto/internal/cryptotest", "\x03\r\n\b&\x0f\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"},
|
||||
{"crypto/internal/entropy", "J"},
|
||||
{"crypto/internal/entropy/v1.0.0", "C0\x95\x018\x13"},
|
||||
{"crypto/internal/fips140", "B1\xbf\x01\v\x16"},
|
||||
{"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x14\x05\x01\x01\x06+\x95\x014"},
|
||||
{"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x12\x05\x01\a+\x92\x01"},
|
||||
{"crypto/internal/fips140/alias", "\xd3\x02"},
|
||||
{"crypto/internal/fips140/bigmod", "'\x19\x01\a+\x95\x01"},
|
||||
{"crypto/internal/fips140/check", "\"\x0e\a\t\x02\xb7\x01Z"},
|
||||
{"crypto/internal/fips140/check/checktest", "'\x8b\x02!"},
|
||||
{"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x14\x05\t\x01)\x86\x01\x0f7\x01"},
|
||||
{"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\n\r3\x86\x01\x0f7"},
|
||||
{"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x03\x06:\x16pF"},
|
||||
{"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\f:\xc9\x01\x03"},
|
||||
{"crypto/internal/fips140/edwards25519", "\x1e\t\a\x123\x95\x017"},
|
||||
{"crypto/internal/fips140/edwards25519/field", "'\x14\x053\x95\x01"},
|
||||
{"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\a<\x16"},
|
||||
{"crypto/internal/fips140/hmac", "\x03\x1f\x15\x01\x01:\x16"},
|
||||
{"crypto/internal/fips140/mldsa", "\x03\x1b\x04\x05\x02\x0e\x01\x03\x053\x95\x017"},
|
||||
{"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0f\x03\x053\xcc\x01"},
|
||||
{"crypto/internal/fips140/nistec", "\x1e\t\r\f3\x95\x01*\r\x14"},
|
||||
{"crypto/internal/fips140/nistec/fiat", "'\x148\x95\x01"},
|
||||
{"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\a<\x16"},
|
||||
{"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"},
|
||||
{"crypto/internal/fips140/sha256", "\x03\x1f\x1e\x01\a+\x16\x7f"},
|
||||
{"crypto/internal/fips140/sha3", "\x03\x1f\x19\x05\x012\x95\x01K"},
|
||||
{"crypto/internal/fips140/sha512", "\x03\x1f\x1e\x01\a+\x16\x7f"},
|
||||
{"crypto/internal/fips140/ssh", "'b"},
|
||||
{"crypto/internal/fips140/subtle", "\x1e\a\x1b\xc8\x01"},
|
||||
{"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\a\x02:\x16"},
|
||||
{"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\b\t3\x16"},
|
||||
{"crypto/internal/fips140cache", "\xb2\x02\r&"},
|
||||
{"crypto/internal/fips140deps", ""},
|
||||
{"crypto/internal/fips140deps/byteorder", "\x9f\x01"},
|
||||
{"crypto/internal/fips140deps/cpu", "\xb4\x01\a"},
|
||||
{"crypto/internal/fips140deps/godebug", "\xbc\x01"},
|
||||
{"crypto/internal/fips140deps/time", "\xcd\x02"},
|
||||
{"crypto/internal/fips140hash", "8\x1d4\xca\x01"},
|
||||
{"crypto/internal/fips140only", ")\x0e\x01\x01P3="},
|
||||
{"crypto/internal/fips140test", ""},
|
||||
{"crypto/internal/hpke", "\x03\v\x01\x01\x03\x055\x03\x04\x01\x01\x16\a\x03\x13\xcc\x01"},
|
||||
{"crypto/internal/impl", "\xbd\x02"},
|
||||
{"crypto/internal/randutil", "\xf9\x01\x12"},
|
||||
{"crypto/internal/sysrand", "sq! \r\r\x01\x01\f\x06"},
|
||||
{"crypto/internal/sysrand/internal/seccomp", "s"},
|
||||
{"crypto/md5", "\x0e7.\x16\x16i"},
|
||||
{"crypto/mlkem", "\x0e$"},
|
||||
{"crypto/mlkem/mlkemtest", "2\x1b&"},
|
||||
{"crypto/pbkdf2", "5\x0f\x01.\x16"},
|
||||
{"crypto/rand", "\x1a\b\a\x1c\x04\x01)\x86\x01\rM"},
|
||||
{"crypto/rc4", "% .\xc9\x01"},
|
||||
{"crypto/rsa", "\x0e\f\x01\v\x10\x0e\x01\x04\a\a\x1c\x03\x133=\f\x01"},
|
||||
{"crypto/sha1", "\x0e\f+\x03+\x16\x16\x15T"},
|
||||
{"crypto/sha256", "\x0e\f\x1dR"},
|
||||
{"crypto/sha3", "\x0e*Q\xca\x01"},
|
||||
{"crypto/sha512", "\x0e\f\x1fP"},
|
||||
{"crypto/subtle", "\x1e\x1d\x9f\x01X"},
|
||||
{"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\x0e\n\x01\n\x05\x04\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"},
|
||||
{"crypto/tls/internal/fips140tls", "\x17\xa9\x02"},
|
||||
{"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x016\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"},
|
||||
{"crypto/x509/pkix", "i\x06\a\x90\x01G"},
|
||||
{"database/sql", "\x03\nP\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"},
|
||||
{"database/sql/driver", "\rf\x03\xb7\x01\x0f\x11"},
|
||||
{"debug/buildinfo", "\x03]\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f\x1f"},
|
||||
{"debug/dwarf", "\x03i\a\x03\x83\x011\x11\x01\x01"},
|
||||
{"debug/elf", "\x03\x06V\r\a\x03g\x1b\x01\f \x17\x01\x16"},
|
||||
{"debug/gosym", "\x03i\n\xc5\x01\x01\x01\x02"},
|
||||
{"debug/macho", "\x03\x06V\r\ng\x1c,\x17\x01"},
|
||||
{"debug/pe", "\x03\x06V\r\a\x03g\x1c,\x17\x01\x16"},
|
||||
{"debug/plan9obj", "l\a\x03g\x1c,"},
|
||||
{"embed", "s+B\x19\x01S"},
|
||||
{"embed/internal/embedtest", ""},
|
||||
{"encoding", ""},
|
||||
{"encoding/ascii85", "\xf9\x01C"},
|
||||
{"encoding/asn1", "\x03p\x03g(\x01'\r\x02\x01\x10\x03\x01"},
|
||||
{"encoding/base32", "\xf9\x01A\x02"},
|
||||
{"encoding/base64", "\x9f\x01ZA\x02"},
|
||||
{"encoding/binary", "s\x86\x01\f(\r\x05"},
|
||||
{"encoding/csv", "\x02\x01p\x03\x83\x01D\x12\x02"},
|
||||
{"encoding/gob", "\x02e\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"},
|
||||
{"encoding/hex", "s\x03\x83\x01A\x03"},
|
||||
{"encoding/json", "\x03\x01c\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"},
|
||||
{"encoding/pem", "\x03h\b\x86\x01A\x03"},
|
||||
{"encoding/xml", "\x02\x01d\f\x03\x83\x014\x05\n\x01\x02\x10\x02"},
|
||||
{"errors", "\xcf\x01\x84\x01"},
|
||||
{"expvar", "pLA\b\v\x15\r\b\x02\x03\x01\x11"},
|
||||
{"flag", "g\f\x03\x83\x01,\b\x05\b\x02\x01\x10"},
|
||||
{"fmt", "sF'\x19\f \b\r\x02\x03\x12"},
|
||||
{"go/ast", "\x03\x01r\x0f\x01s\x03)\b\r\x02\x01\x12\x02"},
|
||||
{"go/build", "\x02\x01p\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"},
|
||||
{"go/build/constraint", "s\xc9\x01\x01\x12\x02"},
|
||||
{"go/constant", "v\x10\x7f\x01\x024\x01\x02\x12"},
|
||||
{"go/doc", "\x04r\x01\x05\n=61\x10\x02\x01\x12\x02"},
|
||||
{"go/doc/comment", "\x03s\xc4\x01\x01\x01\x01\x12\x02"},
|
||||
{"go/format", "\x03s\x01\f\x01\x02sD"},
|
||||
{"go/importer", "x\a\x01\x02\x04\x01r9"},
|
||||
{"go/internal/gccgoimporter", "\x02\x01]\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\f\b"},
|
||||
{"go/internal/gcimporter", "\x02t\x10\x010\x05\r0,\x15\x03\x02"},
|
||||
{"go/internal/scannerhooks", "\x86\x01"},
|
||||
{"go/internal/srcimporter", "v\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x14"},
|
||||
{"go/parser", "\x03p\x03\x01\x02\b\x04\x01s\x01+\x06\x12"},
|
||||
{"go/printer", "v\x01\x02\x03\ns\f \x15\x02\x01\x02\v\x05\x02"},
|
||||
{"go/scanner", "\x03s\v\x05s2\x10\x01\x13\x02"},
|
||||
{"go/token", "\x04r\x86\x01>\x02\x03\x01\x0f\x02"},
|
||||
{"go/types", "\x03\x01\x06i\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"},
|
||||
{"go/version", "\xc1\x01|"},
|
||||
{"hash", "\xf9\x01"},
|
||||
{"hash/adler32", "s\x16\x16"},
|
||||
{"hash/crc32", "s\x16\x16\x15\x8b\x01\x01\x13"},
|
||||
{"hash/crc64", "s\x16\x16\xa0\x01"},
|
||||
{"hash/fnv", "s\x16\x16i"},
|
||||
{"hash/maphash", "\x89\x01\x11<}"},
|
||||
{"html", "\xbd\x02\x02\x12"},
|
||||
{"html/template", "\x03m\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"},
|
||||
{"image", "\x02q\x1fg\x0f4\x03\x01"},
|
||||
{"image/color", ""},
|
||||
{"image/color/palette", "\x92\x01"},
|
||||
{"image/draw", "\x91\x01\x01\x04"},
|
||||
{"image/gif", "\x02\x01\x05k\x03\x1b\x01\x01\x01\vZ\x0f"},
|
||||
{"image/internal/imageutil", "\x91\x01"},
|
||||
{"image/jpeg", "\x02q\x1e\x01\x04c"},
|
||||
{"image/png", "\x02\ac\n\x13\x02\x06\x01gC"},
|
||||
{"index/suffixarray", "\x03i\a\x86\x01\f+\n\x01"},
|
||||
{"internal/abi", "\xbb\x01\x98\x01"},
|
||||
{"internal/asan", "\xd3\x02"},
|
||||
{"internal/bisect", "\xb2\x02\r\x01"},
|
||||
{"internal/buildcfg", "vHg\x06\x02\x05\n\x01"},
|
||||
{"internal/bytealg", "\xb4\x01\x9f\x01"},
|
||||
{"internal/byteorder", ""},
|
||||
{"internal/cfg", ""},
|
||||
{"internal/cgrouptest", "v[T\x06\x0f\x02\x01\x04\x01"},
|
||||
{"internal/chacha8rand", "\x9f\x01\x15\a\x98\x01"},
|
||||
{"internal/copyright", ""},
|
||||
{"internal/coverage", ""},
|
||||
{"internal/coverage/calloc", ""},
|
||||
{"internal/coverage/cfile", "p\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\r\x06"},
|
||||
{"internal/coverage/cformat", "\x04r.\x04Q\v6\x01\x02\r"},
|
||||
{"internal/coverage/cmerge", "v.a"},
|
||||
{"internal/coverage/decodecounter", "l\n.\v\x02H,\x17\x17"},
|
||||
{"internal/coverage/decodemeta", "\x02j\n\x17\x17\v\x02H,"},
|
||||
{"internal/coverage/encodecounter", "\x02j\n.\f\x01\x02F\v!\x15"},
|
||||
{"internal/coverage/encodemeta", "\x02\x01i\n\x13\x04\x17\r\x02F,."},
|
||||
{"internal/coverage/pods", "\x04r.\x81\x01\x06\x05\n\x02\x01"},
|
||||
{"internal/coverage/rtcov", "\xd3\x02"},
|
||||
{"internal/coverage/slicereader", "l\n\x83\x01Z"},
|
||||
{"internal/coverage/slicewriter", "v\x83\x01"},
|
||||
{"internal/coverage/stringtab", "v9\x04F"},
|
||||
{"internal/coverage/test", ""},
|
||||
{"internal/coverage/uleb128", ""},
|
||||
{"internal/cpu", "\xd3\x02"},
|
||||
{"internal/dag", "\x04r\xc4\x01\x03"},
|
||||
{"internal/diff", "\x03s\xc5\x01\x02"},
|
||||
{"internal/exportdata", "\x02\x01p\x03\x02e\x1c,\x01\x05\x11\x01\x02"},
|
||||
{"internal/filepathlite", "s+B\x1a@"},
|
||||
{"internal/fmtsort", "\x04\xa9\x02\r"},
|
||||
{"internal/fuzz", "\x03\nG\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"},
|
||||
{"internal/goarch", ""},
|
||||
{"internal/godebug", "\x9c\x01!\x82\x01\x01\x13"},
|
||||
{"internal/godebugs", ""},
|
||||
{"internal/goexperiment", ""},
|
||||
{"internal/goos", ""},
|
||||
{"internal/goroot", "\xa5\x02\x01\x05\x12\x02"},
|
||||
{"internal/gover", "\x04"},
|
||||
{"internal/goversion", ""},
|
||||
{"internal/lazyregexp", "\xa5\x02\v\r\x02"},
|
||||
{"internal/lazytemplate", "\xf9\x01,\x18\x02\f"},
|
||||
{"internal/msan", "\xd3\x02"},
|
||||
{"internal/nettrace", ""},
|
||||
{"internal/obscuretestdata", "k\x8e\x01,"},
|
||||
{"internal/oserror", "s"},
|
||||
{"internal/pkgbits", "\x03Q\x18\a\x03\x04\fs\r\x1f\r\n\x01"},
|
||||
{"internal/platform", ""},
|
||||
{"internal/poll", "sl\x05\x159\r\x01\x01\f\x06"},
|
||||
{"internal/profile", "\x03\x04l\x03\x83\x017\n\x01\x01\x01\x10"},
|
||||
{"internal/profilerecord", ""},
|
||||
{"internal/race", "\x9a\x01\xb9\x01"},
|
||||
{"internal/reflectlite", "\x9a\x01!;<!"},
|
||||
{"internal/runtime/atomic", "\xbb\x01\x98\x01"},
|
||||
{"internal/runtime/cgroup", "\x9e\x01=\x04t"},
|
||||
{"internal/runtime/exithook", "\xd0\x01\x83\x01"},
|
||||
{"internal/runtime/gc", "\xbb\x01"},
|
||||
{"internal/runtime/gc/internal/gen", "\nb\n\x18k\x04\v\x1d\b\x10\x02"},
|
||||
{"internal/runtime/gc/scan", "\xb4\x01\a\x18\ay"},
|
||||
{"internal/runtime/maps", "\x9a\x01\x01 \n\t\t\x03y"},
|
||||
{"internal/runtime/math", "\xbb\x01"},
|
||||
{"internal/runtime/pprof/label", ""},
|
||||
{"internal/runtime/startlinetest", ""},
|
||||
{"internal/runtime/sys", "\xbb\x01\x04"},
|
||||
{"internal/runtime/syscall/linux", "\xbb\x01\x98\x01"},
|
||||
{"internal/runtime/wasitest", ""},
|
||||
{"internal/saferio", "\xf9\x01Z"},
|
||||
{"internal/singleflight", "\xbf\x02"},
|
||||
{"internal/strconv", "\x88\x02K"},
|
||||
{"internal/stringslite", "\x9e\x01\xb5\x01"},
|
||||
{"internal/sync", "\x9a\x01!\x13r\x13"},
|
||||
{"internal/synctest", "\x9a\x01\xb9\x01"},
|
||||
{"internal/syscall/execenv", "\xc1\x02"},
|
||||
{"internal/syscall/unix", "\xb2\x02\x0e\x01\x12"},
|
||||
{"internal/sysinfo", "\x02\x01\xb1\x01E,\x18\x02"},
|
||||
{"internal/syslist", ""},
|
||||
{"internal/testenv", "\x03\nf\x02\x01*\x1b\x0f0+\x01\x05\a\n\x01\x02\x02\x01\v"},
|
||||
{"internal/testhash", "\x03\x86\x01p\x118\v"},
|
||||
{"internal/testlog", "\xbf\x02\x01\x13"},
|
||||
{"internal/testpty", "s\x03\xaf\x01"},
|
||||
{"internal/trace", "\x02\x01\x01\x06b\a\x03w\x03\x03\x06\x03\t5\x01\x01\x01\x10\x06"},
|
||||
{"internal/trace/internal/testgen", "\x03i\nu\x03\x02\x03\x011\v\r\x10"},
|
||||
{"internal/trace/internal/tracev1", "\x03\x01h\a\x03}\x06\f5\x01"},
|
||||
{"internal/trace/raw", "\x02j\nz\x03\x06C\x01\x12"},
|
||||
{"internal/trace/testtrace", "\x02\x01p\x03q\x04\x03\x05\x01\x05,\v\x02\b\x02\x01\x05"},
|
||||
{"internal/trace/tracev2", ""},
|
||||
{"internal/trace/traceviewer", "\x02c\v\x06\x1a<\x1f\a\a\x04\b\v\x15\x01\x05\a\n\x01\x02\x0e"},
|
||||
{"internal/trace/traceviewer/format", ""},
|
||||
{"internal/trace/version", "vz\t"},
|
||||
{"internal/txtar", "\x03s\xaf\x01\x18"},
|
||||
{"internal/types/errors", "\xbc\x02"},
|
||||
{"internal/unsafeheader", "\xd3\x02"},
|
||||
{"internal/xcoff", "_\r\a\x03g\x1c,\x17\x01"},
|
||||
{"internal/zstd", "l\a\x03\x83\x01\x0f"},
|
||||
{"io", "s\xcc\x01"},
|
||||
{"io/fs", "s+*11\x10\x13\x04"},
|
||||
{"io/ioutil", "\xf9\x01\x01+\x15\x03"},
|
||||
{"iter", "\xce\x01d!"},
|
||||
{"log", "v\x83\x01\x05'\r\r\x01\r"},
|
||||
{"log/internal", ""},
|
||||
{"log/slog", "\x03\nZ\t\x03\x03\x83\x01\x04\x01\x02\x02\x03(\x05\b\x02\x01\x02\x01\r\x02\x02\x02"},
|
||||
{"log/slog/internal", ""},
|
||||
{"log/slog/internal/benchmarks", "\rf\x03\x83\x01\x06\x03:\x11"},
|
||||
{"log/slog/internal/buffer", "\xbf\x02"},
|
||||
{"log/syslog", "s\x03\x87\x01\x12\x16\x18\x02\x0e"},
|
||||
{"maps", "\xfc\x01W"},
|
||||
{"math", "\xb4\x01TK"},
|
||||
{"math/big", "\x03p\x03)\x15E\f\x03\x020\x02\x01\x02\x14"},
|
||||
{"math/big/internal/asmgen", "\x03\x01r\x92\x012\x03"},
|
||||
{"math/bits", "\xd3\x02"},
|
||||
{"math/cmplx", "\x85\x02\x03"},
|
||||
{"math/rand", "\xbc\x01I:\x01\x13"},
|
||||
{"math/rand/v2", "s,\x03c\x03K"},
|
||||
{"mime", "\x02\x01h\b\x03\x83\x01\v!\x15\x03\x02\x10\x02"},
|
||||
{"mime/multipart", "\x02\x01M#\x03F=\v\x01\a\x02\x15\x02\x06\x0f\x02\x01\x16"},
|
||||
{"mime/quotedprintable", "\x02\x01s\x83\x01"},
|
||||
{"net", "\x04\tf+\x1e\n\x05\x13\x01\x01\x04\x15\x01%\x06\r\b\x05\x01\x01\f\x06\a"},
|
||||
{"net/http", "\x02\x01\x03\x01\x04\x02C\b\x13\x01\a\x03F=\x01\x03\a\x01\x03\x02\x02\x01\x02\x06\x02\x01\x01\n\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\r\x02\x02\x02\b\x01\x01\x01"},
|
||||
{"net/http/cgi", "\x02V\x1b\x03\x83\x01\x04\a\v\x01\x13\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x10\x0e"},
|
||||
{"net/http/cookiejar", "\x04o\x03\x99\x01\x01\b\a\x05\x16\x03\x02\x0e\x04"},
|
||||
{"net/http/fcgi", "\x02\x01\n_\a\x03\x83\x01\x16\x01\x01\x14\x18\x02\x0e"},
|
||||
{"net/http/httptest", "\x02\x01\nK\x02\x1b\x01\x83\x01\x04\x12\x01\n\t\x02\x17\x01\x02\x0e\x0e"},
|
||||
{"net/http/httptrace", "\rKnI\x14\n "},
|
||||
{"net/http/httputil", "\x02\x01\nf\x03\x83\x01\x04\x0f\x03\x01\x05\x02\x01\v\x01\x19\x02\x01\r\x0e"},
|
||||
{"net/http/internal", "\x02\x01p\x03\x83\x01"},
|
||||
{"net/http/internal/ascii", "\xbd\x02\x12"},
|
||||
{"net/http/internal/httpcommon", "\rf\x03\x9f\x01\x0e\x01\x17\x01\x01\x02\x1c\x02"},
|
||||
{"net/http/internal/testcert", "\xbd\x02"},
|
||||
{"net/http/pprof", "\x02\x01\ni\x19-\x02\x0e-\x04\x13\x14\x01\r\x04\x03\x01\x02\x01\x10"},
|
||||
{"net/internal/cgotest", ""},
|
||||
{"net/internal/socktest", "v\xc9\x01\x02"},
|
||||
{"net/mail", "\x02q\x03\x83\x01\x04\x0f\x03\x14\x1a\x02\x0e\x04"},
|
||||
{"net/netip", "\x04o+\x01f\x034\x16"},
|
||||
{"net/rpc", "\x02l\x05\x03\x10\ni\x04\x12\x01\x1d\r\x03\x02"},
|
||||
{"net/rpc/jsonrpc", "p\x03\x03\x83\x01\x16\x11\x1f"},
|
||||
{"net/smtp", "\x193\f\x13\b\x03\x83\x01\x16\x14\x1a"},
|
||||
{"net/textproto", "\x02\x01p\x03\x83\x01\f\n-\x01\x02\x14"},
|
||||
{"net/url", "s\x03Fc\v\x10\x02\x01\x16"},
|
||||
{"os", "s+\x01\x19\x03\x10\x14\x01\x03\x01\x05\x10\x018\b\x05\x01\x01\f\x06"},
|
||||
{"os/exec", "\x03\nfI'\x01\x15\x01+\x06\a\n\x01\x04\f"},
|
||||
{"os/exec/internal/fdtest", "\xc1\x02"},
|
||||
{"os/signal", "\r\x98\x02\x15\x05\x02"},
|
||||
{"os/user", "\x02\x01p\x03\x83\x01,\r\n\x01\x02"},
|
||||
{"path", "s+\xb3\x01"},
|
||||
{"path/filepath", "s+\x1aB+\r\b\x03\x04\x10"},
|
||||
{"plugin", "s"},
|
||||
{"reflect", "s'\x04\x1d\x13\b\x04\x05\x17\x06\t-\n\x03\x10\x02\x02"},
|
||||
{"reflect/internal/example1", ""},
|
||||
{"reflect/internal/example2", ""},
|
||||
{"regexp", "\x03\xf6\x018\t\x02\x01\x02\x10\x02"},
|
||||
{"regexp/syntax", "\xba\x02\x01\x01\x01\x02\x10\x02"},
|
||||
{"runtime", "\x9a\x01\x04\x01\x03\f\x06\a\x02\x01\x01\x0e\x03\x01\x01\x01\x02\x01\x01\x01\x02\x01\x04\x01\x10\x18K"},
|
||||
{"runtime/coverage", "\xa6\x01S"},
|
||||
{"runtime/debug", "vUZ\r\b\x02\x01\x10\x06"},
|
||||
{"runtime/metrics", "\xbd\x01H-!"},
|
||||
{"runtime/pprof", "\x02\x01\x01\x03\x06_\a\x03$$\x0f\v!\f \r\b\x01\x01\x01\x02\x02\t\x03\x06"},
|
||||
{"runtime/race", "\xb8\x02"},
|
||||
{"runtime/race/internal/amd64v1", ""},
|
||||
{"runtime/trace", "\rf\x03z\t9\b\x05\x01\r\x06"},
|
||||
{"slices", "\x04\xf8\x01\fK"},
|
||||
{"sort", "\xcf\x0192"},
|
||||
{"strconv", "s+A\x01q"},
|
||||
{"strings", "s'\x04B\x19\x03\f7\x10\x02\x02"},
|
||||
{"structs", ""},
|
||||
{"sync", "\xce\x01\x13\x01P\x0e\x13"},
|
||||
{"sync/atomic", "\xd3\x02"},
|
||||
{"syscall", "s(\x03\x01\x1c\n\x03\x06\r\x04S\b\x05\x01\x13"},
|
||||
{"testing", "\x03\nf\x02\x01X\x17\x14\f\x05\x1b\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\r\x02\x04"},
|
||||
{"testing/fstest", "s\x03\x83\x01\x01\n&\x10\x03\b\b"},
|
||||
{"testing/internal/testdeps", "\x02\v\xad\x01/\x10,\x03\x05\x03\x06\a\x02\x0e"},
|
||||
{"testing/iotest", "\x03p\x03\x83\x01\x04"},
|
||||
{"testing/quick", "u\x01\x8f\x01\x05#\x10\x10"},
|
||||
{"testing/slogtest", "\rf\x03\x89\x01.\x05\x10\v"},
|
||||
{"testing/synctest", "\xe2\x01`\x11"},
|
||||
{"text/scanner", "\x03s\x83\x01,*\x02"},
|
||||
{"text/tabwriter", "v\x83\x01X"},
|
||||
{"text/template", "s\x03C@\x01\n \x01\x05\x01\x02\x05\v\x02\r\x03\x02"},
|
||||
{"text/template/parse", "\x03s\xbc\x01\n\x01\x12\x02"},
|
||||
{"time", "s+\x1e$(*\r\x02\x12"},
|
||||
{"time/tzdata", "s\xce\x01\x12"},
|
||||
{"unicode", ""},
|
||||
{"unicode/utf16", ""},
|
||||
{"unicode/utf8", ""},
|
||||
{"unique", "\x9a\x01!%\x01Q\r\x01\x13\x12"},
|
||||
{"unsafe", ""},
|
||||
{"vendor/golang.org/x/crypto/chacha20", "\x10\\\a\x95\x01*&"},
|
||||
{"vendor/golang.org/x/crypto/chacha20poly1305", "\x10\\\a\xe1\x01\x04\x01\a"},
|
||||
{"vendor/golang.org/x/crypto/cryptobyte", "i\n\x03\x90\x01' \n"},
|
||||
{"vendor/golang.org/x/crypto/cryptobyte/asn1", ""},
|
||||
{"vendor/golang.org/x/crypto/internal/alias", "\xd3\x02"},
|
||||
{"vendor/golang.org/x/crypto/internal/poly1305", "W\x15\x9c\x01"},
|
||||
{"vendor/golang.org/x/net/dns/dnsmessage", "s\xc7\x01"},
|
||||
{"vendor/golang.org/x/net/http/httpguts", "\x8f\x02\x14\x1a\x14\r"},
|
||||
{"vendor/golang.org/x/net/http/httpproxy", "s\x03\x99\x01\x10\x05\x01\x18\x14\r"},
|
||||
{"vendor/golang.org/x/net/http2/hpack", "\x03p\x03\x83\x01F"},
|
||||
{"vendor/golang.org/x/net/idna", "v\x8f\x018\x14\x10\x02\x01"},
|
||||
{"vendor/golang.org/x/net/nettest", "\x03i\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\v"},
|
||||
{"vendor/golang.org/x/sys/cpu", "\xa5\x02\r\n\x01\x16"},
|
||||
{"vendor/golang.org/x/text/secure/bidirule", "s\xde\x01\x11\x01"},
|
||||
{"vendor/golang.org/x/text/transform", "\x03p\x86\x01X"},
|
||||
{"vendor/golang.org/x/text/unicode/bidi", "\x03\bk\x87\x01>\x16"},
|
||||
{"vendor/golang.org/x/text/unicode/norm", "l\n\x83\x01F\x12\x11"},
|
||||
{"weak", "\x9a\x01\x98\x01!"},
|
||||
}
|
||||
|
||||
// bootstrap is the list of bootstrap packages extracted from cmd/dist.
|
||||
var bootstrap = map[string]bool{
|
||||
"cmp": true,
|
||||
"cmd/asm": true,
|
||||
"cmd/asm/internal/arch": true,
|
||||
"cmd/asm/internal/asm": true,
|
||||
"cmd/asm/internal/flags": true,
|
||||
"cmd/asm/internal/lex": true,
|
||||
"cmd/cgo": true,
|
||||
"cmd/compile": true,
|
||||
"cmd/compile/internal/abi": true,
|
||||
"cmd/compile/internal/abt": true,
|
||||
"cmd/compile/internal/amd64": true,
|
||||
"cmd/compile/internal/arm": true,
|
||||
"cmd/compile/internal/arm64": true,
|
||||
"cmd/compile/internal/base": true,
|
||||
"cmd/compile/internal/bitvec": true,
|
||||
"cmd/compile/internal/bloop": true,
|
||||
"cmd/compile/internal/compare": true,
|
||||
"cmd/compile/internal/coverage": true,
|
||||
"cmd/compile/internal/deadlocals": true,
|
||||
"cmd/compile/internal/devirtualize": true,
|
||||
"cmd/compile/internal/dwarfgen": true,
|
||||
"cmd/compile/internal/escape": true,
|
||||
"cmd/compile/internal/gc": true,
|
||||
"cmd/compile/internal/importer": true,
|
||||
"cmd/compile/internal/inline": true,
|
||||
"cmd/compile/internal/inline/inlheur": true,
|
||||
"cmd/compile/internal/inline/interleaved": true,
|
||||
"cmd/compile/internal/ir": true,
|
||||
"cmd/compile/internal/liveness": true,
|
||||
"cmd/compile/internal/logopt": true,
|
||||
"cmd/compile/internal/loong64": true,
|
||||
"cmd/compile/internal/loopvar": true,
|
||||
"cmd/compile/internal/mips": true,
|
||||
"cmd/compile/internal/mips64": true,
|
||||
"cmd/compile/internal/noder": true,
|
||||
"cmd/compile/internal/objw": true,
|
||||
"cmd/compile/internal/pgoir": true,
|
||||
"cmd/compile/internal/pkginit": true,
|
||||
"cmd/compile/internal/ppc64": true,
|
||||
"cmd/compile/internal/rangefunc": true,
|
||||
"cmd/compile/internal/reflectdata": true,
|
||||
"cmd/compile/internal/riscv64": true,
|
||||
"cmd/compile/internal/rttype": true,
|
||||
"cmd/compile/internal/s390x": true,
|
||||
"cmd/compile/internal/slice": true,
|
||||
"cmd/compile/internal/ssa": true,
|
||||
"cmd/compile/internal/ssagen": true,
|
||||
"cmd/compile/internal/staticdata": true,
|
||||
"cmd/compile/internal/staticinit": true,
|
||||
"cmd/compile/internal/syntax": true,
|
||||
"cmd/compile/internal/test": true,
|
||||
"cmd/compile/internal/typebits": true,
|
||||
"cmd/compile/internal/typecheck": true,
|
||||
"cmd/compile/internal/types": true,
|
||||
"cmd/compile/internal/types2": true,
|
||||
"cmd/compile/internal/walk": true,
|
||||
"cmd/compile/internal/wasm": true,
|
||||
"cmd/compile/internal/x86": true,
|
||||
"cmd/internal/archive": true,
|
||||
"cmd/internal/bio": true,
|
||||
"cmd/internal/codesign": true,
|
||||
"cmd/internal/dwarf": true,
|
||||
"cmd/internal/edit": true,
|
||||
"cmd/internal/gcprog": true,
|
||||
"cmd/internal/goobj": true,
|
||||
"cmd/internal/hash": true,
|
||||
"cmd/internal/macho": true,
|
||||
"cmd/internal/obj": true,
|
||||
"cmd/internal/obj/arm": true,
|
||||
"cmd/internal/obj/arm64": true,
|
||||
"cmd/internal/obj/loong64": true,
|
||||
"cmd/internal/obj/mips": true,
|
||||
"cmd/internal/obj/ppc64": true,
|
||||
"cmd/internal/obj/riscv": true,
|
||||
"cmd/internal/obj/s390x": true,
|
||||
"cmd/internal/obj/wasm": true,
|
||||
"cmd/internal/obj/x86": true,
|
||||
"cmd/internal/objabi": true,
|
||||
"cmd/internal/par": true,
|
||||
"cmd/internal/pgo": true,
|
||||
"cmd/internal/pkgpath": true,
|
||||
"cmd/internal/quoted": true,
|
||||
"cmd/internal/src": true,
|
||||
"cmd/internal/sys": true,
|
||||
"cmd/internal/telemetry": true,
|
||||
"cmd/internal/telemetry/counter": true,
|
||||
"cmd/link": true,
|
||||
"cmd/link/internal/amd64": true,
|
||||
"cmd/link/internal/arm": true,
|
||||
"cmd/link/internal/arm64": true,
|
||||
"cmd/link/internal/benchmark": true,
|
||||
"cmd/link/internal/dwtest": true,
|
||||
"cmd/link/internal/ld": true,
|
||||
"cmd/link/internal/loadelf": true,
|
||||
"cmd/link/internal/loader": true,
|
||||
"cmd/link/internal/loadmacho": true,
|
||||
"cmd/link/internal/loadpe": true,
|
||||
"cmd/link/internal/loadxcoff": true,
|
||||
"cmd/link/internal/loong64": true,
|
||||
"cmd/link/internal/mips": true,
|
||||
"cmd/link/internal/mips64": true,
|
||||
"cmd/link/internal/ppc64": true,
|
||||
"cmd/link/internal/riscv64": true,
|
||||
"cmd/link/internal/s390x": true,
|
||||
"cmd/link/internal/sym": true,
|
||||
"cmd/link/internal/wasm": true,
|
||||
"cmd/link/internal/x86": true,
|
||||
"compress/flate": true,
|
||||
"compress/zlib": true,
|
||||
"container/heap": true,
|
||||
"debug/dwarf": true,
|
||||
"debug/elf": true,
|
||||
"debug/macho": true,
|
||||
"debug/pe": true,
|
||||
"go/build/constraint": true,
|
||||
"go/constant": true,
|
||||
"go/version": true,
|
||||
"internal/abi": true,
|
||||
"internal/coverage": true,
|
||||
"cmd/internal/cov/covcmd": true,
|
||||
"internal/bisect": true,
|
||||
"internal/buildcfg": true,
|
||||
"internal/exportdata": true,
|
||||
"internal/goarch": true,
|
||||
"internal/godebugs": true,
|
||||
"internal/goexperiment": true,
|
||||
"internal/goroot": true,
|
||||
"internal/gover": true,
|
||||
"internal/goversion": true,
|
||||
"internal/lazyregexp": true,
|
||||
"internal/pkgbits": true,
|
||||
"internal/platform": true,
|
||||
"internal/profile": true,
|
||||
"internal/race": true,
|
||||
"internal/runtime/gc": true,
|
||||
"internal/saferio": true,
|
||||
"internal/syscall/unix": true,
|
||||
"internal/types/errors": true,
|
||||
"internal/unsafeheader": true,
|
||||
"internal/xcoff": true,
|
||||
"internal/zstd": true,
|
||||
"math/bits": true,
|
||||
"sort": true,
|
||||
}
|
||||
|
||||
// BootstrapVersion is the minor version of Go used during toolchain
|
||||
// bootstrapping. Packages for which [IsBootstrapPackage] must not use
|
||||
// features of Go newer than this version.
|
||||
const BootstrapVersion = Version(24) // go1.24.6
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// Copyright 2025 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 stdlib
|
||||
|
||||
// This file provides the API for the import graph of the standard library.
|
||||
//
|
||||
// Be aware that the compiler-generated code for every package
|
||||
// implicitly depends on package "runtime" and a handful of others
|
||||
// (see runtimePkgs in GOROOT/src/cmd/internal/objabi/pkgspecial.go).
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"iter"
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Imports returns the sequence of packages directly imported by the
|
||||
// named standard packages, in name order.
|
||||
// The imports of an unknown package are the empty set.
|
||||
//
|
||||
// The graph is built into the application and may differ from the
|
||||
// graph in the Go source tree being analyzed by the application.
|
||||
func Imports(pkgs ...string) iter.Seq[string] {
|
||||
return func(yield func(string) bool) {
|
||||
for _, pkg := range pkgs {
|
||||
if i, ok := find(pkg); ok {
|
||||
var depIndex uint64
|
||||
for data := []byte(deps[i].deps); len(data) > 0; {
|
||||
delta, n := binary.Uvarint(data)
|
||||
depIndex += delta
|
||||
if !yield(deps[depIndex].name) {
|
||||
return
|
||||
}
|
||||
data = data[n:]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dependencies returns the set of all dependencies of the named
|
||||
// standard packages, including the initial package,
|
||||
// in a deterministic topological order.
|
||||
// The dependencies of an unknown package are the empty set.
|
||||
//
|
||||
// The graph is built into the application and may differ from the
|
||||
// graph in the Go source tree being analyzed by the application.
|
||||
func Dependencies(pkgs ...string) iter.Seq[string] {
|
||||
return func(yield func(string) bool) {
|
||||
for _, pkg := range pkgs {
|
||||
if i, ok := find(pkg); ok {
|
||||
var seen [1 + len(deps)/8]byte // bit set of seen packages
|
||||
var visit func(i int) bool
|
||||
visit = func(i int) bool {
|
||||
bit := byte(1) << (i % 8)
|
||||
if seen[i/8]&bit == 0 {
|
||||
seen[i/8] |= bit
|
||||
var depIndex uint64
|
||||
for data := []byte(deps[i].deps); len(data) > 0; {
|
||||
delta, n := binary.Uvarint(data)
|
||||
depIndex += delta
|
||||
if !visit(int(depIndex)) {
|
||||
return false
|
||||
}
|
||||
data = data[n:]
|
||||
}
|
||||
if !yield(deps[i].name) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
if !visit(i) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// find returns the index of pkg in the deps table.
|
||||
func find(pkg string) (int, bool) {
|
||||
return slices.BinarySearchFunc(deps[:], pkg, func(p pkginfo, n string) int {
|
||||
return strings.Compare(p.name, n)
|
||||
})
|
||||
}
|
||||
|
||||
// IsBootstrapPackage reports whether pkg is one of the low-level
|
||||
// packages in the Go distribution that must compile with the older
|
||||
// language version specified by [BootstrapVersion] during toolchain
|
||||
// bootstrapping; see golang.org/s/go15bootstrap.
|
||||
func IsBootstrapPackage(pkg string) bool {
|
||||
return bootstrap[pkg]
|
||||
}
|
||||
+18276
File diff suppressed because it is too large
Load Diff
+105
@@ -0,0 +1,105 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
//go:generate go run generate.go
|
||||
|
||||
// Package stdlib provides a table of all exported symbols in the
|
||||
// standard library, along with the version at which they first
|
||||
// appeared. It also provides the import graph of std packages.
|
||||
package stdlib
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Symbol struct {
|
||||
Name string
|
||||
Kind Kind
|
||||
Version Version // Go version that first included the symbol
|
||||
// Signature provides the type of a function (defined only for Kind=Func).
|
||||
// Imported types are denoted as pkg.T; pkg is not fully qualified.
|
||||
// TODO(adonovan): use an unambiguous encoding that is parseable.
|
||||
//
|
||||
// Example2:
|
||||
// func[M ~map[K]V, K comparable, V any](m M) M
|
||||
// func(fi fs.FileInfo, link string) (*Header, error)
|
||||
Signature string // if Kind == stdlib.Func
|
||||
}
|
||||
|
||||
// A Kind indicates the kind of a symbol:
|
||||
// function, variable, constant, type, and so on.
|
||||
type Kind int8
|
||||
|
||||
const (
|
||||
Invalid Kind = iota // Example name:
|
||||
Type // "Buffer"
|
||||
Func // "Println"
|
||||
Var // "EOF"
|
||||
Const // "Pi"
|
||||
Field // "Point.X"
|
||||
Method // "(*Buffer).Grow" or "(Reader).Read"
|
||||
)
|
||||
|
||||
func (kind Kind) String() string {
|
||||
return [...]string{
|
||||
Invalid: "invalid",
|
||||
Type: "type",
|
||||
Func: "func",
|
||||
Var: "var",
|
||||
Const: "const",
|
||||
Field: "field",
|
||||
Method: "method",
|
||||
}[kind]
|
||||
}
|
||||
|
||||
// A Version represents a version of Go of the form "go1.%d".
|
||||
type Version int8
|
||||
|
||||
// String returns a version string of the form "go1.23", without allocating.
|
||||
func (v Version) String() string { return versions[v] }
|
||||
|
||||
var versions [30]string // (increase constant as needed)
|
||||
|
||||
func init() {
|
||||
for i := range versions {
|
||||
versions[i] = fmt.Sprintf("go1.%d", i)
|
||||
}
|
||||
}
|
||||
|
||||
// HasPackage reports whether the specified package path is part of
|
||||
// the standard library's public API.
|
||||
func HasPackage(path string) bool {
|
||||
_, ok := PackageSymbols[path]
|
||||
return ok
|
||||
}
|
||||
|
||||
// SplitField splits the field symbol name into type and field
|
||||
// components. It must be called only on Field symbols.
|
||||
//
|
||||
// Example: "File.Package" -> ("File", "Package")
|
||||
func (sym *Symbol) SplitField() (typename, name string) {
|
||||
if sym.Kind != Field {
|
||||
panic("not a field")
|
||||
}
|
||||
typename, name, _ = strings.Cut(sym.Name, ".")
|
||||
return
|
||||
}
|
||||
|
||||
// SplitMethod splits the method symbol name into pointer, receiver,
|
||||
// and method components. It must be called only on Method symbols.
|
||||
//
|
||||
// Example: "(*Buffer).Grow" -> (true, "Buffer", "Grow")
|
||||
func (sym *Symbol) SplitMethod() (ptr bool, recv, name string) {
|
||||
if sym.Kind != Method {
|
||||
panic("not a method")
|
||||
}
|
||||
recv, name, _ = strings.Cut(sym.Name, ".")
|
||||
recv = recv[len("(") : len(recv)-len(")")]
|
||||
ptr = recv[0] == '*'
|
||||
if ptr {
|
||||
recv = recv[len("*"):]
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user