mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
package path with "." bug fix
This commit is contained in:
+6
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user