Skip to content

Commit

Permalink
Update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 13, 2024
1 parent 379b7c5 commit a04a3c3
Show file tree
Hide file tree
Showing 15 changed files with 231 additions and 205 deletions.
6 changes: 3 additions & 3 deletions docs/api/bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#### 定义

`Read(data any, descriptors ...*PartDescriptor) ([]ResultIf , error )`
`Read(data any, descriptors ...*PartDescriptor) ([]ResultIf any, error any)`

#### 参数
|参数名|参数类型|参数解释|
Expand All @@ -39,8 +39,8 @@
#### 返回值
|返回值(顺序)|返回值类型|返回值解释|
|:-----------|:---------- |:-----------|
| []ResultIf | `` | |
| error | `` | |
| []ResultIf | `any` | |
| error | `any` | |


### toBool
Expand Down
26 changes: 26 additions & 0 deletions docs/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
| [cli.setMultipleSelect](#setmultipleselect) |SetMultipleSelect 是一个选项函数,设置参数是否可以多选 此选项仅在`cli.StringSlice`中生效 |
| [cli.setRequired](#setrequired) |setRequired 是一个选项函数,设置参数是否必须 |
| [cli.setSelectOption](#setselectoption) |setSelectOption 是一个选项函数,设置参数的下拉框选项 此选项仅在`cli.StringSlice`中生效 |
| [cli.setShortName](#setshortname) |setShortName 是一个选项函数,设置参数的短名称 |
| [cli.setVerboseName](#setverbosename) |setVerboseName 是一个选项函数,设置参数的中文名 |
| [cli.showGroup](#showgroup) ||
| [cli.showParams](#showparams) ||
Expand Down Expand Up @@ -995,6 +996,31 @@ cli.StringSlice("targets", cli.setSelectOption("下拉框选项"
| r1 | `SetCliExtraParam` | |


### setShortName

#### 详细描述
setShortName 是一个选项函数,设置参数的短名称
Example:
```
cli.String("target", cli.setShortName("t"))
```
在命令行可以使用`-t`代替`--target`

#### 定义

`setShortName(shortName string) SetCliExtraParam`

#### 参数
|参数名|参数类型|参数解释|
|:-----------|:---------- |:-----------|
| shortName | `string` | |

#### 返回值
|返回值(顺序)|返回值类型|返回值解释|
|:-----------|:---------- |:-----------|
| r1 | `SetCliExtraParam` | |


### setVerboseName

#### 详细描述
Expand Down
Loading

0 comments on commit a04a3c3

Please sign in to comment.