summaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/cobra/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/cobra/README.md')
-rw-r--r--vendor/github.com/spf13/cobra/README.md34
1 files changed, 8 insertions, 26 deletions
diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md
index 074e3979f..1ade1081c 100644
--- a/vendor/github.com/spf13/cobra/README.md
+++ b/vendor/github.com/spf13/cobra/README.md
@@ -11,28 +11,6 @@ name a few. [This list](./projects_using_cobra.md) contains a more extensive lis
[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra)
[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199)
-# Table of Contents
-
-- [Overview](#overview)
-- [Concepts](#concepts)
- * [Commands](#commands)
- * [Flags](#flags)
-- [Installing](#installing)
-- [Usage](#usage)
- * [Using the Cobra Generator](user_guide.md#using-the-cobra-generator)
- * [Using the Cobra Library](user_guide.md#using-the-cobra-library)
- * [Working with Flags](user_guide.md#working-with-flags)
- * [Positional and Custom Arguments](user_guide.md#positional-and-custom-arguments)
- * [Example](user_guide.md#example)
- * [Help Command](user_guide.md#help-command)
- * [Usage Message](user_guide.md#usage-message)
- * [PreRun and PostRun Hooks](user_guide.md#prerun-and-postrun-hooks)
- * [Suggestions when "unknown command" happens](user_guide.md#suggestions-when-unknown-command-happens)
- * [Generating documentation for your command](user_guide.md#generating-documentation-for-your-command)
- * [Generating shell completions](user_guide.md#generating-shell-completions)
-- [Contributing](CONTRIBUTING.md)
-- [License](#license)
-
# Overview
Cobra is a library providing a simple interface to create powerful modern CLI
@@ -46,7 +24,7 @@ Cobra provides:
* Fully POSIX-compliant flags (including short & long versions)
* Nested subcommands
* Global, local and cascading flags
-* Easy generation of applications & commands with `cobra init appname` & `cobra add cmdname`
+* Easy generation of applications & commands with `cobra init` & `cobra add cmdname`
* Intelligent suggestions (`app srver`... did you mean `app server`?)
* Automatic help generation for commands and flags
* Automatic help flag recognition of `-h`, `--help`, etc.
@@ -54,7 +32,7 @@ Cobra provides:
* Automatically generated man pages for your application
* Command aliases so you can change things without breaking them
* The flexibility to define your own help, usage, etc.
-* Optional tight integration with [viper](http://github.com/spf13/viper) for 12-factor apps
+* Optional seamless integration with [viper](http://github.com/spf13/viper) for 12-factor apps
# Concepts
@@ -88,7 +66,7 @@ have children commands and optionally run an action.
In the example above, 'server' is the command.
-[More about cobra.Command](https://godoc.org/github.com/spf13/cobra#Command)
+[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command)
## Flags
@@ -117,8 +95,12 @@ import "github.com/spf13/cobra"
```
# Usage
+Cobra provides its own program that will create your application and add any
+commands you want. It's the easiest way to incorporate Cobra into your application.
+
+For complete details on using the Cobra generator, please read [The Cobra Generator README](https://github.com/spf13/cobra/blob/master/cobra/README.md)
-See [User Guide](user_guide.md).
+For complete details on using the Cobra library, please read the [The Cobra User Guide](user_guide.md).
# License