title: Converting a custom type to string in Go
body: <p>In this bizarre example, someone has created a new type which is really just a string: </p>
  
  <pre><code>type CustomType string
  
  const (
          Foobar CustomType = "somestring"
  )
  
  func SomeFunction() string {
          return Foobar
  }
  </code></pre>
  
  <p>However, this code fails to compile:</p>
  
  <blockquote>
    <p>cannot use Foobar (type CustomType) as type string in return argument</p>
  </blockquote>
  
  <p>How would you fix SomeFunction so that it is able to return the string value of Foobar ("somestring") ?</p>