golang file ending code example
Example: golang check file extension
import (
"fmt"
"path/filepath"
)
func main(){
path := "/media/godfather.mp4"
fileExtension := filepath.Ext(path)
fmt.Println("File extension ", fileExtension)
}
import (
"fmt"
"path/filepath"
)
func main(){
path := "/media/godfather.mp4"
fileExtension := filepath.Ext(path)
fmt.Println("File extension ", fileExtension)
}