gpmgo/gopm — pull request #20 by ggaaooppeenngg (2014-04-17 09:32:25+00:00)
Title: add new unstable feature  to fit  local project usage

there is test under cmd/test/get_test.go

example:

Suppose you are under the ~/testproject directory. and mkdir src/test as your own package.your path will be like ~/testproject/src/test.
Go to ~/testproject/src/test and touch file main.go with the content bellow:

package main

import (
"fmt"
"github.com/ggaaooppeenngg/TEST"
)

func main() {
fmt.Println(TEST.TEST)
}

Go to ~/testproject, and run command `gopm gen -l` to generate local .gopmfile like:

[res]
include =

[project]
localPath = ~/testproject

[deps]
github.com/ggaaooppeenngg/TEST =

Then add run command and target for build. and .gopmfile will be like:

[target]
path= ~/testproject/test
[res]
include =

[project]
localPath = ~/testproject

[run]
cmd = go run ~/testproject/src/test/main.go

[deps]
github.com/ggaaooppeenngg/TEST =

*cmd* is flexable for you can command like `revel app` and other command rather than `go run ` .
Then type `gopm get -l`, you
can find ~/testproject/src/github.com/ggaaooppeenngg/TEST, it means the package has been downloaded depends on .gopmfile.

Now type `gopm run -l`
See what happens! It prints `TEST`.
You can run `gopm run -l ` anywhere under the local project gopath, it will recursively find the .gopmfile with value project and run . this feature does not work under the windows os.

codereview:

It seems that the global var `isHasGopath` is not used.
It seems download work is single-thread , why not use goroutine?