go rewrite