How to add file into autorun with help of Golang

How do I create a register file and add a value to it?

Or a single solution is to execute commands in the terminal using exec?

And can i create a service with help of Golang? I was searching information for this and did not find any information.