code: func (tx *Tx) TTL(key string) (time.Duration, error) {
  	if tx.db == nil {
  		return 0, ErrTxClosed
  	}
  	item := tx.db.get(key)
  	if item == nil {
  		return 0, ErrNotFound
  	} else if item.opts == nil || !item.opts.ex {
  		return -1, nil
  	}
  	dur := item.opts.exat.Sub(time.Now())
  	if dur < 0 {
  		return 0, ErrNotFound
  	}
  	return dur, nil
  }
docs: // TTL returns the remaining time-to-live for an item.
  // A negative duration will be returned for items that do not have an
  // expiration.