You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe something like this would be a good solution:
fn getImportedRoutes(file_data: str) -> &str {
let re = Regex::new("import\\(\"[^\"]*\"\\)").unwrap();
let mat = regex.find(file_data).unwrap().as_str();
let path = mat.split("\"").collect::<Vec<&str>>()[1];
//if it contains wildcard, grab all files with extension within that directory
if path.contains("*") {
let splitPath: Vec<&str> = path.split("*").collect();
let directory = splitPath[0];
let extension = splitPath[1];
/*
TODO: Iterate through directory and grab data from each file with the given extension and replace import
*/
return path;
}
return path;
}
Is your feature request related to a problem? Please describe.
I would like to have the option to import the entire folder of configuration files. Example domains.
Describe the solution you'd like
routes = [
import("/opt/proksi/sites/*.hcl")
]
Describe alternatives you've considered
Additional context
Better and faster management.
The text was updated successfully, but these errors were encountered: