aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2018-08-20 17:43:42 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-08-20 17:43:42 +0100
commitdbefe685912e286fce16bf9dd3773f4037cdcdf1 (patch)
tree238422f371df9f04d2c2aebd700e61d015837753
parentf906c9ba422eb720514721b559c01f840ca34a0c (diff)
Small updates
- Test against 1.11 rc - Set timeouts on the http client - Use gofmt instead of goimports
-rw-r--r--.travis.yml4
-rw-r--r--Makefile2
-rw-r--r--client/client.go8
3 files changed, 8 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 4a4f0d1..bef27fd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ env:
- MYSQL_TEST="true"
go:
- - 1.11beta3
+ - 1.11rc1
- 1.10.3
- 1.9.7
- tip
@@ -26,4 +26,4 @@ install:
sudo: false
script:
- - make test \ No newline at end of file
+ - make test
diff --git a/Makefile b/Makefile
index 934c79d..1d2f08e 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ test: dep
go install -race $(CASHIER_CMD) $(CASHIERD_CMD)
go vet ./...
go list ./... |xargs -L1 golint -set_exit_status
- goimports -d $(SRC_FILES)
+ gofmt -s -d -l -e $(SRC_FILES)
$(MAKE) generate
@[ -z "`git status --porcelain`" ] || (echo "unexpected files: `git status --porcelain`" && exit 1)
diff --git a/client/client.go b/client/client.go
index dc4ada1..b84e09a 100644
--- a/client/client.go
+++ b/client/client.go
@@ -89,10 +89,12 @@ func send(sr *lib.SignRequest, token, ca string, ValidateTLSCertificate bool) (*
if err != nil {
return nil, errors.Wrap(err, "unable to create sign request")
}
- transport := &http.Transport{
- TLSClientConfig: &tls.Config{InsecureSkipVerify: !ValidateTLSCertificate},
+ client := &http.Client{
+ Transport: &http.Transport{
+ TLSClientConfig: &tls.Config{InsecureSkipVerify: !ValidateTLSCertificate},
+ },
+ Timeout: 30 * time.Second,
}
- client := &http.Client{Transport: transport}
u, err := url.Parse(ca)
if err != nil {
return nil, errors.Wrap(err, "unable to parse CA url")