ping_ver/lib.rs
1pub use axum;
2pub use const_str;
3
4#[macro_export]
5macro_rules! ping_ver {
6 ($app:expr) => {{
7 async fn ping_ver() -> &'static str {
8 $crate::const_str::concat!(env!("CARGO_PKG_NAME"), " ", env!("CARGO_PKG_VERSION"))
9 }
10 $app.route("/ping/ver", $crate::axum::routing::get(ping_ver))
11 }};
12}