Imitating EventListener in golang