3
0

Change now() fn to return *time.Time, remove nowPtr

This commit is contained in:
Denis Arh 2020-10-07 21:20:44 +02:00 committed by Peter Grlica
parent 218ed597ea
commit 2ff393edb7

View File

@ -39,14 +39,9 @@ var (
DefaultActionlog actionlog.Recorder
// wrapper around time.Now() that will aid service testing
now = func() time.Time {
return time.Now()
}
// returns pointer to time.Time struct that is set to current time
nowPtr = func() *time.Time {
n := now()
return &n
now = func() *time.Time {
c := time.Now()
return &c
}
// wrapper around id.Next() that will aid service testing