Add missing comments
This commit is contained in:
parent
8f00a10203
commit
1d1ad3dba6
1 changed files with 2 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// CacheGetter wraps a getter with a cache
|
||||
type CacheGetter struct {
|
||||
updated time.Time
|
||||
cache time.Duration
|
||||
|
|
@ -11,6 +12,7 @@ type CacheGetter struct {
|
|||
val interface{}
|
||||
}
|
||||
|
||||
// NewCacheGetter wraps a getter with a cache
|
||||
func NewCacheGetter(getter interface{}, cache time.Duration) *CacheGetter {
|
||||
return &CacheGetter{
|
||||
getter: getter,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue