title: error from convert ObjectIDFromHex from mongodb
body: <p>I have a problem finding an <code>objectid</code> through the query param called <code>id</code>.</p>
  <p>I can see the id that arrives at the function until the moment of doing the query.
  But when I try to use <code>ObjectIDFromHex</code> it returns <code>00000000000000000000000</code> and doesn't get the document from mongodb.</p>
  <p>I'll leave a screenshot so you can see the full problem.</p>
  <p><a href="https://i.stack.imgur.com/2FyED.png" rel="nofollow noreferrer">screenshot with IDE</a></p>
  <p>The code is this.</p>
  <pre><code>func RetrieveUser(ID string) (models.User, error) {
      ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
      defer cancel()
  
      db := MongoCN.Database(&quot;mydatabase&quot;)
      col := db.Collection(&quot;users&quot;)
  
      var user models.User
  
      objID, _ := primitive.ObjectIDFromHex(ID)
  
      fmt.Println(ID)
      fmt.Println(objID)
      condition := bson.M{
          &quot;_id&quot;: objID,
      }
  
      err := col.FindOne(ctx, condition).Decode(&amp;user)
      user.Password = &quot;&quot;
  
      if err != nil {
          fmt.Println(&quot;User not found&quot; + err.Error())
          return user, err
      }
      return user, nil
  }
  </code></pre>