From 8e42f49054003a67c801ce3c2929d401beb1fee5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 3 Dec 2013 04:12:14 -0500 Subject: [PATCH] Bug fixed --- cmd/gen.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/gen.go b/cmd/gen.go index ee3e1c5d3..fccd070df 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -58,8 +58,12 @@ func runGen(ctx *cli.Context) { } // Get dependencies. + importPath, err := gf.GetValue("target", "path") + if err != nil { + importPath = "." + } imports := doc.GetAllImports([]string{curPath}, - gf.MustValue("target", "path"), ctx.Bool("example")) + importPath, ctx.Bool("example")) for _, p := range imports { if _, err := gf.GetValue("deps", doc.GetProjectPath(p)); err != nil {