From d34c3b1f10abee31e34b482e45a9b0e005c76ffc Mon Sep 17 00:00:00 2001 From: Michael Snowden Date: Tue, 20 Dec 2022 22:23:36 -0800 Subject: [PATCH] Fix gofmt and add Go report card --- README.md | 4 ++++ common/archiver/URI_test.go | 8 ++++---- common/collection/pagingIterator_test.go | 2 +- service/frontend/workflow_handler_test.go | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 020a6acb8f4..04258a157cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ [![Build status](https://badge.buildkite.com/98c157ed502d55722ef7f28e6470aa20702c76d6989a0a5a89.svg?branch=master)](https://buildkite.com/temporal/temporal-public) [![Coverage Status](https://coveralls.io/repos/github/temporalio/temporal/badge.svg?branch=master)](https://coveralls.io/github/temporalio/temporal?branch=master) [![Discourse](https://img.shields.io/static/v1?label=Discourse&message=Get%20Help&color=informational)](https://community.temporal.io) +[![Go Report Card][go-report-image]][go-report-url] + +[go-report-image]: https://goreportcard.com/badge/github.com/temporalio/temporal +[go-report-url]: https://goreportcard.com/report/github.com/temporalio/temporal # Temporal diff --git a/common/archiver/URI_test.go b/common/archiver/URI_test.go index 993358958e6..97db485717d 100644 --- a/common/archiver/URI_test.go +++ b/common/archiver/URI_test.go @@ -99,8 +99,8 @@ func (s *URISuite) TestURI() { hostname: "localhost", port: "8080", query: map[string][]string{ - "key1": []string{"value1", "value2"}, - "key2": []string{"value3"}, + "key1": {"value1", "value2"}, + "key2": {"value3"}, }, }, { @@ -124,8 +124,8 @@ func (s *URISuite) TestURI() { scheme: "test", opaque: "opaque", query: map[string][]string{ - "key1": []string{"value1", "value2"}, - "key2": []string{"value3"}, + "key1": {"value1", "value2"}, + "key2": {"value3"}, }, }, } diff --git a/common/collection/pagingIterator_test.go b/common/collection/pagingIterator_test.go index 5ef44f9183e..d7c8df90572 100644 --- a/common/collection/pagingIterator_test.go +++ b/common/collection/pagingIterator_test.go @@ -127,7 +127,7 @@ func (s *pagingIteratorSuite) TestIteration_Err_NotBegining() { phase := 0 outputs := [][]interface{}{ - []interface{}{1, 2, 3, 4, 5}, + {1, 2, 3, 4, 5}, } tokens := [][]byte{ []byte("some random token 1"), diff --git a/service/frontend/workflow_handler_test.go b/service/frontend/workflow_handler_test.go index c686d35343f..a8f08feead3 100644 --- a/service/frontend/workflow_handler_test.go +++ b/service/frontend/workflow_handler_test.go @@ -256,8 +256,8 @@ func (s *workflowHandlerSuite) TestDisableListVisibilityByFilter() { func (s *workflowHandlerSuite) TestTransientTaskInjection() { cfg := s.newConfig() baseEvents := []*historypb.HistoryEvent{ - &historypb.HistoryEvent{EventId: 1}, - &historypb.HistoryEvent{EventId: 2}, + {EventId: 1}, + {EventId: 2}, } // Needed to execute test but not relevant