misc functions for go lang