Port of GGP base to golang