Documentation
¶
Index ¶
- Constants
- func ParseDurationWithDays(value string) (time.Duration, error)
- func ParseTimeOrRelativeDuration(value string, now time.Time) (time.Time, error)
- type Clock
- type FakeClock
- func (f *FakeClock) Advance(d time.Duration)
- func (f *FakeClock) AfterFunc(d time.Duration, fn func()) Timer
- func (f *FakeClock) NewTimer(d time.Duration) Timer
- func (f *FakeClock) Now() time.Time
- func (f *FakeClock) WithTimeout(parent context.Context, d time.Duration) (context.Context, context.CancelFunc)
- type FakeDeadlineContext
- type FakeTimer
- type RealClock
- type RealTimer
- type Timer
Constants ¶
View Source
const ( Day = 24 * time.Hour SimpleDate1 = "2006-01-02" SimpleDate2 = "2026/01/02" UsDate1 = "01-02-2006" )
Variables ¶
This section is empty.
Functions ¶
func ParseDurationWithDays ¶ added in v1.1.4
Types ¶
type FakeClock ¶
type FakeClock struct {
// contains filtered or unexported fields
}
func NewFakeClock ¶
type FakeDeadlineContext ¶
func (*FakeDeadlineContext) Deadline ¶
func (ctx *FakeDeadlineContext) Deadline() (deadline time.Time, ok bool)
func (*FakeDeadlineContext) Done ¶
func (ctx *FakeDeadlineContext) Done() <-chan struct{}
func (*FakeDeadlineContext) Err ¶
func (ctx *FakeDeadlineContext) Err() error
Click to show internal directories.
Click to hide internal directories.