diff --git a/rpc/call.go b/rpc/call.go index cf52316b..d0534724 100644 --- a/rpc/call.go +++ b/rpc/call.go @@ -115,7 +115,7 @@ func Invoke(ctx context.Context, method string, args, reply proto.Message, cc *C Delay: false, } ts := 0 - var lastErr error // record the error happened in the last iteration + var lastErr error // record the error that happened for { var ( err error diff --git a/rpc/clientconn.go b/rpc/clientconn.go index ff50312d..8ccf74ad 100644 --- a/rpc/clientconn.go +++ b/rpc/clientconn.go @@ -49,7 +49,6 @@ import ( type dialOptions struct { protocol string authOptions []credentials.Credentials - // TBD: other options } // DialOption configures how we set up the connection including auth @@ -64,8 +63,8 @@ func WithClientTLS(creds credentials.TransportAuthenticator) DialOption { } } -// WithComputeEngine returns a DialOption which sets a -// credentials which uses application default credentials as provided to +// WithComputeEngine returns a DialOption which sets +// credentials which use application default credentials as provided to // Google Compute Engine. Note that TLS credentials is typically also // needed. If it is the case, users need to pass WithTLS option too. func WithComputeEngine(creds credentials.Credentials) DialOption { @@ -76,7 +75,7 @@ func WithComputeEngine(creds credentials.Credentials) DialOption { // Dial creates a client connection the given target. // TODO(zhaoq): Have an option to make Dial return immediately without waiting -// for connection complete. +// for connection to complete. func Dial(target string, opts ...DialOption) (*ClientConn, error) { if target == "" { return nil, fmt.Errorf("rpc.Dial: target is empty")