gxyz/cli
Functions
pub fn hard_fail(res: Result(a, b)) -> a
Hard exit the program if the result is an Error and return the value if an Ok, exit 1, without a message
pub fn hard_fail_with_msg(res: Result(a, b), msg: String) -> a
Hard exit the program if the result is an Error and return the value if an Ok, with the exit 1 and printing msg to stderror
pub fn hard_fail_with_opts(
res: Result(a, b),
msg: String,
status_code: Int,
) -> a
Hard exit the program if the result is an Error and return the value if an Ok, with the exit code and printing msg to stderror
pub fn strip_js_from_argv(args: List(String)) -> List(String)
strip js/ts files from argv (often present in node and deno implementation)