On 28 December 2017 at 16:54, jzs <zeil...@gmail.com> wrote:
>
> Any feedback is more than welcome
>

Looks nice. A few minor ideas:

There is code which appears after log.Fatal() - that code won't run because
log.Fatal calls exit. Therefore the the waitgroup could be dropped and
you'd have something shorter and still equivalent :)

`proxies` and `statics` could be unified into a single map: `handler
map[string]http.Handler`.

If `proxies` and `statics` (or `handler`) lived on the P type, global state
could be avoided. (And as anmol noted, you can check r.TLS, so you could
just have a single instance of P without the `secure` bool and reuse it).

A 200 status code is returned in the "Nothing here" branch.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to