From 33e031444e73c3ba3a788f19c6a685ed1dc68eeb Mon Sep 17 00:00:00 2001 From: Ying Li Date: Wed, 14 Oct 2015 18:10:21 -0700 Subject: [PATCH] Better line wrapping and more comments Signed-off-by: Ying Li --- signer/signer_trust.go | 2 ++ signer/signer_trust_test.go | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/signer/signer_trust.go b/signer/signer_trust.go index 10e5289d13..a0a9168eb2 100644 --- a/signer/signer_trust.go +++ b/signer/signer_trust.go @@ -14,6 +14,8 @@ import ( "google.golang.org/grpc/credentials" ) +// The only thing needed from grpc.ClientConn - specifying an interface +// so that the connection can be stubbed out in tests. type checkableConnectionState interface { State() grpc.ConnectivityState } diff --git a/signer/signer_trust_test.go b/signer/signer_trust_test.go index 57bacaa29b..f27335ec0f 100644 --- a/signer/signer_trust_test.go +++ b/signer/signer_trust_test.go @@ -17,7 +17,8 @@ type StubKeyManagementClient struct { healthCheck func() (map[string]string, error) } -func (c StubKeyManagementClient) CheckHealth(x context.Context, v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) { +func (c StubKeyManagementClient) CheckHealth(x context.Context, + v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) { status, err := c.healthCheck() if err != nil { return nil, err @@ -30,7 +31,8 @@ type StubSignerClient struct { healthCheck func() (map[string]string, error) } -func (c StubSignerClient) CheckHealth(x context.Context, v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) { +func (c StubSignerClient) CheckHealth(x context.Context, v *pb.Void, + o ...grpc.CallOption) (*pb.HealthStatus, error) { status, err := c.healthCheck() if err != nil { return nil, err