Remove references to flag HelpProviders

As these don't appear to be currently supported, remove references
to them working (from main README)
This commit is contained in:
Keilin Olsen
2022-05-17 12:05:37 +10:00
committed by Alec Thomas
parent 6042c4b10e
commit 195d56c42e
+35 -41
View File
@@ -8,39 +8,40 @@
<!-- MarkdownTOC autolink="true" style="ordered" indent=" " --> <!-- MarkdownTOC autolink="true" style="ordered" indent=" " -->
1. [Introduction](#introduction) - [Kong is a command-line parser for Go](#kong-is-a-command-line-parser-for-go)
1. [Help](#help) - [Introduction](#introduction)
1. [Help as a user of a Kong application](#help-as-a-user-of-a-kong-application) - [Help](#help)
1. [Defining help in Kong](#defining-help-in-kong) - [Help as a user of a Kong application](#help-as-a-user-of-a-kong-application)
1. [Showing the _command_'s detailed help](#showing-the-commands-detailed-help) - [Defining help in Kong](#defining-help-in-kong)
1. [Showing an _argument_'s detailed help](#showing-an-arguments-detailed-help) - [Showing the _command_'s detailed help](#showing-the-commands-detailed-help)
1. [Showing a _flag_'s detailed help](#showing-a-flags-detailed-help) - [Showing an _argument_'s detailed help](#showing-an-arguments-detailed-help)
1. [Command handling](#command-handling) - [Command handling](#command-handling)
1. [Switch on the command string](#switch-on-the-command-string) - [Switch on the command string](#switch-on-the-command-string)
1. [Attach a `Run(...) error` method to each command](#attach-a-run-error-method-to-each-command) - [Attach a `Run(...) error` method to each command](#attach-a-run-error-method-to-each-command)
1. [Hooks: BeforeResolve\(\), BeforeApply\(\), AfterApply\(\) and the Bind\(\) option](#hooks-beforeresolve-beforeapply-afterapply-and-the-bind-option) - [Hooks: BeforeResolve(), BeforeApply(), AfterApply() and the Bind() option](#hooks-beforeresolve-beforeapply-afterapply-and-the-bind-option)
1. [Flags](#flags) - [Flags](#flags)
1. [Commands and sub-commands](#commands-and-sub-commands) - [Commands and sub-commands](#commands-and-sub-commands)
1. [Branching positional arguments](#branching-positional-arguments) - [Branching positional arguments](#branching-positional-arguments)
1. [Positional arguments](#positional-arguments) - [Positional arguments](#positional-arguments)
1. [Slices](#slices) - [Slices](#slices)
1. [Maps](#maps) - [Maps](#maps)
1. [Custom named decoders](#custom-named-decoders) - [Nested data structure](#nested-data-structure)
1. [Supported field types](#supported-field-types) - [Custom named decoders](#custom-named-decoders)
1. [Custom decoders \(mappers\)](#custom-decoders-mappers) - [Supported field types](#supported-field-types)
1. [Supported tags](#supported-tags) - [Custom decoders (mappers)](#custom-decoders-mappers)
1. [Plugins](#plugins) - [Supported tags](#supported-tags)
1. [Dynamic Commands](#dynamic-commands) - [Plugins](#plugins)
1. [Variable interpolation](#variable-interpolation) - [Dynamic Commands](#dynamic-commands)
1. [Validation](#validation) - [Variable interpolation](#variable-interpolation)
1. [Modifying Kong's behaviour](#modifying-kongs-behaviour) - [Validation](#validation)
1. [`Name(help)` and `Description(help)` - set the application name description](#namehelp-and-descriptionhelp---set-the-application-name-description) - [Modifying Kong's behaviour](#modifying-kongs-behaviour)
1. [`Configuration(loader, paths...)` - load defaults from configuration files](#configurationloader-paths---load-defaults-from-configuration-files) - [`Name(help)` and `Description(help)` - set the application name description](#namehelp-and-descriptionhelp---set-the-application-name-description)
1. [`Resolver(...)` - support for default values from external sources](#resolver---support-for-default-values-from-external-sources) - [`Configuration(loader, paths...)` - load defaults from configuration files](#configurationloader-paths---load-defaults-from-configuration-files)
1. [`*Mapper(...)` - customising how the command-line is mapped to Go values](#mapper---customising-how-the-command-line-is-mapped-to-go-values) - [`Resolver(...)` - support for default values from external sources](#resolver---support-for-default-values-from-external-sources)
1. [`ConfigureHelp(HelpOptions)` and `Help(HelpFunc)` - customising help](#configurehelphelpoptions-and-helphelpfunc---customising-help) - [`*Mapper(...)` - customising how the command-line is mapped to Go values](#mapper---customising-how-the-command-line-is-mapped-to-go-values)
1. [`Bind(...)` - bind values for callback hooks and Run\(\) methods](#bind---bind-values-for-callback-hooks-and-run-methods) - [`ConfigureHelp(HelpOptions)` and `Help(HelpFunc)` - customising help](#configurehelphelpoptions-and-helphelpfunc---customising-help)
1. [Other options](#other-options) - [`Bind(...)` - bind values for callback hooks and Run() methods](#bind---bind-values-for-callback-hooks-and-run-methods)
- [Other options](#other-options)
<!-- /MarkdownTOC --> <!-- /MarkdownTOC -->
@@ -134,7 +135,7 @@ Help is automatically generated from the command-line structure itself,
including `help:""` and other tags. [Variables](#variable-interpolation) will including `help:""` and other tags. [Variables](#variable-interpolation) will
also be interpolated into the help string. also be interpolated into the help string.
Finally, any command, argument, or flag type implementing the interface Finally, any command, or argument type implementing the interface
`Help() string` will have this function called to retrieve more detail to `Help() string` will have this function called to retrieve more detail to
augment the help tag. This allows for much more descriptive text than can augment the help tag. This allows for much more descriptive text than can
fit in Go tags. [See _examples/shell/help](./_examples/shell/help) fit in Go tags. [See _examples/shell/help](./_examples/shell/help)
@@ -193,13 +194,6 @@ Flags:
--flag Regular flag help --flag Regular flag help
``` ```
#### Showing a _flag_'s detailed help
> **TODO** (not known how to elicit this behaviour)
Neither `go run ./main.go --help --flag` nor `go run ./main.go --flag --help` appear to work
## Command handling ## Command handling
There are two ways to handle commands in Kong. There are two ways to handle commands in Kong.