Documentation
¶
Overview ¶
Package std answers which name a standard library import declares.
The table in packages.go is generated from "go list std" and holds the answer outright, so nothing here guesses. That is what lets the formatter prune an unused standard library import: the name is known, not inferred.
A path the table does not hold is not treated as standard library, whatever it looks like. A package added by a newer Go release, and a local module such as "myapp/models" whose first path element holds no dot, are both unknown until the table is regenerated, and unknown means the formatter falls back to guessing.
Index ¶
Constants ¶
const GeneratedFor = "go1.27"
GeneratedFor names the Go release this table was read from, as in "go1.27".
A later release adds packages the table does not hold, and Name then answers false for them, which leaves the formatter guessing rather than wrong. TestTableMatchesToolchain checks the table exactly on this release and checks only the names they share on any other.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.