Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Mar 25, 2023
1 parent 78c8426 commit fb90959
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 0 additions & 12 deletions CHANGELOG.md

This file was deleted.

6 changes: 6 additions & 0 deletions timedmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ func New(cleanupTickTime time.Duration, tickerChan ...<-chan time.Time) *TimedMa
return newTimedMap(make(map[keyWrap]*element), cleanupTickTime, tickerChan)
}

// FromMap creates a new TimedMap containing the given
// keys and values from the passed map m. All key-value
// pairs will be assigned the given expiration.
//
// Returns ErrValueNoMap if the given value for m is
// not of type map.
func FromMap(
m interface{},
expiration time.Duration,
Expand Down

0 comments on commit fb90959

Please sign in to comment.