macro_rules! ADD {
(--chown=$user:ident:$group:ident $src:tt $dst:tt) => { ... };
(--chown=$user:ident $src:tt $dst:tt) => { ... };
($src:tt $dst:tt) => { ... };
}
Expand description
let add = ADD!("/var/run" "/home");
assert_eq!(add.to_string(), r#"ADD "/var/run" "/home""#);