title: mongo-go-driver find a document by _id
body: <p>I'm trying to find a document by its auto generated _id field. Code below returns nothing:</p>
  
  <pre><code>var documentID bson.RawValue
  documentID.Type = 7
  documentID.Value = []byte("5c7452c7aeb4c97e0cdb75bf")
  objID := documentID.ObjectID()
  value := collection.FindOne(ctx, bson.M{"_id": objID})
  </code></pre>
  
  <p>The value I provided is a real document id I got from Mongo Express </p>
  
  <pre><code>"_id": ObjectID("5c7452c7aeb4c97e0cdb75bf")
  </code></pre>
  
  <p>In case you're wondering why I bother with RawValue, I found examples using bson.EC.ObjectID but bson package doesn't seem to have EC type, also I found some examples mentioning github.com/mongodb/mongo-go-driver/bson/objectid package, but I could not find that package either. I previously developed with mgo but I'm new to mongo-go-driver, so if you can point an easy way to declare an ObjectID. </p>