Skip to content

Commit c20bc33

Browse files
committed
fix linter issues
1 parent 2b7d14d commit c20bc33

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

config/defaults_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ var simpleServiceServiceDesc = grpc.ServiceDesc{
6666
Metadata: "simple.proto",
6767
}
6868

69+
// simpleServicePingHandler handles ping requests
70+
// This function must follow gRPC's required signature, where context is the second parameter.
71+
//
72+
//nolint:revive // context-as-argument: gRPC handler requires this signature
6973
func simpleServicePingHandler(
7074
srv interface{},
7175
ctx context.Context,
@@ -103,6 +107,7 @@ type simpleServiceClient struct {
103107
cc grpc.ClientConnInterface
104108
}
105109

110+
// NewSimpleServiceClient creates a new client
106111
func NewSimpleServiceClient(cc grpc.ClientConnInterface) SimpleServiceClient {
107112
return &simpleServiceClient{cc}
108113
}
@@ -121,6 +126,11 @@ func (c *simpleServiceClient) Ping(
121126
return out, nil
122127
}
123128

129+
// TestGRPCLoadBalancingPolicies tests how different load balancing policies behave
130+
// This is a test function, so we can ignore the staticcheck warnings about deprecated methods
131+
// as we need to use these specific gRPC APIs for testing the load balancing behavior.
132+
//
133+
//nolint:staticcheck
124134
func TestGRPCLoadBalancingPolicies(t *testing.T) {
125135
// Start several real gRPC servers with different characteristics
126136
servers := make([]*simpleServer, 3)

0 commit comments

Comments
 (0)