From 30b68728d41021ca8a82dfdbb239fe87e7caff4b Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 14 Mar 2020 08:50:27 +0800 Subject: [PATCH] chore(lint): fix from gofmt -s --- internal/base/base_test.go | 6 +++--- internal/rdb/rdb_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/base/base_test.go b/internal/base/base_test.go index ee43185..c475cb4 100644 --- a/internal/base/base_test.go +++ b/internal/base/base_test.go @@ -110,9 +110,9 @@ func TestProcessStateConcurrentAccess(t *testing.T) { var wg sync.WaitGroup started := time.Now() msgs := []*TaskMessage{ - &TaskMessage{ID: xid.New(), Type: "type1", Payload: map[string]interface{}{"user_id": 42}}, - &TaskMessage{ID: xid.New(), Type: "type2"}, - &TaskMessage{ID: xid.New(), Type: "type3"}, + {ID: xid.New(), Type: "type1", Payload: map[string]interface{}{"user_id": 42}}, + {ID: xid.New(), Type: "type2"}, + {ID: xid.New(), Type: "type3"}, } // Simulate hearbeater calling SetStatus and SetStarted. diff --git a/internal/rdb/rdb_test.go b/internal/rdb/rdb_test.go index b44cc0f..842449f 100644 --- a/internal/rdb/rdb_test.go +++ b/internal/rdb/rdb_test.go @@ -884,7 +884,7 @@ func TestWriteProcessStateWithWorkers(t *testing.T) { gotWorkers[key] = &w } wantWorkers := map[string]*base.WorkerInfo{ - msg1.ID.String(): &base.WorkerInfo{ + msg1.ID.String(): { Host: host, PID: pid, ID: msg1.ID, @@ -893,7 +893,7 @@ func TestWriteProcessStateWithWorkers(t *testing.T) { Payload: msg1.Payload, Started: w1Started, }, - msg2.ID.String(): &base.WorkerInfo{ + msg2.ID.String(): { Host: host, PID: pid, ID: msg2.ID,