Browse Source

format coding style (#970)

Kevin Wan 3 năm trước cách đây
mục cha
commit
50a6bbe6b9

+ 0 - 1
zrpc/internal/codes/accept_test.go

@@ -9,7 +9,6 @@ import (
 )
 
 func TestAccept(t *testing.T) {
-
 	tests := []struct {
 		name   string
 		err    error

+ 2 - 2
zrpc/internal/serverinterceptors/timeoutinterceptor.go

@@ -3,14 +3,14 @@ package serverinterceptors
 import (
 	"context"
 	"fmt"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/status"
 	"runtime/debug"
 	"strings"
 	"sync"
 	"time"
 
 	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
 )
 
 // UnaryTimeoutInterceptor returns a func that sets timeout to incoming unary requests.

+ 3 - 2
zrpc/internal/serverinterceptors/timeoutinterceptor_test.go

@@ -2,14 +2,14 @@ package serverinterceptors
 
 import (
 	"context"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/status"
 	"sync"
 	"testing"
 	"time"
 
 	"github.com/stretchr/testify/assert"
 	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
 )
 
 func TestUnaryTimeoutInterceptor(t *testing.T) {
@@ -70,6 +70,7 @@ func TestUnaryTimeoutInterceptor_timeoutExpire(t *testing.T) {
 	wg.Wait()
 	assert.EqualValues(t, status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error()), err)
 }
+
 func TestUnaryTimeoutInterceptor_cancel(t *testing.T) {
 	const timeout = time.Minute * 10
 	interceptor := UnaryTimeoutInterceptor(timeout)