title: Type interface {} is interface with no methods
body: <p>I am using <a href="https://github.com/kataras/iris" rel="nofollow noreferrer">https://github.com/kataras/iris</a> golang web framework. This is follow up mail from the last question asked here - <a href="https://stackoverflow.com/questions/46130446/fetching-logged-in-user-info-for-display-golang-template">Fetching Logged in User Info for display - Golang Template</a></p>
  
  <p>I am finally using code that was mentioned in the previous post like:-</p>
  
  <p><code>ctx.Values().Get("user")</code></p>
  
  <p>and the value that user is set or has is "Struct" type:-</p>
  
  <pre><code>// users is struct below
  
  var user users
  
  // details are fetched from DB and assigned to user 
  // like mentioned here http://go-database-sql.org/retrieving.html 
  // Now value is set
  ctx.Values().Set("user", user);
  </code></pre>
  
  <p>But after getting the value, When I use in different handler and print:-</p>
  
  <pre><code>user := ctx.Values().Get("user")
  fmt.Println(user.ID)
  </code></pre>
  
  <p>I get the error:-</p>
  
  <p><code>user.ID undefined (type interface {} is interface with no methods)</code></p>
  
  <p>I need help in "Type assertion" for the interface. How can I "type assert" above value?</p>