Use platform agnostic path/filepath in ffmpeg
javouhey opened this issue · comments
Currently I am doing this to extract the name of the videofile;
var video string
switch runtime.GOOS {
case "windows":
winp := strings.Split(v.Filename, string(os.PathSeparator))
video = winp[len(winp)-1]
case "linux":
fallthrough
default:
video = path.Base(v.Filename)
}
Replace it with:
video := filepath.Base(v.Filename)
See: