简介
gopath/filepath

判断是否为绝对路径

func IsAbs(path string) (b bool)
fmt.Println(filepath.IsAbs("master.exe")) // false

绝对路径转相对路径

func Rel(basepath, targpath string) (string, error)
fmt.Println(filepath.Rel("", "")) // . <nil>

相对路径转绝对路径

func Abs(path string) (string, error)
fmt.Println(filepath.Abs("./master.exe")) // F:\GoTest\GoTest\master.exe <nil>