Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶ added in v1.0.1
type Error struct {
// contains filtered or unexported fields
}
Error is similar to Once, except it returns an error value.
type Once ¶
type Once struct {
// contains filtered or unexported fields
}
Once is backwards compatible re-implementation of sync.Once. See https://golang.org/pkg/sync/#Once
type Value ¶ added in v1.0.1
type Value struct {
// contains filtered or unexported fields
}
Value is similar to Once, except it returns a value.
type ValueError ¶ added in v1.0.1
type ValueError struct {
// contains filtered or unexported fields
}
ValueError is similar to Once, except it return a (value, error) tuple
func (*ValueError) Do ¶ added in v1.0.1
func (o *ValueError) Do(f func() (interface{}, error)) (interface{}, error)
Do runs the specified function only once, but all callers gets the same result from that single execution.
Click to show internal directories.
Click to hide internal directories.