pub use ureq;
pub use regex;
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
pub fn slurp<T: AsRef<str>>(argument: T) -> Result<String> {
let destination = argument.as_ref();
let body = if destination.starts_with("http://") || destination.starts_with("https://") {
ureq::get(destination).call()?.into_string()?
} else {
std::fs::read_to_string(destination)?
};
Ok(body)
}