title: Setting process name (as seen by `ps`) in Go
body: <p>The following (rightfully) doesn't work:</p>
  
  <pre><code>package main
  
  import (
          "os"
          "time"
  )
  
  func main() {
          os.Args[0] = "custom name"
          println("sleeping")
          time.Sleep(1000 * time.Second)
          println("done")
  }
  </code></pre>
  
  <p>Some languages provide this feature of <a href="http://www.steve.org.uk/Reference/Unix/faq_2.html#SEC22" rel="noreferrer">setting process name</a> as a built-in functionality (in Ruby, for instance, it is only a matter of <a href="https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/launcher.rb#L27" rel="noreferrer">assigning to</a> <code>$0</code>) or as a third-party library (<a href="http://pypi.python.org/pypi/setproctitle" rel="noreferrer">Python</a>).</p>
  
  <p>I'm looking for a solution that works, at least, on Linux.</p>