The following (rightfully) doesn\'t work:
package main import ( \"os\" \"time\" ) func main() { os.Args[0] = \"custom name\"
To change a process name on Linux, you need to use the prctl system call combined with the PR_SET_NAME option.
PR_SET_NAME
At the moment, I don't think you can do this in Go code. You can, however, build a small C module to do this and then integrate it into your Go build.