package main
import (
"fmt"
"path"
)
func main() {
p := "./p/p"
q := ".\\q\\q"
fmt.Println(path.Base(p))
fmt.Println(path.Base(q))
}
I run it on Windows, and output is:
p
.\q\q
I think path.Base return incorrect answer. So how can I get correct file base name.