title: Golang store any struct in other struct field
body: <p>I have this code:</p>
  
  <pre><code>type TestData struct {
      Key string
  }
  
  type TemporaryStoreItem struct {
      key string
      data interface{}
      aliveUntil time.Time
  }
  
  func (s *TemporaryStoreItem) SetData(src interface{}) {
      src = s.data
  }
  
  data := TestData{
      Key: "value",
  }
  
  item := TemporaryStoreItem{
      key:     "item1",
      data:    data,
      aliveUntil: time.Now(),
  }
  oldItem := TestData{}
  item.SetData(&amp;oldItem)
  
  </code></pre>
  
  <p>I need to save any data or pointer to data in 'data' field of TemporaryStoreItem, and i need to get data as TestData struct(or any else source struct), what i do wrong, and is it possible to implement this idea?</p>