Documentation
¶
Index ¶
Constants ¶
View Source
const NUMBER = 456
View Source
const REVISION = "0af20d1a52676c97158307f104c1a6affcca2880+1"
View Source
const VERSION = "1.1.14"
these fields are automatically copied from when running `go run ./script/generate runtime/core/version.go`
View Source
const XGO_CHECK_TOOLCHAIN_VERSION = "XGO_CHECK_TOOLCHAIN_VERSION"
View Source
const XGO_NUMBER = 0
View Source
const XGO_REVISION = ""
View Source
const XGO_VERSION = ""
these fields will be filled by compiler when xgo builds with xgo/runtime see CORE_VERSION in cmd/xgo/version.go
Variables ¶
This section is empty.
Functions ¶
func ParseFuncName ¶ added in v1.0.8
func ParseFuncName(fullName string) (pkgPath string, recvName string, recvPtr bool, typeGeneric string, funcGeneric string, funcName string)
a/b/c.A a/b/c.(*C).X a/b/c.C.Y a/b/c.Z a/b/c.Z[].X a/b/c.X[]
parse process:
funcGeneric funcName recvType recvGeneric pkgPath
Types ¶
type Field ¶
type Field interface {
Name() string
Value() interface{}
Ptr() interface{}
Set(val interface{})
}
type FuncInfo ¶
type FuncInfo struct {
Kind Kind
// full name, format: {pkgPath}.{receiver}.{funcName}
// example: github.com/xhd2015/xgo/runtime/core.(*SomeType).SomeFunc
FullName string
Pkg string
// identity name within a package, for ptr-method, it's something like `(*SomeType).SomeFunc`
// run `go run ./test/example/method` to verify
IdentityName string
Name string
RecvType string
RecvPtr bool
// is this an interface method?
Interface bool
// is this a generic function?
Generic bool
// is this a closure?
Closure bool
// is this function from stdlib
Stdlib bool
// source info
File string
Line int
// PC is the function entry point
// if it's a method, it is the underlying entry point
// for all instances, it is the same
PC uintptr `json:"-"`
Func interface{} `json:"-"`
Var interface{} `json:"-"` // var address
RecvName string
ArgNames []string
ResNames []string
// is first argument ctx
FirstArgCtx bool
// last result error
LastResultErr bool
}
func (*FuncInfo) DisplayName ¶
type Kind ¶ added in v1.0.19
type Kind int
don't change the following marker they are generated by xgo ==start xgo func==
type ObjectWithErr ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.