mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/go: move runtime/debug.modinfo to runtime.modinfo
It is easier to ensure that the symbol is always present if we move it to package runtime. Avoids init-time work. Also moves it next to buildVersion, the other similar symbol. Setting up for "go version <binary>". For #31624. Change-Id: I943724469ce6992153e701257eb6f12da88c8e4e Reviewed-on: https://go-review.googlesource.com/c/go/+/173341 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
fac3b5d05e
commit
b51c157025
4 changed files with 19 additions and 12 deletions
|
|
@ -57,3 +57,8 @@ func NumCgoCall() int64 {
|
|||
func NumGoroutine() int {
|
||||
return int(gcount())
|
||||
}
|
||||
|
||||
//go:linkname debug_modinfo runtime/debug.modinfo
|
||||
func debug_modinfo() string {
|
||||
return modinfo
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue