title: Determine if var is a custom Type
body: <p>How to determine if the var passed to my Func is actually the Type that i want?</p>
  
  <p>i have a custom Type</p>
  
  <pre><code>type Name string
  </code></pre>
  
  <p>and a bunch of constants of that type</p>
  
  <pre><code>const Fred Name = "fred"
  </code></pre>
  
  <p>and i have a func that i need to forbid any other type of input other than my custom Type ex:</p>
  
  <pre><code>func MyFunc(name1 Name, name2 Name) (*Person, error) {
  //bunch of stuff
  }
  </code></pre>
  
  <p>how i check inside my func that name1 and name2 are not strings passed to the func but exclusively the const i already defined in my type ex:</p>
  
  <pre><code>p, err := MyFunc(Fred,Albert) //What i want
  p, err := MyFunc("fred","albert") //What i dont want to happen
  </code></pre>
  
  <p>if cannot answer my question how i can make like a Enum in Golang a type that means something and restrict other ppl to use that type i defined</p>