title: How can I update and specific nested struct field in MongoDB with golang using bson
body: <p>This is what I'm trying to achieve:</p>
  <p><code>bson.M{constants.MONGO_SET: entity.UserShop{Shop.ID: userShop.Shop.ID}} </code></p>
  <p>instead using</p>
  <p><code>bson.M{constants.MONGO_SET: entity.UserShop{&quot;shop._id&quot;: userShop.Shop.ID}} </code></p>
  <p>being</p>
  <pre><code>type UserShop struct {
    User `json:&quot;-&quot;  bson:&quot;-&quot;`
    Shop `json:&quot;shop,omitempty&quot;  bson:&quot;shop,omitempty&quot;`
  }
  </code></pre>
  <p>and shop</p>
  <pre><code>type Shop struct {
      ID          primitive.ObjectID `json:&quot;-&quot; bson:&quot;_id,omitempty&quot;`
      Name        string             `json:&quot;name,omitempty&quot; bson:&quot;name,omitempty&quot;`
      Description string             `json:&quot;description,omitempty&quot; bson:&quot;description,omitempty&quot;`
      ImageURL    string             `json:&quot;imageURL,omitempty&quot; bson:&quot;imageURL,omitempty&quot;`
      Stars       int64              `json:&quot;stars,omitempty&quot; bson:&quot;stars,omitempty&quot;`
      // Location    *[]int64           `json:&quot;location,omitempty&quot; bson:&quot;location,omitmepty&quot;`
      // Products    *AllProducts       `json:&quot;products,omitempty&quot; bson:&quot;products,omitempty&quot;`
  }
  </code></pre>
  <p>In database struct :</p>
  <p>Shop:{
  _id: &quot;12344&quot;,
  name: &quot;hello&quot;
  }</p>
  <p>I want to modify any specific field and do not modify any other field inside shop object</p>