(value interface{}, field string)
| 1021 | } |
| 1022 | |
| 1023 | func printField(value interface{}, field string) { |
| 1024 | var matchFunc = func(structField string) bool { |
| 1025 | return strings.ToLower(structField) == strings.ToLower(field) |
| 1026 | } |
| 1027 | |
| 1028 | structValue := reflect.ValueOf(value) |
| 1029 | fieldValue := reflect.Indirect(structValue).FieldByNameFunc(matchFunc) |
| 1030 | |
| 1031 | printJSON(fieldValue.Interface()) |
| 1032 | } |
| 1033 | |
| 1034 | func parseShared(shared string) (bool, bool, error) { |
| 1035 | var isShared, isSet bool |
no test coverage detected