From 2d2a95c3fb868dd00ef8f1e2790fa9b6ad071df1 Mon Sep 17 00:00:00 2001 From: Ting Yuan Date: Fri, 21 May 2021 21:23:38 +0800 Subject: [PATCH] Fix the format issue --- pkg/grpc_testing/stub_server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/grpc_testing/stub_server.go b/pkg/grpc_testing/stub_server.go index 50b385476..14b724d05 100644 --- a/pkg/grpc_testing/stub_server.go +++ b/pkg/grpc_testing/stub_server.go @@ -26,13 +26,13 @@ type StubServer struct { s *grpc.Server cleanups []func() // Lambdas executed in Stop(); populated by Start(). - started chan struct{} + started chan struct{} } func New(testService testpb.TestServiceServer) *StubServer { return &StubServer{ testService: testService, - started: make(chan struct{}), + started: make(chan struct{}), } } @@ -67,6 +67,7 @@ func (ss *StubServer) Start(sopts []grpc.ServerOption, dopts ...grpc.DialOption) // Stop stops ss and cleans up all resources it consumed. func (ss *StubServer) Stop() { <-ss.started + for i := len(ss.cleanups) - 1; i >= 0; i-- { ss.cleanups[i]() }