Documentation
¶
Index ¶
- Constants
- func ByteSize(bytes uint64) string
- func CallerStack(cd int, fns ...func(fn *runtime.Func, pc uintptr) string) string
- func CopyBytes(b []byte) []byte
- func CopyString(s string) string
- func EqualFold(b, s string) (equals bool)
- func EqualFoldBytes(b, s []byte) (equals bool)
- func Func(fn interface{}) func(...interface{}) func(...interface{})
- func FuncRaw(fn interface{}) func(...interface{}) []reflect.Value
- func FuncStack(fn interface{}, fns ...func(fn *runtime.Func, pc uintptr) string) string
- func FuncValue(fn interface{}) func(...reflect.Value) []reflect.Value
- func GetMIME(extension string) (mime string)
- func StatusMessage(status int) string
- func ToLower(b string) string
- func ToLowerBytes(b []byte) []byte
- func ToUpper(b string) string
- func ToUpperBytes(b []byte) []byte
- func Trim(s string, cutset byte) string
- func TrimBytes(b []byte, c byte) []byte
- func TrimLeft(s string, cutset byte) string
- func TrimLeftBytes(b []byte, c byte) []byte
- func TrimRight(s string, cutset byte) string
- func TrimRightBytes(b []byte, c byte) []byte
- func UnsafeBytes(s string) (bs []byte)
- func UnsafeString(b []byte) string
Constants ¶
View Source
const MIMEOctetStream = "application/octet-stream"
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 CallerStack ¶
CallerStack 调用栈
func EqualFoldBytes ¶
EqualFold the equivalent of bytes.EqualFold
func StatusMessage ¶
StatusMessage returns the correct message for the provided HTTP statuscode
func ToLowerBytes ¶
ToLowerBytes is the equivalent of bytes.ToLower
func ToUpperBytes ¶
ToUpperBytes is the equivalent of bytes.ToUpper
func TrimLeftBytes ¶
TrimLeftBytes is the equivalent of bytes.TrimLeft
func TrimRightBytes ¶
TrimRightBytes is the equivalent of bytes.TrimRight
func UnsafeBytes ¶
#nosec G103 GetBytes returns a byte pointer without allocation
func UnsafeString ¶
#nosec G103 GetString returns a string pointer without allocation
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.