Skip to content

Commit b0e42aa

Browse files
committed
Cleanup docs
1 parent 6573da7 commit b0e42aa

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

docs/v3/examples/arguments/advanced.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ search:
77

88
The [Basics] showed how to access arguments for a command. They are all retrieved as strings which is fine
99
but it we need to say get integers or timestamps the user would have to convert from string to desired type.
10-
To ease the burden on users the `cli` library offers predefined <Type>Arg and <Type>Args structure to faciliate this
11-
The value of the argument can be retrieved using the command.<Type>Arg() function. For e.g
10+
To ease the burden on users the `cli` library offers predefined `{Type}Arg` and `{Type}Args` structure to faciliate this
11+
The value of the argument can be retrieved using the `command.{Type}Arg()` function. For e.g
1212

1313
<!-- {
1414
"args" : ["10"],
@@ -52,7 +52,7 @@ $ greet 10
5252
We got 10
5353
```
5454

55-
Instead of using the cmd.XXXArg() function to retrieve the argument value a destination for the argument can be set
55+
Instead of using the `cmd.{Type}Arg()` function to retrieve the argument value a destination for the argument can be set
5656
for e.g
5757

5858
<!-- {
@@ -152,9 +152,9 @@ func main() {
152152

153153
Some things to note about multi value arguments
154154

155-
1. They have XXXArgs type instead of XXXArg to differentiate them from single value arguments
156-
2. The Max field needs to be defined to a non zero value without which it cannot be parsed
157-
3. Max field value needs to be greater then the Min field value
155+
1. They are of `{Type}Args` type rather than `{Type}Arg` to differentiate them from single value arguments
156+
2. The `Max` field needs to be defined to a non zero value without which it cannot be parsed
157+
3. `Max` field value needs to be greater than the `Min` field value
158158

159159
As with single value args the destination field can be set
160160

@@ -214,11 +214,11 @@ Following multi value arguments are supported
214214
- `TimestampArgs`
215215

216216
It goes without saying that the chain of arguments set in the Arguments slice need to be consistent. Generally a glob
217-
argument(max=-1) should be set for the argument at the end of the slice. To glob args we arent interested in we coud add
217+
argument(`max=-1`) should be set for the argument at the end of the slice. To glob args we arent interested in we coud add
218218
the following to the end of the Arguments slice and retrieve them as a slice
219219

220220
```
221-
&StringArgs{
222-
Max: -1,
223-
},
221+
&StringArgs{
222+
Max: -1,
223+
},
224224
```

docs/v3/examples/flags/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ The following basic flags are supported
153153
- `StringFlag`
154154
- `TimestampFlag`
155155

156-
For full list of flags see https://pkg.go.dev/github.com/urfave/cli/v3
156+
For full list of flags see [`https://pkg.go.dev/github.com/urfave/cli/v3`](https://pkg.go.dev/github.com/urfave/cli/v3)
157157

158158
### Timestamp Flag ###
159159

docs/v3/examples/flags/value-sources.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ search:
77

88
Flags can have their default values set from different sources. The following sources are
99
provided by default with `urfave/cli`
10+
1011
- Environment
1112
- Text Files
1213

1314
The library also provides a framework for users to plugin their own implementation of value sources
1415
to be fetched via other mechanisms(http and so on).
1516

1617
In addition there is a `urfave/cli-altsrc` repo which hosts some common value sources to read
18+
from files or via http/https.
19+
1720
- YAML
1821
- JSON
1922
- TOML
20-
from files or via http/https.
2123

2224
#### Values from the Environment
2325

0 commit comments

Comments
 (0)