Browse Source

Mirror fix

pull/103/head
Unknown 11 years ago
parent
commit
948bbfbae4
  1. 3
      cmd/cmd.go
  2. 3
      cmd/gen.go

3
cmd/cmd.go

@ -83,5 +83,6 @@ func versionSuffix(value string) string {
}
func isSubpackage(rootPath, targetPath string) bool {
return strings.HasSuffix(workDir, rootPath) || strings.HasPrefix(rootPath, targetPath)
return strings.HasSuffix(strings.Replace(workDir, "\\", "/", -1), rootPath) ||
strings.HasPrefix(rootPath, targetPath)
}

3
cmd/gen.go

@ -62,8 +62,7 @@ func runGen(ctx *cli.Context) {
for _, p := range imports {
p = doc.GetProjectPath(p)
// Skip subpackage(s) of current project.
if strings.HasSuffix(strings.Replace(workDir, "\\", "/", -1), p) ||
strings.HasPrefix(p, targetPath) {
if isSubpackage(p, targetPath) {
continue
}

Loading…
Cancel
Save