From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Library:Go runtime" |
|---|
| claim | "The low 5 bits of abi.Type.Kind_ hold the type kind, numbered as reflect.Kind (stable since at least Go 1.16). Before Go 1.26 bit 5 (0x20) of Kind_ was KindDirectIface (value stored directly in the interface word), moved to TFlag bit 5 in 1.26; before Go 1.24 bit 6 (0x40) was KindGCProg." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Go runtime" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "abi_Kind" |
|---|
| underlying_type | "uint8" |
|---|
| values | | KindInvalid | 0 |
|---|
| KindBool | 1 |
|---|
| KindInt | 2 |
|---|
| KindInt8 | 3 |
|---|
| KindInt16 | 4 |
|---|
| KindInt32 | 5 |
|---|
| KindInt64 | 6 |
|---|
| KindUint | 7 |
|---|
| KindUint8 | 8 |
|---|
| KindUint16 | 9 |
|---|
| KindUint32 | 10 |
|---|
| KindUint64 | 11 |
|---|
| KindUintptr | 12 |
|---|
| KindFloat32 | 13 |
|---|
| KindFloat64 | 14 |
|---|
| KindComplex64 | 15 |
|---|
| KindComplex128 | 16 |
|---|
| KindArray | 17 |
|---|
| KindChan | 18 |
|---|
| KindFunc | 19 |
|---|
| KindInterface | 20 |
|---|
| KindMap | 21 |
|---|
| KindPointer | 22 |
|---|
| KindSlice | 23 |
|---|
| KindString | 24 |
|---|
| KindStruct | 25 |
|---|
| KindUnsafePointer | 26 |
|---|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "const ( Invalid Kind = iota; Bool; Int; ... Struct; UnsafePointer )" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| commit | "dfc6f7db9bd75868ffb5cbc9501a2f4899122d2f" |
|---|
| path | "src/internal/abi/type.go" |
|---|
| lines | "50-80" |
|---|
|
| type | "source" |
|---|
| detail | "Go 1.16: kindBool = 1 + iota ... kindUnsafePointer; kindDirectIface = 1 << 5; kindGCProg = 1 << 6; kindMask = (1 << 5) - 1" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| commit | "f21be2fdc6f1becdbed1592ea0b245cdeedc5ac8" |
|---|
| path | "src/runtime/typekind.go" |
|---|
| lines | "8-37" |
|---|
|
| type | "comparison" |
|---|
| detail | "go1.24.0 and go1.25.0 internal/abi/type.go define KindDirectIface = 1<<5 and KindMask but no KindGCProg; go1.26.0 adds TFlagDirectIface = 1<<5 and checks TFlag instead of Kind_." |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Mailpit v1.22.3 (Go 1.24.0): syscall.Errno has kind 12 (Uintptr), *io.LimitedReader kind 22 (Pointer) after masking with 0x1F." |
|---|
|
| type | "source" |
|---|
| detail | "go1.23.0 still defines KindGCProg Kind = 1 << 6 (gone in go1.24.0), confirming the 'before Go 1.24' boundary" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| path | "src/internal/abi/type.go" |
|---|
| lines | "75-76" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Kind" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T09:13:42.794Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:46:02.712Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read type.go at dfc6f7db: Kind iota list Invalid..UnsafePointer is exactly 27 values 0-26 in the same order as the fact (names prefixed Kind in the fact by design)." |
|---|
| notes | "Complete list." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-17T09:17:11.237Z" |
|---|
| summary | "Prefix the enumerator names with Kind so the exported C header does not define bare names like Int, String or Struct that collide with other headers" |
|---|
| changed | |
|---|
|
|
|---|