title: What is the meaning of "dot parenthesis" syntax?
body: <p>I am studying a sample Go application that stores data in mongodb. The code at this line (<a href="https://github.com/zeebo/gostbook/blob/master/context.go#L36" rel="noreferrer">https://github.com/zeebo/gostbook/blob/master/context.go#L36</a>) seems to access an user ID stored in a gorilla session:</p>
  
  <pre><code>if uid, ok := sess.Values["user"].(bson.ObjectId); ok {
    ...
  }
  </code></pre>
  
  <p>Would someone please explain to me the syntax here? I understand that <code>sess.Values["user"]</code> gets a value from the session, but what is the part that follows? Why is the expression after the dot in parentheses? Is this a function invocation?</p>