Uses the sync package from the unofficial Go library instead of simpler solution. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>