types

package
v0.0.0-...-3b294e6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2013 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByTime

type ByTime []time.Time

ByTime sorts times.

func (ByTime) Len

func (s ByTime) Len() int

func (ByTime) Less

func (s ByTime) Less(i, j int) bool

func (ByTime) Swap

func (s ByTime) Swap(i, j int)

type Time3339

type Time3339 time.Time

Time3339 is a time.Time which encodes to and from JSON as an RFC 3339 time in UTC.

func ParseTime3339OrZero

func ParseTime3339OrZero(v string) Time3339

ParseTime3339OrZero parses a string in RFC3339 format. If it's invalid, the zero time value is returned instead.

func ParseTime3339OrZil

func ParseTime3339OrZil(v string) *Time3339

func (*Time3339) IsZero

func (t *Time3339) IsZero() bool

IsZero returns whether the time is Go zero or Unix zero.

func (Time3339) MarshalJSON

func (t Time3339) MarshalJSON() ([]byte, error)

func (Time3339) String

func (t Time3339) String() string

func (Time3339) Time

func (t Time3339) Time() time.Time

Time returns the time as a time.Time with slightly less stutter than a manual conversion.

func (*Time3339) UnmarshalJSON

func (t *Time3339) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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