> `filepath.Clean()` is not called `filepath.Canonicalize()`
Canonicalization of a path is a different operation, as a name suggests it returns a canonical path to a resource. The idea being that if you happen to have two paths that refer to the same file (say, `/bin/sh` and `/usr/bin/sh`) then you should be able to pass those to path canonicalization function to get the same string for both. This is not what `filepath.Clean` does, so calling it `Canonicalize` would be confusing.
For example, in Rust the following program when run in Rust playground (https://play.rust-lang.org/?version=stable&mode=debug&editio...) will output /usr/bin/dash:
fn main() -> std::io::Result<()> {
println!("{}", std::fs::canonicalize("/bin/sh")?.display());
Ok(())
}
Meanwhile, Go's `Clean` function is only concerned about lexical processing and ignores the file system entirely and would return `/bin/sh` here, as none of rules `Clean` uses apply.