client/pkg/kn/commands
Roland Huß b916a5b3ed
Add grouping for help message + streamlined help messages (#887)
* Add grouping for help message + streamlined help messages

The top-level looks like

kn is the command line interface for managing Knative Serving and Eventing objects

 Find more information about Knative at: https://knative.dev

Serving Commands:
  service     Manage Knative services
  revision    Manage service revisions
  route       List and show service routes

Eventing Commands:
  source      Manage event sources
  trigger     Manage event triggers

Other Commands:
  plugin      Manage kn plugins
  completion  Output shell completion code
  version     Show the version of this client

Use "kn <command> --help" for more information about a given command.
Use "kn options" for a list of global command-line options (applies to all commands).

The following changes have been applied:

* Add CommandGroups for grouping commands together
* Add flexible templating for the help messages
* Moved global options to an own command ('kn options', much like 'kubectl options')
* Aligned wording and typography of help messages

These features has been highly inspired by kubectl grouping & help templating but has been considerably been stripped down to the needs of kn.

Signed-off-by: Roland Huß <roland@ro14nd.de>

* chore: Add missing file

* Update pkg/templates/command_groups.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* chore: Add some test for error messages

* fix formatting

* chore: Add test

* moar tests

* Update pkg/kn/commands/completion/completion.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/source/apiserver/delete.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/service/list.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/route/route.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/revision/delete.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/plugin/plugin.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/service/delete.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/revision/delete.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/commands/service/delete.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* regen docs

* chore: Update conventions doc

* Move some direct configuration of rootcmd to NewRootCommand()

* Moved CaptureOutput to "test" package for reuse

Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-18 00:06:25 -07:00
..
completion Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
flags Refactor main flow and introduce explicit plugin and config handling (#877) 2020-06-15 09:15:24 -07:00
options Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
plugin Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
revision Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
route Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
service Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
source Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
trigger Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
version Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
describe.go Remove unused variables and unreachable code (#779) 2020-04-06 14:26:59 -07:00
describe_test.go Human-readable revision describe (#475) 2019-11-05 17:43:02 -08:00
human_readable_flags.go feature(source binding): Support for Sink Binding as source (#625) 2020-01-29 12:08:27 -08:00
namespaced.go update the description of flag namespace (#419) 2019-09-30 01:12:51 -07:00
namespaced_test.go fix lint errors (#388) 2019-08-24 22:46:13 -07:00
testing_helper.go Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
testing_helper_test.go Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00
types.go Refactor main flow and introduce explicit plugin and config handling (#877) 2020-06-15 09:15:24 -07:00
types_test.go Report missing kubeconfig or error connecting to cluster (#725) 2020-03-10 03:34:29 -07:00
wait_flags.go Make wait, no-wait and async flags per bool var CLI convention (#802) 2020-04-14 12:36:16 -07:00
wait_flags_test.go Make wait, no-wait and async flags per bool var CLI convention (#802) 2020-04-14 12:36:16 -07:00