More linting fun

This commit is contained in:
Asim
2016-04-06 18:03:27 +01:00
parent 2f50c74f41
commit bfe20d81d0
12 changed files with 33 additions and 38 deletions

View File

@@ -312,6 +312,7 @@ func (h *httpTransportListener) Close() error {
func (h *httpTransportListener) Accept(fn func(Socket)) error {
var tempDelay time.Duration
for {
c, err := h.listener.Accept()
if err != nil {
@@ -348,7 +349,6 @@ func (h *httpTransportListener) Accept(fn func(Socket)) error {
fn(sock)
}()
}
return nil
}
func (h *httpTransport) Dial(addr string, opts ...DialOption) (Client, error) {
@@ -436,7 +436,7 @@ func (h *httpTransport) String() string {
return "http"
}
func newHttpTransport(opts ...Option) *httpTransport {
func newHTTPTransport(opts ...Option) *httpTransport {
var options Options
for _, o := range opts {
o(&options)

View File

@@ -86,7 +86,6 @@ func (m *mockListener) Accept(fn func(transport.Socket)) error {
})
}
}
return nil
}
func (m *mockTransport) Dial(addr string, opts ...transport.DialOption) (transport.Client, error) {

View File

@@ -43,13 +43,13 @@ type DialOption func(*DialOptions)
type ListenOption func(*ListenOptions)
var (
DefaultTransport Transport = newHttpTransport()
DefaultTransport Transport = newHTTPTransport()
DefaultDialTimeout = time.Second * 5
)
func NewTransport(opts ...Option) Transport {
return newHttpTransport(opts...)
return newHTTPTransport(opts...)
}
func Dial(addr string, opts ...DialOption) (Client, error) {