clock

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2020 License: GPL-3.0 Imports: 1 Imported by: 2

README

clock

Build Status

Testable time.Now

Documentation

Index

Constants

View Source
const (
	Default    = Clock("")
	Epoch      = Clock("1970-01-01 00:00:00.0 -0000 UTC")
	Format     = Clock("2006-01-02 15:04:05.987654321 -0000 UTC")
	Playground = Clock("2009-11-10 11:00:00.0 -0000 UTC")
	NineEleven = Clock("2001-09-11 12:46:40.0 -0000 UTC")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock string

func (Clock) MustTime

func (c Clock) MustTime() TimeFunction

func (Clock) Time

func (c Clock) Time() (TimeFunction, error)

func (Clock) UTC

func (c Clock) UTC() TimeFunction

type TimeFunction

type TimeFunction func() time.Time

func Now

func Now(c Clock) TimeFunction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL