docs: 优化泛型约束类型文档显示
This commit is contained in:
parent
f9d31888ee
commit
65c10f2ad0
|
@ -1,6 +1,6 @@
|
|||
# Configuration
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/configuration)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
configuration 基于配置导表功能实现的配置加载及刷新功能
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Game
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/game)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
game 目录下包含了各类通用的游戏玩法性内容,其中该目录主要为基础性内容,具体目录将对应不同的游戏功能性内容。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Activity
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/activity)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
activity 活动状态管理
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Activities
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/activities)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Demoactivity
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/demoactivity)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Types
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/types)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Fight
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/fight)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Space
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/space)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
space 游戏中常见的空间设计,例如房间、地图等
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Task
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/task)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Notify
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/notify)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
notify 包含了对外部第三方通知的实现,如机器人消息等
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Notifies
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/notifies)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
notifies 包含了内置通知内容的实现
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Senders
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/senders)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
senders Package 包含了内置通知发送器的实现
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Planner
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/planner)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
planner 包含了策划工具相关的内容
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Pce
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/pce)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Cs
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/cs)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
# Main
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/main)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
|
||||
## 目录导航
|
||||
列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️
|
||||
<details>
|
||||
<summary>展开 / 折叠目录导航</summary>
|
||||
|
||||
|
||||
> 包级函数定义
|
||||
|
||||
|函数名称|描述
|
||||
|:--|:--
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Cmd
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/cmd)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Tmpls
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/tmpls)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Server
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/server)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
server 提供了包含多种网络类型的服务器实现
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Client
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/client)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Gateway
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/gateway)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
gateway 是用于处理服务器消息的网关模块,适用于对客户端消息进行处理、转发的情况。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Dispatcher
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/dispatcher)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Logger
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/logger)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Lockstep
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/lockstep)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Router
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/router)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Writeloop
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/writeloop)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Utils
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/utils)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
utils 旨在提供一组用于处理通用功能的函数和数据结构。该包旨在简化通用功能的实现,并提供一致的接口和易于使用的功能。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Aoi
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/aoi)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
aoi 提供了一种有效的方法来处理 AOI(Area of Interest)问题。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Arrangement
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/arrangement)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
arrangement 包提供了一些有用的函数来处理数组的排列。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Buffer
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/buffer)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
buffer 提供了缓冲区相关的实用程序。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Collection
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/collection)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
collection 用于对 input 和 map 操作的工具函数
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Listings
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/listings)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Mappings
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/mappings)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Combination
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/combination)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
combination 包提供了一些实用的组合函数。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Compress
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/compress)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
compress 提供了一些用于压缩和解压缩数据的函数。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Crypto
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/crypto)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Deck
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/deck)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
deck 包中的内容用于针对一堆内容的管理,适用但不限于牌堆、麻将牌堆等情况。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# File
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/file)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Fsm
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/fsm)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Astgo
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/astgo)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -121,7 +121,11 @@ func newType(expr ast.Expr) *Type {
|
|||
t := newType(e.X)
|
||||
str.WriteString(fmt.Sprintf("*%s", t.Sign))
|
||||
case *ast.UnaryExpr:
|
||||
str.WriteString(fmt.Sprintf("%s%s", e.Op.String(), newType(e.X).Sign))
|
||||
case *ast.BinaryExpr:
|
||||
str.WriteString(newType(e.X).Sign)
|
||||
str.WriteString(fmt.Sprintf(" %s ", e.Op.String()))
|
||||
str.WriteString(newType(e.Y).Sign)
|
||||
}
|
||||
typ.Sign = str.String()
|
||||
return typ
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Genreadme
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/genreadme)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -43,13 +43,26 @@ func (b *Builder) Generate() error {
|
|||
func (b *Builder) genHeader() {
|
||||
b.title(1, str.FirstUpper(b.p.Name))
|
||||
b.newLine()
|
||||
b.newLine(fmt.Sprintf(`[](https://pkg.go.dev/github.com/kercylan98/minotaur/%s)`, b.p.Name))
|
||||
b.newLine(fmt.Sprintf(`[](https://pkg.go.dev/github.com/kercylan98/minotaur)`))
|
||||
b.newLine(fmt.Sprintf(``))
|
||||
b.newLine().newLine(b.p.FileComments().Clear...).newLine()
|
||||
if len(b.p.FileComments().Clear) != 0 {
|
||||
b.newLine().newLine(b.p.FileComments().Clear...).newLine()
|
||||
} else {
|
||||
b.newLine().newLine("暂无介绍...").newLine()
|
||||
}
|
||||
b.newLine()
|
||||
}
|
||||
|
||||
func (b *Builder) genMenus() {
|
||||
var genTitleOnce sync.Once
|
||||
var genTitle = func() {
|
||||
genTitleOnce.Do(func() {
|
||||
b.title(2, "目录导航")
|
||||
b.newLine("列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️")
|
||||
b.detailsStart("展开 / 折叠目录导航")
|
||||
})
|
||||
}
|
||||
|
||||
packageFunction := b.p.PackageFunc()
|
||||
var structList []*astgo.Struct
|
||||
for _, f := range b.p.Files {
|
||||
|
@ -64,19 +77,20 @@ func (b *Builder) genMenus() {
|
|||
}
|
||||
}
|
||||
|
||||
if len(packageFunction)+len(structList) > 0 {
|
||||
b.title(2, "目录导航")
|
||||
b.newLine("列出了该 `package` 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️")
|
||||
b.detailsStart("展开 / 折叠目录导航")
|
||||
}
|
||||
|
||||
if len(packageFunction) > 0 {
|
||||
b.quote("包级函数定义").newLine()
|
||||
b.tableCel("函数名称", "描述")
|
||||
var pfGenOnce sync.Once
|
||||
var pfGen = func() {
|
||||
pfGenOnce.Do(func() {
|
||||
genTitle()
|
||||
b.quote("包级函数定义").newLine()
|
||||
b.tableCel("函数名称", "描述")
|
||||
})
|
||||
}
|
||||
for _, function := range packageFunction {
|
||||
if function.Test || function.Internal {
|
||||
continue
|
||||
}
|
||||
pfGen()
|
||||
b.tableRow(
|
||||
fmt.Sprintf("[%s](#%s)", function.Name, function.Name),
|
||||
collection.FindFirstOrDefaultInSlice(function.Comments.Clear, "暂无描述..."),
|
||||
|
@ -86,12 +100,19 @@ func (b *Builder) genMenus() {
|
|||
}
|
||||
|
||||
if len(structList) > 0 {
|
||||
b.quote("类型定义").newLine()
|
||||
b.tableCel("类型", "名称", "描述")
|
||||
var structGenOnce sync.Once
|
||||
var structGen = func() {
|
||||
structGenOnce.Do(func() {
|
||||
genTitle()
|
||||
b.quote("类型定义").newLine()
|
||||
b.tableCel("类型", "名称", "描述")
|
||||
})
|
||||
}
|
||||
for _, structInfo := range structList {
|
||||
if structInfo.Test || structInfo.Internal {
|
||||
continue
|
||||
}
|
||||
structGen()
|
||||
b.tableRow(
|
||||
super.If(structInfo.Interface, "`INTERFACE`", "`STRUCT`"),
|
||||
fmt.Sprintf("[%s](#%s)", structInfo.Name, strings.ToLower(structInfo.Name)),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Generic
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/generic)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
generic 目的在于提供一组基于泛型的用于处理通用功能的函数和数据结构。该包旨在简化通用功能的实现,并提供一致的接口和易于使用的功能。
|
||||
|
@ -111,53 +111,62 @@ type IDR2W[ID comparable] interface {
|
|||
可排序类型
|
||||
```go
|
||||
type Ordered interface {
|
||||
Integer | Float | ~string
|
||||
}
|
||||
```
|
||||
### Number `INTERFACE`
|
||||
数字类型
|
||||
```go
|
||||
type Number interface {
|
||||
Integer | Float
|
||||
}
|
||||
```
|
||||
### SignedNumber `INTERFACE`
|
||||
有符号数字类型
|
||||
```go
|
||||
type SignedNumber interface {
|
||||
Signed | Float
|
||||
}
|
||||
```
|
||||
### Integer `INTERFACE`
|
||||
整数类型
|
||||
```go
|
||||
type Integer interface {
|
||||
Signed | Unsigned
|
||||
}
|
||||
```
|
||||
### Signed `INTERFACE`
|
||||
有符号整数类型
|
||||
```go
|
||||
type Signed interface {
|
||||
~int | ~int8 | ~int16 | ~int32 | ~int64
|
||||
}
|
||||
```
|
||||
### Unsigned `INTERFACE`
|
||||
无符号整数类型
|
||||
```go
|
||||
type Unsigned interface {
|
||||
UnsignedNumber | ~uintptr
|
||||
}
|
||||
```
|
||||
### UnsignedNumber `INTERFACE`
|
||||
无符号数字类型
|
||||
```go
|
||||
type UnsignedNumber interface {
|
||||
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
|
||||
}
|
||||
```
|
||||
### Float `INTERFACE`
|
||||
浮点类型
|
||||
```go
|
||||
type Float interface {
|
||||
~float32 | ~float64
|
||||
}
|
||||
```
|
||||
### Basic `INTERFACE`
|
||||
基本类型
|
||||
```go
|
||||
type Basic interface {
|
||||
Signed | Unsigned | Float | ~string | ~bool | ~byte
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Geometry
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/geometry)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
geometry 旨在提供一组用于处理几何形状和计算几何属性的函数和数据结构。该包旨在简化几何计算的过程,并提供一致的接口和易于使用的功能。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Astar
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/astar)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
astar 提供用于实现 A* 算法的函数和数据结构。A* 算法是一种常用的路径搜索算法,用于在图形或网络中找到最短路径。该包旨在简化 A* 算法的实现过程,并提供一致的接口和易于使用的功能。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Dp
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/dp)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
dp (DistributionPattern) 提供用于在二维数组中根据不同的特征标记为数组成员建立分布链接的函数和数据结构。该包的目标是实现快速查找与给定位置成员具有相同特征且位置紧邻的其他成员。
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Matrix
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/matrix)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
matrix 提供了一个简单的二维数组的实现
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Navmesh
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/navmesh)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
navmesh 提供了用于导航网格处理的函数和数据结构。导航网格是一种常用的数据结构,用于在游戏开发和虚拟环境中进行路径规划和导航。该包旨在简化导航网格的创建、查询和操作过程,并提供高效的导航功能。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Hub
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/hub)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Huge
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/huge)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Leaderboard
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/leaderboard)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Log
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/log)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Survey
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/survey)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Maths
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/maths)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Memory
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/memory)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Moving
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/moving)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Network
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/network)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Offset
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/offset)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Random
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/random)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Reflects
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/reflects)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Runtimes
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/runtimes)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Sole
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/sole)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Sorts
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/sorts)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Str
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/str)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Super
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/super)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Timer
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/timer)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Times
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/times)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Xlsxtool
|
||||
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur/xlsxtool)
|
||||
[](https://pkg.go.dev/github.com/kercylan98/minotaur)
|
||||

|
||||
|
||||
|
||||
暂无介绍...
|
||||
|
||||
|
||||
## 目录导航
|
||||
|
|
Loading…
Reference in New Issue