Documentation ¶
Index ¶
- Variables
- func Do(f func(), r func(interface{}))
- func Err(f string, args ...interface{}) error
- func ExitIf(condition bool, format string, args ...interface{})
- func ExitOn(i interface{})
- func Go(f func(), r func(interface{}))
- func MustGoGroup(fs ...func())
- func Now() time.Time
- func NowMilli() time.Time
- func NowUnixMilli() int64
- func NowUnixNano() int64
- func PanicIf(condition bool, format string, args ...interface{})
- func PanicIfZeroID(id ID)
- func PanicOn(i interface{})
- func Print(args ...interface{})
- func Printf(f string, args ...interface{})
- func Println(args ...interface{})
- func Recover(r func(interface{}))
- func Str(args ...interface{}) string
- func StrContains(s, substr string) bool
- func StrEllipsis(s string, max uint) string
- func StrHasPrefix(s, prefix string) bool
- func StrHasSuffix(s, suffix string) bool
- func StrJoin(strs []string, sep string) string
- func StrLen(s string) int
- func StrLower(s string) string
- func StrRepeat(s string, count int) string
- func StrReplace(s, old, new string, n int) string
- func StrReplaceAll(s, old, new string) string
- func StrSplit(s string, sep string) []string
- func StrTrim(s, cutset string) string
- func StrTrimWS(s string) string
- func StrUpper(s string) string
- func Strf(f string, args ...interface{}) string
- func Strln(args ...interface{}) string
- type Bit
- type Bits
- type Error
- type Errors
- type ID
- func (id ID) Compare(other ID) int
- func (id ID) Copy() ID
- func (id ID) Equal(other ID) bool
- func (id ID) IsZero() bool
- func (id ID) MarshalBinary() ([]byte, error)
- func (id ID) MarshalBinaryTo(dst []byte) error
- func (id ID) MarshalText() ([]byte, error)
- func (id ID) MarshalTextTo(dst []byte) error
- func (id *ID) Scan(src interface{}) error
- func (id ID) String() string
- func (id ID) Time() time.Time
- func (id *ID) UnmarshalBinary(data []byte) error
- func (id *ID) UnmarshalText(data []byte) error
- func (id ID) Value() (driver.Value, error)
- type IDGen
- type IDGenPool
- type IDs
- type Key
- func (s Key) MarshalBinary() ([]byte, error)
- func (s Key) MarshalBinaryTo(dst []byte) error
- func (s Key) MarshalText() ([]byte, error)
- func (s Key) MarshalTextTo(dst []byte) error
- func (s *Key) Scan(src interface{}) error
- func (s *Key) String() string
- func (s *Key) UnmarshalBinary(data []byte) error
- func (s *Key) UnmarshalText(data []byte) error
- func (s Key) Value() (driver.Value, error)
- type Keys
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Exit = os.Exit
)
Functions ¶
func MustGoGroup ¶
func MustGoGroup(fs ...func())
func NowUnixMilli ¶
func NowUnixMilli() int64
func NowUnixNano ¶
func NowUnixNano() int64
func PanicIfZeroID ¶
func PanicIfZeroID(id ID)
func StrContains ¶
func StrEllipsis ¶
func StrHasPrefix ¶
func StrHasSuffix ¶
func StrReplace ¶
func StrReplaceAll ¶
Types ¶
type Bit ¶
type Bit uint8
func (Bit) MarshalBinary ¶
func (Bit) MarshalJSON ¶
func (Bit) MarshalText ¶
func (*Bit) UnmarshalBinary ¶
func (*Bit) UnmarshalJSON ¶
func (*Bit) UnmarshalText ¶
type Bits ¶
type Bits []Bit
func (Bits) MarshalBinary ¶
func (Bits) MarshalText ¶
func (*Bits) UnmarshalBinary ¶
func (*Bits) UnmarshalText ¶
type Error ¶
type ID ¶
type ID ulid.ULID
func MustParseID ¶
func (ID) MarshalBinary ¶
func (ID) MarshalBinaryTo ¶
func (ID) MarshalText ¶
func (ID) MarshalTextTo ¶
func (*ID) UnmarshalBinary ¶
func (*ID) UnmarshalText ¶
type IDGenPool ¶
type IDGenPool interface {
Get() IDGen
}
func NewIDGenPool ¶
n.b. each IDGen allocates approx 5kb of memory so use a fixed pool to save on lots of big memory de/allocations
type IDs ¶
type IDs []ID
type Key ¶
type Key string
keys are user defined ids, max chars 50
func MustParseKey ¶
func MustToKeyPtr ¶
func (Key) MarshalBinary ¶
func (Key) MarshalBinaryTo ¶
func (Key) MarshalText ¶
func (Key) MarshalTextTo ¶
func (*Key) UnmarshalBinary ¶
func (*Key) UnmarshalText ¶
type Keys ¶
type Keys []Key
func MustParseKeys ¶
func MustToKeys ¶
Click to show internal directories.
Click to hide internal directories.