From 21a952d2be483a691ef7f768d6db175c3dc00819 Mon Sep 17 00:00:00 2001
From: dudaodong 创建一个函数,当他被调用n或更多次之后将马上触发fn Checks if two values are equal or not. (check both type and value) Checks if two values are equal or not. (check value only) Checks if value `left` less than value `right`. Checks if value `left` less greater or equal than value `right`. Checks if two values are equal or not within a delta. Create channel, put values into the channel repeatly until cancel the context. Create a channel, excutes fn repeatly, and put the result into the channel, until close context. Read one or more channels into one channel, will close when any readin channel is closed. Read a channel into another channel, will close until cancel context. Create a channel whose values are taken from another channel with limit number. Split one chanel into two channels, until cancel the context.
```go
func Bool[T any](value T) bool
```
-示例:[运行](https://go.dev/play/p/ETzeDJRSvhm)
+示例:[运行](https://go.dev/play/p/ETzeDJRSvhm)
```go
package main
@@ -111,7 +109,7 @@ func main() {
```go
func And[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/W1SSUmt6pvr)
+示例:[运行](https://go.dev/play/p/W1SSUmt6pvr)
```go
package main
@@ -137,7 +135,7 @@ func main() {
```go
func Or[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/UlQTxHaeEkq)
+示例:[运行](https://go.dev/play/p/UlQTxHaeEkq)
```go
package main
@@ -163,7 +161,7 @@ func main() {
```go
func Xor[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/gObZrW7ZbG8)
+示例:[运行](https://go.dev/play/p/gObZrW7ZbG8)
```go
package main
@@ -189,7 +187,7 @@ func main() {
```go
func Nor[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/g2j08F_zZky)
+示例:[运行](https://go.dev/play/p/g2j08F_zZky)
```go
package main
@@ -215,7 +213,7 @@ func main() {
```go
func Xnor[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/OuDB9g51643)
+示例:[运行](https://go.dev/play/p/OuDB9g51643)
```go
package main
@@ -241,7 +239,7 @@ func main() {
```go
func Nand[T, U any](a T, b U) bool
```
-示例:[运行](https://go.dev/play/p/vSRMLxLIbq8)
+示例:[运行](https://go.dev/play/p/vSRMLxLIbq8)
```go
package main
@@ -267,7 +265,7 @@ func main() {
```go
func TernaryOperator[T, U any](isTrue T, ifValue U, elseValue U) U
```
-示例:[运行](https://go.dev/play/p/ElllPZY0guT)
+示例:[运行](https://go.dev/play/p/ElllPZY0guT)
```go
package main
diff --git a/docs/api/packages/convertor.md b/docs/api/packages/convertor.md
index a27423b..6a3e84d 100644
--- a/docs/api/packages/convertor.md
+++ b/docs/api/packages/convertor.md
@@ -46,8 +46,6 @@ import (
-
-
## 文档
### ColorHexToRGB
@@ -60,7 +58,7 @@ import (
func ColorHexToRGB(colorHex string) (red, green, blue int)
```
-示例:[运行](https://go.dev/play/p/o7_ft-JCJBV)
+示例:[运行](https://go.dev/play/p/o7_ft-JCJBV)
```go
package main
@@ -91,7 +89,7 @@ func main() {
func ColorRGBToHex(red, green, blue int) string
```
-示例:[运行](https://go.dev/play/p/nzKS2Ro87J1)
+示例:[运行](https://go.dev/play/p/nzKS2Ro87J1)
```go
package main
@@ -124,7 +122,7 @@ func main() {
func ToBool(s string) (bool, error)
```
-示例:[运行](https://go.dev/play/p/ARht2WnGdIN)
+示例:[运行](https://go.dev/play/p/ARht2WnGdIN)
```go
package main
@@ -165,7 +163,7 @@ func main() {
func ToBytes(data any) ([]byte, error)
```
-示例:[运行](https://go.dev/play/p/fAMXYFDvOvr)
+示例:[运行](https://go.dev/play/p/fAMXYFDvOvr)
```go
package main
@@ -198,7 +196,7 @@ func main() {
func ToChar(s string) []string
```
-示例:[运行](https://go.dev/play/p/JJ1SvbFkVdM)
+示例:[运行](https://go.dev/play/p/JJ1SvbFkVdM)
```go
package main
@@ -234,7 +232,7 @@ func main() {
func ToChannel[T any](array []T) <-chan T
```
-示例:[运行](https://go.dev/play/p/hOx_oYZbAnL)
+示例:[运行](https://go.dev/play/p/hOx_oYZbAnL)
```go
package main
@@ -271,7 +269,7 @@ func main() {
func ToFloat(value any) (float64, error)
```
-示例:[运行](https://go.dev/play/p/4YTmPCibqHJ)
+示例:[运行](https://go.dev/play/p/4YTmPCibqHJ)
```go
package main
@@ -316,7 +314,7 @@ func main() {
func ToInt(value any) (int64, error)
```
-示例:[运行](https://go.dev/play/p/9_h9vIt-QZ_b)
+示例:[运行](https://go.dev/play/p/9_h9vIt-QZ_b)
```go
package main
@@ -358,7 +356,7 @@ func main() {
func ToJson(value any) (string, error)
```
-示例:[运行](https://go.dev/play/p/2rLIkMmXWvR)
+示例:[运行](https://go.dev/play/p/2rLIkMmXWvR)
```go
package main
@@ -393,7 +391,7 @@ func main() {
func ToMap[T any, K comparable, V any](array []T, iteratee func(T) (K, V)) map[K]V
```
-示例:[运行](https://go.dev/play/p/tVFy7E-t24l)
+示例:[运行](https://go.dev/play/p/tVFy7E-t24l)
```go
package main
@@ -434,7 +432,7 @@ func main() {
func ToPointer[T any](value T) *T
```
-示例:[运行](https://go.dev/play/p/ASf_etHNlw1)
+示例:[运行](https://go.dev/play/p/ASf_etHNlw1)
```go
package main
@@ -463,7 +461,7 @@ func main() {
func ToString(value any) string
```
-示例:[运行](https://go.dev/play/p/nF1zOOslpQq)
+示例:[运行](https://go.dev/play/p/nF1zOOslpQq)
```go
package main
@@ -511,7 +509,7 @@ func main() {
func StructToMap(value any) (map[string]any, error)
```
-示例:[运行](https://go.dev/play/p/KYGYJqNUBOI)
+示例:[运行](https://go.dev/play/p/KYGYJqNUBOI)
```go
package main
@@ -549,7 +547,7 @@ func main() {
func MapToSlice[T any, K comparable, V any](aMap map[K]V, iteratee func(K, V) T) []T
```
-示例:[运行](https://go.dev/play/p/dmX4Ix5V6Wl)
+示例:[运行](https://go.dev/play/p/dmX4Ix5V6Wl)
```go
package main
@@ -579,7 +577,7 @@ func main() {
func EncodeByte(data any) ([]byte, error)
```
-示例:[运行](https://go.dev/play/p/DVmM1G5JfuP)
+示例:[运行](https://go.dev/play/p/DVmM1G5JfuP)
```go
package main
@@ -608,7 +606,7 @@ func main() {
func DecodeByte(data []byte, target any) error
```
-示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
+示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
```go
package main
@@ -644,7 +642,7 @@ func main() {
func DeepClone[T any](src T) T
```
-示例:[运行](https://go.dev/play/p/j4DP5dquxnk)
+示例:[运行](https://go.dev/play/p/j4DP5dquxnk)
```go
package main
@@ -708,7 +706,7 @@ func main() {
func CopyProperties[T, U any](dst T, src U) (err error)
```
-示例:[运行](https://go.dev/play/p/oZujoB5Sgg5)
+示例:[运行](https://go.dev/play/p/oZujoB5Sgg5)
```go
package main
@@ -787,7 +785,7 @@ func main() {
func ToInterface(v reflect.Value) (value interface{}, ok bool)
```
-示例:[运行](https://go.dev/play/p/syqw0-WG7Xd)
+示例:[运行](https://go.dev/play/p/syqw0-WG7Xd)
```go
package main
@@ -822,7 +820,7 @@ func main() {
func Utf8ToGbk(bs []byte) ([]byte, error)
```
-示例:[运行](https://go.dev/play/p/9FlIaFLArIL)
+示例:[运行](https://go.dev/play/p/9FlIaFLArIL)
```go
package main
@@ -856,7 +854,7 @@ func main() {
func GbkToUtf8(bs []byte) ([]byte, error)
```
-示例:[运行](https://go.dev/play/p/OphmHCN_9u8)
+示例:[运行](https://go.dev/play/p/OphmHCN_9u8)
```go
package main
diff --git a/docs/api/packages/cryptor.md b/docs/api/packages/cryptor.md
index ba9aa55..617c839 100644
--- a/docs/api/packages/cryptor.md
+++ b/docs/api/packages/cryptor.md
@@ -68,8 +68,6 @@ import (
-
-
## 文档
### AesEcbEncrypt
@@ -82,7 +80,7 @@ import (
func AesEcbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
+示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
```go
package main
@@ -116,7 +114,7 @@ func main() {
func AesEcbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
+示例:[运行](https://go.dev/play/p/zI6xsmuQRbn)
```go
package main
@@ -150,7 +148,7 @@ func main() {
func AesCbcEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/IOq_g8_lKZD)
+示例:[运行](https://go.dev/play/p/IOq_g8_lKZD)
```go
package main
@@ -184,7 +182,7 @@ func main() {
func AesCbcDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/IOq_g8_lKZD)
+示例:[运行](https://go.dev/play/p/IOq_g8_lKZD)
```go
package main
@@ -218,7 +216,7 @@ func main() {
func AesCtrCrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/SpaZO0-5Nsp)
+示例:[运行](https://go.dev/play/p/SpaZO0-5Nsp)
```go
package main
@@ -252,7 +250,7 @@ func main() {
func AesCfbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/tfkF10B13kH)
+示例:[运行](https://go.dev/play/p/tfkF10B13kH)
```go
package main
@@ -286,7 +284,7 @@ func main() {
func AesCfbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/tfkF10B13kH)
+示例:[运行](https://go.dev/play/p/tfkF10B13kH)
```go
package main
@@ -320,7 +318,7 @@ func main() {
func AesOfbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/VtHxtkUj-3F)
+示例:[运行](https://go.dev/play/p/VtHxtkUj-3F)
```go
package main
@@ -354,7 +352,7 @@ func main() {
func AesOfbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/VtHxtkUj-3F)
+示例:[运行](https://go.dev/play/p/VtHxtkUj-3F)
```go
package main
@@ -388,7 +386,7 @@ func main() {
func Base64StdEncode(s string) string
```
-示例:[运行](https://go.dev/play/p/VOaUyQUreoK)
+示例:[运行](https://go.dev/play/p/VOaUyQUreoK)
```go
package main
@@ -417,7 +415,7 @@ func main() {
func Base64StdDecode(s string) string
```
-示例:[运行](https://go.dev/play/p/RWQylnJVgIe)
+示例:[运行](https://go.dev/play/p/RWQylnJVgIe)
```go
package main
@@ -446,7 +444,7 @@ func main() {
func DesEcbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/8qivmPeZy4P)
+示例:[运行](https://go.dev/play/p/8qivmPeZy4P)
```go
package main
@@ -481,7 +479,7 @@ func main() {
func DesEcbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/8qivmPeZy4P)
+示例:[运行](https://go.dev/play/p/8qivmPeZy4P)
```go
package main
@@ -516,7 +514,7 @@ func main() {
func DesCbcEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/4cC4QvWfe3_1)
+示例:[运行](https://go.dev/play/p/4cC4QvWfe3_1)
```go
package main
@@ -550,7 +548,7 @@ func main() {
func DesCbcDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/4cC4QvWfe3_1)
+示例:[运行](https://go.dev/play/p/4cC4QvWfe3_1)
```go
package main
@@ -584,7 +582,7 @@ func main() {
func DesCtrCrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/9-T6OjKpcdw)
+示例:[运行](https://go.dev/play/p/9-T6OjKpcdw)
```go
package main
@@ -618,7 +616,7 @@ func main() {
func DesCfbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/y-eNxcFBlxL)
+示例:[运行](https://go.dev/play/p/y-eNxcFBlxL)
```go
package main
@@ -652,7 +650,7 @@ func main() {
func DesCfbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/y-eNxcFBlxL)
+示例:[运行](https://go.dev/play/p/y-eNxcFBlxL)
```go
package main
@@ -686,7 +684,7 @@ func main() {
func DesOfbEncrypt(data, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/74KmNadjN1J)
+示例:[运行](https://go.dev/play/p/74KmNadjN1J)
```go
package main
@@ -720,7 +718,7 @@ func main() {
func DesOfbDecrypt(encrypted, key []byte) []byte
```
-示例:[运行](https://go.dev/play/p/74KmNadjN1J)
+示例:[运行](https://go.dev/play/p/74KmNadjN1J)
```go
package main
@@ -754,7 +752,7 @@ func main() {
func HmacMd5(str, key string) string
```
-示例:[运行](https://go.dev/play/p/uef0q1fz53I)
+示例:[运行](https://go.dev/play/p/uef0q1fz53I)
```go
package main
@@ -786,7 +784,7 @@ func main() {
func HmacMd5WithBase64(str, key string) string
```
-示例:[运行](https://go.dev/play/p/UY0ng2AefFC)
+示例:[运行](https://go.dev/play/p/UY0ng2AefFC)
```go
package main
@@ -818,7 +816,7 @@ func main() {
func HmacSha1(str, key string) string
```
-示例:[运行](https://go.dev/play/p/1UI4oQ4WXKM)
+示例:[运行](https://go.dev/play/p/1UI4oQ4WXKM)
```go
package main
@@ -850,7 +848,7 @@ func main() {
func HmacSha1WithBase64(str, key string) string
```
-示例:[运行](https://go.dev/play/p/47JmmGrnF7B)
+示例:[运行](https://go.dev/play/p/47JmmGrnF7B)
```go
package main
@@ -882,7 +880,7 @@ func main() {
func HmacSha256(str, key string) string
```
-示例:[运行](https://go.dev/play/p/HhpwXxFhhC0)
+示例:[运行](https://go.dev/play/p/HhpwXxFhhC0)
```go
package main
@@ -914,7 +912,7 @@ func main() {
func HmacSha256WithBase64(str, key string) string
```
-示例:[运行](https://go.dev/play/p/EKbkUvPTLwO)
+示例:[运行](https://go.dev/play/p/EKbkUvPTLwO)
```go
package main
@@ -946,7 +944,7 @@ func main() {
func HmacSha512(str, key string) string
```
-示例:[运行](https://go.dev/play/p/59Od6m4A0Ud)
+示例:[运行](https://go.dev/play/p/59Od6m4A0Ud)
```go
package main
@@ -978,7 +976,7 @@ func main() {
func HmacSha512WithBase64(str, key string) string
```
-示例:[运行](https://go.dev/play/p/c6dSe3E2ydU)
+示例:[运行](https://go.dev/play/p/c6dSe3E2ydU)
```go
package main
@@ -1010,7 +1008,7 @@ func main() {
func Md5String(str string) string
```
-示例:[运行](https://go.dev/play/p/1bLcVetbTOI)
+示例:[运行](https://go.dev/play/p/1bLcVetbTOI)
```go
package main
@@ -1041,7 +1039,7 @@ func main() {
func Md5StringWithBase64(s string) string
```
-示例:[运行](https://go.dev/play/p/Tcb-Z7LN2ax)
+示例:[运行](https://go.dev/play/p/Tcb-Z7LN2ax)
```go
package main
@@ -1070,7 +1068,7 @@ func main() {
func Md5Byte(data []byte) string
```
-示例:[运行](https://go.dev/play/p/suraalH8lyC)
+示例:[运行](https://go.dev/play/p/suraalH8lyC)
```go
package main
@@ -1099,7 +1097,7 @@ func main() {
func Md5ByteWithBase64(data []byte) string
```
-示例:[运行](https://go.dev/play/p/Lx4gH7Vdr5_y)
+示例:[运行](https://go.dev/play/p/Lx4gH7Vdr5_y)
```go
package main
@@ -1154,7 +1152,7 @@ func main() {
func Sha1(str string) string
```
-示例:[运行](https://go.dev/play/p/_m_uoD1deMT)
+示例:[运行](https://go.dev/play/p/_m_uoD1deMT)
```go
package main
@@ -1185,7 +1183,7 @@ func main() {
func Sha1WithBase64(str string) string
```
-示例:[运行](https://go.dev/play/p/fSyx-Gl2l2-)
+示例:[运行](https://go.dev/play/p/fSyx-Gl2l2-)
```go
package main
@@ -1214,7 +1212,7 @@ func main() {
func Sha256(str string) string
```
-示例:[运行](https://go.dev/play/p/tU9tfBMIAr1)
+示例:[运行](https://go.dev/play/p/tU9tfBMIAr1)
```go
package main
@@ -1245,7 +1243,7 @@ func main() {
func Sha256WithBase64(str string) string
```
-示例:[运行](https://go.dev/play/p/85IXJHIal1k)
+示例:[运行](https://go.dev/play/p/85IXJHIal1k)
```go
package main
@@ -1274,7 +1272,7 @@ func main() {
func Sha512(str string) string
```
-示例:[运行](https://go.dev/play/p/3WsvLYZxsHa)
+示例:[运行](https://go.dev/play/p/3WsvLYZxsHa)
```go
package main
@@ -1305,7 +1303,7 @@ func main() {
func Sha512WithBase64(str string) string
```
-示例:[运行](https://go.dev/play/p/q_fY2rA-k5I)
+示例:[运行](https://go.dev/play/p/q_fY2rA-k5I)
```go
package main
@@ -1334,7 +1332,7 @@ func main() {
func GenerateRsaKey(keySize int, priKeyFile, pubKeyFile string) error
```
-示例:[运行](https://go.dev/play/p/zutRHrDqs0X)
+示例:[运行](https://go.dev/play/p/zutRHrDqs0X)
```go
package main
@@ -1362,7 +1360,7 @@ func main() {
func RsaEncrypt(data []byte, pubKeyFileName string) []byte
```
-示例:[运行](https://go.dev/play/p/uef0q1fz53I)
+示例:[运行](https://go.dev/play/p/uef0q1fz53I)
```go
package main
@@ -1399,7 +1397,7 @@ func main() {
func RsaDecrypt(data []byte, privateKeyFileName string) []byte
```
-示例:[运行](https://go.dev/play/p/uef0q1fz53I)
+示例:[运行](https://go.dev/play/p/uef0q1fz53I)
```go
package main
diff --git a/docs/api/packages/datetime.md b/docs/api/packages/datetime.md
index 51c9392..8b10524 100644
--- a/docs/api/packages/datetime.md
+++ b/docs/api/packages/datetime.md
@@ -67,8 +67,6 @@ import (
-
-
## 文档
## 注:
@@ -108,7 +106,7 @@ import (
func AddDay(t time.Time, day int64) time.Time
```
-示例:[运行](https://go.dev/play/p/dIGbs_uTdFa)
+示例:[运行](https://go.dev/play/p/dIGbs_uTdFa)
```go
package main
@@ -147,7 +145,7 @@ func main() {
func AddHour(t time.Time, hour int64) time.Time
```
-示例:[运行](https://go.dev/play/p/rcMjd7OCsi5)
+示例:[运行](https://go.dev/play/p/rcMjd7OCsi5)
```go
package main
@@ -186,7 +184,7 @@ func main() {
func AddMinute(t time.Time, minute int64) time.Time
```
-示例:[运行](https://go.dev/play/p/nT1heB1KUUK)
+示例:[运行](https://go.dev/play/p/nT1heB1KUUK)
```go
package main
@@ -225,7 +223,7 @@ func main() {
func AddYear(t time.Time, year int64) time.Time
```
-示例:[运行](https://go.dev/play/p/MqW2ujnBx10)
+示例:[运行](https://go.dev/play/p/MqW2ujnBx10)
```go
package main
@@ -264,7 +262,7 @@ func main() {
func BeginOfMinute(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/ieOLVJ9CiFT)
+示例:[运行](https://go.dev/play/p/ieOLVJ9CiFT)
```go
package main
@@ -296,7 +294,7 @@ func main() {
func BeginOfHour(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/GhdGFnDWpYs)
+示例:[运行](https://go.dev/play/p/GhdGFnDWpYs)
```go
package main
@@ -328,7 +326,7 @@ func main() {
func BeginOfDay(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/94m_UT6cWs9)
+示例:[运行](https://go.dev/play/p/94m_UT6cWs9)
```go
package main
@@ -360,7 +358,7 @@ func main() {
func BeginOfWeek(t time.Time, beginFrom ...time.Weekday) time.Time
```
-示例:[运行](https://go.dev/play/p/ynjoJPz7VNV)
+示例:[运行](https://go.dev/play/p/ynjoJPz7VNV)
```go
package main
@@ -392,7 +390,7 @@ func main() {
func BeginOfMonth(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/bWXVFsmmzwL)
+示例:[运行](https://go.dev/play/p/bWXVFsmmzwL)
```go
package main
@@ -424,7 +422,7 @@ func main() {
func BeginOfYear(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/i326DSwLnV8)
+示例:[运行](https://go.dev/play/p/i326DSwLnV8)
```go
package main
@@ -456,7 +454,7 @@ func main() {
func EndOfMinute(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/yrL5wGzPj4z)
+示例:[运行](https://go.dev/play/p/yrL5wGzPj4z)
```go
package main
@@ -488,7 +486,7 @@ func main() {
func EndOfHour(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/6ce3j_6cVqN)
+示例:[运行](https://go.dev/play/p/6ce3j_6cVqN)
```go
package main
@@ -520,7 +518,7 @@ func main() {
func EndOfDay(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/eMBOvmq5Ih1)
+示例:[运行](https://go.dev/play/p/eMBOvmq5Ih1)
```go
package main
@@ -552,7 +550,7 @@ func main() {
func EndOfWeek(t time.Time, endWith ...time.Weekday) time.Time
```
-示例:[运行](https://go.dev/play/p/i08qKXD9flf)
+示例:[运行](https://go.dev/play/p/i08qKXD9flf)
```go
package main
@@ -584,7 +582,7 @@ func main() {
func EndOfMonth(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/_GWh10B3Nqi)
+示例:[运行](https://go.dev/play/p/_GWh10B3Nqi)
```go
package main
@@ -616,7 +614,7 @@ func main() {
func EndOfYear(t time.Time) time.Time
```
-示例:[运行](https://go.dev/play/p/G01cKlMCvNm)
+示例:[运行](https://go.dev/play/p/G01cKlMCvNm)
```go
package main
@@ -648,7 +646,7 @@ func main() {
func GetNowDate() string
```
-示例:[运行](https://go.dev/play/p/PvfkPpcpBBf)
+示例:[运行](https://go.dev/play/p/PvfkPpcpBBf)
```go
package main
@@ -677,7 +675,7 @@ func main() {
func GetNowTime() string
```
-示例:[运行](https://go.dev/play/p/l7BNxCkTmJS)
+示例:[运行](https://go.dev/play/p/l7BNxCkTmJS)
```go
package main
@@ -706,7 +704,7 @@ func main() {
func GetNowDateTime() string
```
-示例:[运行](https://go.dev/play/p/pI4AqngD0al)
+示例:[运行](https://go.dev/play/p/pI4AqngD0al)
```go
package main
@@ -735,7 +733,7 @@ func main() {
func GetTodayStartTime() string
```
-示例:[运行](https://go.dev/play/p/84siyYF7t99)
+示例:[运行](https://go.dev/play/p/84siyYF7t99)
```go
package main
@@ -764,7 +762,7 @@ func main() {
func GetTodayEndTime() string
```
-示例:[运行](https://go.dev/play/p/jjrLnfoqgn3)
+示例:[运行](https://go.dev/play/p/jjrLnfoqgn3)
```go
package main
@@ -793,7 +791,7 @@ func main() {
func GetZeroHourTimestamp() int64
```
-示例:[运行](https://go.dev/play/p/QmL2oIaGE3q)
+示例:[运行](https://go.dev/play/p/QmL2oIaGE3q)
```go
package main
@@ -822,7 +820,7 @@ func main() {
func GetNightTimestamp() int64
```
-示例:[运行](https://go.dev/play/p/UolysR3MYP1)
+示例:[运行](https://go.dev/play/p/UolysR3MYP1)
```go
package main
@@ -851,7 +849,7 @@ func main() {
func FormatTimeToStr(t time.Time, format string, timezone ...string) string
```
-示例:[运行](https://go.dev/play/p/_Ia7M8H_OvE)
+示例:[运行](https://go.dev/play/p/_Ia7M8H_OvE)
```go
package main
@@ -890,7 +888,7 @@ func main() {
func FormatStrToTime(str, format string, timezone ...string) (time.Time, error)
```
-示例:[运行](https://go.dev/play/p/1h9FwdU8ql4)
+示例:[运行](https://go.dev/play/p/1h9FwdU8ql4)
```go
package main
@@ -929,7 +927,7 @@ type theTime struct {
func NewUnixNow() *theTime
```
-示例:[运行](https://go.dev/play/p/U4PPx-9D0oz)
+示例:[运行](https://go.dev/play/p/U4PPx-9D0oz)
```go
package main
@@ -961,7 +959,7 @@ type theTime struct {
func NewUnix(unix int64) *theTime
```
-示例:[运行](https://go.dev/play/p/psoSuh_kLRt)
+示例:[运行](https://go.dev/play/p/psoSuh_kLRt)
```go
package main
@@ -993,7 +991,7 @@ type theTime struct {
func NewFormat(t string) (*theTime, error)
```
-示例:[运行](https://go.dev/play/p/VkW08ZOaXPZ)
+示例:[运行](https://go.dev/play/p/VkW08ZOaXPZ)
```go
package main
@@ -1025,7 +1023,7 @@ type theTime struct {
func NewISO8601(iso8601 string) (*theTime, error)
```
-示例:[运行](https://go.dev/play/p/mkhOHQkdeA2)
+示例:[运行](https://go.dev/play/p/mkhOHQkdeA2)
```go
package main
@@ -1054,7 +1052,7 @@ func main() {
func (t *theTime) ToUnix() int64
```
-示例:[运行](https://go.dev/play/p/_LUiwAdocjy)
+示例:[运行](https://go.dev/play/p/_LUiwAdocjy)
```go
package main
@@ -1083,7 +1081,7 @@ func main() {
func (t *theTime) ToFormat() string
```
-示例:[运行](https://go.dev/play/p/VkW08ZOaXPZ)
+示例:[运行](https://go.dev/play/p/VkW08ZOaXPZ)
```go
package main
@@ -1112,7 +1110,7 @@ func main() {
func (t *theTime) ToFormatForTpl(tpl string) string
```
-示例:[运行](https://go.dev/play/p/nyXxXcQJ8L5)
+示例:[运行](https://go.dev/play/p/nyXxXcQJ8L5)
```go
package main
@@ -1142,7 +1140,7 @@ func main() {
func (t *theTime) ToIso8601() string
```
-示例:[运行](https://go.dev/play/p/mkhOHQkdeA2)
+示例:[运行](https://go.dev/play/p/mkhOHQkdeA2)
```go
package main
@@ -1172,7 +1170,7 @@ func main() {
func IsLeapYear(year int) bool
```
-示例:[运行](https://go.dev/play/p/xS1eS2ejGew)
+示例:[运行](https://go.dev/play/p/xS1eS2ejGew)
```go
package main
@@ -1205,7 +1203,7 @@ func main() {
func BetweenSeconds(t1 time.Time, t2 time.Time) int64
```
-示例:[运行](https://go.dev/play/p/n3YDRyfyXJu)
+示例:[运行](https://go.dev/play/p/n3YDRyfyXJu)
```go
package main
@@ -1242,7 +1240,7 @@ func main() {
func DayOfYear(t time.Time) int
```
-示例:[运行](https://go.dev/play/p/0hjqhTwFNlH)
+示例:[运行](https://go.dev/play/p/0hjqhTwFNlH)
```go
package main
@@ -1283,7 +1281,7 @@ func main() {
func IsWeekend(t time.Time) bool
```
-示例:[运行](https://go.dev/play/p/cupRM5aZOIY)
+示例:[运行](https://go.dev/play/p/cupRM5aZOIY)
```go
package main
@@ -1323,7 +1321,7 @@ func main() {
func NowDateOrTime(format string, timezone ...string) string
```
-示例:[运行](https://go.dev/play/p/EZ-begEjtT0)
+示例:[运行](https://go.dev/play/p/EZ-begEjtT0)
```go
package main
@@ -1357,7 +1355,7 @@ func main() {
func Timestamp(timezone ...string) int64
```
-示例:[运行](https://go.dev/play/p/iU5b7Vvjx6x)
+示例:[运行](https://go.dev/play/p/iU5b7Vvjx6x)
```go
package main
@@ -1388,7 +1386,7 @@ func main() {
func TimestampMilli(timezone ...string) int64
```
-示例:[运行](https://go.dev/play/p/4gvEusOTu1T)
+示例:[运行](https://go.dev/play/p/4gvEusOTu1T)
```go
package main
@@ -1418,7 +1416,7 @@ func main() {
func TimestampMicro(timezone ...string) int64
```
-示例:[运行](https://go.dev/play/p/2maANglKHQE)
+示例:[运行](https://go.dev/play/p/2maANglKHQE)
```go
package main
@@ -1448,7 +1446,7 @@ func main() {
func TimestampNano(timezone ...string) int64
```
-示例:[运行](https://go.dev/play/p/A9Oq_COrcCF)
+示例:[运行](https://go.dev/play/p/A9Oq_COrcCF)
```go
package main
diff --git a/docs/api/packages/fileutil.md b/docs/api/packages/fileutil.md
index 6e95162..bb6d2d1 100644
--- a/docs/api/packages/fileutil.md
+++ b/docs/api/packages/fileutil.md
@@ -50,8 +50,6 @@ import (
-
-
## 文档
### ClearFile
@@ -64,7 +62,7 @@ import (
func ClearFile(path string) error
```
-示例:[运行](https://go.dev/play/p/NRZ0ZT-G94H)
+示例:[运行](https://go.dev/play/p/NRZ0ZT-G94H)
```go
package main
@@ -92,7 +90,7 @@ func main() {
func CreateFile(path string) bool
```
-示例:[运行](https://go.dev/play/p/lDt8PEsTNKI)
+示例:[运行](https://go.dev/play/p/lDt8PEsTNKI)
```go
package main
@@ -118,7 +116,7 @@ func main() {
func CreateDir(absPath string) error
```
-示例:[运行](https://go.dev/play/p/qUuCe1OGQnM)
+示例:[运行](https://go.dev/play/p/qUuCe1OGQnM)
```go
package main
@@ -144,7 +142,7 @@ func main() {
func CopyFile(srcPath string, dstPath string) error
```
-示例:[运行](https://go.dev/play/p/Jg9AMJMLrJi)
+示例:[运行](https://go.dev/play/p/Jg9AMJMLrJi)
```go
package main
@@ -172,7 +170,7 @@ func main() {
func CurrentPath() string
```
-示例:[运行](https://go.dev/play/p/s74a9iBGcSw)
+示例:[运行](https://go.dev/play/p/s74a9iBGcSw)
```go
package main
@@ -198,7 +196,7 @@ func main() {
func FileMode(path string) (fs.FileMode, error)
```
-示例:[运行](https://go.dev/play/p/2l2hI42fA3p)
+示例:[运行](https://go.dev/play/p/2l2hI42fA3p)
```go
package main
@@ -227,7 +225,7 @@ func main() {
func MiMeType(file any) string
```
-示例:[运行](https://go.dev/play/p/bd5sevSUZNu)
+示例:[运行](https://go.dev/play/p/bd5sevSUZNu)
```go
package main
@@ -258,7 +256,7 @@ func main() {
func IsExist(path string) bool
```
-示例:[运行](https://go.dev/play/p/nKKXt8ZQbmh)
+示例:[运行](https://go.dev/play/p/nKKXt8ZQbmh)
```go
package main
@@ -285,7 +283,7 @@ func main() {
func IsLink(path string) bool
```
-示例:[运行](https://go.dev/play/p/TL-b-Kzvf44)
+示例:[运行](https://go.dev/play/p/TL-b-Kzvf44)
```go
package main
@@ -311,7 +309,7 @@ func main() {
func IsDir(path string) bool
```
-示例:[运行](https://go.dev/play/p/WkVwEKqtOWk)
+示例:[运行](https://go.dev/play/p/WkVwEKqtOWk)
```go
package main
@@ -340,7 +338,7 @@ func main() {
func ListFileNames(path string) ([]string, error)
```
-示例:[运行](https://go.dev/play/p/Tjd7Y07rejl)
+示例:[运行](https://go.dev/play/p/Tjd7Y07rejl)
```go
package main
@@ -366,7 +364,7 @@ func main() {
func RemoveFile(path string) error
```
-示例:[运行](https://go.dev/play/p/P2y0XW8a1SH)
+示例:[运行](https://go.dev/play/p/P2y0XW8a1SH)
```go
package main
@@ -394,7 +392,7 @@ func main() {
func ReadFileToString(path string) (string, error)
```
-示例:[运行](https://go.dev/play/p/cmfwp_5SQTp)
+示例:[运行](https://go.dev/play/p/cmfwp_5SQTp)
```go
package main
@@ -427,7 +425,7 @@ func main() {
func ReadFileByLine(path string)([]string, error)
```
-示例:[运行](https://go.dev/play/p/svJP_7ZrBrD)
+示例:[运行](https://go.dev/play/p/svJP_7ZrBrD)
```go
package main
@@ -461,7 +459,7 @@ func main() {
func Zip(fpath string, destPath string) error
```
-示例:[运行](https://go.dev/play/p/j-3sWBp8ik_P)
+示例:[运行](https://go.dev/play/p/j-3sWBp8ik_P)
```go
package main
@@ -489,7 +487,7 @@ func main() {
func ZipAppendEntry(fpath string, destPath string) error
```
-示例:[运行](https://go.dev/play/p/cxvaT8TRNQp)
+示例:[运行](https://go.dev/play/p/cxvaT8TRNQp)
```go
package main
@@ -517,7 +515,7 @@ func main() {
func UnZip(zipFile string, destPath string) error
```
-示例:[运行](https://go.dev/play/p/g0w34kS7B8m)
+示例:[运行](https://go.dev/play/p/g0w34kS7B8m)
```go
package main
@@ -545,7 +543,7 @@ func main() {
func IsZipFile(filepath string) bool
```
-示例:[运行](https://go.dev/play/p/9M0g2j_uF_e)
+示例:[运行](https://go.dev/play/p/9M0g2j_uF_e)
```go
package main
@@ -571,7 +569,7 @@ func main() {
func FileSize(path string) (int64, error)
```
-示例:[运行](https://go.dev/play/p/H9Z05uD-Jjc)
+示例:[运行](https://go.dev/play/p/H9Z05uD-Jjc)
```go
package main
@@ -603,7 +601,7 @@ func main() {
func MTime(filepath string) (int64, error)
```
-示例:[运行](https://go.dev/play/p/s_Tl7lZoAaY)
+示例:[运行](https://go.dev/play/p/s_Tl7lZoAaY)
```go
package main
@@ -635,7 +633,7 @@ func main() {
func Sha(filepath string, shaType ...int) (string, error)
```
-示例:[运行](https://go.dev/play/p/VfEEcO2MJYf)
+示例:[运行](https://go.dev/play/p/VfEEcO2MJYf)
```go
package main
@@ -673,7 +671,7 @@ func main() {
func ReadCsvFile(filepath string) ([][]string, error)
```
-示例:[运行](https://go.dev/play/p/OExTkhGEd3_u)
+示例:[运行](https://go.dev/play/p/OExTkhGEd3_u)
```go
package main
@@ -705,7 +703,7 @@ func main() {
func WriteCsvFile(filepath string, records [][]string, append bool) error
```
-示例:[运行](https://go.dev/play/p/dAXm58Q5U1o)
+示例:[运行](https://go.dev/play/p/dAXm58Q5U1o)
```go
package main
@@ -754,7 +752,7 @@ func main() {
func WriteBytesToFile(filepath string, content []byte) error
```
-示例:[运行](https://go.dev/play/p/s7QlDxMj3P8)
+示例:[运行](https://go.dev/play/p/s7QlDxMj3P8)
```go
package main
@@ -803,7 +801,7 @@ func main() {
func WriteStringToFile(filepath string, content string, append bool) error
```
-示例:[运行](https://go.dev/play/p/GhLS6d8lH_g)
+示例:[运行](https://go.dev/play/p/GhLS6d8lH_g)
```go
package main
diff --git a/docs/api/packages/formatter.md b/docs/api/packages/formatter.md
index 202d645..016cf47 100644
--- a/docs/api/packages/formatter.md
+++ b/docs/api/packages/formatter.md
@@ -33,8 +33,6 @@ import (
-
-
## 文档
### Comma
@@ -47,7 +45,7 @@ import (
func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string
```
-示例:[运行](https://go.dev/play/p/eRD5k2vzUVX)
+示例:[运行](https://go.dev/play/p/eRD5k2vzUVX)
```go
package main
@@ -83,7 +81,7 @@ func main() {
func Pretty(v any) (string, error)
```
-示例:[运行](https://go.dev/play/p/YsciGj3FH2x)
+示例:[运行](https://go.dev/play/p/YsciGj3FH2x)
```go
package main
@@ -122,7 +120,7 @@ func main() {
func PrettyToWriter(v any, out io.Writer) error
```
-示例:[运行](https://go.dev/play/p/LPLZ3lDi5ma)
+示例:[运行](https://go.dev/play/p/LPLZ3lDi5ma)
```go
package main
@@ -165,7 +163,7 @@ func main() {
func DecimalBytes(size float64, precision ...int) string
```
-示例:[运行](https://go.dev/play/p/FPXs1suwRcs)
+示例:[运行](https://go.dev/play/p/FPXs1suwRcs)
```go
package main
@@ -204,7 +202,7 @@ func main() {
func BinaryBytes(size float64, precision ...int) string
```
-示例:[运行](https://go.dev/play/p/G9oHHMCAZxP)
+示例:[运行](https://go.dev/play/p/G9oHHMCAZxP)
```go
package main
@@ -243,7 +241,7 @@ func main() {
func ParseDecimalBytes(size string) (uint64, error)
```
-示例:[运行](https://go.dev/play/p/Am98ybWjvjj)
+示例:[运行](https://go.dev/play/p/Am98ybWjvjj)
```go
package main
@@ -282,7 +280,7 @@ func main() {
func ParseBinaryBytes(size string) (uint64, error)
```
-示例:[运行](https://go.dev/play/p/69v1tTT62x8)
+示例:[运行](https://go.dev/play/p/69v1tTT62x8)
```go
package main
diff --git a/docs/api/packages/function.md b/docs/api/packages/function.md
index 186bb79..cc330d5 100644
--- a/docs/api/packages/function.md
+++ b/docs/api/packages/function.md
@@ -37,8 +37,6 @@ import (
## 文档
-
-
### After
Return current mill second timestamp.
@@ -1389,7 +1386,7 @@ func main() { func TimestampMilli(timezone ...string) int64 ``` -Example:[Run](https://go.dev/play/p/4gvEusOTu1T) +Example:[Run](https://go.dev/play/p/4gvEusOTu1T) ```go package main @@ -1419,7 +1416,7 @@ func main() { func TimestampMicro(timezone ...string) int64 ``` -Example:[Run](https://go.dev/play/p/2maANglKHQE) +Example:[Run](https://go.dev/play/p/2maANglKHQE) ```go package main @@ -1449,7 +1446,7 @@ func main() { func TimestampNano(timezone ...string) int64 ``` -Example:[Run](https://go.dev/play/p/A9Oq_COrcCF) +Example:[Run](https://go.dev/play/p/A9Oq_COrcCF) ```go package main diff --git a/docs/en/api/packages/fileutil.md b/docs/en/api/packages/fileutil.md index e995d16..a4d4fd4 100644 --- a/docs/en/api/packages/fileutil.md +++ b/docs/en/api/packages/fileutil.md @@ -50,8 +50,6 @@ import ( - - ## Documentation ### ClearFile @@ -64,7 +62,7 @@ import ( func ClearFile(path string) error ``` -Example:[Run](https://go.dev/play/p/NRZ0ZT-G94H) +Example:[Run](https://go.dev/play/p/NRZ0ZT-G94H) ```go package main @@ -92,7 +90,7 @@ func main() { func CreateFile(path string) bool ``` -Example:[Run](https://go.dev/play/p/lDt8PEsTNKI) +Example:[Run](https://go.dev/play/p/lDt8PEsTNKI) ```go package main @@ -118,7 +116,7 @@ func main() { func CreateDir(absPath string) error ``` -Example:[Run](https://go.dev/play/p/qUuCe1OGQnM) +Example:[Run](https://go.dev/play/p/qUuCe1OGQnM) ```go package main @@ -144,7 +142,7 @@ func main() { func CopyFile(srcPath string, dstPath string) error ``` -Example:[Run](https://go.dev/play/p/Jg9AMJMLrJi) +Example:[Run](https://go.dev/play/p/Jg9AMJMLrJi) ```go package main @@ -172,7 +170,7 @@ func main() { func CurrentPath() string ``` -Example:[Run](https://go.dev/play/p/s74a9iBGcSw) +Example:[Run](https://go.dev/play/p/s74a9iBGcSw) ```go package main @@ -198,7 +196,7 @@ func main() { func FileMode(path string) (fs.FileMode, error) ``` -Example:[Run](https://go.dev/play/p/2l2hI42fA3p) +Example:[Run](https://go.dev/play/p/2l2hI42fA3p) ```go package main @@ -227,7 +225,7 @@ func main() { func MiMeType(file any) string ``` -Example:[Run](https://go.dev/play/p/bd5sevSUZNu) +Example:[Run](https://go.dev/play/p/bd5sevSUZNu) ```go package main @@ -258,7 +256,7 @@ func main() { func IsExist(path string) bool ``` -Example:[Run](https://go.dev/play/p/nKKXt8ZQbmh) +Example:[Run](https://go.dev/play/p/nKKXt8ZQbmh) ```go package main @@ -285,7 +283,7 @@ func main() { func IsLink(path string) bool ``` -Example:[Run](https://go.dev/play/p/TL-b-Kzvf44) +Example:[Run](https://go.dev/play/p/TL-b-Kzvf44) ```go package main @@ -311,7 +309,7 @@ func main() { func IsDir(path string) bool ``` -Example:[Run](https://go.dev/play/p/WkVwEKqtOWk) +Example:[Run](https://go.dev/play/p/WkVwEKqtOWk) ```go package main @@ -340,7 +338,7 @@ func main() { func ListFileNames(path string) ([]string, error) ``` -Example:[Run](https://go.dev/play/p/Tjd7Y07rejl) +Example:[Run](https://go.dev/play/p/Tjd7Y07rejl) ```go package main @@ -366,7 +364,7 @@ func main() { func RemoveFile(path string) error ``` -Example:[Run](https://go.dev/play/p/P2y0XW8a1SH) +Example:[Run](https://go.dev/play/p/P2y0XW8a1SH) ```go package main @@ -394,7 +392,7 @@ func main() { func ReadFileToString(path string) (string, error) ``` -Example:[Run](https://go.dev/play/p/cmfwp_5SQTp) +Example:[Run](https://go.dev/play/p/cmfwp_5SQTp) ```go package main @@ -427,7 +425,7 @@ func main() { func ReadFileByLine(path string)([]string, error) ``` -Example:[Run](https://go.dev/play/p/svJP_7ZrBrD) +Example:[Run](https://go.dev/play/p/svJP_7ZrBrD) ```go package main @@ -461,7 +459,7 @@ func main() { func Zip(fpath string, destPath string) error ``` -Example:[Run](https://go.dev/play/p/j-3sWBp8ik_P) +Example:[Run](https://go.dev/play/p/j-3sWBp8ik_P) ```go package main @@ -489,7 +487,7 @@ func main() { func ZipAppendEntry(fpath string, destPath string) error ``` -Example:[Run](https://go.dev/play/p/cxvaT8TRNQp) +Example:[Run](https://go.dev/play/p/cxvaT8TRNQp) ```go package main @@ -517,7 +515,7 @@ func main() { func UnZip(zipFile string, destPath string) error ``` -Example:[Run](https://go.dev/play/p/g0w34kS7B8m) +Example:[Run](https://go.dev/play/p/g0w34kS7B8m) ```go package main @@ -545,7 +543,7 @@ func main() { func IsZipFile(filepath string) bool ``` -Example:[Run](https://go.dev/play/p/9M0g2j_uF_e) +Example:[Run](https://go.dev/play/p/9M0g2j_uF_e) ```go package main @@ -571,7 +569,7 @@ func main() { func FileSize(path string) (int64, error) ``` -Example:[Run](https://go.dev/play/p/H9Z05uD-Jjc) +Example:[Run](https://go.dev/play/p/H9Z05uD-Jjc) ```go package main @@ -603,7 +601,7 @@ func main() { func MTime(filepath string) (int64, error) ``` -Example:[Run](https://go.dev/play/p/s_Tl7lZoAaY) +Example:[Run](https://go.dev/play/p/s_Tl7lZoAaY) ```go package main @@ -635,7 +633,7 @@ func main() { func Sha(filepath string, shaType ...int) (string, error) ``` -Example:[Run](https://go.dev/play/p/VfEEcO2MJYf) +Example:[Run](https://go.dev/play/p/VfEEcO2MJYf) ```go package main @@ -673,7 +671,7 @@ func main() { func ReadCsvFile(filepath string) ([][]string, error) ``` -Example:[Run](https://go.dev/play/p/OExTkhGEd3_u) +Example:[Run](https://go.dev/play/p/OExTkhGEd3_u) ```go package main @@ -705,7 +703,7 @@ func main() { func WriteCsvFile(filepath string, records [][]string, append bool) error ``` -Example:[Run](https://go.dev/play/p/dAXm58Q5U1o) +Example:[Run](https://go.dev/play/p/dAXm58Q5U1o) ```go package main @@ -754,7 +752,7 @@ func main() { func WriteBytesToFile(filepath string, content []byte) error ``` -Example:[Run](https://go.dev/play/p/s7QlDxMj3P8) +Example:[Run](https://go.dev/play/p/s7QlDxMj3P8) ```go package main @@ -803,7 +801,7 @@ func main() { func WriteStringToFile(filepath string, content string, append bool) error ``` -Example:[Run](https://go.dev/play/p/GhLS6d8lH_g) +Example:[Run](https://go.dev/play/p/GhLS6d8lH_g) ```go package main diff --git a/docs/en/api/packages/formatter.md b/docs/en/api/packages/formatter.md index 783e57c..66726ad 100644 --- a/docs/en/api/packages/formatter.md +++ b/docs/en/api/packages/formatter.md @@ -33,8 +33,6 @@ import ( - - ## Documentation ### Comma @@ -47,7 +45,7 @@ import ( func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string ``` -Example:[Run](https://go.dev/play/p/eRD5k2vzUVX) +Example:[Run](https://go.dev/play/p/eRD5k2vzUVX) ```go package main @@ -83,7 +81,7 @@ func main() { func Pretty(v any) (string, error) ``` -Example:[Run](https://go.dev/play/p/YsciGj3FH2x) +Example:[Run](https://go.dev/play/p/YsciGj3FH2x) ```go package main @@ -122,7 +120,7 @@ func main() { func PrettyToWriter(v any, out io.Writer) error ``` -Example:[Run](https://go.dev/play/p/LPLZ3lDi5ma) +Example:[Run](https://go.dev/play/p/LPLZ3lDi5ma) ```go package main @@ -165,7 +163,7 @@ func main() { func DecimalBytes(size float64, precision ...int) string ``` -Example:[Run](https://go.dev/play/p/FPXs1suwRcs) +Example:[Run](https://go.dev/play/p/FPXs1suwRcs) ```go package main @@ -204,7 +202,7 @@ func main() { func BinaryBytes(size float64, precision ...int) string ``` -Example:[Run](https://go.dev/play/p/G9oHHMCAZxP) +Example:[Run](https://go.dev/play/p/G9oHHMCAZxP) ```go package main @@ -243,7 +241,7 @@ func main() { func ParseDecimalBytes(size string) (uint64, error) ``` -Example:[Run](https://go.dev/play/p/Am98ybWjvjj) +Example:[Run](https://go.dev/play/p/Am98ybWjvjj) ```go package main @@ -282,7 +280,7 @@ func main() { func ParseBinaryBytes(size string) (uint64, error) ``` -Example:[Run](https://go.dev/play/p/69v1tTT62x8) +Example:[Run](https://go.dev/play/p/69v1tTT62x8) ```go package main diff --git a/docs/en/api/packages/function.md b/docs/en/api/packages/function.md index 5565890..c1dd70b 100644 --- a/docs/en/api/packages/function.md +++ b/docs/en/api/packages/function.md @@ -35,7 +35,6 @@ import ( - ## Documentation ### After @@ -48,7 +47,7 @@ import ( func After(n int, fn any) func(args ...any) []reflect.Value ``` -Example:[Run](https://go.dev/play/p/eRD5k2vzUVX) +Example:[Run](https://go.dev/play/p/eRD5k2vzUVX) ```go package main @@ -81,7 +80,7 @@ func main() { func Before(n int, fn any) func(args ...any) []reflect.Value ``` -Example:[Run](https://go.dev/play/p/0HqUDIFZ3IL) +Example:[Run](https://go.dev/play/p/0HqUDIFZ3IL) ```go package main @@ -118,7 +117,7 @@ type CurryFn[T any] func(...T) T func (cf CurryFn[T]) New(val T) func(...T) T ``` -Example:[Run](https://go.dev/play/p/5HopfDwANKX) +Example:[Run](https://go.dev/play/p/5HopfDwANKX) ```go package main @@ -157,7 +156,7 @@ func main() { func Compose[T any](fnList ...func(...T) T) func(...T) T ``` -Example:[Run](https://go.dev/play/p/KKfugD4PKYF) +Example:[Run](https://go.dev/play/p/KKfugD4PKYF) ```go package main @@ -195,7 +194,7 @@ func main() { func Debounced(fn func(), duration time.Duration) func() ``` -Example:[Run](https://go.dev/play/p/absuEGB_GN7) +Example:[Run](https://go.dev/play/p/absuEGB_GN7) ```go package main @@ -245,7 +244,7 @@ func main() { func Delay(delay time.Duration, fn any, args ...any) ``` -Example:[Run](https://go.dev/play/p/Ivtc2ZE-Tye) +Example:[Run](https://go.dev/play/p/Ivtc2ZE-Tye) ```go package main @@ -277,7 +276,7 @@ func main() { func Schedule(d time.Duration, fn any, args ...any) chan bool ``` -Example:[Run](https://go.dev/play/p/hbON-Xeyn5N) +Example:[Run](https://go.dev/play/p/hbON-Xeyn5N) ```go package main @@ -317,7 +316,7 @@ the functions one by one. func Pipeline[T any](funcs ...func(T) T) func(T) T ``` -Example:[Run](https://go.dev/play/p/mPdUVvj6HD6) +Example:[Run](https://go.dev/play/p/mPdUVvj6HD6) ```go package main @@ -368,7 +367,7 @@ func (w *Watcher) Reset() //reset the watcher func (w *Watcher) GetElapsedTime() time.Duration //get the elapsed time of function execution ``` -Example:[Run](https://go.dev/play/p/l2yrOpCLd1I) +Example:[Run](https://go.dev/play/p/l2yrOpCLd1I) ```go package main diff --git a/docs/en/api/packages/maputil.md b/docs/en/api/packages/maputil.md index af03f0e..6e12a07 100644 --- a/docs/en/api/packages/maputil.md +++ b/docs/en/api/packages/maputil.md @@ -55,8 +55,6 @@ import ( - - ## Documentation ### MapTo @@ -69,7 +67,7 @@ import ( func MapTo(src any, dst any) error ``` -Example:[Run](https://go.dev/play/p/4K7KBEPgS5M) +Example:[Run](https://go.dev/play/p/4K7KBEPgS5M) ```go package main @@ -126,7 +124,7 @@ func main() { func ForEach[K comparable, V any](m map[K]V, iteratee func(key K, value V)) ``` -Example:[Run](https://go.dev/play/p/OaThj6iNVXK) +Example:[Run](https://go.dev/play/p/OaThj6iNVXK) ```go package main @@ -167,7 +165,7 @@ func main() { func Filter[K comparable, V any](m map[K]V, predicate func(key K, value V) bool) map[K]V ``` -Example:[Run](https://go.dev/play/p/fSvF3wxuNG7) +Example:[Run](https://go.dev/play/p/fSvF3wxuNG7) ```go package main @@ -212,7 +210,7 @@ func main() { func FilterByKeys[K comparable, V any](m map[K]V, keys []K) map[K]V ``` -Example:[Run](https://go.dev/play/p/7ov6BJHbVqh) +Example:[Run](https://go.dev/play/p/7ov6BJHbVqh) ```go package main @@ -250,7 +248,7 @@ func main() { func FilterByValues[K comparable, V comparable](m map[K]V, values []V) map[K]V ``` -Example:[Run](https://go.dev/play/p/P3-9MdcXegR) +Example:[Run](https://go.dev/play/p/P3-9MdcXegR) ```go package main @@ -288,7 +286,7 @@ func main() { func OmitBy[K comparable, V any](m map[K]V, predicate func(key K, value V) bool) map[K]V ``` -Example:[Run](https://go.dev/play/p/YJM4Hj5hNwm) +Example:[Run](https://go.dev/play/p/YJM4Hj5hNwm) ```go package main @@ -329,7 +327,7 @@ func main() { func OmitByKeys[K comparable, V any](m map[K]V, keys []K) map[K]V ``` -Example:[Run](https://go.dev/play/p/jXGrWDBfSRp) +Example:[Run](https://go.dev/play/p/jXGrWDBfSRp) ```go package main @@ -367,7 +365,7 @@ func main() { func OmitByValues[K comparable, V comparable](m map[K]V, values []V) map[K]V ``` -Example:[Run](https://go.dev/play/p/XB7Y10uw20_U) +Example:[Run](https://go.dev/play/p/XB7Y10uw20_U) ```go package main @@ -405,7 +403,7 @@ func main() { func Intersect[K comparable, V any](maps ...map[K]V) map[K]V ``` -Example:[Run](https://go.dev/play/p/Zld0oj3sjcC) +Example:[Run](https://go.dev/play/p/Zld0oj3sjcC) ```go package main @@ -460,7 +458,7 @@ func main() { func Keys[K comparable, V any](m map[K]V) []K ``` -Example:[Run](https://go.dev/play/p/xNB5bTb97Wd) +Example:[Run](https://go.dev/play/p/xNB5bTb97Wd) ```go package main @@ -500,7 +498,7 @@ func main() { func Merge[K comparable, V any](maps ...map[K]V) map[K]V ``` -Example:[Run](https://go.dev/play/p/H95LENF1uB-) +Example:[Run](https://go.dev/play/p/H95LENF1uB-) ```go package main @@ -539,7 +537,7 @@ func main() { func Minus[K comparable, V any](mapA, mapB map[K]V) map[K]V ``` -Example:[Run](https://go.dev/play/p/3u5U9K7YZ9m) +Example:[Run](https://go.dev/play/p/3u5U9K7YZ9m) ```go package main @@ -581,7 +579,7 @@ func main() { func Values[K comparable, V any](m map[K]V) []V ``` -Example:[Run](https://go.dev/play/p/CBKdUc5FTW6) +Example:[Run](https://go.dev/play/p/CBKdUc5FTW6) ```go package main @@ -621,7 +619,7 @@ func main() { func KeysBy[K comparable, V any, T any](m map[K]V, mapper func(item K) T) []T ``` -Example:[Run](https://go.dev/play/p/hI371iB8Up8) +Example:[Run](https://go.dev/play/p/hI371iB8Up8) ```go package main @@ -662,7 +660,7 @@ func main() { func ValuesBy[K comparable, V any, T any](m map[K]V, mapper func(item V) T) []T ``` -Example:[Run](https://go.dev/play/p/sg9-oRidh8f) +Example:[Run](https://go.dev/play/p/sg9-oRidh8f) ```go package main @@ -711,7 +709,7 @@ func main() { func MapKeys[K comparable, V any, T comparable](m map[K]V, iteratee func(key K, value V) T) map[T]V ``` -Example:[Run](https://go.dev/play/p/8scDxWeBDKd) +Example:[Run](https://go.dev/play/p/8scDxWeBDKd) ```go package main @@ -750,7 +748,7 @@ func main() { func MapValues[K comparable, V any, T any](m map[K]V, iteratee func(key K, value V) T) map[K]T ``` -Example:[Run](https://go.dev/play/p/g92aY3fc7Iw) +Example:[Run](https://go.dev/play/p/g92aY3fc7Iw) ```go package main @@ -793,7 +791,7 @@ type Entry[K comparable, V any] struct { func Entries[K comparable, V any](m map[K]V) []Entry[K, V] ``` -Example:[Run](https://go.dev/play/p/Ltb11LNcElY) +Example:[Run](https://go.dev/play/p/Ltb11LNcElY) ```go package main @@ -838,7 +836,7 @@ type Entry[K comparable, V any] struct { func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V ``` -Example:[Run](https://go.dev/play/p/fTdu4sCNjQO) +Example:[Run](https://go.dev/play/p/fTdu4sCNjQO) ```go package main @@ -872,7 +870,7 @@ func main() { func Transform[K1 comparable, V1 any, K2 comparable, V2 any](m map[K1]V1, iteratee func(key K1, value V1) (K2, V2)) map[K2]V2 ``` -Example:[Run](https://go.dev/play/p/P6ovfToM3zj) +Example:[Run](https://go.dev/play/p/P6ovfToM3zj) ```go package main @@ -911,7 +909,7 @@ func main() { func IsDisjoint[K comparable, V any](mapA, mapB map[K]V) bool ``` -Example:[Run](https://go.dev/play/p/N9qgYg_Ho6f) +Example:[Run](https://go.dev/play/p/N9qgYg_Ho6f) ```go package main @@ -966,7 +964,7 @@ if haskey { func HasKey[K comparable, V any](m map[K]V, key K) bool ``` -Example:[Run](https://go.dev/play/p/isZZHOsDhFc) +Example:[Run](https://go.dev/play/p/isZZHOsDhFc) ```go package main @@ -1005,7 +1003,7 @@ func main() { func NewConcurrentMap[K comparable, V any](shardCount int) *ConcurrentMap[K, V] ``` -Example:[Run](https://go.dev/play/p/3PenTPETJT0) +Example:[Run](https://go.dev/play/p/3PenTPETJT0) ```go package main @@ -1031,7 +1029,7 @@ func main() { func (cm *ConcurrentMap[K, V]) Set(key K, value V) ``` -Example:[Run](https://go.dev/play/p/3PenTPETJT0) +Example:[Run](https://go.dev/play/p/3PenTPETJT0) ```go package main @@ -1086,7 +1084,7 @@ func main() { func (cm *ConcurrentMap[K, V]) Get(key K) (V, bool) ``` -Example:[Run](https://go.dev/play/p/3PenTPETJT0) +Example:[Run](https://go.dev/play/p/3PenTPETJT0) ```go package main @@ -1141,7 +1139,7 @@ func main() { func (cm *ConcurrentMap[K, V]) GetOrSet(key K, value V) (actual V, ok bool) ``` -Example:[Run](https://go.dev/play/p/aDcDApOK01a) +Example:[Run](https://go.dev/play/p/aDcDApOK01a) ```go package main @@ -1185,7 +1183,7 @@ func main() { func (cm *ConcurrentMap[K, V]) Delete(key K) ``` -Example:[Run](https://go.dev/play/p/uTIJZYhpVMS) +Example:[Run](https://go.dev/play/p/uTIJZYhpVMS) ```go package main @@ -1232,7 +1230,7 @@ func main() { func (cm *ConcurrentMap[K, V]) GetAndDelete(key K) (actual V, ok bool) ``` -Example:[Run](https://go.dev/play/p/ZyxeIXSZUiM) +Example:[Run](https://go.dev/play/p/ZyxeIXSZUiM) ```go package main @@ -1284,7 +1282,7 @@ func main() { func (cm *ConcurrentMap[K, V]) Has(key K) bool ``` -Example:[Run](https://go.dev/play/p/C8L4ul9TVwf) +Example:[Run](https://go.dev/play/p/C8L4ul9TVwf) ```go package main @@ -1331,7 +1329,7 @@ func main() { func (cm *ConcurrentMap[K, V]) Range(iterator func(key K, value V) bool) ``` -Example:[Run](https://go.dev/play/p/iqcy7P8P0Pr) +Example:[Run](https://go.dev/play/p/iqcy7P8P0Pr) ```go package main diff --git a/docs/en/api/packages/mathutil.md b/docs/en/api/packages/mathutil.md index 556c131..71146f0 100644 --- a/docs/en/api/packages/mathutil.md +++ b/docs/en/api/packages/mathutil.md @@ -50,8 +50,6 @@ import ( - - ## Documentation ### Average @@ -64,7 +62,7 @@ import ( func Average[T constraints.Integer | constraints.Float](numbers ...T) T ``` -Example:[Run](https://go.dev/play/p/Vv7LBwER-pz) +Example:[Run](https://go.dev/play/p/Vv7LBwER-pz) ```go package main @@ -99,7 +97,7 @@ func main() { func Exponent(x, n int64) int64 ``` -Example:[Run](https://go.dev/play/p/uF3HGNPk8wr) +Example:[Run](https://go.dev/play/p/uF3HGNPk8wr) ```go package main @@ -135,7 +133,7 @@ func main() { func Fibonacci(first, second, n int) int ``` -Example:[Run](https://go.dev/play/p/IscseUNMuUc) +Example:[Run](https://go.dev/play/p/IscseUNMuUc) ```go package main @@ -171,7 +169,7 @@ func main() { func Factorial(x uint) uint ``` -Example:[Run](https://go.dev/play/p/tt6LdOK67Nx) +Example:[Run](https://go.dev/play/p/tt6LdOK67Nx) ```go package main @@ -207,7 +205,7 @@ func main() { func Max[T constraints.Integer | constraints.Float](numbers ...T) T ``` -Example:[Run](https://go.dev/play/p/cN8DHI0rTkH) +Example:[Run](https://go.dev/play/p/cN8DHI0rTkH) ```go package main @@ -240,7 +238,7 @@ func main() { func MaxBy[T any](slice []T, comparator func(T, T) bool) T ``` -Example:[Run](https://go.dev/play/p/pbe2MT-7DV2) +Example:[Run](https://go.dev/play/p/pbe2MT-7DV2) ```go package main @@ -284,7 +282,7 @@ func main() { func Min[T constraints.Integer | constraints.Float](numbers ...T) T ``` -Example:[Run](https://go.dev/play/p/21BER_mlGUj) +Example:[Run](https://go.dev/play/p/21BER_mlGUj) ```go package main @@ -317,7 +315,7 @@ func main() { func MinBy[T any](slice []T, comparator func(T, T) bool) T ``` -Example:[Run](https://go.dev/play/p/N9qgYg_Ho6f) +Example:[Run](https://go.dev/play/p/N9qgYg_Ho6f) ```go package main @@ -361,7 +359,7 @@ func main() { func Percent(val, total float64, n int) float64 ``` -Example:[Run](https://go.dev/play/p/s0NdFCtwuyd) +Example:[Run](https://go.dev/play/p/s0NdFCtwuyd) ```go package main @@ -397,7 +395,7 @@ func main() { func RoundToFloat(x float64, n int) float64 ``` -Example:[Run](https://go.dev/play/p/ghyb528JRJL) +Example:[Run](https://go.dev/play/p/ghyb528JRJL) ```go package main @@ -433,7 +431,7 @@ func main() { func RoundToString(x float64, n int) string ``` -Example:[Run](https://go.dev/play/p/kZwpBRAcllO) +Example:[Run](https://go.dev/play/p/kZwpBRAcllO) ```go package main @@ -469,7 +467,7 @@ func main() { func TruncRound(x float64, n int) float64 ``` -Example:[Run](https://go.dev/play/p/aumarSHIGzP) +Example:[Run](https://go.dev/play/p/aumarSHIGzP) ```go package main @@ -505,7 +503,7 @@ func main() { func Range[T constraints.Integer | constraints.Float](start T, count int) []T ``` -Example:[Run](https://go.dev/play/p/9ke2opxa8ZP) +Example:[Run](https://go.dev/play/p/9ke2opxa8ZP) ```go package main @@ -544,7 +542,7 @@ func main() { func RangeWithStep[T constraints.Integer | constraints.Float](start, end, step T) []T ``` -Example:[Run](https://go.dev/play/p/akLWz0EqOSM) +Example:[Run](https://go.dev/play/p/akLWz0EqOSM) ```go package main @@ -583,7 +581,7 @@ func main() { func AngleToRadian(angle float64) float64 ``` -Example:[Run](https://go.dev/play/p/CIvlICqrHql) +Example:[Run](https://go.dev/play/p/CIvlICqrHql) ```go package main @@ -619,7 +617,7 @@ func main() { func RadianToAngle(radian float64) float64 ``` -Example:[Run](https://go.dev/play/p/dQtmOTUOMgi) +Example:[Run](https://go.dev/play/p/dQtmOTUOMgi) ```go package main @@ -655,7 +653,7 @@ func main() { func PointDistance(x1, y1, x2, y2 float64) float64 ``` -Example:[Run](https://go.dev/play/p/RrG4JIaziM8) +Example:[Run](https://go.dev/play/p/RrG4JIaziM8) ```go package main @@ -685,7 +683,7 @@ func main() { func IsPrime(n int) bool ``` -Example:[Run](https://go.dev/play/p/Rdd8UTHZJ7u) +Example:[Run](https://go.dev/play/p/Rdd8UTHZJ7u) ```go package main @@ -724,7 +722,7 @@ func main() { func GCD[T constraints.Integer](integers ...T) T ``` -Example:[Run](https://go.dev/play/p/CiEceLSoAKB) +Example:[Run](https://go.dev/play/p/CiEceLSoAKB) ```go package main @@ -766,7 +764,7 @@ func main() { func LCM[T constraints.Integer](integers ...T) T ``` -Example:[Run](https://go.dev/play/p/EjcZxfY7G_g) +Example:[Run](https://go.dev/play/p/EjcZxfY7G_g) ```go package main @@ -802,7 +800,7 @@ func main() { func Cos(radian float64, precision ...int) float64 ``` -Example:[Run](https://go.dev/play/p/Sm89LoIfvFq) +Example:[Run](https://go.dev/play/p/Sm89LoIfvFq) ```go package main @@ -844,7 +842,7 @@ func main() { func Sin(radian float64, precision ...int) float64 ``` -Example:[Run](https://go.dev/play/p/TWMQlMywDsP) +Example:[Run](https://go.dev/play/p/TWMQlMywDsP) ```go package main @@ -886,7 +884,7 @@ func main() { func Log(n, base float64) float64 ``` -Example:[Run](https://go.dev/play/p/_d4bi8oyhat) +Example:[Run](https://go.dev/play/p/_d4bi8oyhat) ```go package main @@ -922,7 +920,7 @@ func main() { func Sum[T constraints.Integer | constraints.Float](numbers ...T) T ``` -Example:[Run](https://go.dev/play/p/1To2ImAMJA7) +Example:[Run](https://go.dev/play/p/1To2ImAMJA7) ```go package main @@ -955,7 +953,7 @@ func main() { func Abs[T constraints.Integer | constraints.Float](x T) T ``` -Example:[Run](https://go.dev/play/p/fsyBh1Os-1d) +Example:[Run](https://go.dev/play/p/fsyBh1Os-1d) ```go package main diff --git a/docs/en/api/packages/netutil.md b/docs/en/api/packages/netutil.md index 0fa82a0..7271a2f 100644 --- a/docs/en/api/packages/netutil.md +++ b/docs/en/api/packages/netutil.md @@ -65,7 +65,7 @@ import ( func ConvertMapToQueryString(param map[string]any) string ``` -Example:[Run](https://go.dev/play/p/jnNt_qoSnRi) +Example:[Run](https://go.dev/play/p/jnNt_qoSnRi) ```go package main @@ -98,7 +98,7 @@ func main() { func EncodeUrl(urlStr string) (string, error) ``` -Example:[Run](https://go.dev/play/p/bsZ6BRC4uKI) +Example:[Run](https://go.dev/play/p/bsZ6BRC4uKI) ```go package main @@ -133,7 +133,7 @@ func main() { func GetInternalIp() string ``` -Example:[Run](https://go.dev/play/p/5mbu-gFp7ei) +Example:[Run](https://go.dev/play/p/5mbu-gFp7ei) ```go package main @@ -165,7 +165,7 @@ func main() { func GetIps() []string ``` -Example:[Run](https://go.dev/play/p/NUFfcEmukx1) +Example:[Run](https://go.dev/play/p/NUFfcEmukx1) ```go package main @@ -195,7 +195,7 @@ func main() { func GetMacAddrs() []string { ``` -Example:[Run](https://go.dev/play/p/Rq9UUBS_Xp1) +Example:[Run](https://go.dev/play/p/Rq9UUBS_Xp1) ```go package main @@ -239,7 +239,7 @@ type PublicIpInfo struct { } ``` -Example:[Run](https://go.dev/play/p/YDxIfozsRHR) +Example:[Run](https://go.dev/play/p/YDxIfozsRHR) ```go package main @@ -269,7 +269,7 @@ func main() { func GetRequestPublicIp(req *http.Request) string ``` -Example:[Run](https://go.dev/play/p/kxU-YDc_eBo) +Example:[Run](https://go.dev/play/p/kxU-YDc_eBo) ```go package main @@ -307,7 +307,7 @@ func main() { func IsPublicIP(IP net.IP) bool ``` -Example:[Run](https://go.dev/play/p/nmktSQpJZnn) +Example:[Run](https://go.dev/play/p/nmktSQpJZnn) ```go package main @@ -344,7 +344,7 @@ func main() { func IsInternalIP(IP net.IP) bool ``` -Example:[Run](https://go.dev/play/p/sYGhXbgO4Cb) +Example:[Run](https://go.dev/play/p/sYGhXbgO4Cb) ```go package main @@ -388,7 +388,7 @@ type HttpRequest struct { } ``` -Example:[Run](https://go.dev/play/p/jUSgynekH7G) +Example:[Run](https://go.dev/play/p/jUSgynekH7G) ```go package main @@ -445,7 +445,7 @@ func NewHttpClientWithConfig(config *HttpClientConfig) *HttpClient ``` -Example:[Run](https://go.dev/play/p/jUSgynekH7G) +Example:[Run](https://go.dev/play/p/jUSgynekH7G) ```go package main @@ -476,7 +476,7 @@ func main() { func (client *HttpClient) SendRequest(request *HttpRequest) (*http.Response, error) ``` -Example:[Run](https://go.dev/play/p/jUSgynekH7G) +Example:[Run](https://go.dev/play/p/jUSgynekH7G) ```go package main @@ -530,7 +530,7 @@ func main() { func (client *HttpClient) DecodeResponse(resp *http.Response, target any) error ``` -Example:[Run](https://go.dev/play/p/jUSgynekH7G) +Example:[Run](https://go.dev/play/p/jUSgynekH7G) ```go package main @@ -584,7 +584,7 @@ func main() { func StructToUrlValues(targetStruct any) url.Values ``` -Example:[Run](https://go.dev/play/p/pFqMkM40w9z) +Example:[Run](https://go.dev/play/p/pFqMkM40w9z) ```go package main @@ -966,7 +966,7 @@ func main() { func IsPingConnected(host string) bool ``` -Example:[Run](https://go.dev/play/p/q8OzTijsA87) +Example:[Run](https://go.dev/play/p/q8OzTijsA87) ```go package main @@ -999,7 +999,7 @@ func main() { func IsTelnetConnected(host string, port string) bool ``` -Example:[Run](https://go.dev/play/p/yiLCGtQv_ZG) +Example:[Run](https://go.dev/play/p/yiLCGtQv_ZG) ```go package main diff --git a/docs/en/api/packages/pointer.md b/docs/en/api/packages/pointer.md index 1d84f25..a3d6838 100644 --- a/docs/en/api/packages/pointer.md +++ b/docs/en/api/packages/pointer.md @@ -30,8 +30,6 @@ import ( - - ## Documentation ### Of @@ -44,7 +42,7 @@ import ( func Of[T any](v T) *T ``` -Example:[Run](https://go.dev/play/p/HFd70x4DrMj) +Example:[Run](https://go.dev/play/p/HFd70x4DrMj) ```go package main @@ -78,7 +76,7 @@ func main() { func Unwrap[T any](p *T) T ``` -Example:[Run](https://go.dev/play/p/cgeu3g7cjWb) +Example:[Run](https://go.dev/play/p/cgeu3g7cjWb) ```go package main @@ -114,7 +112,7 @@ func main() { UnwarpOr[T any](p *T, fallback T) T ``` -Example:[Run](https://go.dev/play/p/mmNaLC38W8C) +Example:[Run](https://go.dev/play/p/mmNaLC38W8C) ```go package main @@ -159,7 +157,7 @@ func main() { UnwarpOrDefault[T any](p *T) T ``` -Example:[Run](https://go.dev/play/p/ZnGIHf8_o4E) +Example:[Run](https://go.dev/play/p/ZnGIHf8_o4E) ```go package main @@ -205,7 +203,7 @@ func main() { func ExtractPointer(value any) any ``` -Example:[Run](https://go.dev/play/p/D7HFjeWU2ZP) +Example:[Run](https://go.dev/play/p/D7HFjeWU2ZP) ```go package main diff --git a/docs/en/api/packages/random.md b/docs/en/api/packages/random.md index 8ecb849..ed5531d 100644 --- a/docs/en/api/packages/random.md +++ b/docs/en/api/packages/random.md @@ -34,8 +34,6 @@ import ( - - ## Documentation ### RandBytes @@ -48,7 +46,7 @@ import ( func RandBytes(length int) []byte ``` -Example:[Run](https://go.dev/play/p/EkiLESeXf8d) +Example:[Run](https://go.dev/play/p/EkiLESeXf8d) ```go package main @@ -74,7 +72,7 @@ func main() { func RandInt(min, max int) int ``` -Example:[Run](https://go.dev/play/p/pXyyAAI5YxD) +Example:[Run](https://go.dev/play/p/pXyyAAI5YxD) ```go package main @@ -100,7 +98,7 @@ func main() { func RandString(length int) string ``` -Example:[Run](https://go.dev/play/p/W2xvRUXA7Mi) +Example:[Run](https://go.dev/play/p/W2xvRUXA7Mi) ```go package main @@ -126,7 +124,7 @@ func main() { func RandUpper(length int) string ``` -Example:[Run](https://go.dev/play/p/29QfOh0DVuh) +Example:[Run](https://go.dev/play/p/29QfOh0DVuh) ```go package main @@ -152,7 +150,7 @@ func main() { func RandLower(length int) string ``` -Example:[Run](https://go.dev/play/p/XJtZ471cmtI) +Example:[Run](https://go.dev/play/p/XJtZ471cmtI) ```go package main @@ -178,7 +176,7 @@ func main() { func RandNumeral(length int) string ``` -Example:[Run](https://go.dev/play/p/g4JWVpHsJcf) +Example:[Run](https://go.dev/play/p/g4JWVpHsJcf) ```go package main @@ -204,7 +202,7 @@ func main() { func RandNumeralOrLetter(length int) string ``` -Example:[Run](https://go.dev/play/p/19CEQvpx2jD) +Example:[Run](https://go.dev/play/p/19CEQvpx2jD) ```go package main @@ -230,7 +228,7 @@ func main() { func UUIdV4() (string, error) ``` -Example:[Run](https://go.dev/play/p/_Z9SFmr28ft) +Example:[Run](https://go.dev/play/p/_Z9SFmr28ft) ```go package main @@ -260,7 +258,7 @@ func main() { func RandUniqueIntSlice(n, min, max int) []int ``` -Example:[Run](https://go.dev/play/p/uBkRSOz73Ec) +Example:[Run](https://go.dev/play/p/uBkRSOz73Ec) ```go package main diff --git a/docs/en/api/packages/retry.md b/docs/en/api/packages/retry.md index 64be7f6..734de3b 100644 --- a/docs/en/api/packages/retry.md +++ b/docs/en/api/packages/retry.md @@ -30,8 +30,6 @@ import ( - - ## Documentation ### Context @@ -44,7 +42,7 @@ import ( func Context(ctx context.Context) ``` -Example:[Run](https://go.dev/play/p/xnAOOXv9GkS) +Example:[Run](https://go.dev/play/p/xnAOOXv9GkS) ```go import ( @@ -91,7 +89,7 @@ func main() { type RetryFunc func() error ``` -Example:[Run](https://go.dev/play/p/nk2XRmagfVF) +Example:[Run](https://go.dev/play/p/nk2XRmagfVF) ```go package main @@ -137,7 +135,7 @@ func main() { func RetryTimes(n uint) ``` -Example:[Run](https://go.dev/play/p/ssfVeU2SwLO) +Example:[Run](https://go.dev/play/p/ssfVeU2SwLO) ```go package main @@ -180,7 +178,7 @@ func main() { func RetryDuration(d time.Duration) ``` -Example:[Run](https://go.dev/play/p/nk2XRmagfVF) +Example:[Run](https://go.dev/play/p/nk2XRmagfVF) ```go package main @@ -226,7 +224,7 @@ func main() { func Retry(retryFunc RetryFunc, opts ...Option) error ``` -Example:[Run](https://go.dev/play/p/nk2XRmagfVF) +Example:[Run](https://go.dev/play/p/nk2XRmagfVF) ```go package main diff --git a/docs/en/api/packages/slice.md b/docs/en/api/packages/slice.md index 23fd4b3..5060126 100644 --- a/docs/en/api/packages/slice.md +++ b/docs/en/api/packages/slice.md @@ -94,8 +94,6 @@ import ( - - ## Documentation ### AppendIfAbsent @@ -108,7 +106,7 @@ import ( func AppendIfAbsent[T comparable](slice []T, item T) []T ``` -Example:[Run](https://go.dev/play/p/GNdv7Jg2Taj) +Example:[Run](https://go.dev/play/p/GNdv7Jg2Taj) ```go import ( @@ -139,7 +137,7 @@ func main() { func Contain[T comparable](slice []T, target T) bool ``` -Example:[Run](https://go.dev/play/p/_454yEHcNjf) +Example:[Run](https://go.dev/play/p/_454yEHcNjf) ```go import ( @@ -170,7 +168,7 @@ func main() { func ContainBy[T any](slice []T, predicate func(item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/49tkHfX4GNc) +Example:[Run](https://go.dev/play/p/49tkHfX4GNc) ```go import ( @@ -215,7 +213,7 @@ func main() { func ContainSubSlice[T comparable](slice, subSlice []T) bool ``` -Example:[Run](https://go.dev/play/p/bcuQ3UT6Sev) +Example:[Run](https://go.dev/play/p/bcuQ3UT6Sev) ```go import ( @@ -246,7 +244,7 @@ func main() { func Chunk[T any](slice []T, size int) [][]T ``` -Example:[Run](https://go.dev/play/p/b4Pou5j2L_C) +Example:[Run](https://go.dev/play/p/b4Pou5j2L_C) ```go import ( @@ -288,7 +286,7 @@ func main() { func Compact[T comparable](slice []T) []T ``` -Example:[Run](https://go.dev/play/p/pO5AnxEr3TK) +Example:[Run](https://go.dev/play/p/pO5AnxEr3TK) ```go import ( @@ -325,7 +323,7 @@ func main() { func Concat[T any](slice []T, slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/gPt-q7zr5mk) +Example:[Run](https://go.dev/play/p/gPt-q7zr5mk) ```go import ( @@ -356,7 +354,7 @@ func main() { func Count[T comparable](slice []T, item T) int ``` -Example:[Run](https://go.dev/play/p/Mj4oiEnQvRJ) +Example:[Run](https://go.dev/play/p/Mj4oiEnQvRJ) ```go import ( @@ -389,7 +387,7 @@ func main() { func CountBy[T any](slice []T, predicate func(index int, item T) bool) int ``` -Example:[Run](https://go.dev/play/p/tHOccTMDZCC) +Example:[Run](https://go.dev/play/p/tHOccTMDZCC) ```go import ( @@ -423,7 +421,7 @@ func main() { func Difference[T comparable](slice, comparedSlice []T) []T ``` -Example:[Run](https://go.dev/play/p/VXvadzLzhDa) +Example:[Run](https://go.dev/play/p/VXvadzLzhDa) ```go import ( @@ -454,7 +452,7 @@ func main() { func DifferenceBy[T comparable](slice []T, comparedSlice []T, iteratee func(index int, item T) T) []T ``` -Example:[Run](https://go.dev/play/p/DiivgwM5OnC) +Example:[Run](https://go.dev/play/p/DiivgwM5OnC) ```go import ( @@ -489,7 +487,7 @@ func main() { func DifferenceWith[T any](slice []T, comparedSlice []T, comparator func(value, otherValue T) bool) []T ``` -Example:[Run](https://go.dev/play/p/v2U2deugKuV) +Example:[Run](https://go.dev/play/p/v2U2deugKuV) ```go import ( @@ -524,7 +522,7 @@ func main() { func DeleteAt[T any](slice []T, start int, end ...int) ``` -Example:[Run](https://go.dev/play/p/pJ-d6MUWcvK) +Example:[Run](https://go.dev/play/p/pJ-d6MUWcvK) ```go import ( @@ -558,7 +556,7 @@ func main() { func Drop[T any](slice []T, n int) []T ``` -Example:[Run](https://go.dev/play/p/jnPO2yQsT8H) +Example:[Run](https://go.dev/play/p/jnPO2yQsT8H) ```go import ( @@ -595,7 +593,7 @@ func main() { func DropRight[T any](slice []T, n int) []T ``` -Example:[Run](https://go.dev/play/p/8bcXvywZezG) +Example:[Run](https://go.dev/play/p/8bcXvywZezG) ```go import ( @@ -632,7 +630,7 @@ func main() { func DropWhile[T any](slice []T, predicate func(item T) bool) []T ``` -Example:[Run](https://go.dev/play/p/4rt252UV_qs) +Example:[Run](https://go.dev/play/p/4rt252UV_qs) ```go import ( @@ -672,7 +670,7 @@ func main() { func DropRightWhile[T any](slice []T, predicate func(item T) bool) []T ``` -Example:[Run](https://go.dev/play/p/6wyK3zMY56e) +Example:[Run](https://go.dev/play/p/6wyK3zMY56e) ```go import ( @@ -714,7 +712,7 @@ func main() { func Equal[T comparable](slice1, slice2 []T) bool ``` -Example:[Run](https://go.dev/play/p/WcRQJ37ifPa) +Example:[Run](https://go.dev/play/p/WcRQJ37ifPa) ```go import ( @@ -749,7 +747,7 @@ func main() { func EqualWith[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) bool ``` -Example:[Run](https://go.dev/play/p/b9iygtgsHI1) +Example:[Run](https://go.dev/play/p/b9iygtgsHI1) ```go import ( @@ -784,7 +782,7 @@ func main() { func Every[T any](slice []T, predicate func(index int, item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/R8U6Sl-j8cD) +Example:[Run](https://go.dev/play/p/R8U6Sl-j8cD) ```go import ( @@ -818,7 +816,7 @@ func main() { func Filter[T any](slice []T, predicate func(index int, item T) bool) []T ``` -Example:[Run](https://go.dev/play/p/SdPna-7qK4T) +Example:[Run](https://go.dev/play/p/SdPna-7qK4T) ```go import ( @@ -852,7 +850,7 @@ func main() { func Find[T any](slice []T, predicate func(index int, item T) bool) (*T, bool) ``` -Example:[Run](https://go.dev/play/p/CBKeBoHVLgq) +Example:[Run](https://go.dev/play/p/CBKeBoHVLgq) ```go import ( @@ -888,7 +886,7 @@ func main() { func FindBy[T any](slice []T, predicate func(index int, item T) bool) (v T, ok bool) ``` -Example:[Run](https://go.dev/play/p/n1lysBYl-GB) +Example:[Run](https://go.dev/play/p/n1lysBYl-GB) ```go import ( @@ -924,7 +922,7 @@ func main() { func FindLast[T any](slice []T, predicate func(index int, item T) bool) (*T, bool) ``` -Example:[Run](https://go.dev/play/p/FFDPV_j7URd) +Example:[Run](https://go.dev/play/p/FFDPV_j7URd) ```go import ( @@ -960,7 +958,7 @@ func main() { func FindLastBy[T any](slice []T, predicate func(index int, item T) bool) (v T, ok bool) ``` -Example:[Run](https://go.dev/play/p/8iqomzyCl_s) +Example:[Run](https://go.dev/play/p/8iqomzyCl_s) ```go import ( @@ -996,7 +994,7 @@ func main() { func Flatten(slice any) any ``` -Example:[Run](https://go.dev/play/p/hYa3cBEevtm) +Example:[Run](https://go.dev/play/p/hYa3cBEevtm) ```go import ( @@ -1026,7 +1024,7 @@ func main() { func FlattenDeep(slice any) any ``` -Example:[Run](https://go.dev/play/p/yjYNHPyCFaF) +Example:[Run](https://go.dev/play/p/yjYNHPyCFaF) ```go import ( @@ -1056,7 +1054,7 @@ func main() { func ForEach[T any](slice []T, iteratee func(index int, item T)) ``` -Example:[Run](https://go.dev/play/p/DrPaa4YsHRF) +Example:[Run](https://go.dev/play/p/DrPaa4YsHRF) ```go import ( @@ -1091,7 +1089,7 @@ func main() { func ForEachWithBreak[T any](slice []T, iteratee func(index int, item T) bool) ``` -Example:[Run](https://go.dev/play/p/qScs39f3D9W) +Example:[Run](https://go.dev/play/p/qScs39f3D9W) ```go import ( @@ -1129,7 +1127,7 @@ func main() { func GroupBy[T any](slice []T, groupFn func(index int, item T) bool) ([]T, []T) ``` -Example:[Run](https://go.dev/play/p/QVkPxzPR0iA) +Example:[Run](https://go.dev/play/p/QVkPxzPR0iA) ```go import ( @@ -1165,7 +1163,7 @@ func main() { func GroupWith[T any, U comparable](slice []T, iteratee func(T) U) map[U][]T ``` -Example:[Run](https://go.dev/play/p/ApCvMNTLO8a) +Example:[Run](https://go.dev/play/p/ApCvMNTLO8a) ```go import ( @@ -1199,7 +1197,7 @@ func main() { func IntSlice(slice any) []int ``` -Example:[Run](https://go.dev/play/p/UQDj-on9TGN) +Example:[Run](https://go.dev/play/p/UQDj-on9TGN) ```go import ( @@ -1228,7 +1226,7 @@ func main() { func InterfaceSlice(slice any) []any ``` -Example:[Run](https://go.dev/play/p/FdQXF0Vvqs-) +Example:[Run](https://go.dev/play/p/FdQXF0Vvqs-) ```go import ( @@ -1257,7 +1255,7 @@ func main() { func Intersection[T comparable](slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/anJXfB5wq_t) +Example:[Run](https://go.dev/play/p/anJXfB5wq_t) ```go import ( @@ -1288,7 +1286,7 @@ func main() { func InsertAt[T any](slice []T, index int, value any) []T ``` -Example:[Run](https://go.dev/play/p/hMLNxPEGJVE) +Example:[Run](https://go.dev/play/p/hMLNxPEGJVE) ```go import ( @@ -1328,7 +1326,7 @@ func main() { func IndexOf[T comparable](slice []T, item T) int ``` -Example:[Run](https://go.dev/play/p/MRN1f0FpABb) +Example:[Run](https://go.dev/play/p/MRN1f0FpABb) ```go import ( @@ -1361,7 +1359,7 @@ func main() { func LastIndexOf[T comparable](slice []T, item T) int ``` -Example:[Run](https://go.dev/play/p/DokM4cf1IKH) +Example:[Run](https://go.dev/play/p/DokM4cf1IKH) ```go import ( @@ -1394,7 +1392,7 @@ func main() { func Map[T any, U any](slice []T, iteratee func(index int, item T) U) []U ``` -Example:[Run](https://go.dev/play/p/biaTefqPquw) +Example:[Run](https://go.dev/play/p/biaTefqPquw) ```go import ( @@ -1428,7 +1426,7 @@ func main() { func FilterMap[T any, U any](slice []T, iteratee func(index int, item T) (U, bool)) []U ``` -Example:[Run](https://go.dev/play/p/J94SZ_9MiIe) +Example:[Run](https://go.dev/play/p/J94SZ_9MiIe) ```go import ( @@ -1465,7 +1463,7 @@ func main() { func FlatMap[T any, U any](slice []T, iteratee func(index int, item T) []U) []U ``` -Example:[Run](https://go.dev/play/p/_QARWlWs1N_F) +Example:[Run](https://go.dev/play/p/_QARWlWs1N_F) ```go import ( @@ -1498,7 +1496,7 @@ func main() { func Merge[T any](slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/lbjFp784r9N) +Example:[Run](https://go.dev/play/p/lbjFp784r9N) ```go import ( @@ -1529,7 +1527,7 @@ func main() { func Reverse[T any](slice []T) ``` -Example:[Run](https://go.dev/play/p/8uI8f1lwNrQ) +Example:[Run](https://go.dev/play/p/8uI8f1lwNrQ) ```go import ( @@ -1559,7 +1557,7 @@ func main() { func Reduce[T any](slice []T, iteratee func(index int, item1, item2 T) T, initial T) T ``` -Example:[Run](https://go.dev/play/p/_RfXJJWIsIm) +Example:[Run](https://go.dev/play/p/_RfXJJWIsIm) ```go import ( @@ -1593,7 +1591,7 @@ func main() { func ReduceBy[T any, U any](slice []T, initial U, reducer func(index int, item T, agg U) U) U ``` -Example:[Run](https://go.dev/play/p/YKDpLi7gtee) +Example:[Run](https://go.dev/play/p/YKDpLi7gtee) ```go import ( @@ -1629,7 +1627,7 @@ func main() { func ReduceRight[T any, U any](slice []T, initial U, reducer func(index int, item T, agg U) U) U ``` -Example:[Run](https://go.dev/play/p/qT9dZC03A1K) +Example:[Run](https://go.dev/play/p/qT9dZC03A1K) ```go import ( @@ -1659,7 +1657,7 @@ func main() { func Replace[T comparable](slice []T, old T, new T, n int) []T ``` -Example:[Run](https://go.dev/play/p/P5mZp7IhOFo) +Example:[Run](https://go.dev/play/p/P5mZp7IhOFo) ```go import ( @@ -1701,7 +1699,7 @@ func main() { func ReplaceAll[T comparable](slice []T, old T, new T) []T ``` -Example:[Run](https://go.dev/play/p/CzqXMsuYUrx) +Example:[Run](https://go.dev/play/p/CzqXMsuYUrx) ```go import ( @@ -1729,7 +1727,7 @@ func main() { func Repeat[T any](item T, n int) []T ``` -Example:[Run](https://go.dev/play/p/1CbOmtgILUU) +Example:[Run](https://go.dev/play/p/1CbOmtgILUU) ```go import ( @@ -1757,7 +1755,7 @@ func main() { func Shuffle[T any](slice []T) []T ``` -Example:[Run](https://go.dev/play/p/YHvhnWGU3Ge) +Example:[Run](https://go.dev/play/p/YHvhnWGU3Ge) ```go import ( @@ -1786,7 +1784,7 @@ func main() { func IsAscending[T constraints.Ordered](slice []T) bool ``` -Example:[Run](https://go.dev/play/p/9CtsFjet4SH) +Example:[Run](https://go.dev/play/p/9CtsFjet4SH) ```go import ( @@ -1820,7 +1818,7 @@ func main() { func IsDescending[T constraints.Ordered](slice []T) bool ``` -Example:[Run](https://go.dev/play/p/U_LljFXma14) +Example:[Run](https://go.dev/play/p/U_LljFXma14) ```go import ( @@ -1854,7 +1852,7 @@ func main() { func IsSorted[T constraints.Ordered](slice []T) bool ``` -Example:[Run](https://go.dev/play/p/nCE8wPLwSA-) +Example:[Run](https://go.dev/play/p/nCE8wPLwSA-) ```go import ( @@ -1888,7 +1886,7 @@ func main() { func IsSortedByKey[T any, K constraints.Ordered](slice []T, iteratee func(item T) K) bool ``` -Example:[Run](https://go.dev/play/p/tUoGB7DOHI4) +Example:[Run](https://go.dev/play/p/tUoGB7DOHI4) ```go import ( @@ -1928,7 +1926,7 @@ func main() { func Sort[T constraints.Ordered](slice []T, sortOrder ...string) ``` -Example:[Run](https://go.dev/play/p/V9AVjzf_4Fk) +Example:[Run](https://go.dev/play/p/V9AVjzf_4Fk) ```go import ( @@ -1965,7 +1963,7 @@ func main() { func SortBy[T any](slice []T, less func(a, b T) bool) ``` -Example:[Run](https://go.dev/play/p/DAhLQSZEumm) +Example:[Run](https://go.dev/play/p/DAhLQSZEumm) ```go import ( @@ -2012,7 +2010,7 @@ func main() { func SortByField(slice any, field string, sortType ...string) error ``` -Example:[Run](https://go.dev/play/p/fU1prOBP9p1) +Example:[Run](https://go.dev/play/p/fU1prOBP9p1) ```go import ( @@ -2053,7 +2051,7 @@ func main() { func Some[T any](slice []T, predicate func(index int, item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/4pO9Xf9NDGS) +Example:[Run](https://go.dev/play/p/4pO9Xf9NDGS) ```go import ( @@ -2087,7 +2085,7 @@ func main() { func StringSlice(slice any) []string ``` -Example:[Run](https://go.dev/play/p/W0TZDWCPFcI) +Example:[Run](https://go.dev/play/p/W0TZDWCPFcI) ```go import ( @@ -2116,7 +2114,7 @@ func main() { func SymmetricDifference[T comparable](slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/1CbOmtgILUU) +Example:[Run](https://go.dev/play/p/1CbOmtgILUU) ```go import ( @@ -2147,7 +2145,7 @@ func main() { func ToSlice[T any](items ...T) []T ``` -Example:[Run](https://go.dev/play/p/YzbzVq5kscN) +Example:[Run](https://go.dev/play/p/YzbzVq5kscN) ```go import ( @@ -2175,7 +2173,7 @@ func main() { func ToSlicePointer[T any](items ...T) []*T ``` -Example:[Run](https://go.dev/play/p/gx4tr6_VXSF) +Example:[Run](https://go.dev/play/p/gx4tr6_VXSF) ```go import ( @@ -2210,7 +2208,7 @@ func main() { func Unique[T comparable](slice []T) []T ``` -Example:[Run](https://go.dev/play/p/AXw0R3ZTE6a) +Example:[Run](https://go.dev/play/p/AXw0R3ZTE6a) ```go import ( @@ -2237,7 +2235,7 @@ func main() { func UniqueBy[T comparable](slice []T, iteratee func(item T) T) []T ``` -Example:[Run](https://go.dev/play/p/UR323iZLDpv) +Example:[Run](https://go.dev/play/p/UR323iZLDpv) ```go import ( @@ -2268,7 +2266,7 @@ func main() { func Union[T comparable](slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/hfXV1iRIZOf) +Example:[Run](https://go.dev/play/p/hfXV1iRIZOf) ```go import ( @@ -2299,7 +2297,7 @@ func main() { func UnionBy[T any, V comparable](predicate func(item T) V, slices ...[]T) []T ``` -Example:[Run](https://go.dev/play/p/HGKHfxKQsFi) +Example:[Run](https://go.dev/play/p/HGKHfxKQsFi) ```go import ( @@ -2332,7 +2330,7 @@ func main() { func UpdateAt[T any](slice []T, index int, value T) []T ``` -Example:[Run](https://go.dev/play/p/f3mh2KloWVm) +Example:[Run](https://go.dev/play/p/f3mh2KloWVm) ```go import ( @@ -2372,7 +2370,7 @@ func main() { func Without[T comparable](slice []T, items ...T) []T ``` -Example:[Run](https://go.dev/play/p/bwhEXEypThg) +Example:[Run](https://go.dev/play/p/bwhEXEypThg) ```go import ( @@ -2400,7 +2398,7 @@ func main() { func KeyBy[T any, U comparable](slice []T, iteratee func(item T) U) map[U]T ``` -Example:[Run](https://go.dev/play/p/uXod2LWD1Kg) +Example:[Run](https://go.dev/play/p/uXod2LWD1Kg) ```go import ( @@ -2430,7 +2428,7 @@ func main() { func Join[T any](s []T, separator string) string ``` -Example:[Run](https://go.dev/play/p/huKzqwNDD7V) +Example:[Run](https://go.dev/play/p/huKzqwNDD7V) ```go import ( diff --git a/docs/en/api/packages/stream.md b/docs/en/api/packages/stream.md index 87b0d0e..6b5dfb2 100644 --- a/docs/en/api/packages/stream.md +++ b/docs/en/api/packages/stream.md @@ -51,7 +51,6 @@ import ( - ## Documentation @@ -65,7 +64,7 @@ import ( func Of[T any](elems ...T) stream[T] ``` -Example:[Run](https://go.dev/play/p/jI6_iZZuVFE) +Example:[Run](https://go.dev/play/p/jI6_iZZuVFE) ```go import ( @@ -95,7 +94,7 @@ func main() { func FromSlice[T any](source []T) stream[T] ``` -Example:[Run](https://go.dev/play/p/wywTO0XZtI4) +Example:[Run](https://go.dev/play/p/wywTO0XZtI4) ```go import ( @@ -125,7 +124,7 @@ func main() { func FromChannel[T any](source <-chan T) stream[T] ``` -Example:[Run](https://go.dev/play/p/9TZYugGMhXZ) +Example:[Run](https://go.dev/play/p/9TZYugGMhXZ) ```go import ( @@ -163,7 +162,7 @@ func main() { func FromRange[T constraints.Integer | constraints.Float](start, end, step T) stream[T] ``` -Example:[Run](https://go.dev/play/p/9Ex1-zcg-B-) +Example:[Run](https://go.dev/play/p/9Ex1-zcg-B-) ```go import ( @@ -192,7 +191,7 @@ func main() { func Generate[T any](generator func() func() (item T, ok bool)) stream[T] ``` -Example:[Run](https://go.dev/play/p/rkOWL1yA3j9) +Example:[Run](https://go.dev/play/p/rkOWL1yA3j9) ```go import ( @@ -232,7 +231,7 @@ func main() { func Concat[T any](a, b stream[T]) stream[T] ``` -Example:[Run](https://go.dev/play/p/HM4OlYk_OUC) +Example:[Run](https://go.dev/play/p/HM4OlYk_OUC) ```go import ( @@ -265,7 +264,7 @@ func main() { func (s stream[T]) Distinct() stream[T] ``` -Example:[Run](https://go.dev/play/p/eGkOSrm64cB) +Example:[Run](https://go.dev/play/p/eGkOSrm64cB) ```go import ( @@ -299,7 +298,7 @@ func main() { func (s stream[T]) Filter(predicate func(item T) bool) stream[T] ``` -Example:[Run](https://go.dev/play/p/MFlSANo-buc) +Example:[Run](https://go.dev/play/p/MFlSANo-buc) ```go import ( @@ -333,7 +332,7 @@ func main() { func (s stream[T]) Map(mapper func(item T) T) stream[T] ``` -Example:[Run](https://go.dev/play/p/OtNQUImdYko) +Example:[Run](https://go.dev/play/p/OtNQUImdYko) ```go import ( @@ -367,7 +366,7 @@ func main() { func (s stream[T]) Peek(consumer func(item T)) stream[T] ``` -Example:[Run](https://go.dev/play/p/u1VNzHs6cb2) +Example:[Run](https://go.dev/play/p/u1VNzHs6cb2) ```go import ( @@ -404,7 +403,7 @@ func main() { func (s stream[T]) Skip(n int) stream[T] ``` -Example:[Run](https://go.dev/play/p/fNdHbqjahum) +Example:[Run](https://go.dev/play/p/fNdHbqjahum) ```go import ( @@ -443,7 +442,7 @@ func main() { func (s stream[T]) Limit(maxSize int) stream[T] ``` -Example:[Run](https://go.dev/play/p/qsO4aniDcGf) +Example:[Run](https://go.dev/play/p/qsO4aniDcGf) ```go import ( @@ -482,7 +481,7 @@ func main() { func (s stream[T]) Reverse() stream[T] ``` -Example:[Run](https://go.dev/play/p/A8_zkJnLHm4) +Example:[Run](https://go.dev/play/p/A8_zkJnLHm4) ```go import ( @@ -512,7 +511,7 @@ func main() { func (s stream[T]) Range(start, end int) stream[T] ``` -Example:[Run](https://go.dev/play/p/indZY5V2f4j) +Example:[Run](https://go.dev/play/p/indZY5V2f4j) ```go import ( @@ -551,7 +550,7 @@ func main() { func (s stream[T]) Sorted(less func(a, b T) bool) stream[T] ``` -Example:[Run](https://go.dev/play/p/XXtng5uonFj) +Example:[Run](https://go.dev/play/p/XXtng5uonFj) ```go import ( @@ -583,7 +582,7 @@ func main() { func (s stream[T]) ForEach(action func(item T)) ``` -Example:[Run](https://go.dev/play/p/Dsm0fPqcidk) +Example:[Run](https://go.dev/play/p/Dsm0fPqcidk) ```go import ( @@ -616,7 +615,7 @@ func main() { func (s stream[T]) Reduce(initial T, accumulator func(a, b T) T) T ``` -Example:[Run](https://go.dev/play/p/6uzZjq_DJLU) +Example:[Run](https://go.dev/play/p/6uzZjq_DJLU) ```go import ( @@ -648,7 +647,7 @@ func main() { func (s stream[T]) FindFirst() (T, bool) ``` -Example:[Run](https://go.dev/play/p/9xEf0-6C1e3) +Example:[Run](https://go.dev/play/p/9xEf0-6C1e3) ```go import ( @@ -680,7 +679,7 @@ func main() { func (s stream[T]) FindLast() (T, bool) ``` -Example:[Run](https://go.dev/play/p/WZD2rDAW-2h) +Example:[Run](https://go.dev/play/p/WZD2rDAW-2h) ```go import ( @@ -712,7 +711,7 @@ func main() { func (s stream[T]) Max(less func(a, b T) bool) (T, bool) ``` -Example:[Run](https://go.dev/play/p/fm-1KOPtGzn) +Example:[Run](https://go.dev/play/p/fm-1KOPtGzn) ```go import ( @@ -744,7 +743,7 @@ func main() { func (s stream[T]) Min(less func(a, b T) bool) (T, bool) ``` -Example:[Run](https://go.dev/play/p/vZfIDgGNRe_0) +Example:[Run](https://go.dev/play/p/vZfIDgGNRe_0) ```go import ( @@ -776,7 +775,7 @@ func main() { func (s stream[T]) AllMatch(predicate func(item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/V5TBpVRs-Cx) +Example:[Run](https://go.dev/play/p/V5TBpVRs-Cx) ```go import ( @@ -814,7 +813,7 @@ func main() { func (s stream[T]) AnyMatch(predicate func(item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/PTCnWn4OxSn) +Example:[Run](https://go.dev/play/p/PTCnWn4OxSn) ```go import ( @@ -852,7 +851,7 @@ func main() { func (s stream[T]) NoneMatch(predicate func(item T) bool) bool ``` -Example:[Run](https://go.dev/play/p/iWS64pL1oo3) +Example:[Run](https://go.dev/play/p/iWS64pL1oo3) ```go import ( @@ -890,7 +889,7 @@ func main() { func (s stream[T]) Count() int ``` -Example:[Run](https://go.dev/play/p/r3koY6y_Xo-) +Example:[Run](https://go.dev/play/p/r3koY6y_Xo-) ```go import ( @@ -921,7 +920,7 @@ func main() { func (s stream[T]) ToSlice() []T ``` -Example:[Run](https://go.dev/play/p/jI6_iZZuVFE) +Example:[Run](https://go.dev/play/p/jI6_iZZuVFE) ```go import ( diff --git a/docs/en/api/packages/strutil.md b/docs/en/api/packages/strutil.md index 8e67410..767eacb 100644 --- a/docs/en/api/packages/strutil.md +++ b/docs/en/api/packages/strutil.md @@ -62,8 +62,6 @@ import ( - - ## Documentation ### After @@ -76,7 +74,7 @@ import ( func After(s, char string) string ``` -Example:[Run](https://go.dev/play/p/RbCOQqCDA7m) +Example:[Run](https://go.dev/play/p/RbCOQqCDA7m) ```go import ( @@ -116,7 +114,7 @@ func main() { func AfterLast(s, char string) string ``` -Example:[Run](https://go.dev/play/p/1TegARrb8Yn) +Example:[Run](https://go.dev/play/p/1TegARrb8Yn) ```go import ( @@ -156,7 +154,7 @@ func main() { func Before(s, char string) string ``` -Example:[Run](https://go.dev/play/p/JAWTZDS4F5w) +Example:[Run](https://go.dev/play/p/JAWTZDS4F5w) ```go import ( @@ -193,7 +191,7 @@ func main() { func BeforeLast(s, char string) string ``` -Example:[Run](https://go.dev/play/p/pJfXXAoG_Te) +Example:[Run](https://go.dev/play/p/pJfXXAoG_Te) ```go import ( @@ -230,7 +228,7 @@ func main() { func CamelCase(s string) string ``` -Example:[Run](https://go.dev/play/p/9eXP3tn2tUy) +Example:[Run](https://go.dev/play/p/9eXP3tn2tUy) ```go import ( @@ -265,7 +263,7 @@ func main() { func KebabCase(s string) string ``` -Example:[Run](https://go.dev/play/p/dcZM9Oahw-Y) +Example:[Run](https://go.dev/play/p/dcZM9Oahw-Y) ```go import ( @@ -300,7 +298,7 @@ func main() { func UpperKebabCase(s string) string ``` -Example:[Run](https://go.dev/play/p/zDyKNneyQXk) +Example:[Run](https://go.dev/play/p/zDyKNneyQXk) ```go import ( @@ -335,7 +333,7 @@ func main() { func Capitalize(s string) string ``` -Example:[Run](https://go.dev/play/p/2OAjgbmAqHZ) +Example:[Run](https://go.dev/play/p/2OAjgbmAqHZ) ```go import ( @@ -370,7 +368,7 @@ func main() { func IsString(v any) bool ``` -Example:[Run](https://go.dev/play/p/IOgq7oF9ERm) +Example:[Run](https://go.dev/play/p/IOgq7oF9ERm) ```go import ( @@ -410,7 +408,7 @@ func main() { func LowerFirst(s string) string ``` -Example:[Run](https://go.dev/play/p/CbzAyZmtJwL) +Example:[Run](https://go.dev/play/p/CbzAyZmtJwL) ```go import ( @@ -444,7 +442,7 @@ func main() { func UpperFirst(s string) string ``` -Example:[Run](https://go.dev/play/p/sBbBxRbs8MM) +Example:[Run](https://go.dev/play/p/sBbBxRbs8MM) ```go import ( @@ -478,7 +476,7 @@ func main() { func Pad(source string, size int, padStr string) string ``` -Example:[Run](https://go.dev/play/p/NzImQq-VF8q) +Example:[Run](https://go.dev/play/p/NzImQq-VF8q) ```go import ( @@ -523,7 +521,7 @@ func main() { func PadEnd(source string, size int, padStr string) string ``` -Example:[Run](https://go.dev/play/p/9xP8rN0vz--) +Example:[Run](https://go.dev/play/p/9xP8rN0vz--) ```go import ( @@ -569,7 +567,7 @@ func main() { func PadStart(source string, size int, padStr string) string ``` -Example:[Run](https://go.dev/play/p/xpTfzArDfvT) +Example:[Run](https://go.dev/play/p/xpTfzArDfvT) ```go import ( @@ -615,7 +613,7 @@ func main() { func Reverse(s string) string ``` -Example:[Run](https://go.dev/play/p/adfwalJiecD) +Example:[Run](https://go.dev/play/p/adfwalJiecD) ```go import ( @@ -646,7 +644,7 @@ func main() { func SnakeCase(s string) string ``` -Example:[Run](https://go.dev/play/p/tgzQG11qBuN) +Example:[Run](https://go.dev/play/p/tgzQG11qBuN) ```go import ( @@ -681,7 +679,7 @@ func main() { func UpperSnakeCase(s string) string ``` -Example:[Run](https://go.dev/play/p/4COPHpnLx38) +Example:[Run](https://go.dev/play/p/4COPHpnLx38) ```go import ( @@ -716,7 +714,7 @@ func main() { func SplitEx(s, sep string, removeEmptyString bool) []string ``` -Example:[Run](https://go.dev/play/p/Us-ySSbWh-3) +Example:[Run](https://go.dev/play/p/Us-ySSbWh-3) ```go import ( @@ -757,7 +755,7 @@ func main() { func Substring(s string, offset int, length uint) string ``` -Example:[Run](https://go.dev/play/p/q3sM6ehnPDp) +Example:[Run](https://go.dev/play/p/q3sM6ehnPDp) ```go import ( @@ -800,7 +798,7 @@ func main() { func Wrap(str string, wrapWith string) string ``` -Example:[Run](https://go.dev/play/p/KoZOlZDDt9y) +Example:[Run](https://go.dev/play/p/KoZOlZDDt9y) ```go import ( @@ -837,7 +835,7 @@ func main() { func Unwrap(str string, wrapToken string) string ``` -Example:[Run](https://go.dev/play/p/Ec2q4BzCpG-) +Example:[Run](https://go.dev/play/p/Ec2q4BzCpG-) ```go import ( @@ -877,7 +875,7 @@ func main() { func SplitWords(s string) []string ``` -Example:[Run](https://go.dev/play/p/KLiX4WiysMM) +Example:[Run](https://go.dev/play/p/KLiX4WiysMM) ```go import ( @@ -920,7 +918,7 @@ func main() { func WordCount(s string) int ``` -Example:[Run](https://go.dev/play/p/bj7_odx3vRf) +Example:[Run](https://go.dev/play/p/bj7_odx3vRf) ```go import ( @@ -963,7 +961,7 @@ func main() { func RemoveNonPrintable(str string) string ``` -Example:[Run](https://go.dev/play/p/og47F5x_jTZ) +Example:[Run](https://go.dev/play/p/og47F5x_jTZ) ```go import ( @@ -994,7 +992,7 @@ func main() { func StringToBytes(str string) (b []byte) ``` -Example:[Run](https://go.dev/play/p/7OyFBrf9AxA) +Example:[Run](https://go.dev/play/p/7OyFBrf9AxA) ```go import ( @@ -1025,7 +1023,7 @@ func main() { func BytesToString(bytes []byte) string ``` -Example:[Run](https://go.dev/play/p/6c68HRvJecH) +Example:[Run](https://go.dev/play/p/6c68HRvJecH) ```go import ( @@ -1054,7 +1052,7 @@ func main() { func IsBlank(str string) bool ``` -Example:[Run](https://go.dev/play/p/6zXRH_c0Qd3) +Example:[Run](https://go.dev/play/p/6zXRH_c0Qd3) ```go import ( @@ -1088,7 +1086,7 @@ func main() { func HasPrefixAny(str string, prefixes []string) bool ``` -Example:[Run](https://go.dev/play/p/8UUTl2C5slo) +Example:[Run](https://go.dev/play/p/8UUTl2C5slo) ```go import ( @@ -1119,7 +1117,7 @@ func main() { func HasSuffixAny(str string, suffixes []string) bool ``` -Example:[Run](https://go.dev/play/p/sKWpCQdOVkx) +Example:[Run](https://go.dev/play/p/sKWpCQdOVkx) ```go import ( @@ -1150,7 +1148,7 @@ func main() { func IndexOffset(str string, substr string, idxFrom int) int ``` -Example:[Run](https://go.dev/play/p/qZo4lV2fomB) +Example:[Run](https://go.dev/play/p/qZo4lV2fomB) ```go import ( @@ -1192,7 +1190,7 @@ func main() { func ReplaceWithMap(str string, replaces map[string]string) string ``` -Example:[Run](https://go.dev/play/p/h3t7CNj2Vvu) +Example:[Run](https://go.dev/play/p/h3t7CNj2Vvu) ```go import ( @@ -1225,7 +1223,7 @@ func main() { func Trim(str string, characterMask ...string) string ``` -Example:[Run](https://go.dev/play/p/Y0ilP0NRV3j) +Example:[Run](https://go.dev/play/p/Y0ilP0NRV3j) ```go import ( @@ -1262,7 +1260,7 @@ func main() { func SplitAndTrim(str, delimiter string, characterMask ...string) []string ``` -Example:[Run](https://go.dev/play/p/ZNL6o4SkYQ7) +Example:[Run](https://go.dev/play/p/ZNL6o4SkYQ7) ```go import ( @@ -1295,7 +1293,7 @@ func main() { func HideString(origin string, start, end int, replaceChar string) string ``` -Example:[Run](https://go.dev/play/p/pzbaIVCTreZ) +Example:[Run](https://go.dev/play/p/pzbaIVCTreZ) ```go import ( @@ -1334,7 +1332,7 @@ func main() { func ContainsAll(str string, substrs []string) bool ``` -Example:[Run](https://go.dev/play/p/KECtK2Os4zq) +Example:[Run](https://go.dev/play/p/KECtK2Os4zq) ```go import ( @@ -1367,7 +1365,7 @@ func main() { func ContainsAny(str string, substrs []string) bool ``` -Example:[Run](https://go.dev/play/p/dZGSSMB3LXE) +Example:[Run](https://go.dev/play/p/dZGSSMB3LXE) ```go import ( @@ -1403,7 +1401,7 @@ func main() { func RemoveWhiteSpace(str string, repalceAll bool) string ``` -Example:[Run](https://go.dev/play/p/HzLC9vsTwkf) +Example:[Run](https://go.dev/play/p/HzLC9vsTwkf) ```go import ( diff --git a/docs/en/api/packages/xerror.md b/docs/en/api/packages/xerror.md index 428d4b0..07019d4 100644 --- a/docs/en/api/packages/xerror.md +++ b/docs/en/api/packages/xerror.md @@ -58,7 +58,7 @@ type XError struct { func New(format string, args ...any) *XError ``` -Example:[Run](https://go.dev/play/p/w4oWZts7q7f) +Example:[Run](https://go.dev/play/p/w4oWZts7q7f) ```go package main @@ -87,7 +87,7 @@ func main() { func Wrap(cause error, message ...any) *XError ``` -Example:[Run](https://go.dev/play/p/5385qT2dCi4) +Example:[Run](https://go.dev/play/p/5385qT2dCi4) ```go package main @@ -118,7 +118,7 @@ func main() { func Unwrap(err error) *XError ``` -Example:[Run](https://go.dev/play/p/LKMLep723tu) +Example:[Run](https://go.dev/play/p/LKMLep723tu) ```go package main @@ -153,7 +153,7 @@ func main() { func (e *XError) Wrap(cause error) *XError ``` -Example:[Run](https://go.dev/play/p/RpjJ5u5sc97) +Example:[Run](https://go.dev/play/p/RpjJ5u5sc97) ```go package main @@ -185,7 +185,7 @@ func main() { func (e *XError) Unwrap() error ``` -Example:[Run](https://go.dev/play/p/VUXJ8BST4c6) +Example:[Run](https://go.dev/play/p/VUXJ8BST4c6) ```go package main @@ -218,7 +218,7 @@ func main() { func (e *XError) With(key string, value any) *XError ``` -Example:[Run](https://go.dev/play/p/ow8UISXX_Dp) +Example:[Run](https://go.dev/play/p/ow8UISXX_Dp) ```go package main @@ -250,7 +250,7 @@ func main() { func (e *XError) Id(id string) *XError ``` -Example:[Run](https://go.dev/play/p/X6HBlsy58U9) +Example:[Run](https://go.dev/play/p/X6HBlsy58U9) ```go package main @@ -287,7 +287,7 @@ func main() { func (e *XError) Is(target error) bool ``` -Example:[Run](https://go.dev/play/p/X6HBlsy58U9) +Example:[Run](https://go.dev/play/p/X6HBlsy58U9) ```go package main @@ -324,7 +324,7 @@ func main() { func (e *XError) Values() map[string]any ``` -Example:[Run](https://go.dev/play/p/ow8UISXX_Dp) +Example:[Run](https://go.dev/play/p/ow8UISXX_Dp) ```go package main @@ -357,7 +357,7 @@ func main() { func (e *XError) StackTrace() StackTrace ``` -Example:[Run](https://go.dev/play/p/6FAvSQpa7pc) +Example:[Run](https://go.dev/play/p/6FAvSQpa7pc) ```go package main @@ -391,7 +391,7 @@ func main() { func (e *XError) Info() *errInfo ``` -Example:[Run](https://go.dev/play/p/1ZX0ME1F-Jb) +Example:[Run](https://go.dev/play/p/1ZX0ME1F-Jb) ```go package main @@ -431,7 +431,7 @@ func main() { func (e *XError) Error() string ``` -Example:[Run](https://go.dev/play/p/w4oWZts7q7f) +Example:[Run](https://go.dev/play/p/w4oWZts7q7f) ```go package main @@ -459,7 +459,7 @@ func main() { func TryUnwrap[T any](val T, err error) T ``` -Example:[Run](https://go.dev/play/p/acyZVkNZEeW) +Example:[Run](https://go.dev/play/p/acyZVkNZEeW) ```go package main diff --git a/docs/styles/api_doc.css b/docs/styles/api_doc.css deleted file mode 100644 index 8c96556..0000000 --- a/docs/styles/api_doc.css +++ /dev/null @@ -1,4 +0,0 @@ -.run-container { - float: right; - display: inline-block; -} \ No newline at end of file