Golang port of rmate