Some utility functions written in Go (golang)