Documentation
¶
Index ¶
- Constants
- func CeilToPower2(num uint32) uint32
- func HttpError(w http.ResponseWriter, errmsg string, code int)
- func Include(slice []uint64, s uint64) bool
- func IndexOf(slice []uint64, s uint64) int
- func IntLimit(min, max int, v int) int
- func IsObjectNil(obj interface{}) bool
- func MustClose(obj io.Closer)
- func SetLogger(lg *zap.Logger)
- func TimeCost(option string) func()
- 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)
Constants ¶
View Source
const ( TierBegin = 0 Hot = 1 Warm = 2 Cold = 3 TierEnd = 4 )
Variables ¶
This section is empty.
Functions ¶
func CeilToPower2 ¶ added in v0.2.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 IsObjectNil ¶
func IsObjectNil(obj interface{}) bool
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.