In line 31 you are redeclaring dispatchMux instead of assigning to the
global dispatchMux. That still doesn't explain why it is not working
when you do it with a function, but maybe there's something else not
included in your posted code.
On Thu, Jun 6, 2019 at 11:40 PM Manish Champaneri
wrote:
>
Link to complete project :
https://github.com/mchampaneri/go-multihost
File that contains this code
https://github.com/mchampaneri/go-multihost/blob/master/proxy.go
Json file containing site details
https://github.com/mchampaneri/go-multihost/blob/master/server.json
On Friday, June 7, 2019 at
On Thu, Jun 6, 2019 at 9:28 PM Sam Mortimer wrote:
>
> I suspect it's the classic that I think everyone does at least once - in the
> second code block the for loop reuses the same storage on each iteration for
> the variable site. Try adding:
> site := site
> ..just before your append to verif
I suspect it's the classic that I think everyone does at least once - in
the second code block the for loop reuses the same storage on each
iteration for the variable site. Try adding:
site := site
..just before your append to verify this.
Cheers,
-Sam.
On Thursday, June 6, 2019 at 6:49:00 AM