feat: add go:linkname directives for defaultToolTags and defaultReleaseTags
Add linkname directives and stdlib comments for defaultToolTags and defaultReleaseTags variables to match Go standard library pattern. This allows external packages (like gopherjs) to access these internal variables via linkname, maintaining compatibility with packages that depend on this behavior. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,26 @@ func parseGoVersion() int {
|
|||||||
|
|
||||||
var goVersion = parseGoVersion()
|
var goVersion = parseGoVersion()
|
||||||
|
|
||||||
|
// defaultToolTags should be an internal detail,
|
||||||
|
// but widely used packages access it using linkname.
|
||||||
|
// Notable members of the hall of shame include:
|
||||||
|
// - github.com/gopherjs/gopherjs
|
||||||
|
//
|
||||||
|
// Do not remove or change the type signature.
|
||||||
|
// See go.dev/issue/67401.
|
||||||
|
//
|
||||||
|
//go:linkname defaultToolTags
|
||||||
var defaultToolTags []string
|
var defaultToolTags []string
|
||||||
|
|
||||||
|
// defaultReleaseTags should be an internal detail,
|
||||||
|
// but widely used packages access it using linkname.
|
||||||
|
// Notable members of the hall of shame include:
|
||||||
|
// - github.com/gopherjs/gopherjs
|
||||||
|
//
|
||||||
|
// Do not remove or change the type signature.
|
||||||
|
// See go.dev/issue/67401.
|
||||||
|
//
|
||||||
|
//go:linkname defaultReleaseTags
|
||||||
var defaultReleaseTags []string
|
var defaultReleaseTags []string
|
||||||
|
|
||||||
// defaultContext returns the default Context for builds.
|
// defaultContext returns the default Context for builds.
|
||||||
|
|||||||
Reference in New Issue
Block a user