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) {
3737 println ! ( "\n {}" , "FlowType" . bright_cyan( ) . bold( ) ) ;
3838 match serde_json:: to_string_pretty ( flow_type) {
3939 Ok ( json) => {
40+ let mut index = 0 ;
4041 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+ ) ;
4248 }
4349 }
4450 Err ( _) => println ! ( "{}" , "Error serializing FlowType" . red( ) ) ,
@@ -57,8 +63,14 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
5763 println ! ( "\n {}" , "DataType" . bright_cyan( ) . bold( ) ) ;
5864 match serde_json:: to_string_pretty ( data_type) {
5965 Ok ( json) => {
66+ let mut index = 0 ;
6067 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+ ) ;
6274 }
6375 }
6476 Err ( _) => println ! ( "{}" , "Error serializing DataType" . red( ) ) ,
You can’t perform that action at this time.
0 commit comments