Simplify files via gofmt -s (thanks, Go Report Card!)

This commit is contained in:
pancho horrillo
2019-11-19 14:14:55 +01:00
parent 92fbb72735
commit 83e4523dc7
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -397,8 +397,8 @@ func TestListRoutesReturnsTwoElementsList(t *testing.T) {
funcList = func() []model.Route { funcList = func() []model.Route {
return []model.Route{ return []model.Route{
model.Route{Method: "GET", Pattern: "/hello1", Entrypoint: "/bin/sh -c", Command: "echo Hello World1 | kapow set /response/body", Index: 0, ID: "ROUTE_XXXXXXXXXXXXXXXXXX"}, {Method: "GET", Pattern: "/hello1", Entrypoint: "/bin/sh -c", Command: "echo Hello World1 | kapow set /response/body", Index: 0, ID: "ROUTE_XXXXXXXXXXXXXXXXXX"},
model.Route{Method: "GET", Pattern: "/hello", Entrypoint: "/bin/sh -c", Command: "echo Hello World | kapow set /response/body", Index: 1, ID: "ROUTE_YYYYYYYYYYYYYYYYYY"}, {Method: "GET", Pattern: "/hello", Entrypoint: "/bin/sh -c", Command: "echo Hello World | kapow set /response/body", Index: 1, ID: "ROUTE_YYYYYYYYYYYYYYYYYY"},
} }
} }
@@ -417,8 +417,8 @@ func TestListRoutesReturnsTwoElementsList(t *testing.T) {
} }
expectedRouteList := []model.Route{ expectedRouteList := []model.Route{
model.Route{Method: "GET", Pattern: "/hello1", Entrypoint: "/bin/sh -c", Command: "echo Hello World1 | kapow set /response/body", Index: 0, ID: "ROUTE_XXXXXXXXXXXXXXXXXX"}, {Method: "GET", Pattern: "/hello1", Entrypoint: "/bin/sh -c", Command: "echo Hello World1 | kapow set /response/body", Index: 0, ID: "ROUTE_XXXXXXXXXXXXXXXXXX"},
model.Route{Method: "GET", Pattern: "/hello", Entrypoint: "/bin/sh -c", Command: "echo Hello World | kapow set /response/body", Index: 1, ID: "ROUTE_YYYYYYYYYYYYYYYYYY"}, {Method: "GET", Pattern: "/hello", Entrypoint: "/bin/sh -c", Command: "echo Hello World | kapow set /response/body", Index: 1, ID: "ROUTE_YYYYYYYYYYYYYYYYYY"},
} }
if !reflect.DeepEqual(respJson, expectedRouteList) { if !reflect.DeepEqual(respJson, expectedRouteList) {
+1 -1
View File
@@ -229,7 +229,7 @@ func TestServeHTTPCallsInnerMuxAfterAcquiringLock(t *testing.T) {
func TestUpdateUpdatesMuxWithProvideRouteList(t *testing.T) { func TestUpdateUpdatesMuxWithProvideRouteList(t *testing.T) {
sm := New() sm := New()
rs := []model.Route{ rs := []model.Route{
model.Route{ {
Method: "GET", Method: "GET",
Pattern: "/", Pattern: "/",
Entrypoint: "/bin/sh -c", Entrypoint: "/bin/sh -c",