filepath has a method for evaluating symlinks https://pkg.go.dev/path/filepath#EvalSymlinks. It would be really useful to have this cross filesystems It has been attempted in the past https://github.com/spf13/afero/pull/212/ but the PR has been closed.