title: How to build an array of structs in Go and gRPC?
body: <p>I am trying to add an array of strings into the content part of a struct with the Id as the array index. I have the code working for one element, but get various errors when I try and add the loop. Any ideas are welcome.  I am using Go.</p>
  
  <pre><code>func buildRequest(s []string) []*storepb.LongStoreRequest { 
  //      ss:= []storepb.LongStoreRequest 
  // int32 i =0 stringv := s[0] 
  //      for i := 0; i &lt; len(s); i++ {
      //              println(i, apps[i])
      ss := []*storepb.LongStoreRequest{
              &amp;storepb.LongStoreRequest {
                      Msg: &amp;storepb.StoreMessage{
                              Content: stringv,
                              Account:  "trevor3",
                              Parent: "parentrec",
                              Id: 0,
                      },
                      }, 
              } //      }
          return ss 
  }
  </code></pre>