diff --git a/docs/api/packages/algorithm.md b/docs/api/packages/algorithm.md index d47386d..47f33e5 100644 --- a/docs/api/packages/algorithm.md +++ b/docs/api/packages/algorithm.md @@ -39,7 +39,7 @@ import (
- + ## 文档 diff --git a/docs/api/packages/compare.md b/docs/api/packages/compare.md index 18495f9..e5a0ade 100644 --- a/docs/api/packages/compare.md +++ b/docs/api/packages/compare.md @@ -35,7 +35,7 @@ import ( - + ## 文档 diff --git a/docs/api/packages/concurrency.md b/docs/api/packages/concurrency.md index 6c5cc12..a16935a 100644 --- a/docs/api/packages/concurrency.md +++ b/docs/api/packages/concurrency.md @@ -33,13 +33,15 @@ import ( - + ## 文档 ### Channel + ### NewChannel +返回一个Channel指针实例
函数签名: @@ -48,7 +50,7 @@ import ( type Channel[T any] struct func NewChannel[T any]() *Channel[T] ``` -示例:[运行](https://go.dev/play/p/7aB4KyMMp9A) +示例:[运行](https://go.dev/play/p/7aB4KyMMp9A) ```go package main @@ -67,12 +69,12 @@ func main() {将多个channel链接到一个channel,直到取消上下文。
-函数签名: +函数签名: ```go func (c *Channel[T]) Bridge(ctx context.Context, chanStream <-chan <-chan T) <-chan T ``` -示例:[运行](https://go.dev/play/p/qmWSy1NVF-Y) +示例:[运行](https://go.dev/play/p/qmWSy1NVF-Y) ```go package main @@ -124,7 +126,7 @@ func main() { ```go func (c *Channel[T]) FanIn(ctx context.Context, channels ...<-chan T) <-chan T ``` -示例:[运行](https://go.dev/play/p/2VYFMexEvTm) +示例:[运行](https://go.dev/play/p/2VYFMexEvTm) ```go package main @@ -163,7 +165,7 @@ func main() { ```go func (c *Channel[T]) Generate(ctx context.Context, values ...T) <-chan T ``` -示例:[运行](https://go.dev/play/p/7aB4KyMMp9A) +示例:[运行](https://go.dev/play/p/7aB4KyMMp9A) ```go package main @@ -201,7 +203,7 @@ func main() { ```go func (c *Channel[T]) Repeat(ctx context.Context, values ...T) <-chan T ``` -示例:[运行](https://go.dev/play/p/k5N_ALVmYjE) +示例:[运行](https://go.dev/play/p/k5N_ALVmYjE) ```go package main @@ -240,7 +242,7 @@ func main() { ```go func (c *Channel[T]) RepeatFn(ctx context.Context, fn func() T) <-chan T ``` -示例:[运行](https://go.dev/play/p/4J1zAWttP85) +示例:[运行](https://go.dev/play/p/4J1zAWttP85) ```go package main @@ -281,7 +283,7 @@ func main() { ```go func (c *Channel[T]) Or(channels ...<-chan T) <-chan T ``` -示例:[运行](https://go.dev/play/p/Wqz9rwioPww) +示例:[运行](https://go.dev/play/p/Wqz9rwioPww) ```go package main @@ -324,7 +326,7 @@ func main() { ```go func (c *Channel[T]) OrDone(ctx context.Context, channel <-chan T) <-chan T ``` -示例:[运行](https://go.dev/play/p/lm_GoS6aDjo) +示例:[运行](https://go.dev/play/p/lm_GoS6aDjo) ```go package main @@ -362,7 +364,7 @@ func main() { ```go func (c *Channel[T]) Take(ctx context.Context, valueStream <-chan T, number int) <-chan T ``` -示例:[运行](https://go.dev/play/p/9Utt-1pDr2J) +示例:[运行](https://go.dev/play/p/9Utt-1pDr2J) ```go package main @@ -408,7 +410,7 @@ func main() { ```go func (c *Channel[T]) Tee(ctx context.Context, in <-chan T) (<-chan T, <-chan T) ``` -示例:[运行](https://go.dev/play/p/3TQPKnCirrP) +示例:[运行](https://go.dev/play/p/3TQPKnCirrP) ```go package main diff --git a/docs/api/packages/condition.md b/docs/api/packages/condition.md index c9a9e40..b79015c 100644 --- a/docs/api/packages/condition.md +++ b/docs/api/packages/condition.md @@ -31,7 +31,7 @@ import ( - + ## 文档 @@ -47,7 +47,7 @@ slices和map的length大于0时,返回true,否则返回falseCreate channel, put values into the channel repeatly until cancel the context.
-Signature: [运行](https://go.dev/play/p/k5N_ALVmYjE) +Signature: [Run](https://go.dev/play/p/k5N_ALVmYjE) ```go func (c *Channel[T]) Repeat(ctx context.Context, values ...T) <-chan T @@ -201,7 +201,7 @@ func main() { ```go func (c *Channel[T]) Generate(ctx context.Context, values ...T) <-chan T ``` -Example: [运行](https://go.dev/play/p/7aB4KyMMp9A) +Example: [Run](https://go.dev/play/p/7aB4KyMMp9A) ```go package main @@ -234,7 +234,7 @@ func main() {Create a channel, excutes fn repeatly, and put the result into the channel, until close context.
-Signature: [运行](https://go.dev/play/p/4J1zAWttP85) +Signature: [Run](https://go.dev/play/p/4J1zAWttP85) ```go func (c *Channel[T]) RepeatFn(ctx context.Context, fn func() T) <-chan T @@ -276,7 +276,7 @@ func main() {Read one or more channels into one channel, will close when any readin channel is closed.
-Signature: [运行](https://go.dev/play/p/Wqz9rwioPww) +Signature: [Run](https://go.dev/play/p/Wqz9rwioPww) ```go func (c *Channel[T]) Or(channels ...<-chan T) <-chan T @@ -319,7 +319,7 @@ func main() {Read a channel into another channel, will close until cancel context.
-Signature: [运行](https://go.dev/play/p/lm_GoS6aDjo) +Signature: [Run](https://go.dev/play/p/lm_GoS6aDjo) ```go func (c *Channel[T]) OrDone(ctx context.Context, channel <-chan T) <-chan T @@ -357,7 +357,7 @@ func main() {Create a channel whose values are taken from another channel with limit number.
-Signature: [运行](https://go.dev/play/p/9Utt-1pDr2J) +Signature: [Run](https://go.dev/play/p/9Utt-1pDr2J) ```go func (c *Channel[T]) Take(ctx context.Context, valueStream <-chan T, number int) <-chan T @@ -403,7 +403,7 @@ func main() {Split one chanel into two channels, until cancel the context.
-Signature: [运行](https://go.dev/play/p/3TQPKnCirrP) +Signature: [Run](https://go.dev/play/p/3TQPKnCirrP) ```go func (c *Channel[T]) Tee(ctx context.Context, in <-chan T) (<-chan T, <-chan T) diff --git a/docs/en/api/packages/condition.md b/docs/en/api/packages/condition.md index 4a3de95..0c832ff 100644 --- a/docs/en/api/packages/condition.md +++ b/docs/en/api/packages/condition.md @@ -31,6 +31,8 @@ import ( + + ## Documentation @@ -46,7 +48,7 @@ All other types are truthy if they are not their zero value. ```go func Bool[T any](value T) bool ``` -Example: +Example:[运行](https://go.dev/play/p/ETzeDJRSvhm) ```go package main @@ -111,7 +113,7 @@ func main() { ```go func And[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/W1SSUmt6pvr) ```go package main @@ -139,7 +141,7 @@ func main() { ```go func Or[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/UlQTxHaeEkq) ```go package main @@ -167,7 +169,7 @@ func main() { ```go func Xor[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/gObZrW7ZbG8) ```go package main @@ -195,7 +197,7 @@ func main() { ```go func Nor[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/g2j08F_zZky) ```go package main @@ -222,7 +224,7 @@ func main() { ```go func Xnor[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/OuDB9g51643) ```go package main @@ -249,7 +251,7 @@ func main() { ```go func Nand[T, U any](a T, b U) bool ``` -Example: +Example:[运行](https://go.dev/play/p/vSRMLxLIbq8) ```go package main @@ -277,7 +279,7 @@ func main() { ```go func TernaryOperator[T, U any](isTrue T, ifValue U, elseValue U) U ``` -Example: +Example:[运行](https://go.dev/play/p/ElllPZY0guT) ```go package main diff --git a/docs/api/api_doc.css b/docs/styles/api_doc.css similarity index 100% rename from docs/api/api_doc.css rename to docs/styles/api_doc.css