Documentation
¶
Overview ¶
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.
Index ¶
Constants ¶
const BootstrapVersion = Version(24) // go1.24.6
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.
Variables ¶
var PackageSymbols = map[string][]Symbol{}/* 172 elements not displayed */
Functions ¶
func Dependencies ¶ added in v0.31.0
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 HasPackage ¶
HasPackage reports whether the specified package path is part of the standard library's public API.
func Imports ¶ added in v0.31.0
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 IsBootstrapPackage ¶ added in v0.39.0
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.
Types ¶
type Kind ¶
type Kind int8
A Kind indicates the kind of a symbol: function, variable, constant, type, and so on.
type Symbol ¶
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
}
func (*Symbol) SplitField ¶
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 (*Symbol) SplitMethod ¶
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")