azer/boxcars — pull request #5 by JustinAzoff (2013-07-28 05:22:32+00:00)
Title: Use a temporary map for loading the sites list.

When loading the site list, build the mapping in a temporary variable
and then swap it. This (I think) fixes a race condition where sites
will not match while the configuration is being updated.

As far as I know, swapping out the map like that is an atomic operation
and this does not require the use of a mutex or making 'sites' not a
global variable and using goroutines to pass around the latest config.