title: ToString() function in Go
body: <p>The <code>strings.Join</code> function takes slices of strings only:</p>
  
  <pre><code>s := []string{"foo", "bar", "baz"}
  fmt.Println(strings.Join(s, ", "))
  </code></pre>
  
  <p>But it would be nice to be able to pass arbitrary objects which implement a <code>ToString()</code> function.</p>
  
  <pre><code>type ToStringConverter interface {
      ToString() string
  }
  </code></pre>
  
  <p>Is there something like this in Go or do I have to decorate existing types like <code>int</code> with ToString methods and write a wrapper around <code>strings.Join</code>?</p>
  
  <pre><code>func Join(a []ToStringConverter, sep string) string
  </code></pre>