This repository has been archived on 2025-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
web-app-template/service/clock.go
Tim Wundenberg 3232632200
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 48s
fix: new test and extract time.Now to mockable Clock #181
2024-10-05 23:42:38 +02:00

18 lines
211 B
Go

package service
import "time"
type Clock interface {
Now() time.Time
}
type ClockImpl struct{}
func NewClockImpl() Clock {
return &ClockImpl{}
}
func (c *ClockImpl) Now() time.Time {
return time.Now()
}