title: How to "cast" a pointer back to a value in Golang?
body: <p>I'm using time.Time as a pointer in one of my structs. Eg</p>
  
  <pre><code>type struct Example{
      CreatedDate *time.Time
  }
  </code></pre>
  
  <p>I'm using the pointer, so I can pass nil to the struct, if no date exists.</p>
  
  <p>This does however pose a problem now, since I need to use the time.Since(then) function which does not accept the pointer as the parameter, but takes a time.Time instead.</p>
  
  <p>So...</p>
  
  <p>It's quite easy to put "&amp;" in front of a struct eg. &amp;time.Time, but if you have a pointer, how can you reverse it, back into eg. a type of time.Time?</p>
  
  <p>Eg. (does not work, but might give you an idea of what I mean)</p>
  
  <pre><code>var t *time.Time = &amp;time.Now()
  var t2 time.Time = t.(time.Time)
  </code></pre>
  
  <p>I hope you can help. The question feels quite silly, since I can't find anything about it when googling. I get the feeling I'm just missing something here ;-)</p>