Rewrite in Go.