gh_workflow_parser/
lib.rs

1pub mod commands;
2pub mod config;
3pub mod err_msg_parse;
4pub mod errlog;
5pub mod gh;
6pub mod issue;
7pub mod util;
8
9/// Module containing macros related to protocol words.
10pub mod macros {
11    #[macro_export]
12    // These macros are needed because the normal ones panic when there's a broken pipe.
13    // This is especially problematic for CLI tools that are frequently piped into `head` or `grep -q`
14    macro_rules! pipe_println {
15        () => (print!("\n"));
16        ($fmt:expr) => ({
17            writeln!(std::io::stdout(), $fmt)
18        });
19        ($fmt:expr, $($arg:tt)*) => ({
20            writeln!(std::io::stdout(), $fmt, $($arg)*)
21        })
22    }
23    pub use pipe_println;
24
25    #[macro_export]
26    macro_rules! pipe_print {
27        () => (print!("\n"));
28        ($fmt:expr) => ({
29            write!(std::io::stdout(), $fmt)
30        });
31        ($fmt:expr, $($arg:tt)*) => ({
32            write!(std::io::stdout(), $fmt, $($arg)*)
33        })
34    }
35
36    pub use pipe_print;
37}