Declaring a field tag in proto message
<p>I just dived in Go programming using protobuf and I'm at the point where I need to validate data in a struct. I found <a href="https://github.com/asaskevich/govalidator" rel="noreferrer">govalidator</a>, which seems to do the perfect job for what I need. It does validate structs based on the field tags, something like</p>

<pre><code>type Contact struct {
    firstName string `valid:"alpha,required"`
    lastName string `valid:"alpha,required"`
    email string `valid:"email,required"`
}

jdoe := &amp;Contact{
    firstName: "John",
    lastName: "Doe",
    email: "jdoe@mail.com"
}

ok, err = govalidator.ValidateStruct(jdoe)
</code></pre>

<p>And my protobuf definition would look like</p>

<pre><code>message Contact {
    string firstName = 1;
    string lastName = 2;
    string email = 3;
}
</code></pre>

<p>Now my question would be, is there a way to define the field tags in the proto message. From what I've seen in the generated go code, the compiler adds tags to the fields anyway, but could I "sneak" the ones that I need too? Also, I would imagine that unmarshalling could be one possible solution, but it somehow seems inefficient to me to unmarshal just to copy the field values to an equivalent struct which would have the necessary field tags.</p>