File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,14 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
37
37
println ! ( "\n {}" , "FlowType" . bright_cyan( ) . bold( ) ) ;
38
38
match serde_json:: to_string_pretty ( flow_type) {
39
39
Ok ( json) => {
40
+ let mut index = 0 ;
40
41
for line in json. lines ( ) {
41
- println ! ( "{}" , line. bright_green( ) ) ;
42
+ index += 1 ;
43
+ println ! (
44
+ "{} {}" ,
45
+ format!( "{index}:" ) . bright_blue( ) ,
46
+ line. bright_green( )
47
+ ) ;
42
48
}
43
49
}
44
50
Err ( _) => println ! ( "{}" , "Error serializing FlowType" . red( ) ) ,
@@ -57,8 +63,14 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
57
63
println ! ( "\n {}" , "DataType" . bright_cyan( ) . bold( ) ) ;
58
64
match serde_json:: to_string_pretty ( data_type) {
59
65
Ok ( json) => {
66
+ let mut index = 0 ;
60
67
for line in json. lines ( ) {
61
- println ! ( "{}" , line. bright_green( ) ) ;
68
+ index += 1 ;
69
+ println ! (
70
+ "{} {}" ,
71
+ format!( "{index}:" ) . bright_blue( ) ,
72
+ line. bright_green( )
73
+ ) ;
62
74
}
63
75
}
64
76
Err ( _) => println ! ( "{}" , "Error serializing DataType" . red( ) ) ,
You can’t perform that action at this time.
0 commit comments