cmd/gio: use path.Base for Go import paths

Go import paths always use forward slashes as separators.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-24 17:44:51 +01:00
parent 6433cb2d88
commit 7780cf1353
+2 -1
View File
@@ -13,6 +13,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
@@ -74,7 +75,7 @@ func main() {
if err != nil {
errorf("gio: %v", err)
}
name = filepath.Base(name)
name = path.Base(name)
dir, err := runCmd(exec.Command("go", "list", "-f", "{{.Dir}}", pkg))
if err != nil {
errorf("gio: %v", err)