修复CI死锁

pull/121/head
formych 2019-09-10 00:50:32 +08:00 committed by kun
parent 64117b2669
commit ae73e81ba0
3 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@ A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
## Requirements
It invokes the local go command to answer requests.
The default cacheDir is GOPATH, you can set it up by yourself according to the situation.
## Build
git clone https://github.com/goproxyio/goproxy.git
@ -18,6 +19,9 @@ A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
./bin/goproxy -listen=0.0.0.0:80 -cacheDir=/tmp/test
If you run `go get -v pkg` in the proxy machine, shuold set a new GOPATH which is not different from the old GOPATH, or mayebe deadlock.
See the file test/get_test.sh.
### Router mode
Use the -proxy flag switch to "Router mode", which

View File

@ -174,7 +174,7 @@ func (*ops) List(ctx context.Context, mpath string) (proxy.File, error) {
if err != nil {
return nil, err
}
file := filepath.Join(downloadRoot, escMod+"/@v/listproxy")
file := filepath.Join(downloadRoot, escMod+"/@v/list")
if info, err := os.Stat(file); err == nil && time.Since(info.ModTime()) < listExpire {
return os.Open(file)
}

View File

@ -2,6 +2,7 @@
export GO111MODULE=on
export GOPROXY='http://127.0.0.1:8081'
export GOPATH=/tmp/go
datafile='test/testdata/get.txt'