Documentation ¶
Index ¶
- Constants
- func BtoS(b []byte) (s string)
- func BtoU4(b []byte) (i []uint32)
- func BtoU8(b []byte) (i []uint64)
- func ByteSize(bytes uint64) string
- func CmpB(a, b []byte) int
- func CmpS(a, b string) (r int)
- func CodeFormat(data ...string) string
- func Copy(x []byte) []byte
- func CopyBytes(b []byte) []byte
- func CopyString(s string) string
- func Cost(fn func()) (dur time.Duration, err error)
- func DirExists(path string) bool
- func DotJoin(str ...string) string
- func EqualFieldType(out interface{}, kind reflect.Kind, key string) bool
- func EqualFold(b, s string) (equals bool)
- func EqualFoldBytes(b, s []byte) (equals bool)
- func FileExists(path string) bool
- func FirstNotEmpty(fx ...func() string) string
- func GetDefault(names ...string) string
- func IfEmpty(str string, fx func())
- func InsideTest() bool
- func StoB(s string) (b []byte)
- func StoU4(s string) (i []uint32)
- func StoU8(s string) (i []uint64)
- func ToLower(b string) string
- func ToLowerBytes(b []byte) []byte
- func ToUpper(b string) string
- func ToUpperBytes(b []byte) []byte
- func TransformObject2Param(object interface{}) (params map[string]string)
- func Trim(s string, cutset byte) string
- func TrimBytes(b []byte, cutset byte) []byte
- func TrimLeft(s string, cutset byte) string
- func TrimLeftBytes(b []byte, cutset byte) []byte
- func TrimRight(s string, cutset byte) string
- func TrimRightBytes(b []byte, cutset byte) []byte
- func U4toB(i []uint32) (b []byte)
- func U4toS(i []uint32) (s string)
- func U4toU8(i []uint32) (k []uint64)
- func U8toB(i []uint64) (b []byte)
- func U8toS(i []uint64) (s string)
- func U8toU4(i []uint64) (k []uint32)
- func UnsafeBytes(s string) (bs []byte)
- func UnsafeString(b []byte) string
- type Slice
- type String
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ByteSize ¶
ByteSize returns a human-readable byte string of the form 10M, 12.5K, and so forth. The unit that results in the smallest number greater than or equal to 1 is always chosen.
func CodeFormat ¶
func EqualFoldBytes ¶
EqualFoldBytes the equivalent of bytes.EqualFold
func FirstNotEmpty ¶
func GetDefault ¶
func ToLowerBytes ¶
ToLowerBytes is the equivalent of bytes.ToLower
func ToUpperBytes ¶
ToUpperBytes is the equivalent of bytes.ToUpper
func TransformObject2Param ¶
func TrimLeftBytes ¶
TrimLeftBytes is the equivalent of bytes.TrimLeft
func TrimRightBytes ¶
TrimRightBytes is the equivalent of bytes.TrimRight
func UnsafeBytes ¶
#nosec G103 UnsafeBytes returns a byte pointer without allocation
func UnsafeString ¶
#nosec G103 UnsafeString returns a string pointer without allocation
Types ¶
type Slice ¶
Slice internals from reflect
func U4toSlices ¶
U4toSlices converts integer slice to Slice list
func U8toSlices ¶
U8toSlices converts integer slice to Slice list