reflect.Type.Kind (method)
313 uses
reflect (current package)
deepequal.go#L109: if v1.Type().Elem().Kind() == Uint8 {
makefunc.go#L47: if typ.Kind() != Func {
type.go#L104: Kind() Kind
type.go#L879: return t.Elem().Kind() == Array
type.go#L907: return t.Elem().Kind() == Array
type.go#L1156: if ft.Kind() == Pointer && ft.Elem().Kind() == Struct {
type.go#L1389: if u.Kind() != Interface {
type.go#L1846: if variadic && (len(in) == 0 || in[len(in)-1].Kind() != Slice) {
type.go#L2136: switch t.Kind() {
value.go#L2083: if toRType(v.typ()).Elem().Kind() != Uint8 { // TODO add Elem method, fix mustBe(Slice) to return slice.
value.go#L2905: if typ.Kind() != Slice {
value.go#L2934: if typ.Kind() != Chan {
value.go#L2956: if typ.Kind() != Map {
value.go#L3099: case vt.Kind() == Slice && t.Kind() == Array:
value.go#L3103: case vt.Kind() == Slice && t.Kind() == Pointer && t.Elem().Kind() == Array:
value.go#L3123: switch v.Type().Elem().Kind() {
value.go#L3434: if v.Type().Kind() == Float32 && t.Kind() == Float32 {
visiblefields.go#L20: if t.Kind() != Struct {
visiblefields.go#L95: if f.Type.Kind() == Pointer {
visiblefields.go#L98: if f.Type.Kind() == Struct {
encoding/asn1
asn1.go#L683: if ifaceType := fieldType; ifaceType.Kind() == reflect.Interface && ifaceType.NumMethod() == 0 {
asn1.go#L943: if sliceType.Elem().Kind() == reflect.Uint8 {
asn1.go#L1100: if e.Type.Kind() != reflect.Pointer {
common.go#L166: switch t.Kind() {
common.go#L174: if t.Elem().Kind() == reflect.Uint8 {
marshal.go#L534: if sliceType.Elem().Kind() == reflect.Uint8 {
encoding/binary
binary.go#L708: if t.Kind() == reflect.Struct {
binary.go#L734: switch t.Kind() {
encoding/json
decode.go#L162: if e.Type.Kind() != reflect.Pointer {
decode.go#L632: switch t.Key().Kind() {
decode.go#L779: switch kt.Kind() {
decode.go#L941: if v.Type().Elem().Kind() != reflect.Uint8 {
encode.go#L395: if t.Kind() != reflect.Pointer && allowAddr && reflect.PointerTo(t).Implements(marshalerType) {
encode.go#L401: if t.Kind() != reflect.Pointer && allowAddr && reflect.PointerTo(t).Implements(textMarshalerType) {
encode.go#L408: switch t.Kind() {
encode.go#L791: switch t.Key().Kind() {
encode.go#L849: if t.Elem().Kind() == reflect.Uint8 {
encode.go#L946: if t.Kind() == reflect.Pointer {
encode.go#L1121: if t.Kind() == reflect.Pointer {
encode.go#L1124: if !sf.IsExported() && t.Kind() != reflect.Struct {
encode.go#L1147: if ft.Name() == "" && ft.Kind() == reflect.Pointer {
encode.go#L1155: switch ft.Kind() {
encode.go#L1166: if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
encode.go#L1191: case t.Kind() == reflect.Interface && t.Implements(isZeroerType):
encode.go#L1199: case t.Kind() == reflect.Pointer && t.Implements(isZeroerType):
flag
flag.go#L544: if typ.Kind() == reflect.Pointer {
flag.go#L554: if typ.Kind() == reflect.Pointer {
fmt
print.go#L873: if t.Elem().Kind() == reflect.Uint8 {
print.go#L1203: isString := arg != nil && reflect.TypeOf(arg).Kind() == reflect.String
scan.go#L1036: if typ.Elem().Kind() != reflect.Uint8 {
github.com/google/go-cmp/cmp
compare.go#L271: switch t.Kind() {
compare.go#L299: panic(fmt.Sprintf("%v kind not handled", t.Kind()))
compare.go#L419: isSlice := t.Kind() == reflect.Slice
options.go#L166: if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 {
options.go#L302: if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 {
options.go#L361: if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 {
options.go#L434: if t.Kind() != reflect.Struct {
report_compare.go#L113: parentKind = v.parent.Type.Kind()
report_compare.go#L118: isBytes := v.Type.Kind() == reflect.Slice && v.Type.Elem() == byteType
report_compare.go#L175: switch k := v.Type.Kind(); k {
report_reflect.go#L55: switch t.Kind() {
report_reflect.go#L75: switch t.Kind() {
report_reflect.go#L134: if (t.Kind() != reflect.Ptr && t.Kind() != reflect.Interface) || !v.IsNil() {
report_reflect.go#L162: switch t.Kind() {
report_reflect.go#L205: s := opts.WithTypeMode(autoType).FormatValue(vv, t.Kind(), ptrs)
report_reflect.go#L238: s := opts.WithTypeMode(elideType).FormatValue(v.Index(i), t.Kind(), ptrs)
report_reflect.go#L243: if t.Kind() == reflect.Slice && opts.PrintAddresses {
report_reflect.go#L272: sv := opts.WithTypeMode(elideType).FormatValue(v.MapIndex(k), t.Kind(), ptrs)
report_reflect.go#L298: out = opts.FormatValue(v.Elem(), t.Kind(), ptrs)
report_reflect.go#L308: return opts.WithTypeMode(emitType).FormatValue(v.Elem(), t.Kind(), ptrs)
report_slices.go#L50: if t.Kind() == reflect.Interface && !vx.IsNil() && !vy.IsNil() && vx.Elem().Type() == vy.Elem().Type() {
report_slices.go#L56: switch t.Kind() {
report_slices.go#L60: switch t.Elem().Kind() {
report_slices.go#L69: if t.Kind() == reflect.Slice && (vx.Len() == 0 || vy.Len() == 0) {
report_slices.go#L93: if t.Kind() == reflect.Interface {
report_slices.go#L104: case t.Kind() == reflect.String:
report_slices.go#L107: case t.Kind() == reflect.Slice && t.Elem() == byteType:
report_slices.go#L110: case t.Kind() == reflect.Array:
report_slices.go#L236: switch t.Kind() {
report_slices.go#L284: if t.Elem().Kind() == reflect.Bool {
report_slices.go#L299: vx, vy, chunkSize, t.Elem().Kind().String(),
report_slices.go#L303: switch t.Elem().Kind() {
report_slices.go#L325: if t.Kind() == reflect.String {
report_slices.go#L330: switch t.Kind() {
github.com/google/go-cmp/cmp/internal/function
func.go#L42: if t == nil || t.Kind() != reflect.Func || t.IsVariadic() {
github.com/google/go-cmp/cmp/internal/value
name.go#L45: switch k := t.Kind(); k {
sort.go#L37: switch x.Type().Kind() {
sort.go#L89: if tx.Kind() != ty.Kind() {
go.uber.org/mock/gomock
call.go#L201: switch want.Kind() {
call.go#L249: switch at.Kind() {
call.go#L265: switch reflect.TypeOf(args[n]).Kind() {
string.go#L28: if typ.Kind() == reflect.Ptr {
string.go#L31: if typ.Kind() != reflect.Struct {
google.golang.org/protobuf/internal/encoding/tag
tag.go#L54: switch goType.Kind() {
tag.go#L67: if goType.Kind() == reflect.Int32 {
tag.go#L71: if goType.Kind() == reflect.Int64 {
tag.go#L75: switch goType.Kind() {
tag.go#L84: switch goType.Kind() {
tag.go#L94: case goType.Kind() == reflect.String:
tag.go#L96: case goType.Kind() == reflect.Slice && goType.Elem() == byteType:
google.golang.org/protobuf/internal/impl
codec_field_opaque.go#L120: if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {
codec_message.go#L71: mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr
codec_message_opaque.go#L23: mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr
codec_tables.go#L43: if ft.Kind() != reflect.Slice {
codec_tables.go#L49: if ft.Kind() == reflect.Bool {
codec_tables.go#L53: if ft.Kind() == reflect.Int32 {
codec_tables.go#L57: if ft.Kind() == reflect.Int32 {
codec_tables.go#L61: if ft.Kind() == reflect.Int32 {
codec_tables.go#L65: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L69: if ft.Kind() == reflect.Int64 {
codec_tables.go#L73: if ft.Kind() == reflect.Int64 {
codec_tables.go#L77: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L81: if ft.Kind() == reflect.Int32 {
codec_tables.go#L85: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L89: if ft.Kind() == reflect.Float32 {
codec_tables.go#L93: if ft.Kind() == reflect.Int64 {
codec_tables.go#L97: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L101: if ft.Kind() == reflect.Float64 {
codec_tables.go#L105: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
codec_tables.go#L108: if ft.Kind() == reflect.String {
codec_tables.go#L111: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {
codec_tables.go#L114: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
codec_tables.go#L118: if ft.Kind() == reflect.String {
codec_tables.go#L121: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
codec_tables.go#L134: if ft.Kind() != reflect.Slice {
codec_tables.go#L140: if ft.Kind() == reflect.Bool {
codec_tables.go#L144: if ft.Kind() == reflect.Int32 {
codec_tables.go#L148: if ft.Kind() == reflect.Int32 {
codec_tables.go#L152: if ft.Kind() == reflect.Int32 {
codec_tables.go#L156: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L160: if ft.Kind() == reflect.Int64 {
codec_tables.go#L164: if ft.Kind() == reflect.Int64 {
codec_tables.go#L168: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L172: if ft.Kind() == reflect.Int32 {
codec_tables.go#L176: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L180: if ft.Kind() == reflect.Float32 {
codec_tables.go#L184: if ft.Kind() == reflect.Int64 {
codec_tables.go#L188: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L192: if ft.Kind() == reflect.Float64 {
codec_tables.go#L205: if ft.Kind() == reflect.Bool {
codec_tables.go#L209: if ft.Kind() == reflect.Int32 {
codec_tables.go#L213: if ft.Kind() == reflect.Int32 {
codec_tables.go#L217: if ft.Kind() == reflect.Int32 {
codec_tables.go#L221: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L225: if ft.Kind() == reflect.Int64 {
codec_tables.go#L229: if ft.Kind() == reflect.Int64 {
codec_tables.go#L233: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L237: if ft.Kind() == reflect.Int32 {
codec_tables.go#L241: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L245: if ft.Kind() == reflect.Float32 {
codec_tables.go#L249: if ft.Kind() == reflect.Int64 {
codec_tables.go#L253: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L257: if ft.Kind() == reflect.Float64 {
codec_tables.go#L261: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
codec_tables.go#L264: if ft.Kind() == reflect.String {
codec_tables.go#L267: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {
codec_tables.go#L270: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
codec_tables.go#L274: if ft.Kind() == reflect.String {
codec_tables.go#L277: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
codec_tables.go#L281: case ft.Kind() == reflect.Ptr:
codec_tables.go#L285: if ft.Kind() == reflect.Bool {
codec_tables.go#L289: if ft.Kind() == reflect.Int32 {
codec_tables.go#L293: if ft.Kind() == reflect.Int32 {
codec_tables.go#L297: if ft.Kind() == reflect.Int32 {
codec_tables.go#L301: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L305: if ft.Kind() == reflect.Int64 {
codec_tables.go#L309: if ft.Kind() == reflect.Int64 {
codec_tables.go#L313: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L317: if ft.Kind() == reflect.Int32 {
codec_tables.go#L321: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L325: if ft.Kind() == reflect.Float32 {
codec_tables.go#L329: if ft.Kind() == reflect.Int64 {
codec_tables.go#L333: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L337: if ft.Kind() == reflect.Float64 {
codec_tables.go#L341: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
codec_tables.go#L344: if ft.Kind() == reflect.String {
codec_tables.go#L348: if ft.Kind() == reflect.String {
codec_tables.go#L355: if ft.Kind() == reflect.Bool {
codec_tables.go#L359: if ft.Kind() == reflect.Int32 {
codec_tables.go#L363: if ft.Kind() == reflect.Int32 {
codec_tables.go#L367: if ft.Kind() == reflect.Int32 {
codec_tables.go#L371: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L375: if ft.Kind() == reflect.Int64 {
codec_tables.go#L379: if ft.Kind() == reflect.Int64 {
codec_tables.go#L383: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L387: if ft.Kind() == reflect.Int32 {
codec_tables.go#L391: if ft.Kind() == reflect.Uint32 {
codec_tables.go#L395: if ft.Kind() == reflect.Float32 {
codec_tables.go#L399: if ft.Kind() == reflect.Int64 {
codec_tables.go#L403: if ft.Kind() == reflect.Uint64 {
codec_tables.go#L407: if ft.Kind() == reflect.Float64 {
codec_tables.go#L411: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {
codec_tables.go#L414: if ft.Kind() == reflect.String {
codec_tables.go#L417: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {
codec_tables.go#L420: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
codec_tables.go#L424: if ft.Kind() == reflect.String {
codec_tables.go#L427: if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {
convert.go#L99: if t.Kind() == reflect.Bool {
convert.go#L103: if t.Kind() == reflect.Int32 {
convert.go#L107: if t.Kind() == reflect.Int64 {
convert.go#L111: if t.Kind() == reflect.Uint32 {
convert.go#L115: if t.Kind() == reflect.Uint64 {
convert.go#L119: if t.Kind() == reflect.Float32 {
convert.go#L123: if t.Kind() == reflect.Float64 {
convert.go#L127: if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {
convert.go#L131: if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {
convert.go#L136: if t.Kind() == reflect.Int32 {
convert.go#L328: if c.goType.Kind() == reflect.Slice && s == "" {
convert.go#L352: if c.goType.Kind() == reflect.String && v.Len() == 0 {
convert.go#L494: return c.goType.Kind() != reflect.Ptr
convert_list.go#L16: case t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice:
convert_list.go#L18: case t.Kind() == reflect.Slice:
convert_map.go#L20: if t.Kind() != reflect.Map {
legacy_extension.go#L42: switch extType.Kind() {
legacy_extension.go#L91: isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct
legacy_extension.go#L92: isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
legacy_message.go#L26: if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {
legacy_message.go#L37: if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {
legacy_message.go#L126: if t.Elem().Kind() == reflect.Struct {
legacy_message.go#L187: if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {
legacy_message.go#L195: switch f.Type.Kind() {
legacy_message.go#L289: if t.Kind() == reflect.Ptr {
legacy_message.go#L297: isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct
legacy_message.go#L298: isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
legacy_message.go#L339: if t.Kind() == reflect.Map {
legacy_message.go#L471: if mt.t.Kind() == reflect.Ptr {
legacy_message.go#L517: if m.v.Type().Kind() == reflect.Ptr {
message.go#L86: if t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct {
message_opaque.go#L32: if t.Kind() == reflect.Struct && t.NumField() > 0 {
message_opaque.go#L140: if ft.Kind() != reflect.Map {
message_opaque.go#L193: if ft.Kind() != reflect.Slice {
message_opaque.go#L243: if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {
message_opaque.go#L336: if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {
message_opaque.go#L404: if nullable && ft.Kind() == reflect.Ptr {
message_opaque_gen.go#L17: if ft.Kind() == reflect.Ptr {
message_opaque_gen.go#L30: switch ft.Kind() {
message_opaque_gen.go#L131: panic("unexpected protobuf kind: " + ft.Kind().String())
message_reflect.go#L207: if ft.Kind() == reflect.Slice {
message_reflect.go#L215: if fd.HasPresence() && ft.Kind() == reflect.Ptr {
message_reflect.go#L222: if isMessage && ft != nil && ft.Kind() != reflect.Ptr {
message_reflect_field.go#L63: if ft.Kind() != reflect.Interface {
message_reflect_field.go#L66: if ot.Kind() != reflect.Struct {
message_reflect_field.go#L146: if ft.Kind() != reflect.Map {
message_reflect_field.go#L199: if ft.Kind() != reflect.Slice {
message_reflect_field.go#L255: isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8
message_reflect_field.go#L258: if ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice {
message_reflect_field.go#L264: if ft.Kind() == reflect.Ptr {
message_reflect_field.go#L345: if fs.Type.Kind() != reflect.Ptr {
message_reflect_field.go#L364: if fs.Type.Kind() == reflect.Ptr && rv.IsNil() {
message_reflect_field.go#L370: if fs.Type.Kind() == reflect.Ptr && rv.IsNil() {
message_reflect_field_gen.go#L17: if ft.Kind() == reflect.Ptr {
message_reflect_field_gen.go#L34: switch ft.Kind() {
message_reflect_field_gen.go#L162: panic("unexpected protobuf kind: " + ft.Kind().String())
message_reflect_field_gen.go#L177: switch ft.Kind() {
message_reflect_field_gen.go#L272: panic("unexpected protobuf kind: " + ft.Kind().String())
validate.go#L157: if ft.Kind() == reflect.Ptr {
validate.go#L162: if ft.Kind() == reflect.Slice {
validate.go#L168: if ft.Kind() == reflect.Ptr {
validate.go#L173: if ft.Kind() == reflect.Slice {
validate.go#L202: if ft.Kind() == reflect.Map {
google.golang.org/protobuf/proto
equal.go#L46: if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y {
gotest.tools/v3/assert/cmp
compare.go#L174: switch colValue.Type().Kind() {
compare.go#L176: if itemValue.Type().Kind() != reflect.String {
compare.go#L276: kind := value.Type().Kind()
compare.go#L316: if expectedType.Kind() == reflect.Interface {
compare.go#L326: case expectedType.Kind() == reflect.Struct, isPtrToStruct(expectedType):
compare.go#L371: return typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Interface
compare.go#L375: return typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct
html/template
content.go#L119: if t := reflect.TypeOf(a); t.Kind() != reflect.Pointer {
internal/fmtsort
sort.go#L50: if mapValue.Type().Kind() != reflect.Map {
net/http
h2_error.go#L16: if dstType.Kind() != reflect.Struct {
transport.go#L406: if rv := reflect.ValueOf(altProto["https"]); rv.IsValid() && rv.Type().Kind() == reflect.Struct && rv.Type().NumField() == 1 {
net/http/httptrace
trace.go#L185: if hookType.Kind() != reflect.Func {
testing
fuzz.go#L224: if fnType.Kind() != reflect.Func {
text/template
exec.go#L748: if etyp.Kind() == reflect.Struct {
exec.go#L882: switch typ.Kind() {
exec.go#L955: switch typ.Kind() {
funcs.go#L170: if intLike(value.Kind()) && intLike(argType.Kind()) && value.Type().ConvertibleTo(argType) {
funcs.go#L327: if typ.Kind() != reflect.Func {