Browse Source

add trace

pull/103/head
Lunny Xiao 11 years ago
parent
commit
9dc90cac91
  1. 1
      cmd/gopath.go
  2. 1
      doc/utils.go

1
cmd/gopath.go

@ -38,6 +38,7 @@ func getGopmPkgs(dirPath string, isTest bool) (pkgs map[string]*doc.Pkg, err err
imports := doc.GetAllImports([]string{dirPath}, ".", false)
pkgs = make(map[string]*doc.Pkg)
for _, name := range imports {
println(name)
if name == "C" {
continue
}

1
doc/utils.go

@ -68,6 +68,7 @@ func GetImports(absPath, importPath string, example bool) []string {
imports := make([]string, 0, len(pkg.Imports))
for _, p := range pkg.Imports {
println(p, IsGoRepoPath(p), importPath)
if !IsGoRepoPath(p) && !strings.HasPrefix(p, importPath) {
imports = append(imports, p)
}

Loading…
Cancel
Save