Skip to content

Commit a099ff8

Browse files
committed
docs: add a examples root page
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent abe20c5 commit a099ff8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docs/examples/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Examples
2+
3+
This section provides various examples demonstrating the features and usage of `aperturerobotics/cli`.
4+
5+
- [Arguments](./arguments.md): Learn how to access command-line arguments.
6+
- [Bash Completions](./bash-completions.md): Enable and customize bash completion for your application.
7+
- [Combining Short Options](./combining-short-options.md): Allow users to combine short boolean flags (e.g., `-abc`).
8+
- [Exit Codes](./exit-codes.md): Control the exit code of your application based on success or failure.
9+
- [Flags](./flags.md): Define and use various types of flags (string, bool, int, slice, etc.).
10+
- [Full API Example](./full-api-example.md): A comprehensive example showcasing many API features.
11+
- [Generated Help Text](./generated-help-text.md): Understand and customize the automatically generated help messages.
12+
- [Greet Example](./greet.md): A simple introductory "hello world" style application.
13+
- [Subcommand Categories](./subcommands-categories.md): Organize subcommands into categories in the help output.
14+
- [Subcommands](./subcommands.md): Structure your application using commands and subcommands.
15+
- [Suggestions](./suggestions.md): Enable suggestions for mistyped commands or flags.
16+
- [Timestamp Flag](./timestamp-flag.md): Use flags to accept date/time input.
17+
- [Version Flag](./version-flag.md): Customize the built-in version flag behavior.

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ func main() {
154154

155155
Now, the main action is performed by running `go run main.go greet --name Dave`. Running `go run main.go --help` will show the available subcommands.
156156

157-
This tutorial covers the basics of creating a CLI application, adding flags, and organizing functionality with subcommands using `aperturerobotics/cli`. Explore the [Examples](./examples/) section for more advanced use cases.
157+
This tutorial covers the basics of creating a CLI application, adding flags, and organizing functionality with subcommands using `aperturerobotics/cli`. Explore the [Examples](../examples/) section for more advanced use cases.

0 commit comments

Comments
 (0)