From 23c960bc018d1f8e0ed0c8274745245deb0b5e1b Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Fri, 24 Jul 2015 11:26:21 -0700 Subject: [PATCH] gofmt -w --- transport/http2_client.go | 10 +++++----- transport/transport.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/transport/http2_client.go b/transport/http2_client.go index b5a97d33..8f79ad96 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -53,10 +53,10 @@ import ( // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { - target string // server name/addr + target string // server name/addr userAgent string - conn net.Conn // underlying communication channel - nextID uint32 // the next stream ID to be used + conn net.Conn // underlying communication channel + nextID uint32 // the next stream ID to be used // writableChan synchronizes write access to the transport. // A writer acquires the write lock by sending a value on writableChan @@ -165,9 +165,9 @@ func newHTTP2Client(addr string, opts *ConnectOptions) (_ ClientTransport, err e } var buf bytes.Buffer t := &http2Client{ - target: addr, + target: addr, userAgent: ua, - conn: conn, + conn: conn, // The client initiated stream id is odd starting from 1. nextID: 1, writableChan: make(chan int, 1), diff --git a/transport/transport.go b/transport/transport.go index b79cfd89..454511f7 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -321,13 +321,13 @@ func NewServerTransport(protocol string, conn net.Conn, maxStreams uint32) (Serv // ConnectOptions covers all relevant options for dialing a server. type ConnectOptions struct { // UserAgent is the application user agent. - UserAgent string + UserAgent string // Dialer specifies how to dial a network address. - Dialer func(string, time.Duration) (net.Conn, error) + Dialer func(string, time.Duration) (net.Conn, error) // AuthOptions stores the credentials required to setup a client connection and issue RPCs. AuthOptions []credentials.Credentials // Timeout specifies the timeout for dialing a client connection. - Timeout time.Duration + Timeout time.Duration } // NewClientTransport establishes the transport with the required ConnectOptions