diff options
| author | Teddy Wing | 2015-06-06 19:25:17 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-06-06 19:25:17 -0400 |
| commit | 1135764727f3dc525d0f674c784edbc81cc786f3 (patch) | |
| tree | 5c402c88d3a07a3cde84237ead5829bda28f3e25 /vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go | |
| download | New-House-on-the-Block-1135764727f3dc525d0f674c784edbc81cc786f3.tar.bz2 | |
Initial commit. Install coinbase-go.
* Use nut for vendored dependencies
* Install coinbase-go to interact with the Coinbase API
Diffstat (limited to 'vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go')
| -rw-r--r-- | vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go b/vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go new file mode 100644 index 0000000..329e59c --- /dev/null +++ b/vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go @@ -0,0 +1,12 @@ +package coinbase + +import ( + "net" + "time" +) + +// dialTimeout is used to enforce a timeout for all http requests. +func dialTimeout(network, addr string) (net.Conn, error) { + var timeout = time.Duration(2 * time.Second) //how long to wait when trying to connect to the coinbase + return net.DialTimeout(network, addr, timeout) +} |
