From bdff4b25d2a879357bc0ed53e96c0b551de07f88 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Fri, 21 Sep 2018 16:29:34 +0300 Subject: [PATCH] version bump + fmt --- cmd/rr/cmd/version.go | 4 +--- service/http/handler_test.go | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/rr/cmd/version.go b/cmd/rr/cmd/version.go index 26744922b..a550c6828 100644 --- a/cmd/rr/cmd/version.go +++ b/cmd/rr/cmd/version.go @@ -1,11 +1,9 @@ package cmd -import "time" - var ( // Version - defines build version. Version = "local" // BuildTime - defined build time. - BuildTime = time.Now().Format(time.RFC1123) + BuildTime = "development" ) diff --git a/service/http/handler_test.go b/service/http/handler_test.go index b82fc9389..3b51c8736 100644 --- a/service/http/handler_test.go +++ b/service/http/handler_test.go @@ -8,13 +8,13 @@ import ( "io/ioutil" "mime/multipart" "net/http" + "net/http/httptest" "net/url" "os" "runtime" "strings" "testing" "time" - "net/http/httptest" ) // get request and return body @@ -113,14 +113,13 @@ func Test_Handler_JSON_error(t *testing.T) { wr := httptest.NewRecorder() rq := httptest.NewRequest("POST", "/", bytes.NewBuffer([]byte("{sd"))) - rq.Header.Add("Content-Type","application/json") - rq.Header.Add("Content-Size","3") + rq.Header.Add("Content-Type", "application/json") + rq.Header.Add("Content-Size", "3") st.ServeHTTP(wr, rq) assert.Equal(t, 500, wr.Code) } - func TestServer_Headers(t *testing.T) { st := &Handler{ cfg: &Config{