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() }