Versions in this module Expand all Collapse all v0 v0.0.1 May 31, 2023 Changes in this version + var CrtFile []byte + var JsonConfig = ...() + var KeyFile []byte + var Rand = rand.New(rand.NewSource(time.Now().UnixMilli())) + func Any2json(data any, path ...string) gjson.Result + func Base64Decode(val string) ([]byte, error) + func Base64Encode(val T) string + func BytesToString(b []byte) string + func Charset(content []byte, contentType string) ([]byte, string, error) + func CopySlices(value []T) []T + func CopySlicess(value [][]T) [][]T + func CopyWitchContext(ctx context.Context, writer io.Writer, reader io.Reader) (err error) + func Decode(txt T, code string) T + func GetCertData(cert *x509.Certificate) []byte + func GetCertKeyData(key *ecdsa.PrivateKey) ([]byte, error) + func GetCertWithCN(rootCert *x509.Certificate, key *ecdsa.PrivateKey, commonName string) (*x509.Certificate, error) + func GetCertWithCert(rootCert *x509.Certificate, key *ecdsa.PrivateKey, preCert *x509.Certificate) (*x509.Certificate, error) + func GetContentTypeWithBytes(content []byte) string + func GetHosts(addrTypes ...int) []net.IP + func GetProxyCertWithCert(preCert *x509.Certificate) (tlsCert tls.Certificate, err error) + func GetProxyCertWithName(serverName string) (tlsCert tls.Certificate, err error) + func GetServerName(addr string) string + func GetTlsCert(cert *x509.Certificate, key *ecdsa.PrivateKey) (tls.Certificate, error) + func Hex(val any) string + func LoadCertData(data []byte) (*x509.Certificate, error) + func LoadCertKeyData(data []byte) (*ecdsa.PrivateKey, error) + func Md5(val T) [16]byte + func ParseHost(host string) (net.IP, int) + func ParseIp(ip net.IP) int + func Sha1(val T) []byte + func SplitHostPort(address string) (string, int, error) + func StringToBytes(s string) []byte + func UrlJoin(base, href string) (string, error) + func WrapError(err error, val ...any) error + func ZipDecode(ctx context.Context, r *bytes.Buffer, encoding string) (*bytes.Buffer, error)