fermentord/vendor/github.com/getsentry/sentry-go/stacktrace_below_go1.20.go

16 lines
413 B
Go
Raw Normal View History

2024-06-15 13:58:47 +00:00
//go:build !go1.20
package sentry
import "strings"
func isCompilerGeneratedSymbol(name string) bool {
// In versions of Go below 1.20 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 true
}
return false
}