Documentation
¶
Index ¶
- Variables
- func Any2json(data any, path ...string) gjson.Result
- func Any2struct(data any, stru any) error
- func Base64Decode(val string) ([]byte, error)
- func Base64Encode[T string | []byte](val T) string
- func BytesToString(b []byte) string
- func CharSet(content []byte, contentType string) ([]byte, string, error)
- func CopyWitchContext(ctx context.Context, writer io.Writer, reader io.Reader) (err error)
- func Decode[T string | []byte](txt T, code string) T
- func DecodeRead(txt io.Reader, code string) io.Reader
- func GetContentTypeWithBytes(content []byte) string
- func GetServerName(addr string) string
- func ImgDiffer(c, c2 []byte) (float64, error)
- func Merge(c1 any, c2 any)
- func ParseHost(host string) (net.IP, int)
- func ParseIp(ip net.IP) int
- func SetUnExportedField[T any](source T, fieldName string, newFieldVal any) T
- func Signal(preCtx context.Context, fun func())
- func SplitHostPort(address string) (string, int, error)
- func StringToBytes(s string) []byte
- func WrapError(err error, val ...any) error
- func ZipDecode(ctx context.Context, r *bytes.Buffer, encoding string) (*bytes.Buffer, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var JsonConfig = jsoniter.Config{ EscapeHTML: true, CaseSensitive: true, }.Froze()
Functions ¶
func CopyWitchContext ¶
func GetContentTypeWithBytes ¶
func GetServerName ¶
func SetUnExportedField ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.