title: Why use sql tags in struct in some go libs like gorm?
body: <p>Well I know the necessity of tags in struct in golang and how is it accessed by reflect in golang. But I have searched and could not find a reliable answer to the question of why I should use sql tags in struct while writing struct for sql results. I have explored many sample code and people are using <code>sql:"index"</code> in the struct and <code>sql:"primary_key"</code> in the struct.</p>
  
  <p>Now I have done indexing in the database layer, isn’t it enough? Should I have to use <code>sql:"index"</code> too get the best results? Like so I have defined primary key attribute in the database should I have to specify <code>sql:"primary_key"</code> as well?</p>
  
  <p>My code seems to work fine without those. Just want to know their benefit and usages.</p>