Documentation ¶
Overview ¶
Package types provides various common types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyBody io.ReadCloser = ioutil.NopCloser(strings.NewReader(""))
EmptyBody is a ReadCloser that returns EOF on Read and does nothing on Close.
NopCloser is an io.Closer that does nothing.
Functions ¶
Types ¶
type Time3339 ¶
Time3339 is a time.Time which encodes to and from JSON as an RFC 3339 time in UTC.
func ParseTime3339OrNil ¶
func ParseTime3339OrZero ¶
ParseTime3339OrZero parses a string in RFC3339 format. If it's invalid, the zero time value is returned instead.
func (Time3339) MarshalJSON ¶
func (Time3339) Time ¶
Time returns the time as a time.Time with slightly less stutter than a manual conversion.
func (*Time3339) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.