github.com/gramework/runtimer@v0.0.0-20211014201118-d25b6e2ccefd/kinds.go (about) 1 package runtimer 2 3 const ( 4 KindBool = 1 + iota 5 KindInt 6 KindInt8 7 KindInt16 8 KindInt32 9 KindInt64 10 KindUint 11 KindUint8 12 KindUint16 13 KindUint32 14 KindUint64 15 KindUintptr 16 KindFloat32 17 KindFloat64 18 KindComplex64 19 KindComplex128 20 KindArray 21 KindChan 22 KindFunc 23 KindInterface 24 KindMap 25 KindPtr 26 KindSlice 27 KindString 28 KindStruct 29 KindUnsafePointer 30 31 KindDirectIface = 1 << 5 32 KindGCProg = 1 << 6 33 KindNoPointers = 1 << 7 34 KindMask = (1 << 5) - 1 35 ) 36 37 // IsDirectIface reports whether t is stored directly in an interface value. 38 func IsDirectIface(t *Type) bool { 39 return t.Kind&KindDirectIface != 0 40 }