From 5512a9e325acbb298683d0caa2dd7f9f0ce99259 Mon Sep 17 00:00:00 2001 From: Garrett Thornburg Date: Sun, 15 Oct 2017 20:34:45 -0400 Subject: [PATCH] Use new() over empty struct init --- connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection.go b/connection.go index 4fe5576..8878d31 100644 --- a/connection.go +++ b/connection.go @@ -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)