title: Use google.protobuf.Value in a protobuf file with go interface{} field in a struct and vice versa
body: <p>I have protobuf message which looks like this : </p>
  
  <pre><code>// Rule : Includes an entity , an operation and a comparison value
  message Rule {
    string entity = 1;
    string operator = 2;
    google.protobuf.Value value = 3;
  }
  </code></pre>
  
  <p>I am using Value here because value can be of any type. </p>
  
  <p>In my Golang code where I am using the generated code :</p>
  
  <pre><code>type Rule struct {
   Entity string
   Operator string
   Value interface{}
  }
  </code></pre>
  
  <p>Now, My question is :
  How do I convert type represented by Kind of google.protobuf.Value (nil, number, string, bool, struct, list) to interface{}
  and convert the dynamic type of interface{} in runtime back to type google.protobuf.Value ?</p>
  
  <p>I can really use some help, found a sorta-solution here ( <a href="https://go.googlesource.com/protobuf/+/4c057caa84dc5e1bc6bf0d9fe8af9180a6151e07/internal/value/convert.go" rel="nofollow noreferrer">https://go.googlesource.com/protobuf/+/4c057caa84dc5e1bc6bf0d9fe8af9180a6151e07/internal/value/convert.go</a> ) but was hoping of a simpler way to go about this.</p>