-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.14 darwin/amd64
What did you do?
package main
import "debug/gosym"
func main() {
s1 := gosym.Sym{Name: "go.uber.org/zap/zapcore.(*CheckedEntry).Write"}
println(s1.PackageName())
}
What did you expect to see?
go.uber.org/zap/zapcore
What did you see instead?
empty string
I see problem is right here but since I'm not aware how linker uses these prefixes I can't figure out how to properly fix this condition
Lines 40 to 44 in 43c6ada
// A prefix of "type." and "go." is a compiler-generated symbol that doesn't belong to any package. | |
// See variable reservedimports in cmd/compile/internal/gc/subr.go | |
if strings.HasPrefix(name, "go.") || strings.HasPrefix(name, "type.") { | |
return "" | |
} |
NateScarlet, denniselite and drinkius
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.