title: How do I f.Type()=="string" directly using golang reflect?
body: <p>Full code is here:
  <a href="https://pastebin.com/xC1uQVBC" rel="nofollow noreferrer">https://pastebin.com/xC1uQVBC</a></p>
  
  <pre><code>   type UDD struct {
                          A string //content = "John"
                          B string //content = "Male"
                          C string //content = "12345678"
                          D int64 //content = ""
                          E uint64 //content = ""
                          Z string //content = "FIrst time user"
     }
  
  
      reflect_UDD := reflect.ValueOf(&amp;UDD).Elem()
      typeOf_UDD := reflect_UDD.Type()
  
  
  
  
      for i := 0; i &lt; reflect_UDD.NumField(); i++ {
             f := reflect_UDD.Field(i)
  
             if(f.Type()==reflect.TypeOf("string")){ 
                  //i would like to f.Type()=="string" directly... 
                  //how is this possible and also for uint64 and int64 etc
             }
       }
  </code></pre>
  
  <p>Basically, I would like to do something along the lines of</p>
  
  <pre><code>f.Type()=="string"
  </code></pre>
  
  <p>or </p>
  
  <pre><code>f.Type()=="uint64"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>f.Type()=="int64"
  </code></pre>
  
  <p>directly instead</p>