INNER CODE UNIT · Go
catalogLine
abahmed/kwatch · cmd/configcatalog/main.go:167
func catalogLine(path string, t reflect.Type, value reflect.Value, meta metadata) string {
if t.Kind() == reflect.Pointer {
t = t.Elem()
}
typeName := "string"
switch t.Kind() {
case reflect.Bool:
typeName = "boolean"
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
typeName = "integer"
case reflect.Float32, reflect.Float64:
typeName = "float"
case reflect.Slice, reflect.Array:
typeName = "list"
case reflect.Map:
typeName = "json"
}