Skip to main content

go_module_dir

Function go_module_dir 

Source
pub fn go_module_dir(file: &Path, relative_file: &str) -> String
Expand description

The directory of the Go module the file at file (relative_file from the project root) belongs to, relative to the root: the nearest directory above it holding a go.mod, or the root’s own when none does.