mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-09 09:26:35 +00:00
25 lines
356 B
Go
25 lines
356 B
Go
// Package clock provides the system clock.
|
|
package clock
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
var Set = wire.NewSet(
|
|
wire.Struct(new(Real), "*"),
|
|
wire.Bind(new(Interface), new(*Real)),
|
|
)
|
|
|
|
type Interface interface {
|
|
Now() time.Time
|
|
}
|
|
|
|
type Real struct{}
|
|
|
|
// Now returns the current time.
|
|
func (c *Real) Now() time.Time {
|
|
return time.Now()
|
|
}
|