github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/util/fileutil/path.go (about) 1 package fileutil 2 3 import ( 4 "path/filepath" 5 ) 6 7 // Note: this *must* produce a relative path, *must not* do Abs() 8 func MkPath(dir string, fn string) string { 9 if dir == "" { 10 return fn 11 } 12 return filepath.Clean(dir + "/" + fn) 13 }