(structType reflect.Type, typeStructField string, typeKey string)
| 1210 | } |
| 1211 | |
| 1212 | func inferKey(structType reflect.Type, typeStructField string, typeKey string) string { |
| 1213 | if typeKey != "" { |
| 1214 | return typeKey |
| 1215 | } |
| 1216 | field, _ := structType.Elem().FieldByName(typeStructField) |
| 1217 | tag, ok := getTagFieldName(field) |
| 1218 | if ok { |
| 1219 | return tag |
| 1220 | } |
| 1221 | return typeStructField |
| 1222 | } |
| 1223 | |
| 1224 | func inferPromptFieldName(structType reflect.Type, typeStructField string) string { |
| 1225 | field, _ := structType.Elem().FieldByName(typeStructField) |
no test coverage detected