生成器去除默认的生成的包名称
This commit is contained in:
parent
7d1ecab9fb
commit
75ca055772
|
@ -75,7 +75,11 @@ func extractFile(file string, dirname string) (err error) {
|
|||
prefix = header.Name
|
||||
continue
|
||||
}
|
||||
filename := path.Join(dirname, strings.TrimPrefix(header.Name, prefix))
|
||||
realname := strings.TrimPrefix(header.Name, prefix)
|
||||
if strings.HasPrefix(realname, "generator") {
|
||||
continue
|
||||
}
|
||||
filename := path.Join(dirname, realname)
|
||||
if header.Typeflag == tar.TypeDir {
|
||||
if err = os.MkdirAll(filename, 0755); err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue