...
Run Format

Source file src/runtime/typekind.go

Documentation: runtime

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  const (
     8  	kindBool = 1 + iota
     9  	kindInt
    10  	kindInt8
    11  	kindInt16
    12  	kindInt32
    13  	kindInt64
    14  	kindUint
    15  	kindUint8
    16  	kindUint16
    17  	kindUint32
    18  	kindUint64
    19  	kindUintptr
    20  	kindFloat32
    21  	kindFloat64
    22  	kindComplex64
    23  	kindComplex128
    24  	kindArray
    25  	kindChan
    26  	kindFunc
    27  	kindInterface
    28  	kindMap
    29  	kindPtr
    30  	kindSlice
    31  	kindString
    32  	kindStruct
    33  	kindUnsafePointer
    34  
    35  	kindDirectIface = 1 << 5
    36  	kindGCProg      = 1 << 6
    37  	kindNoPointers  = 1 << 7
    38  	kindMask        = (1 << 5) - 1
    39  )
    40  
    41  // isDirectIface reports whether t is stored directly in an interface value.
    42  func isDirectIface(t *_type) bool {
    43  	return t.kind&kindDirectIface != 0
    44  }
    45  

View as plain text