Skip to content

Commit

Permalink
Use new() over empty struct init
Browse files Browse the repository at this point in the history
  • Loading branch information
film42 committed Oct 6, 2018
1 parent f9ffaec commit 5512a9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ func (c *connection) Handle() {
logger.Info.Println(c.id, "Processing connection to:", request.Method, request.Host)

if request.Method == "CONNECT" {
c.proxy = &httpsProxy{}
c.proxy = new(httpsProxy)
} else {
c.proxy = &httpProxy{}
c.proxy = new(httpProxy)
}

err = c.proxy.SetupOutgoing(c, request)
Expand Down

0 comments on commit 5512a9e

Please sign in to comment.