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 StrEllipsis(s string, max uint) string
- 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) UnmarshalBinary(data []byte) error
- func (id *ID) UnmarshalText(data []byte) error
- func (id ID) Value() (driver.Value, error)
- type IDGen
- type IDGenPool
- type IDs
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 StrEllipsis ¶
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
Click to show internal directories.
Click to hide internal directories.