Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynom committed Apr 26, 2017
1 parent cbf82ef commit eb29716
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
}

rlBucket := ratelimit.NewBucketWithRate(bucketRate, bucketSize)
proxy := newProxy(rURL, logger)
proxy := newProxy(logger, rURL)

s := &http.Server{
Addr: fmt.Sprintf(":%d", listenPort),
Expand All @@ -82,7 +82,7 @@ func main() {
s.ListenAndServe()
}

func newProxy(backend *url.URL, l log.Logger) *httputil.ReverseProxy {
func newProxy(l log.Logger, backend *url.URL) *httputil.ReverseProxy {
proxy := httputil.NewSingleHostReverseProxy(backend)
proxy.ErrorLog = stdlog.New(log.NewStdlibAdapter(l), "", stdlog.LstdFlags)
proxy.Transport = &http.Transport{
Expand Down

0 comments on commit eb29716

Please sign in to comment.