From 56ea7cd472c1bca12d1a2cd6f02594868dafdeb3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 12 Oct 2013 17:46:31 -0400 Subject: [PATCH] DOne get --- cmd/get.go | 6 ++++-- doc/google.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/get.go b/cmd/get.go index 684ceea03..517390e69 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -17,7 +17,7 @@ package cmd import ( "errors" "fmt" - //"os" + "os" "strings" "github.com/Unknwon/com" @@ -208,6 +208,8 @@ func downloadPackages(nodes []*doc.Node) { com.ColorLog("[WARN] Skipped downloaded package( %s => %s:%s )\n", n.ImportPath, n.Type, doc.CheckNodeValue(n.Value)) } + } else if n.ImportPath == "C" { + continue } else { // Invalid import path. com.ColorLog("[WARN] Skipped invalid package path( %s => %s:%s )\n", @@ -229,7 +231,7 @@ func downloadPackage(nod *doc.Node) (*doc.Node, []string) { if err != nil { com.ColorLog("[ERRO] Download falied( %s )[ %s ]\n", nod.ImportPath, err) failConut++ - //os.RemoveAll(installRepoPath + "/" + doc.GetProjectPath(nod.ImportPath) + "/") + os.RemoveAll(installRepoPath + "/" + doc.GetProjectPath(nod.ImportPath) + "/") return nil, nil } return nod, imports diff --git a/doc/google.go b/doc/google.go index 18ab3e4f2..ee2b60e39 100644 --- a/doc/google.go +++ b/doc/google.go @@ -107,7 +107,7 @@ func getGoogleDoc(client *http.Client, match map[string]string, installRepoPath // Create diretory before create file. dir := path.Dir(absPath) if !checkDir(dir, dirs) && !(!cmdFlags["-e"] && strings.Contains(absPath, "example")) { - dirs = append(dirs, dir) + dirs = append(dirs, dir+"/") os.MkdirAll(dir+"/", os.ModePerm) }