mirror of
https://github.com/Luzifer/ots.git
synced 2025-04-19 06:55:51 -04:00
refactor: hold timer pointer instead of needlesly dereferencing it.
This commit is contained in:
parent
ffc6144c44
commit
7d6f683d9d
@ -19,14 +19,14 @@ type (
|
||||
storageMem struct {
|
||||
sync.RWMutex
|
||||
store map[string]memStorageSecret
|
||||
storePruneTimer time.Ticker
|
||||
storePruneTimer *time.Ticker
|
||||
}
|
||||
)
|
||||
|
||||
// New creates a new In-Mem storage
|
||||
func New() storage.Storage {
|
||||
store := &storageMem{
|
||||
storePruneTimer: *time.NewTicker(time.Minute),
|
||||
storePruneTimer: time.NewTicker(time.Minute),
|
||||
store: make(map[string]memStorageSecret),
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user