I believe the idiomatic way would be to have 2 &quot;Add&quot; functions:<p><pre><code>  func (c *Cache) AddExpiring(k Key, e Entry, d time.Duration) {}
  func (c *Cache) Add(k Key, e Entry) {}
  func (c *Cache) GetWithRemaining(k Key) (e Entry, left time.Duration) {}
</code></pre>
Not the prettiest, but it does the job. That sentence could be Go&#x27;s motto.