Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golint fixes #315

Merged
merged 1 commit into from
Nov 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions transport/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ func (t *Transport) getIdleConn(cm *connectMethod) (pconn *persistConn) {
return
}
}
return
}

func (t *Transport) dial(network, addr string) (c net.Conn, raddr string, ip *net.TCPAddr, err error) {
Expand Down Expand Up @@ -479,12 +478,12 @@ type connectMethod struct {
targetAddr string // Not used if proxy + http targetScheme (4th example in table)
}

func (ck *connectMethod) String() string {
func (cm *connectMethod) String() string {
proxyStr := ""
if ck.proxyURL != nil {
proxyStr = ck.proxyURL.String()
if cm.proxyURL != nil {
proxyStr = cm.proxyURL.String()
}
return strings.Join([]string{proxyStr, ck.targetScheme, ck.targetAddr}, "|")
return strings.Join([]string{proxyStr, cm.targetScheme, cm.targetAddr}, "|")
}

// addr returns the first hop "host:port" to which we need to TCP connect.
Expand Down Expand Up @@ -655,7 +654,6 @@ type requestAndChan struct {
func (pc *persistConn) roundTrip(req *transportRequest) (resp *http.Response, err error) {
if pc.mutateHeaderFunc != nil {
panic("mutateHeaderFunc not supported in modified Transport")
pc.mutateHeaderFunc(req.extraHeaders())
}

// Ask for a compressed version if the caller didn't set their
Expand Down