MCPcopy
hub / github.com/mitchellh/mapstructure / getKind

Function getKind

mapstructure.go:1502–1515  ·  view source on GitHub ↗
(val reflect.Value)

Source from the content-addressed store, hash-verified

1500}
1501
1502func getKind(val reflect.Value) reflect.Kind {
1503 kind := val.Kind()
1504
1505 switch {
1506 case kind >= reflect.Int && kind <= reflect.Int64:
1507 return reflect.Int
1508 case kind >= reflect.Uint && kind <= reflect.Uint64:
1509 return reflect.Uint
1510 case kind >= reflect.Float32 && kind <= reflect.Float64:
1511 return reflect.Float32
1512 default:
1513 return kind
1514 }
1515}
1516
1517func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, tagName string) bool {
1518 for i := 0; i < typ.NumField(); i++ {

Callers 7

decodeMethod · 0.85
decodeStringMethod · 0.85
decodeIntMethod · 0.85
decodeUintMethod · 0.85
decodeBoolMethod · 0.85
decodeFloatMethod · 0.85
isEmptyValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…