title: Convert a string slice to a BSON array
body: <p>I am trying to insert an array into a MongoDB instance using Go. I have the <code>[] string</code> slice in Go and want to convert it into a <code>BSON</code> array to pass it to the DB using the <code>github.com/mongodb/mongo-go-driver</code> driver.</p>
  
  <pre><code>var result bson.Array
      for _, data := range myData {
          value := bson.VC.String(data)
          result.Append(value)
  }
  </code></pre>
  
  <p>This loops over each element of my input data and tries to append it to the <code>BSON</code> array. However the line with the <code>Append()</code> fails with <code>panic: document is nil</code>. How should I do this conversion?</p>