Documentation ¶
Index ¶
- Constants
- func AllocSlice[T allocItem](data []T, size int) ([]T, []T)
- func BooleanSlice2byte(b []bool) []byte
- func Bytes2BooleanSlice(b []byte) []bool
- func Bytes2Float32Slice(b []byte) []float32
- func Bytes2Float64Slice(b []byte) []float64
- func Bytes2Int16Slice(b []byte) []int16
- func Bytes2Int32Slice(b []byte) []int32
- func Bytes2Int64Slice(b []byte) []int64
- func Bytes2Int8Slice(b []byte) []int8
- func Bytes2Uint16Slice(b []byte) []uint16
- func Bytes2Uint32Slice(b []byte) []uint32
- func Bytes2Uint64Slice(b []byte) []uint64
- func Bytes2str(b []byte) string
- func CeilToPower2(num uint64) uint64
- func Float32Slice2byte(b []float32) []byte
- func Float64Slice2byte(b []float64) []byte
- func Float64ToUint64(v float64) uint64
- func HttpError(w http.ResponseWriter, errmsg string, code int)
- func Include(slice []uint64, s uint64) bool
- func IndexOf(slice []uint64, s uint64) int
- func Int16Slice2byte(b []int16) []byte
- func Int32Slice2byte(b []int32) []byte
- func Int64Slice2byte(b []int64) []byte
- func IntLimit(min, max int, v int) int
- func IsObjectNil(obj interface{}) bool
- func MaxUint32(x, y uint32) uint32
- func MemorySet(buf []byte)
- func Min(x, y int) int
- func MustClose(obj io.Closer)
- func NumberOfTrailingZeros(num uint64) int
- func RemoveDuplicationInt(array []uint32) []uint32
- func SetLogger(lg *zap.Logger)
- func Str2bytes(s string) []byte
- func TimeCost(option string) func()
- func Uint16Slice2byte(b []uint16) []byte
- func Uint32Slice2byte(b []uint32) []byte
- func Uint64Slice2byte(b []uint64) []byte
- func Uint64ToFloat64(v uint64) float64
- type Corrector
- func (c *Corrector) Float64(v *float64, def float64)
- func (c *Corrector) Int(v *int, def int)
- func (c *Corrector) String(v *string, def string)
- func (c *Corrector) TomlDuration(v *toml.Duration, def toml.Duration)
- func (c *Corrector) TomlSize(v *toml.Size, def toml.Size)
- func (c *Corrector) Uint64(v *uint64, def uint64)
- type TimeRange
- type TimerPool
Constants ¶
View Source
const ( TierBegin = 0 Hot = 1 Warm = 2 Cold = 3 TierEnd = 4 )
View Source
const ( BooleanSizeBytes = int(unsafe.Sizeof(false)) Uint32SizeBytes = int(unsafe.Sizeof(uint32(0))) Uint16SizeBytes = int(unsafe.Sizeof(uint16(0))) Uint64SizeBytes = int(unsafe.Sizeof(uint64(0))) Int16SizeBytes = int(unsafe.Sizeof(int16(0))) Int32SizeBytes = int(unsafe.Sizeof(int32(0))) Int64SizeBytes = int(unsafe.Sizeof(int64(0))) Float32SizeBytes = int(unsafe.Sizeof(float32(0))) Float64SizeBytes = int(unsafe.Sizeof(float64(0))) Int8SizeBytes = int(unsafe.Sizeof(int8(0))) )
View Source
const RowsNumPerFragment int = 8192
Variables ¶
This section is empty.
Functions ¶
func AllocSlice ¶ added in v1.1.0
func AllocSlice[T allocItem](data []T, size int) ([]T, []T)
func BooleanSlice2byte ¶ added in v1.1.0
func Bytes2BooleanSlice ¶ added in v1.1.0
func Bytes2Float32Slice ¶ added in v1.1.0
func Bytes2Float64Slice ¶ added in v1.1.0
func Bytes2Int16Slice ¶ added in v1.1.0
func Bytes2Int32Slice ¶ added in v1.1.0
func Bytes2Int64Slice ¶ added in v1.1.0
func Bytes2Int8Slice ¶ added in v1.1.0
func Bytes2Uint16Slice ¶ added in v1.1.0
func Bytes2Uint32Slice ¶ added in v1.1.0
func Bytes2Uint64Slice ¶ added in v1.1.0
func CeilToPower2 ¶ added in v0.2.0
func Float32Slice2byte ¶ added in v1.1.0
func Float64Slice2byte ¶ added in v1.1.0
func Float64ToUint64 ¶ added in v1.1.0
func HttpError ¶ added in v1.0.0
func HttpError(w http.ResponseWriter, errmsg string, code int)
httpError writes an error to the client in a standard format.
func IndexOf ¶ added in v1.0.0
IndexOf returns index position in slice from given array If value is -1, the string does not found.
func Int16Slice2byte ¶ added in v1.1.0
func Int32Slice2byte ¶ added in v1.1.0
func Int64Slice2byte ¶ added in v1.1.0
func IsObjectNil ¶
func IsObjectNil(obj interface{}) bool
func NumberOfTrailingZeros ¶ added in v1.1.0
func RemoveDuplicationInt ¶ added in v1.1.0
func Uint16Slice2byte ¶ added in v1.1.0
func Uint32Slice2byte ¶ added in v1.1.0
func Uint64Slice2byte ¶ added in v1.1.0
func Uint64ToFloat64 ¶ added in v1.1.0
Types ¶
type Corrector ¶
type Corrector struct {
// contains filtered or unexported fields
}
func NewCorrector ¶
func (*Corrector) TomlDuration ¶
Click to show internal directories.
Click to hide internal directories.