Fix code formatting (#120)
authorTobias Schmidt <ts@soundcloud.com>
Sat, 4 Mar 2017 02:52:29 +0000 (22:52 -0400)
committerBrian Brazil <brian-brazil@users.noreply.github.com>
Sat, 4 Mar 2017 02:52:29 +0000 (02:52 +0000)
* Fix code formatting

* Ensure CI fails on unformatted code

.travis.yml
Makefile
http.go

index 24225ea4f71899905aa5ccbc183149777cb94843..9945a4aef2779436f2dc3ed270cf86ef2bce7075 100644 (file)
@@ -3,8 +3,8 @@ sudo: false
 language: go
 
 go:
-- 1.5.4
-- 1.6.2
+- 1.7.5
+- 1.8
 
 script:
 - make
index ffbad58a190b29efe6d6a50c2088e191c14e60f7..0b26c361951d346371073055e6bbe02d62a33fda 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ DOCKER_IMAGE_NAME       ?= blackbox-exporter
 DOCKER_IMAGE_TAG        ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
 
 
-all: format build test
+all: style build test
 
 style:
        @echo ">> checking code style"
diff --git a/http.go b/http.go
index 63aa2667ff3079263c844f1a38f39a246886baf7..fdf309888e860f755633dd7c9b9f398c3f7c4f0b 100644 (file)
--- a/http.go
+++ b/http.go
@@ -123,9 +123,9 @@ func probeHTTP(target string, w http.ResponseWriter, module Module) (success boo
                return net.Dial(dialProtocol, address)
        }
        client.Transport = &http.Transport{
-               TLSClientConfig: tlsconfig,
-               Dial:            dial,
-               Proxy:           http.ProxyFromEnvironment,
+               TLSClientConfig:   tlsconfig,
+               Dial:              dial,
+               Proxy:             http.ProxyFromEnvironment,
                DisableKeepAlives: true,
        }