package tools import ( "path/filepath" ) func resolvePath(baseDir, path string) (string, error) { if path == "" { path = "." } if filepath.IsAbs(path) { return filepath.Clean(path), nil } return filepath.Abs(filepath.Join(baseDir, path)) }