Browse Source

Bug fix

pull/103/head
Unknown 11 years ago
parent
commit
e6fc1004ad
  1. 3
      cmd/get.go
  2. 13
      doc/utils.go
  3. 2
      gopm.go

3
cmd/get.go

@ -191,6 +191,9 @@ func copyToGopath(srcPath, destPath string) {
// if the commit is empty string, then it downloads all dependencies, // if the commit is empty string, then it downloads all dependencies,
// otherwise, it only downloada package with specific commit only. // otherwise, it only downloada package with specific commit only.
func downloadPackages(ctx *cli.Context, nodes []*doc.Node) { func downloadPackages(ctx *cli.Context, nodes []*doc.Node) {
for _, node := range nodes {
fmt.Println(node)
}
// Check all packages, they may be raw packages path. // Check all packages, they may be raw packages path.
for _, n := range nodes { for _, n := range nodes {
// Check if local reference // Check if local reference

13
doc/utils.go

@ -59,12 +59,13 @@ func GetImports(absPath, importPath string, example bool) []string {
fis := GetDirsInfo(absPath) fis := GetDirsInfo(absPath)
absPath += "/" absPath += "/"
dirs := make([]string, 0) // Load too much, skip for now.
for _, fi := range fis { // dirs := make([]string, 0)
if fi.IsDir() && !strings.Contains(fi.Name(), VENDOR) { // for _, fi := range fis {
dirs = append(dirs, absPath+fi.Name()) // if fi.IsDir() && !strings.Contains(fi.Name(), VENDOR) {
} // dirs = append(dirs, absPath+fi.Name())
} // }
// }
imports := make([]string, 0, len(pkg.Imports)) imports := make([]string, 0, len(pkg.Imports))
for _, p := range pkg.Imports { for _, p := range pkg.Imports {

2
gopm.go

@ -29,7 +29,7 @@ import (
// Test that go1.1 tag above is included in builds. main.go refers to this definition. // Test that go1.1 tag above is included in builds. main.go refers to this definition.
const go11tag = true const go11tag = true
const APP_VER = "0.6.2.0125" const APP_VER = "0.6.2.0218"
// //cmd.CmdSearch, // //cmd.CmdSearch,
// cmdClean, // cmdClean,

Loading…
Cancel
Save