Added a Go implementation (with tests)

I just added a Go implementation, let me know if I've done something wrong!