package path with "." bug fix

This commit is contained in:
sokol
2017-02-27 18:40:06 +03:00
parent 44f6bc771e
commit 2302d82d8a
+6 -1
View File
@@ -220,7 +220,12 @@ func (g *Generator) pkgAlias(pkgPath string) string {
}
for i := 0; ; i++ {
alias := path.Base(pkgPath)
alias := strings.Replace(
strings.Replace(path.Base(pkgPath), ".", "_", -1),
"-",
"_",
-1,
)
if i > 0 {
alias += fmt.Sprint(i)
}