-
Notifications
You must be signed in to change notification settings - Fork 5
/
name_js.go
58 lines (42 loc) · 1.04 KB
/
name_js.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//go:build js && !wasm
// +build js,!wasm
package reflectx
import (
_ "unsafe"
)
//go:linkname name_nameLen reflect.name.nameLen
func name_nameLen(name) int
//go:linkname name_isExported reflect.name.isExported
func name_isExported(name) bool
//go:linkname name_name reflect.name.name
func name_name(name) string
//go:linkname name_tag reflect.name.tag
func name_tag(name) string
//go:linkname name_pkgPath reflect.name.pkgPath
func name_pkgPath(name) string
//go:linkname name_setPkgPath reflect.name.setPkgPath
func name_setPkgPath(name, string)
type name struct {
bytes *byte
}
func (n name) isExported() bool {
return name_isExported(n)
}
func (n name) nameLen() int {
return name_nameLen(n)
}
func (n name) name() (s string) {
return name_name(n)
}
func (n name) tag() (s string) {
return name_tag(n)
}
func (n name) pkgPath() string {
return name_pkgPath(n)
}
func (n name) setPkgPath(pkgpath string) {
name_setPkgPath(n, pkgpath)
}
func newNameEx(n, tag string, exported bool, pkgpath bool) name {
return newName(n, tag, exported)
}