Files
cdk/crates/cdk-mintd/src/lib.rs
2025-05-20 10:27:52 +01:00

26 lines
553 B
Rust

//! Cdk mintd lib
#[cfg(feature = "cln")]
use std::path::PathBuf;
pub mod cli;
pub mod config;
pub mod env_vars;
pub mod setup;
#[cfg(feature = "cln")]
fn expand_path(path: &str) -> Option<PathBuf> {
if path.starts_with('~') {
if let Some(home_dir) = home::home_dir().as_mut() {
let remainder = &path[2..];
home_dir.push(remainder);
let expanded_path = home_dir;
Some(expanded_path.clone())
} else {
None
}
} else {
Some(PathBuf::from(path))
}
}