path and filepath are two related packages that expose functionality to manipulating forward-slash-separated paths (path) and file names and filesystem paths that may include Windows-style backslashes and drive letters (filepath).
path
filepath
https://pkg.go.dev/path
https://pkg.go.dev/path/filepath