title: In Go, how do I create a "constructor" for a type with a string base type?
body: <p>trying to have a type <code>Char</code> that is a <code>string</code> one character long.  what I'm unable to do is create a "constructor".  I know I'm missing something completely obvious.</p>
  
  <p>declare the <code>Char</code> type</p>
  
  <pre>
    type Char string
  </pre>
  
  <p>can use that type with a declaration</p>
  
  <pre>
    var c1 Char("abc")
    var c2 Char = "abc"
  </pre>
  
  <p>these are wrong:  <code>c1</code> and <code>c2</code> need to be "a", not "abc"</p>
  
  <p>what I really want is a "constructor" to limit Char to one character</p>
  
  <pre>
   func Char( s string ) Char {
     var ch string = s[0]
     return ch
   }
  </pre>
  
  <p>of course having the <code>type Char</code> and <code>func Char</code> is not the way to do it</p>
  
  <pre>
   type.go:8: Char redeclared in this block
  </pre>
  
  <p>is there any way for to force <code>type</code> initialization through a constructor?  or am I even asking the correct question?</p>
  
  <p>let me state differently: if the user says <code>var c Char = "abc"</code> they will have an invalid value for type <code>Char</code> - is there any way to force the user into <code>func NewChar(string) Char</code> as <code>Char</code>'s only valid constructor?</p>