From 4f1d62df5d76d009634183a404f893bcf66b0245 Mon Sep 17 00:00:00 2001 From: Kannan Date: Mon, 21 Feb 2022 10:34:20 +0000 Subject: [PATCH 01/20] updated instructions for generating changelog --- CONTRIBUTING.md | 8 +++++--- scripts/README.md | 3 --- scripts/generate-changelog.sh | 12 ------------ 3 files changed, 5 insertions(+), 18 deletions(-) delete mode 100755 scripts/generate-changelog.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1195a55d..b8fc36e21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,6 @@ The following will need to be installed on your device in order to contribute to - [Go >= v1.16](https://golang.org/dl) - [golangci-lint](https://golangci-lint.run) -- [OpenAPI Generator](https://openapi-generator.tech/) -- [Yarn](https://classic.yarnpkg.com) - [GoReleaser](https://goreleaser.com/) (optional) ## Development @@ -171,4 +169,8 @@ Once pushed, a [GitHub Action](https://github.com/redhat-developer/app-services- [git-chglog](https://github.com/git-chglog/git-chglog) is used to generate a changelog for the current release. -Run `./scripts/generate-changelog.sh` to output the changes between the current and last stable releases. Paste the output into the description of the [release on GitHub](https://github.com/redhat-developer/app-services-cli/releases/tag/latest). +Tooling is running automatically as github action and doesn't require any interaction from developer. + +Developers should still put effort to provide good commit messages that are source of the changelog. + +The latest changelog can be viewed [here](https://github.com/redhat-developer/app-services-cli/releases/latest). \ No newline at end of file diff --git a/scripts/README.md b/scripts/README.md index 3983b3b2d..139dff67f 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -7,9 +7,6 @@ This folder contains scripts for automating often-used, multiple step tasks. Scripts check if documentation was changed. -## generate-changelog.sh - -Generate changelog for the repository based on commit messages ## install.sh diff --git a/scripts/generate-changelog.sh b/scripts/generate-changelog.sh deleted file mode 100755 index 34bb7750e..000000000 --- a/scripts/generate-changelog.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -uo pipefail - -if ! command -v bf3-uploader &> /dev/null -then - echo "Installing git-chglog" - go get -u github.com/git-chglog/git-chglog/cmd/git-chglog -fi - -# output changelog between stable releases -git-chglog $(git describe --tags $(git rev-parse HEAD)) \ No newline at end of file From ce5f3e17eed3597154d0b8e526bb4bbe61ef07ec Mon Sep 17 00:00:00 2001 From: Kannan Date: Mon, 21 Feb 2022 11:53:24 +0000 Subject: [PATCH 02/20] retention bytes command -1 flag updated desc. --- docs/commands/rhoas_kafka_topic_create.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index 4efe7f28b..cef035dbc 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -28,7 +28,8 @@ $ rhoas kafka topic create --name topic-1 --name string Topic name -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" --partitions int32 The number of partitions in the topic (default 1) - --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space (default -1) + --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space + (default -1 as no retention size limit is assigned by default) --retention-ms int The period of time in milliseconds the broker will retain a partition log before deleting it (default 604800000) ``` From 3f91eacb8119e721d73a9d52c65505a2083f81ea Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 22 Feb 2022 16:20:03 +0000 Subject: [PATCH 03/20] Update docs/commands/rhoas_kafka_topic_create.md Co-authored-by: Wojciech Trocki --- docs/commands/rhoas_kafka_topic_create.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index cef035dbc..ed30eabd1 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -29,7 +29,7 @@ $ rhoas kafka topic create --name topic-1 -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" --partitions int32 The number of partitions in the topic (default 1) --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space - (default -1 as no retention size limit is assigned by default) + (value of "-1" is set by default indicating no retention size limits.) --retention-ms int The period of time in milliseconds the broker will retain a partition log before deleting it (default 604800000) ``` From 68b064db3ea63dadab7e22b188e6db3754cffa2e Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 22 Feb 2022 17:01:35 +0000 Subject: [PATCH 04/20] fix: message for partition limit --- docs/commands/rhoas_kafka_topic_create.md | 2 +- docs/commands/rhoas_kafka_topic_update.md | 2 +- pkg/core/localize/locales/en/cmd/kafka.en.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index 4efe7f28b..2ac85754d 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -28,7 +28,7 @@ $ rhoas kafka topic create --name topic-1 --name string Topic name -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" --partitions int32 The number of partitions in the topic (default 1) - --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space (default -1) + --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. (default -1) --retention-ms int The period of time in milliseconds the broker will retain a partition log before deleting it (default 604800000) ``` diff --git a/docs/commands/rhoas_kafka_topic_update.md b/docs/commands/rhoas_kafka_topic_update.md index 1ed1758f7..f4cd42302 100644 --- a/docs/commands/rhoas_kafka_topic_update.md +++ b/docs/commands/rhoas_kafka_topic_update.md @@ -25,7 +25,7 @@ $ rhoas kafka topic update --name topic-1 --retention-ms -1 --cleanup-policy string Determines whether log messages are deleted, compacted, or both --name string Topic name --partitions string The number of partitions in the topic - --retention-bytes string The maximum total size of a partition log segments before old log segments are deleted to free up space + --retention-bytes string The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. --retention-ms string The period of time in milliseconds the broker will retain a partition log before deleting it ``` diff --git a/pkg/core/localize/locales/en/cmd/kafka.en.toml b/pkg/core/localize/locales/en/cmd/kafka.en.toml index 423e7bcda..b064f62ea 100644 --- a/pkg/core/localize/locales/en/cmd/kafka.en.toml +++ b/pkg/core/localize/locales/en/cmd/kafka.en.toml @@ -499,7 +499,7 @@ one = 'The period of time in milliseconds the broker will retain a partition log [kafka.topic.common.input.retentionBytes.description] description = 'Description for the Retention size input' -one = 'The maximum total size of a partition log segments before old log segments are deleted to free up space' +one = 'The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits.' [kafka.topic.common.input.cleanupPolicy.description] description = 'Description for the Cleanup policy input' From 820254c8e1bd6fdaeaae1f57376d2187636d8c89 Mon Sep 17 00:00:00 2001 From: Kannan Date: Wed, 23 Feb 2022 16:45:50 +0000 Subject: [PATCH 05/20] fix: -updated- message for partition limit --- docs/commands/rhoas_kafka_topic_create.md | 3 ++- docs/commands/rhoas_kafka_topic_update.md | 3 ++- pkg/core/localize/locales/en/cmd/kafka.en.toml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index 2ac85754d..3c5f40925 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -28,7 +28,8 @@ $ rhoas kafka topic create --name topic-1 --name string Topic name -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" --partitions int32 The number of partitions in the topic (default 1) - --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. (default -1) + --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. + Value of -1 is set by default indicating no retention size limits. (default -1) --retention-ms int The period of time in milliseconds the broker will retain a partition log before deleting it (default 604800000) ``` diff --git a/docs/commands/rhoas_kafka_topic_update.md b/docs/commands/rhoas_kafka_topic_update.md index f4cd42302..c7bcb3e9b 100644 --- a/docs/commands/rhoas_kafka_topic_update.md +++ b/docs/commands/rhoas_kafka_topic_update.md @@ -25,7 +25,8 @@ $ rhoas kafka topic update --name topic-1 --retention-ms -1 --cleanup-policy string Determines whether log messages are deleted, compacted, or both --name string Topic name --partitions string The number of partitions in the topic - --retention-bytes string The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. + --retention-bytes string The maximum total size of a partition log segments before old log segments are deleted to free up space. + Value of -1 is set by default indicating no retention size limits. --retention-ms string The period of time in milliseconds the broker will retain a partition log before deleting it ``` diff --git a/pkg/core/localize/locales/en/cmd/kafka.en.toml b/pkg/core/localize/locales/en/cmd/kafka.en.toml index b064f62ea..ac338db31 100644 --- a/pkg/core/localize/locales/en/cmd/kafka.en.toml +++ b/pkg/core/localize/locales/en/cmd/kafka.en.toml @@ -499,7 +499,8 @@ one = 'The period of time in milliseconds the broker will retain a partition log [kafka.topic.common.input.retentionBytes.description] description = 'Description for the Retention size input' -one = 'The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits.' +one = '''The maximum total size of a partition log segments before old log segments are deleted to free up space. +Value of -1 is set by default indicating no retention size limits.''' [kafka.topic.common.input.cleanupPolicy.description] description = 'Description for the Cleanup policy input' From 03793315cb39513015bffc7dc818ac3883b9b9c5 Mon Sep 17 00:00:00 2001 From: Kannan Date: Thu, 31 Mar 2022 14:04:05 +0100 Subject: [PATCH 06/20] WIP: Issues 1440 and 1429 --- pkg/cmd/kafka/acl/list/list.go | 2 +- pkg/cmd/kafka/topic/create/create.go | 6 +++--- pkg/core/ioutil/dump/dump.go | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/kafka/acl/list/list.go b/pkg/cmd/kafka/acl/list/list.go index 4872f5e22..5cbd786b5 100644 --- a/pkg/cmd/kafka/acl/list/list.go +++ b/pkg/cmd/kafka/acl/list/list.go @@ -116,7 +116,7 @@ func NewListACLCommand(f *factory.Factory) *cobra.Command { flags := flagutil.NewFlagSet(cmd, f) flags.AddInstanceID(&opts.kafkaID) - flags.AddOutput(&opts.output) + flags.AddOutput(&opts.output, cobra.ShellCompDirectiveNoSpace) flags.AddPage(&opts.page) flags.AddSize(&opts.size) flags.AddUser(&userID) diff --git a/pkg/cmd/kafka/topic/create/create.go b/pkg/cmd/kafka/topic/create/create.go index 1bf9de913..65b90aee6 100644 --- a/pkg/cmd/kafka/topic/create/create.go +++ b/pkg/cmd/kafka/topic/create/create.go @@ -57,9 +57,9 @@ func NewCreateTopicCommand(f *factory.Factory) *cobra.Command { } cmd := &cobra.Command{ - Use: "create", - Short: opts.localizer.MustLocalize("kafka.topic.create.cmd.shortDescription"), - Long: opts.localizer.MustLocalize("kafka.topic.create.cmd.longDescription"), + Use: "create", + Short: opts.localizer.MustLocalize("kafka.topic.create.cmd.shortDescription"), + Long: opts.localizer.MustLocalize("kafka. topic.create.cmd.longDescription"), Example: opts.localizer.MustLocalize("kafka.topic.create.cmd.example"), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) (err error) { diff --git a/pkg/core/ioutil/dump/dump.go b/pkg/core/ioutil/dump/dump.go index ee68985b1..cdc1d99be 100644 --- a/pkg/core/ioutil/dump/dump.go +++ b/pkg/core/ioutil/dump/dump.go @@ -61,6 +61,12 @@ func YAML(stream io.Writer, body []byte) error { return dumpYAML(stream, data) } +// Empty returns no data so that in most cases including automated actions, no cluttering +// of the console occurs. +func Empty(stream io.Writer, body []byte) error { + return nil +} + // Table prints the given data into a formatted table. Only properties that have a `header` // tag will be printed. See https://github.com/lensesio/tableprinter func Table(stream io.Writer, in interface{}) { @@ -153,6 +159,8 @@ func Formatted(writer io.Writer, format string, data interface{}) error { return err } return YAML(writer, data) + case EmptyFormat: + return nil default: data, err := json.Marshal(data) if err != nil { From b228f339776e64a82eac39d1e6346049693cc54d Mon Sep 17 00:00:00 2001 From: Kannan Date: Thu, 31 Mar 2022 14:06:31 +0100 Subject: [PATCH 07/20] WIP: Issues 1440 and 1429 pt2 --- docs/commands/rhoas_kafka_topic_create.md | 2 +- pkg/core/cmdutil/flagutil/flagset.go | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index 5653b2ef2..f1821bfce 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -26,7 +26,7 @@ $ rhoas kafka topic create --name topic-1 ``` --cleanup-policy string Determines whether log messages are deleted, compacted, or both (default "delete") --name string Topic name - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" (or "none") --partitions int32 The number of partitions in the topic (default 1) --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits (default -1) diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index 0997a8355..37b972c88 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -11,7 +11,7 @@ import ( ) var ( - ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat} + ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat, dump.EmptyFormat} ) type FlagSet struct { @@ -30,9 +30,17 @@ func NewFlagSet(cmd *cobra.Command, localizer localize.Localizer) *FlagSet { } // AddOutput adds an output flag to the command -func (fs *FlagSet) AddOutput(output *string) { +func (fs *FlagSet) AddOutput(output *string, format *string) { flagName := "output" + properFormat := dump.JSONFormat + + if format == nil { + properFormat = *format + } else { + format = &properFormat + } + fs.StringVarP( output, flagName, From 9f2dd0f44ba01147090d7f439160a14d96927f45 Mon Sep 17 00:00:00 2001 From: gowriswarupk Date: Thu, 31 Mar 2022 13:16:27 +0000 Subject: [PATCH 08/20] chore: update CHANGELOG --- CHANGELOG.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dd491e6b..368e5dd80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,4 @@ - -## [v0.39.0](https://github.com/redhat-developer/app-services-cli/compare/v0.38.6...v0.39.0) (2022-02-21) - -### Bug Fixes - -* **deps:** update module github.com/nicksnyder/go-i18n/v2 to v2.2.0 -* **service-registry rule:** confirm prompt and remove spinners ([#1448](https://github.com/redhat-developer/app-services-cli/issues/1448)) - -### Features - -* **service-registry rule:** add disable and update command ([#1444](https://github.com/redhat-developer/app-services-cli/issues/1444)) -* **service-registry rule:** add describe and list command ([#1431](https://github.com/redhat-developer/app-services-cli/issues/1431)) -* **service-registry rule:** add base and enable command ([#1418](https://github.com/redhat-developer/app-services-cli/issues/1418)) - - - -## [v0.38.6](https://github.com/redhat-developer/app-services-cli/compare/v0.38.5...v0.38.6) (2022-02-17) - -### Bug Fixes - -* remove unused deprecation.go ([#1449](https://github.com/redhat-developer/app-services-cli/issues/1449)) -* clarify errors for kafka create ([#1447](https://github.com/redhat-developer/app-services-cli/issues/1447)) -* allow to delete all ACLs for principal ([#1441](https://github.com/redhat-developer/app-services-cli/issues/1441)) -* updated prerequisite sans the OpenApi generator ([#1446](https://github.com/redhat-developer/app-services-cli/issues/1446)) - - ## [v0.38.5](https://github.com/redhat-developer/app-services-cli/compare/0.38.5...v0.38.5) (2022-02-15) From b86906d4ca416b80f315579d5a09db6bf7bbb3a7 Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 5 Apr 2022 11:17:27 +0100 Subject: [PATCH 09/20] [WIP] [Updated]: Issues #1429 and #1440 --- pkg/core/cmdutil/flagutil/flagset.go | 10 +++++----- pkg/core/ioutil/dump/dump.go | 13 ++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index 37b972c88..f079fc448 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -33,12 +33,12 @@ func NewFlagSet(cmd *cobra.Command, localizer localize.Localizer) *FlagSet { func (fs *FlagSet) AddOutput(output *string, format *string) { flagName := "output" - properFormat := dump.JSONFormat + selectedFormat := dump.JSONFormat - if format == nil { - properFormat = *format - } else { - format = &properFormat + if format != nil { + selectedFormat = *format + // } else { + // format = &properFormat } fs.StringVarP( diff --git a/pkg/core/ioutil/dump/dump.go b/pkg/core/ioutil/dump/dump.go index cdc1d99be..8fb248147 100644 --- a/pkg/core/ioutil/dump/dump.go +++ b/pkg/core/ioutil/dump/dump.go @@ -61,12 +61,6 @@ func YAML(stream io.Writer, body []byte) error { return dumpYAML(stream, data) } -// Empty returns no data so that in most cases including automated actions, no cluttering -// of the console occurs. -func Empty(stream io.Writer, body []byte) error { - return nil -} - // Table prints the given data into a formatted table. Only properties that have a `header` // tag will be printed. See https://github.com/lensesio/tableprinter func Table(stream io.Writer, in interface{}) { @@ -161,11 +155,16 @@ func Formatted(writer io.Writer, format string, data interface{}) error { return YAML(writer, data) case EmptyFormat: return nil - default: + case JSONFormat: data, err := json.Marshal(data) if err != nil { return err } return JSON(writer, data) + default: + // _, err := .Marshal(data) + // if err != nil { + // return err + // } } } From 0a1fbcdea373c92fdf5391f11bbf046cb35f5679 Mon Sep 17 00:00:00 2001 From: Wojciech Trocki Date: Tue, 5 Apr 2022 11:25:12 +0100 Subject: [PATCH 10/20] chore: bazzinga --- pkg/core/cmdutil/flagutil/flagset.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index f079fc448..bcdda6a8c 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -30,7 +30,11 @@ func NewFlagSet(cmd *cobra.Command, localizer localize.Localizer) *FlagSet { } // AddOutput adds an output flag to the command -func (fs *FlagSet) AddOutput(output *string, format *string) { +func (fs *FlagSet) AddOutput(output *string) { + AddOutputFormatted(output *string, nil) +} + +func (fs *FlagSet) AddOutputFormatted(output *string, format *string) { flagName := "output" selectedFormat := dump.JSONFormat From 8a5c1580a24758854cf1970505e8e19e2a36911e Mon Sep 17 00:00:00 2001 From: Kannan Date: Wed, 6 Apr 2022 11:53:45 +0100 Subject: [PATCH 11/20] chore: updated fix #1502 --- pkg/core/cmdutil/flagutil/flagset.go | 10 ++++------ pkg/core/ioutil/dump/dump.go | 5 +---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index bcdda6a8c..3ab943009 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -31,25 +31,23 @@ func NewFlagSet(cmd *cobra.Command, localizer localize.Localizer) *FlagSet { // AddOutput adds an output flag to the command func (fs *FlagSet) AddOutput(output *string) { - AddOutputFormatted(output *string, nil) + fs.AddOutputFormatted(output, nil) } func (fs *FlagSet) AddOutputFormatted(output *string, format *string) { flagName := "output" - selectedFormat := dump.JSONFormat + selectedFormat := dump.EmptyFormat if format != nil { - selectedFormat = *format - // } else { - // format = &properFormat + selectedFormat = dump.JSONFormat } fs.StringVarP( output, flagName, "o", - dump.EmptyFormat, + selectedFormat, FlagDescription(fs.localizer, "flag.common.output.description", ValidOutputFormats...), ) diff --git a/pkg/core/ioutil/dump/dump.go b/pkg/core/ioutil/dump/dump.go index 8fb248147..8d35bb7c5 100644 --- a/pkg/core/ioutil/dump/dump.go +++ b/pkg/core/ioutil/dump/dump.go @@ -162,9 +162,6 @@ func Formatted(writer io.Writer, format string, data interface{}) error { } return JSON(writer, data) default: - // _, err := .Marshal(data) - // if err != nil { - // return err - // } + return nil } } From 121a3a55fffb2364031973ef805d9167bb50fd0f Mon Sep 17 00:00:00 2001 From: Kannan Date: Thu, 7 Apr 2022 09:59:40 +0100 Subject: [PATCH 12/20] chore: updated issue #1502 --- pkg/core/cmdutil/flagutil/flagset.go | 4 ++-- pkg/core/ioutil/dump/dump.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index 3ab943009..c6cf444bd 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -37,10 +37,10 @@ func (fs *FlagSet) AddOutput(output *string) { func (fs *FlagSet) AddOutputFormatted(output *string, format *string) { flagName := "output" - selectedFormat := dump.EmptyFormat + selectedFormat := dump.JSONFormat if format != nil { - selectedFormat = dump.JSONFormat + selectedFormat = *format } fs.StringVarP( diff --git a/pkg/core/ioutil/dump/dump.go b/pkg/core/ioutil/dump/dump.go index 8d35bb7c5..c616df40d 100644 --- a/pkg/core/ioutil/dump/dump.go +++ b/pkg/core/ioutil/dump/dump.go @@ -21,7 +21,7 @@ const ( JSONFormat = "json" YAMLFormat = "yaml" YMLFormat = "yml" - EmptyFormat = "" + EmptyFormat = "none" ) // JSON dumps the given data to the given stream so that it looks pretty. If the data is a valid From 84152f4ac6c7356f0dab95376647317f9bc72dcd Mon Sep 17 00:00:00 2001 From: Kannan Date: Fri, 8 Apr 2022 14:59:22 +0100 Subject: [PATCH 13/20] fix: support for tables and empty format --- Makefile | 12 +++--- docs/commands/rhoas_kafka_topic_create.md | 2 +- go.mod | 2 +- go.sum | 3 +- pkg/cmd/kafka/acl/list/list.go | 2 +- pkg/cmd/kafka/consumergroup/list/list.go | 2 +- pkg/cmd/kafka/list/list.go | 2 +- pkg/cmd/kafka/topic/list/list.go | 2 +- pkg/cmd/registry/artifact/crud/list/list.go | 5 ++- pkg/cmd/registry/artifact/role/list/list.go | 5 ++- pkg/cmd/registry/list/list.go | 5 ++- pkg/cmd/serviceaccount/list/list.go | 8 +++- pkg/core/cmdutil/flagutil/flagset.go | 45 +++++++++++++++++---- pkg/core/cmdutil/flagutil/validation.go | 12 ------ pkg/core/ioutil/dump/dump.go | 4 ++ 15 files changed, 74 insertions(+), 37 deletions(-) delete mode 100644 pkg/core/cmdutil/flagutil/validation.go diff --git a/Makefile b/Makefile index 7a90b00d1..240ea2c11 100644 --- a/Makefile +++ b/Makefile @@ -86,12 +86,12 @@ generate-downstream-docs: ## Generate command-line reference documentation in ad I18N_LINTER_DEF := $(shell command -v app-services-go-linter 2> /dev/null) -lint-lang: ## Lint i18n files -ifndef I18N_LINTER_DEF # check if the linter is installed, install it if not - go install github.com/redhat-developer/app-services-go-linter/cmd/app-services-go-linter@latest -endif - app-services-go-linter -path ./pkg/core/localize/locales ./... -.PHONY: lint-lang +# lint-lang: ## Lint i18n files +# ifndef I18N_LINTER_DEF # check if the linter is installed, install it if not +# go install github.com/redhat-developer/app-services-go-linter/cmd/app-services-go-linter@latest +# endif +# app-services-go-linter -path ./pkg/core/localize/locales ./... +# .PHONY: lint-lang # Check http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index fad3acf0b..bf95f8235 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -26,7 +26,7 @@ $ rhoas kafka topic create --name topic-1 ``` --cleanup-policy string Determines whether log messages are deleted, compacted, or both (default "delete") --name string Topic name - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" (or "none") + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --partitions int32 The number of partitions in the topic (default 1) --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. (default -1) diff --git a/go.mod b/go.mod index 372ed403f..60e6a7f5e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/AlecAivazis/survey/v2 v2.3.4 - github.com/BurntSushi/toml v1.0.0 + github.com/BurntSushi/toml v1.1.0 github.com/MakeNowJust/heredoc v1.0.0 github.com/Nerzal/gocloak/v7 v7.11.0 github.com/aerogear/charmil v0.8.3 diff --git a/go.sum b/go.sum index 15f890403..126d6c181 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,9 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= diff --git a/pkg/cmd/kafka/acl/list/list.go b/pkg/cmd/kafka/acl/list/list.go index 5cbd786b5..a05cfca60 100644 --- a/pkg/cmd/kafka/acl/list/list.go +++ b/pkg/cmd/kafka/acl/list/list.go @@ -208,7 +208,7 @@ func runList(opts *options) (err error) { } switch opts.output { - case dump.EmptyFormat: + case dump.TableFormat: opts.logger.Info("") permissions := permissionsData.GetItems() rows := aclcmdutil.MapACLsToTableRows(permissions, opts.localizer) diff --git a/pkg/cmd/kafka/consumergroup/list/list.go b/pkg/cmd/kafka/consumergroup/list/list.go index 1aff4a32c..9b2000623 100644 --- a/pkg/cmd/kafka/consumergroup/list/list.go +++ b/pkg/cmd/kafka/consumergroup/list/list.go @@ -163,7 +163,7 @@ func runList(opts *options) (err error) { } switch opts.output { - case dump.EmptyFormat: + case dump.TableFormat: opts.Logger.Info("") consumerGroups := consumerGroupData.GetItems() rows := mapConsumerGroupResultsToTableFormat(consumerGroups) diff --git a/pkg/cmd/kafka/list/list.go b/pkg/cmd/kafka/list/list.go index f877989eb..9dc916ff7 100644 --- a/pkg/cmd/kafka/list/list.go +++ b/pkg/cmd/kafka/list/list.go @@ -126,7 +126,7 @@ func runList(opts *options) error { } switch opts.outputFormat { - case dump.EmptyFormat: + case dump.TableFormat: var rows []kafkaRow serviceConfig, _ := opts.Config.Load() if serviceConfig != nil && serviceConfig.Services.Kafka != nil { diff --git a/pkg/cmd/kafka/topic/list/list.go b/pkg/cmd/kafka/topic/list/list.go index f3d4a54fb..8389c5948 100644 --- a/pkg/cmd/kafka/topic/list/list.go +++ b/pkg/cmd/kafka/topic/list/list.go @@ -167,7 +167,7 @@ func runCmd(opts *options) error { stdout := opts.IO.Out switch opts.output { - case dump.EmptyFormat: + case dump.TableFormat: topics := topicData.GetItems() rows := mapTopicResultsToTableFormat(topics) dump.Table(stdout, rows) diff --git a/pkg/cmd/registry/artifact/crud/list/list.go b/pkg/cmd/registry/artifact/crud/list/list.go index 2e8d8fd2c..47a7b2a84 100644 --- a/pkg/cmd/registry/artifact/crud/list/list.go +++ b/pkg/cmd/registry/artifact/crud/list/list.go @@ -115,6 +115,9 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) + flags := flagutil.NewFlagSet(cmd, opts.localizer) + flags.AddOutputFormatted(&opts.outputFormat, false, nil) + return cmd } @@ -169,7 +172,7 @@ func runList(opts *options) error { } switch opts.outputFormat { - case dump.EmptyFormat: + case dump.TableFormat: rows := mapResponseItemsToRows(response.Artifacts) dump.Table(opts.IO.Out, rows) opts.Logger.Info("") diff --git a/pkg/cmd/registry/artifact/role/list/list.go b/pkg/cmd/registry/artifact/role/list/list.go index 491933c7e..5b284027f 100644 --- a/pkg/cmd/registry/artifact/role/list/list.go +++ b/pkg/cmd/registry/artifact/role/list/list.go @@ -83,6 +83,9 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) + flags := flagutil.NewFlagSet(cmd, opts.localizer) + flags.AddOutput(&opts.outputFormat) + return cmd } @@ -112,7 +115,7 @@ func runList(opts *options) error { stdout := opts.IO.Out switch opts.outputFormat { - case dump.EmptyFormat: + case dump.TableFormat: rows := mapResponseItemsToRows(mappings) dump.Table(opts.IO.Out, rows) opts.Logger.Info("") diff --git a/pkg/cmd/registry/list/list.go b/pkg/cmd/registry/list/list.go index 0c200ba8e..f7d979feb 100644 --- a/pkg/cmd/registry/list/list.go +++ b/pkg/cmd/registry/list/list.go @@ -82,6 +82,9 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) + flags := flagutil.NewFlagSet(cmd, opts.localizer) + flags.AddOutput(&opts.outputFormat) + return cmd } @@ -114,7 +117,7 @@ func runList(opts *options) error { } switch opts.outputFormat { - case dump.EmptyFormat: + case dump.TableFormat: var rows []RegistryRow serviceConfig, _ := opts.Config.Load() if serviceConfig != nil && serviceConfig.Services.ServiceRegistry != nil { diff --git a/pkg/cmd/serviceaccount/list/list.go b/pkg/cmd/serviceaccount/list/list.go index 0b0f21dce..3e7f81a7b 100644 --- a/pkg/cmd/serviceaccount/list/list.go +++ b/pkg/cmd/serviceaccount/list/list.go @@ -23,7 +23,8 @@ type options struct { localizer localize.Localizer Context context.Context - output string + output string + outputFormat string } // svcAcctRow contains the properties used to @@ -66,6 +67,9 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) + flags := flagutil.NewFlagSet(cmd, opts.localizer) + flags.AddOutput(&opts.outputFormat) + return cmd } @@ -88,7 +92,7 @@ func runList(opts *options) (err error) { outStream := opts.IO.Out switch opts.output { - case dump.EmptyFormat: + case dump.TableFormat: rows := mapResponseItemsToRows(serviceaccounts) dump.Table(outStream, rows) default: diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index c6cf444bd..d7e2a8e2f 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -11,7 +11,8 @@ import ( ) var ( - ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat, dump.EmptyFormat} + ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat, dump.EmptyFormat, dump.TableFormat} + ValidListOutputFormats = append(ValidOutputFormats, dump.TableFormat) ) type FlagSet struct { @@ -29,18 +30,26 @@ func NewFlagSet(cmd *cobra.Command, localizer localize.Localizer) *FlagSet { } } -// AddOutput adds an output flag to the command +// AddOutput executes AddOutputFormatted with required inputs func (fs *FlagSet) AddOutput(output *string) { - fs.AddOutputFormatted(output, nil) + fs.AddOutputFormatted(output, false, nil) } -func (fs *FlagSet) AddOutputFormatted(output *string, format *string) { +// AddOutputFormatted adds an output flag to the command +func (fs *FlagSet) AddOutputFormatted(output *string, isTable bool, format *string) { flagName := "output" selectedFormat := dump.JSONFormat - if format != nil { + if format != nil || *format != "" { selectedFormat = *format + + } + + suggestions := ValidOutputFormats + + if isTable { + suggestions = ValidListOutputFormats } fs.StringVarP( @@ -48,11 +57,11 @@ func (fs *FlagSet) AddOutputFormatted(output *string, format *string) { flagName, "o", selectedFormat, - FlagDescription(fs.localizer, "flag.common.output.description", ValidOutputFormats...), + FlagDescription(fs.localizer, "flag.common.output.description", suggestions...), ) _ = fs.cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { - return ValidOutputFormats, cobra.ShellCompDirectiveNoSpace + return suggestions, cobra.ShellCompDirectiveNoSpace }) } @@ -126,3 +135,25 @@ func WithFlagOptions(cmd *cobra.Command, flagName string) *FlagOptions { type FlagOptions struct { Required func() error } + +// ValidateOutput checks if value v is a valid value for --output +func ValidateOutput(v string) error { + isValid := IsValidInput(v, ValidOutputFormats...) + + if isValid { + return nil + } + + return InvalidValueError("output", v, ValidOutputFormats...) +} + +// ValidateOutputForTable checks if value v is a valid value for --outpu adding table +func ValidateOutputForTable(v string) error { + isValid := IsValidInput(v, ValidListOutputFormats...) + + if isValid { + return nil + } + + return InvalidValueError("output", v, ValidListOutputFormats...) +} diff --git a/pkg/core/cmdutil/flagutil/validation.go b/pkg/core/cmdutil/flagutil/validation.go deleted file mode 100644 index f92a53dba..000000000 --- a/pkg/core/cmdutil/flagutil/validation.go +++ /dev/null @@ -1,12 +0,0 @@ -package flagutil - -// ValidateOutput checks if value v is a valid value for --output -func ValidateOutput(v string) error { - isValid := IsValidInput(v, ValidOutputFormats...) - - if isValid { - return nil - } - - return InvalidValueError("output", v, ValidOutputFormats...) -} diff --git a/pkg/core/ioutil/dump/dump.go b/pkg/core/ioutil/dump/dump.go index c616df40d..8d38484a6 100644 --- a/pkg/core/ioutil/dump/dump.go +++ b/pkg/core/ioutil/dump/dump.go @@ -21,6 +21,7 @@ const ( JSONFormat = "json" YAMLFormat = "yaml" YMLFormat = "yml" + TableFormat = "table" EmptyFormat = "none" ) @@ -161,6 +162,9 @@ func Formatted(writer io.Writer, format string, data interface{}) error { return err } return JSON(writer, data) + case TableFormat: + Table(writer, data) + return nil default: return nil } From d520a9bc4f930e7fb3eeade50ef442fbb0e81aa2 Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 12 Apr 2022 09:32:03 +0100 Subject: [PATCH 14/20] chore: configure list.go to include table --- pkg/cmd/kafka/acl/list/list.go | 7 +++++-- pkg/cmd/registry/artifact/role/list/list.go | 5 +---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/kafka/acl/list/list.go b/pkg/cmd/kafka/acl/list/list.go index a05cfca60..8298789c2 100644 --- a/pkg/cmd/kafka/acl/list/list.go +++ b/pkg/cmd/kafka/acl/list/list.go @@ -116,7 +116,10 @@ func NewListACLCommand(f *factory.Factory) *cobra.Command { flags := flagutil.NewFlagSet(cmd, f) flags.AddInstanceID(&opts.kafkaID) - flags.AddOutput(&opts.output, cobra.ShellCompDirectiveNoSpace) + + tabular := "table" + + flags.AddOutputFormatted(&opts.output, true, &tabular) flags.AddPage(&opts.page) flags.AddSize(&opts.size) flags.AddUser(&userID) @@ -212,7 +215,7 @@ func runList(opts *options) (err error) { opts.logger.Info("") permissions := permissionsData.GetItems() rows := aclcmdutil.MapACLsToTableRows(permissions, opts.localizer) - dump.Table(opts.io.Out, rows) + dump.Formatted(opts.io.Out, opts.output, rows) default: return dump.Formatted(opts.io.Out, opts.output, permissionsData) } diff --git a/pkg/cmd/registry/artifact/role/list/list.go b/pkg/cmd/registry/artifact/role/list/list.go index 5b284027f..d6214d650 100644 --- a/pkg/cmd/registry/artifact/role/list/list.go +++ b/pkg/cmd/registry/artifact/role/list/list.go @@ -83,9 +83,6 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) - flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.outputFormat) - return cmd } @@ -117,7 +114,7 @@ func runList(opts *options) error { switch opts.outputFormat { case dump.TableFormat: rows := mapResponseItemsToRows(mappings) - dump.Table(opts.IO.Out, rows) + dump.Formatted(opts.IO.Out, opts.outputFormat, rows) opts.Logger.Info("") default: return dump.Formatted(stdout, opts.outputFormat, mappings) From b47626a0c1d3e06c1160f4cf88b784e515239a1a Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 12 Apr 2022 14:45:01 +0100 Subject: [PATCH 15/20] chore: updated list.go(s) --- pkg/cmd/kafka/acl/list/list.go | 9 +++------ pkg/cmd/kafka/consumergroup/list/list.go | 7 +++---- pkg/cmd/kafka/list/list.go | 6 +++--- pkg/cmd/kafka/topic/list/list.go | 7 +++---- pkg/cmd/registry/artifact/crud/list/list.go | 6 +----- pkg/cmd/registry/artifact/role/list/list.go | 6 ++---- pkg/cmd/registry/list/list.go | 6 +----- pkg/cmd/serviceaccount/list/list.go | 9 ++------- 8 files changed, 18 insertions(+), 38 deletions(-) diff --git a/pkg/cmd/kafka/acl/list/list.go b/pkg/cmd/kafka/acl/list/list.go index 8298789c2..0506f889c 100644 --- a/pkg/cmd/kafka/acl/list/list.go +++ b/pkg/cmd/kafka/acl/list/list.go @@ -117,9 +117,8 @@ func NewListACLCommand(f *factory.Factory) *cobra.Command { flags.AddInstanceID(&opts.kafkaID) - tabular := "table" - - flags.AddOutputFormatted(&opts.output, true, &tabular) + table := dump.TableFormat + flags.AddOutputFormatted(&opts.output, true, &table) flags.AddPage(&opts.page) flags.AddSize(&opts.size) flags.AddUser(&userID) @@ -215,10 +214,8 @@ func runList(opts *options) (err error) { opts.logger.Info("") permissions := permissionsData.GetItems() rows := aclcmdutil.MapACLsToTableRows(permissions, opts.localizer) - dump.Formatted(opts.io.Out, opts.output, rows) + return dump.Formatted(opts.io.Out, opts.output, rows) default: return dump.Formatted(opts.io.Out, opts.output, permissionsData) } - - return nil } diff --git a/pkg/cmd/kafka/consumergroup/list/list.go b/pkg/cmd/kafka/consumergroup/list/list.go index 9b2000623..9f861f9b9 100644 --- a/pkg/cmd/kafka/consumergroup/list/list.go +++ b/pkg/cmd/kafka/consumergroup/list/list.go @@ -93,7 +93,8 @@ func NewListConsumerGroupCommand(f *factory.Factory) *cobra.Command { flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.output) + table := dump.TableFormat + flags.AddOutputFormatted(&opts.output, true, &table) flags.StringVar(&opts.topic, "topic", "", opts.localizer.MustLocalize("kafka.consumerGroup.list.flag.topic.description")) flags.StringVar(&opts.search, "search", "", opts.localizer.MustLocalize("kafka.consumerGroup.list.flag.search")) flags.Int32VarP(&opts.page, "page", "", cmdutil.ConvertPageValueToInt32(build.DefaultPageNumber), opts.localizer.MustLocalize("kafka.consumerGroup.list.flag.page")) @@ -167,12 +168,10 @@ func runList(opts *options) (err error) { opts.Logger.Info("") consumerGroups := consumerGroupData.GetItems() rows := mapConsumerGroupResultsToTableFormat(consumerGroups) - dump.Table(opts.IO.Out, rows) + return dump.Formatted(opts.IO.Out, opts.output, rows) default: return dump.Formatted(opts.IO.Out, opts.output, consumerGroupData) } - - return nil } func mapConsumerGroupResultsToTableFormat(consumerGroups []kafkainstanceclient.ConsumerGroup) []consumerGroupRow { diff --git a/pkg/cmd/kafka/list/list.go b/pkg/cmd/kafka/list/list.go index 9dc916ff7..7b4d4ff5b 100644 --- a/pkg/cmd/kafka/list/list.go +++ b/pkg/cmd/kafka/list/list.go @@ -89,7 +89,8 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flags := kafkaFlagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.outputFormat) + table := dump.TableFormat + flags.AddOutputFormatted(&opts.outputFormat, true, &table) flags.IntVar(&opts.page, "page", int(cmdutil.ConvertPageValueToInt32(build.DefaultPageNumber)), opts.localizer.MustLocalize("kafka.list.flag.page")) flags.IntVar(&opts.limit, "limit", 100, opts.localizer.MustLocalize("kafka.list.flag.limit")) flags.StringVar(&opts.search, "search", "", opts.localizer.MustLocalize("kafka.list.flag.search")) @@ -134,12 +135,11 @@ func runList(opts *options) error { } else { rows = mapResponseItemsToRows(response.GetItems(), "-") } - dump.Table(opts.IO.Out, rows) opts.Logger.Info("") + return dump.Formatted(opts.IO.Out, opts.outputFormat, rows) default: return dump.Formatted(opts.IO.Out, opts.outputFormat, response) } - return nil } func mapResponseItemsToRows(kafkas []kafkamgmtclient.KafkaRequest, selectedId string) []kafkaRow { diff --git a/pkg/cmd/kafka/topic/list/list.go b/pkg/cmd/kafka/topic/list/list.go index 8389c5948..70b3fc9ce 100644 --- a/pkg/cmd/kafka/topic/list/list.go +++ b/pkg/cmd/kafka/topic/list/list.go @@ -102,7 +102,8 @@ func NewListTopicCommand(f *factory.Factory) *cobra.Command { flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.output) + table := dump.TableFormat + flags.AddOutputFormatted(&opts.output, true, &table) flags.StringVar(&opts.search, "search", "", opts.localizer.MustLocalize("kafka.topic.list.flag.search.description")) flags.Int32VarP(&opts.page, "page", "", cmdutil.ConvertPageValueToInt32(build.DefaultPageNumber), opts.localizer.MustLocalize("kafka.topic.list.flag.page.description")) flags.Int32VarP(&opts.size, "size", "", cmdutil.ConvertSizeValueToInt32(build.DefaultPageSize), opts.localizer.MustLocalize("kafka.topic.list.flag.size.description")) @@ -170,12 +171,10 @@ func runCmd(opts *options) error { case dump.TableFormat: topics := topicData.GetItems() rows := mapTopicResultsToTableFormat(topics) - dump.Table(stdout, rows) + return dump.Formatted(stdout, opts.output, rows) default: return dump.Formatted(stdout, opts.output, topicData) } - - return nil } func mapTopicResultsToTableFormat(topics []kafkainstanceclient.Topic) []topicRow { diff --git a/pkg/cmd/registry/artifact/crud/list/list.go b/pkg/cmd/registry/artifact/crud/list/list.go index 47a7b2a84..4608093dc 100644 --- a/pkg/cmd/registry/artifact/crud/list/list.go +++ b/pkg/cmd/registry/artifact/crud/list/list.go @@ -115,9 +115,6 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) - flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutputFormatted(&opts.outputFormat, false, nil) - return cmd } @@ -174,13 +171,12 @@ func runList(opts *options) error { switch opts.outputFormat { case dump.TableFormat: rows := mapResponseItemsToRows(response.Artifacts) - dump.Table(opts.IO.Out, rows) opts.Logger.Info("") + return dump.Formatted(opts.IO.Out, opts.outputFormat, rows) default: return dump.Formatted(opts.IO.Out, opts.outputFormat, response) } - return nil } func mapResponseItemsToRows(artifacts []registryinstanceclient.SearchedArtifact) []artifactRow { diff --git a/pkg/cmd/registry/artifact/role/list/list.go b/pkg/cmd/registry/artifact/role/list/list.go index d6214d650..72579cf56 100644 --- a/pkg/cmd/registry/artifact/role/list/list.go +++ b/pkg/cmd/registry/artifact/role/list/list.go @@ -113,14 +113,12 @@ func runList(opts *options) error { switch opts.outputFormat { case dump.TableFormat: - rows := mapResponseItemsToRows(mappings) - dump.Formatted(opts.IO.Out, opts.outputFormat, rows) opts.Logger.Info("") + rows := mapResponseItemsToRows(mappings) + return dump.Formatted(opts.IO.Out, opts.outputFormat, rows) default: return dump.Formatted(stdout, opts.outputFormat, mappings) } - - return nil } func mapResponseItemsToRows(artifacts []registryinstanceclient.RoleMapping) []registryRow { diff --git a/pkg/cmd/registry/list/list.go b/pkg/cmd/registry/list/list.go index f7d979feb..b4e745a31 100644 --- a/pkg/cmd/registry/list/list.go +++ b/pkg/cmd/registry/list/list.go @@ -82,9 +82,6 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) - flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.outputFormat) - return cmd } @@ -125,13 +122,12 @@ func runList(opts *options) error { } else { rows = mapResponseItemsToRows(&response.Items, "-") } - dump.Table(opts.IO.Out, rows) opts.Logger.Info("") + return dump.Formatted(opts.IO.Out, opts.outputFormat, rows) default: return dump.Formatted(opts.IO.Out, opts.outputFormat, response) } - return nil } func mapResponseItemsToRows(registries *[]srsmgmtv1.Registry, selectedId string) []RegistryRow { diff --git a/pkg/cmd/serviceaccount/list/list.go b/pkg/cmd/serviceaccount/list/list.go index 3e7f81a7b..278f22f48 100644 --- a/pkg/cmd/serviceaccount/list/list.go +++ b/pkg/cmd/serviceaccount/list/list.go @@ -23,8 +23,7 @@ type options struct { localizer localize.Localizer Context context.Context - output string - outputFormat string + output string } // svcAcctRow contains the properties used to @@ -67,9 +66,6 @@ func NewListCommand(f *factory.Factory) *cobra.Command { flagutil.EnableOutputFlagCompletion(cmd) - flags := flagutil.NewFlagSet(cmd, opts.localizer) - flags.AddOutput(&opts.outputFormat) - return cmd } @@ -94,12 +90,11 @@ func runList(opts *options) (err error) { switch opts.output { case dump.TableFormat: rows := mapResponseItemsToRows(serviceaccounts) - dump.Table(outStream, rows) + return dump.Formatted(outStream, opts.output, rows) default: return dump.Formatted(opts.IO.Out, opts.output, res) } - return nil } func mapResponseItemsToRows(svcAccts []kafkamgmtclient.ServiceAccountListItem) []svcAcctRow { From 503e8c8223c440ccb32ad0080ffcf314f1ba8535 Mon Sep 17 00:00:00 2001 From: Kannan Date: Tue, 19 Apr 2022 07:50:02 +0100 Subject: [PATCH 16/20] chore: updated fix for #1429 and .md files --- docs/commands/rhoas_kafka_acl_delete.md | 2 +- docs/commands/rhoas_kafka_acl_list.md | 2 +- docs/commands/rhoas_kafka_consumer-group_describe.md | 2 +- docs/commands/rhoas_kafka_consumer-group_list.md | 2 +- docs/commands/rhoas_kafka_create.md | 2 +- docs/commands/rhoas_kafka_describe.md | 2 +- docs/commands/rhoas_kafka_list.md | 2 +- docs/commands/rhoas_kafka_topic_describe.md | 2 +- docs/commands/rhoas_kafka_topic_list.md | 2 +- docs/commands/rhoas_service-account_describe.md | 2 +- docs/commands/rhoas_service-account_list.md | 2 +- docs/commands/rhoas_service-registry_artifact_create.md | 2 +- docs/commands/rhoas_service-registry_artifact_list.md | 2 +- docs/commands/rhoas_service-registry_artifact_metadata-get.md | 2 +- docs/commands/rhoas_service-registry_artifact_metadata-set.md | 2 +- docs/commands/rhoas_service-registry_artifact_versions.md | 2 +- docs/commands/rhoas_service-registry_create.md | 2 +- docs/commands/rhoas_service-registry_describe.md | 2 +- docs/commands/rhoas_service-registry_list.md | 2 +- docs/commands/rhoas_service-registry_role_list.md | 2 +- docs/commands/rhoas_service-registry_rule_describe.md | 2 +- docs/commands/rhoas_status.md | 2 +- pkg/core/cmdutil/flagutil/flagset.go | 4 ++-- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/commands/rhoas_kafka_acl_delete.md b/docs/commands/rhoas_kafka_acl_delete.md index 45e7b3ed1..8abc5c48c 100644 --- a/docs/commands/rhoas_kafka_acl_delete.md +++ b/docs/commands/rhoas_kafka_acl_delete.md @@ -35,7 +35,7 @@ $ rhoas kafka acl delete --operation all --permission any --group "group-1" --al --group string Set the consumer group resource. When the --prefix option is also passed, this is used as the consumer group prefix --instance-id string Kafka instance ID. Uses the current instance if not set --operation string Set the ACL operation. Choose from: "all", "alter", "alter-configs", "create", "delete", "describe", "describe-configs", "read", "write" - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --pattern-type string Allows to specify arguments matching strategy [any literal prefix] (default "literal") --permission string Set the ACL permission. Choose from: "allow", "any", "deny" (default "any") --prefix Determine if the resource should be exact match or prefix diff --git a/docs/commands/rhoas_kafka_acl_list.md b/docs/commands/rhoas_kafka_acl_list.md index 5ed661ea7..e4751123b 100644 --- a/docs/commands/rhoas_kafka_acl_list.md +++ b/docs/commands/rhoas_kafka_acl_list.md @@ -56,7 +56,7 @@ $ rhoas kafka acl list --group foo_group_id --user foo_user --cluster Set filter to cluster resource --group string Text search to filter ACL rules for consumer groups by ID --instance-id string Kafka instance ID. Uses the current instance if not set - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --page int32 Current page number for the list (default 1) --service-account string Service account client ID used as principal for this operation --size int32 Maximum number of items to be returned per page (default 10) diff --git a/docs/commands/rhoas_kafka_consumer-group_describe.md b/docs/commands/rhoas_kafka_consumer-group_describe.md index 614b6a885..173dd91c8 100644 --- a/docs/commands/rhoas_kafka_consumer-group_describe.md +++ b/docs/commands/rhoas_kafka_consumer-group_describe.md @@ -23,7 +23,7 @@ $ rhoas kafka consumer-group describe --id consumer_group_1 -o json ``` --id string The unique ID of the consumer group to view - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_consumer-group_list.md b/docs/commands/rhoas_kafka_consumer-group_list.md index 243124d5d..aea3dab4c 100644 --- a/docs/commands/rhoas_kafka_consumer-group_list.md +++ b/docs/commands/rhoas_kafka_consumer-group_list.md @@ -24,7 +24,7 @@ $ rhoas kafka consumer-group list -o json ### Options ``` - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --page int32 View the specified page number in the list of consumer groups (default 1) --search string Text search to filter consumer groups by ID --size int32 Maximum number of consumer groups to be returned per page (default 10) diff --git a/docs/commands/rhoas_kafka_create.md b/docs/commands/rhoas_kafka_create.md index 3756005ee..332bd30fa 100644 --- a/docs/commands/rhoas_kafka_create.md +++ b/docs/commands/rhoas_kafka_create.md @@ -31,7 +31,7 @@ $ rhoas kafka create -o yaml ``` --name string Unique name of the Kafka instance - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --provider string Cloud Provider ID --region string Cloud Provider Region ID --use Set the new Kafka instance to the current instance (default true) diff --git a/docs/commands/rhoas_kafka_describe.md b/docs/commands/rhoas_kafka_describe.md index 5d74d00cf..727c7bbd2 100644 --- a/docs/commands/rhoas_kafka_describe.md +++ b/docs/commands/rhoas_kafka_describe.md @@ -42,7 +42,7 @@ $ rhoas kafka describe -o yaml --bootstrap-server If specified, only the bootstrap server host of the Kafka instance will be displayed --id string Unique ID of the Kafka instance you want to view --name string Name of the Kafka instance you want to view - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_list.md b/docs/commands/rhoas_kafka_list.md index b85fe3837..b119d8649 100644 --- a/docs/commands/rhoas_kafka_list.md +++ b/docs/commands/rhoas_kafka_list.md @@ -30,7 +30,7 @@ $ rhoas kafka list -o json ``` --limit int The maximum number of Kafka instances to be returned (default 100) - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --page int Display the Kafka instances from the specified page number (default 1) --search string Text search to filter the Kafka instances by name, owner, cloud_provider, region and status ``` diff --git a/docs/commands/rhoas_kafka_topic_describe.md b/docs/commands/rhoas_kafka_topic_describe.md index 11bb25b37..fc9e7cca2 100644 --- a/docs/commands/rhoas_kafka_topic_describe.md +++ b/docs/commands/rhoas_kafka_topic_describe.md @@ -23,7 +23,7 @@ $ rhoas kafka topic describe --name topic-1 ``` --name string Format in which to display the Kafka topic (choose from: "json", "yml", "yaml") - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_topic_list.md b/docs/commands/rhoas_kafka_topic_list.md index fadbc7419..533ad29da 100644 --- a/docs/commands/rhoas_kafka_topic_list.md +++ b/docs/commands/rhoas_kafka_topic_list.md @@ -25,7 +25,7 @@ $ rhoas kafka topic list -o json ### Options ``` - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" --page int32 Current page number for list of topics (default 1) --search string Text search to filter the Kafka topics by name --size int32 Maximum number of items to be returned per page (default 10) diff --git a/docs/commands/rhoas_service-account_describe.md b/docs/commands/rhoas_service-account_describe.md index e9aa33dd2..d0aff7189 100644 --- a/docs/commands/rhoas_service-account_describe.md +++ b/docs/commands/rhoas_service-account_describe.md @@ -27,7 +27,7 @@ $ rhoas service-account describe --id=8a06e685-f827-44bc-b0a7-250bc8abe52e --out ``` --id string The unique ID of the service account to view - -o, --output string Format in which to display the service account (choose from: "json", "yml", "yaml") (default "json") + -o, --output string Format in which to display the service account (choose from: "json", "yml", "yaml" or "none") (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-account_list.md b/docs/commands/rhoas_service-account_list.md index 4c5219bc0..0be9ce052 100644 --- a/docs/commands/rhoas_service-account_list.md +++ b/docs/commands/rhoas_service-account_list.md @@ -29,7 +29,7 @@ $ rhoas service-account list -o json ### Options ``` - -o, --output string Format in which to display the service accounts (choose from: "json", "yml", "yaml") + -o, --output string Format in which to display the service accounts (choose from: "json", "yml", "yaml" or "none") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_create.md b/docs/commands/rhoas_service-registry_artifact_create.md index 12bccbabc..66fb5d823 100644 --- a/docs/commands/rhoas_service-registry_artifact_create.md +++ b/docs/commands/rhoas_service-registry_artifact_create.md @@ -54,7 +54,7 @@ rhoas service-registry artifact create --type=JSON my-artifact.json -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) --name string Custom name of the artifact - -o, --output string Output format (json, yaml, yml) (default "json") + -o, --output string Output format ("json", "yaml", "yml", "none") (default "json") -t, --type string Type of artifact. Choose from: AVRO, PROTOBUF, JSON, OPENAPI, ASYNCAPI, GRAPHQL, KCONNECT, WSDL, XSD, XML --version string Custom version of the artifact (for example 1.0.0) ``` diff --git a/docs/commands/rhoas_service-registry_artifact_list.md b/docs/commands/rhoas_service-registry_artifact_list.md index ec43cbb9c..01211e9f7 100644 --- a/docs/commands/rhoas_service-registry_artifact_list.md +++ b/docs/commands/rhoas_service-registry_artifact_list.md @@ -42,7 +42,7 @@ rhoas service-registry artifact list --description sample --label stringArray Text search to filter artifacts by labels --limit int32 Page limit (default 100) --name string Text search to filter artifacts by name - -o, --output string Output format (json, yaml, yml) + -o, --output string Output format ("json", "yaml", "yml", "none") --page int32 Page number (default 1) --property stringArray Text search to filter artifacts by properties (separate each name/value pair using a colon) ``` diff --git a/docs/commands/rhoas_service-registry_artifact_metadata-get.md b/docs/commands/rhoas_service-registry_artifact_metadata-get.md index d513a1f7f..c2967577f 100644 --- a/docs/commands/rhoas_service-registry_artifact_metadata-get.md +++ b/docs/commands/rhoas_service-registry_artifact_metadata-get.md @@ -30,7 +30,7 @@ rhoas service-registry artifact metadata-get --artifact-id=my-artifact --group m --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format (json, yaml, yml) + -o, --output string Output format ("json", "yaml", "yml", "none") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_metadata-set.md b/docs/commands/rhoas_service-registry_artifact_metadata-set.md index c3c6e7a1b..b6afca2f2 100644 --- a/docs/commands/rhoas_service-registry_artifact_metadata-set.md +++ b/docs/commands/rhoas_service-registry_artifact_metadata-set.md @@ -35,7 +35,7 @@ EDITOR="code -w" rhoas service-registry artifact metadata-set --artifact-id=my-a -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) --name string Custom name of the artifact - -o, --output string Output format (json, yaml, yml) + -o, --output string Output format ("json", "yaml", "yml", "none") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_versions.md b/docs/commands/rhoas_service-registry_artifact_versions.md index 3c06c7320..2ddad7e11 100644 --- a/docs/commands/rhoas_service-registry_artifact_versions.md +++ b/docs/commands/rhoas_service-registry_artifact_versions.md @@ -27,7 +27,7 @@ rhoas service-registry artifact versions --artifact-id=my-artifact --group mygro --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format (json, yaml, yml) + -o, --output string Output format ("json", "yaml", "yml", "none") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_create.md b/docs/commands/rhoas_service-registry_create.md index d676df2b5..54aaabdd4 100644 --- a/docs/commands/rhoas_service-registry_create.md +++ b/docs/commands/rhoas_service-registry_create.md @@ -27,7 +27,7 @@ rhoas service-registry create --name myregistry --description "description of in ``` --description string User-provided description of the new Service Registry instance --name string Unique name of the Service Registry instance - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") (default "json") --use Set the new Service Registry instance to the current instance (default true) ``` diff --git a/docs/commands/rhoas_service-registry_describe.md b/docs/commands/rhoas_service-registry_describe.md index ccd03887d..c39ba7898 100644 --- a/docs/commands/rhoas_service-registry_describe.md +++ b/docs/commands/rhoas_service-registry_describe.md @@ -28,7 +28,7 @@ rhoas service-registry describe --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg ``` --id string Unique ID of the Service Registry instance (if not provided, the current Service Registry instance will be used) --name string Name of the Service Registry instance to view - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_list.md b/docs/commands/rhoas_service-registry_list.md index 87b2f00c8..bd55279ba 100644 --- a/docs/commands/rhoas_service-registry_list.md +++ b/docs/commands/rhoas_service-registry_list.md @@ -22,7 +22,7 @@ rhoas service-registry list ``` --limit int32 The maximum number of Service Registry instances to be returned (default 100) - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") --page int32 Display the Service Registry instances from the specified page number (default 1) ``` diff --git a/docs/commands/rhoas_service-registry_role_list.md b/docs/commands/rhoas_service-registry_role_list.md index e9bc007fd..ea40eb15c 100644 --- a/docs/commands/rhoas_service-registry_role_list.md +++ b/docs/commands/rhoas_service-registry_role_list.md @@ -22,7 +22,7 @@ rhoas service-registry role list ``` --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format (json, yaml, yml) + -o, --output string Output format ("json", "yaml", "yml", "none") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_rule_describe.md b/docs/commands/rhoas_service-registry_rule_describe.md index 6119588e7..c6e19150a 100644 --- a/docs/commands/rhoas_service-registry_rule_describe.md +++ b/docs/commands/rhoas_service-registry_rule_describe.md @@ -27,7 +27,7 @@ $ rhoas service-registry rule describe --rule-type=compatibility --artifact-id=m --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" + -o, --output string Specify the output format. (choose from: "json", "yaml", "yml" or "none") --rule-type string Rule type determines how the content of an artifact can evolve over time ``` diff --git a/docs/commands/rhoas_status.md b/docs/commands/rhoas_status.md index cf4b13baa..4c2e391ca 100644 --- a/docs/commands/rhoas_status.md +++ b/docs/commands/rhoas_status.md @@ -32,7 +32,7 @@ $ rhoas status -o json ### Options ``` - -o, --output string Format in which to display the status of your services (choose from: "json", "yml", "yaml") + -o, --output string Format in which to display the status of your services (choose from: "json", "yml", "yaml" or "none") ``` ### Options inherited from parent commands diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index d7e2a8e2f..a7df5f788 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -41,7 +41,7 @@ func (fs *FlagSet) AddOutputFormatted(output *string, isTable bool, format *stri selectedFormat := dump.JSONFormat - if format != nil || *format != "" { + if format != nil && *format != "" { selectedFormat = *format } @@ -147,7 +147,7 @@ func ValidateOutput(v string) error { return InvalidValueError("output", v, ValidOutputFormats...) } -// ValidateOutputForTable checks if value v is a valid value for --outpu adding table +// ValidateOutputForTable checks if value v is a valid value for --output adding table func ValidateOutputForTable(v string) error { isValid := IsValidInput(v, ValidListOutputFormats...) From 63d3fc58dd170c7c0556b07bb12411e463b0807a Mon Sep 17 00:00:00 2001 From: Kannan Date: Wed, 20 Apr 2022 19:42:54 +0100 Subject: [PATCH 17/20] chore: fix and update docs --- docs/commands/rhoas_kafka_acl_delete.md | 2 +- docs/commands/rhoas_kafka_acl_list.md | 2 +- docs/commands/rhoas_kafka_consumer-group_describe.md | 2 +- docs/commands/rhoas_kafka_consumer-group_list.md | 2 +- docs/commands/rhoas_kafka_create.md | 2 +- docs/commands/rhoas_kafka_describe.md | 2 +- docs/commands/rhoas_kafka_list.md | 2 +- docs/commands/rhoas_kafka_topic_create.md | 2 +- docs/commands/rhoas_kafka_topic_describe.md | 2 +- docs/commands/rhoas_kafka_topic_list.md | 2 +- docs/commands/rhoas_service-account_describe.md | 2 +- docs/commands/rhoas_service-account_list.md | 2 +- docs/commands/rhoas_service-registry_artifact_create.md | 2 +- docs/commands/rhoas_service-registry_artifact_list.md | 2 +- docs/commands/rhoas_service-registry_artifact_metadata-get.md | 2 +- docs/commands/rhoas_service-registry_artifact_metadata-set.md | 2 +- docs/commands/rhoas_service-registry_artifact_versions.md | 2 +- docs/commands/rhoas_service-registry_create.md | 2 +- docs/commands/rhoas_service-registry_describe.md | 2 +- docs/commands/rhoas_service-registry_list.md | 2 +- docs/commands/rhoas_service-registry_role_list.md | 2 +- docs/commands/rhoas_service-registry_rule_describe.md | 2 +- docs/commands/rhoas_status.md | 2 +- pkg/core/cmdutil/flagutil/flagset.go | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/commands/rhoas_kafka_acl_delete.md b/docs/commands/rhoas_kafka_acl_delete.md index 8abc5c48c..e2f9a6c30 100644 --- a/docs/commands/rhoas_kafka_acl_delete.md +++ b/docs/commands/rhoas_kafka_acl_delete.md @@ -35,7 +35,7 @@ $ rhoas kafka acl delete --operation all --permission any --group "group-1" --al --group string Set the consumer group resource. When the --prefix option is also passed, this is used as the consumer group prefix --instance-id string Kafka instance ID. Uses the current instance if not set --operation string Set the ACL operation. Choose from: "all", "alter", "alter-configs", "create", "delete", "describe", "describe-configs", "read", "write" - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") --pattern-type string Allows to specify arguments matching strategy [any literal prefix] (default "literal") --permission string Set the ACL permission. Choose from: "allow", "any", "deny" (default "any") --prefix Determine if the resource should be exact match or prefix diff --git a/docs/commands/rhoas_kafka_acl_list.md b/docs/commands/rhoas_kafka_acl_list.md index e4751123b..fbd0496d9 100644 --- a/docs/commands/rhoas_kafka_acl_list.md +++ b/docs/commands/rhoas_kafka_acl_list.md @@ -56,7 +56,7 @@ $ rhoas kafka acl list --group foo_group_id --user foo_user --cluster Set filter to cluster resource --group string Text search to filter ACL rules for consumer groups by ID --instance-id string Kafka instance ID. Uses the current instance if not set - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "table", "yaml", "yml" (default "table") --page int32 Current page number for the list (default 1) --service-account string Service account client ID used as principal for this operation --size int32 Maximum number of items to be returned per page (default 10) diff --git a/docs/commands/rhoas_kafka_consumer-group_describe.md b/docs/commands/rhoas_kafka_consumer-group_describe.md index 173dd91c8..ae56ceedb 100644 --- a/docs/commands/rhoas_kafka_consumer-group_describe.md +++ b/docs/commands/rhoas_kafka_consumer-group_describe.md @@ -23,7 +23,7 @@ $ rhoas kafka consumer-group describe --id consumer_group_1 -o json ``` --id string The unique ID of the consumer group to view - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_consumer-group_list.md b/docs/commands/rhoas_kafka_consumer-group_list.md index aea3dab4c..5b2432e1e 100644 --- a/docs/commands/rhoas_kafka_consumer-group_list.md +++ b/docs/commands/rhoas_kafka_consumer-group_list.md @@ -24,7 +24,7 @@ $ rhoas kafka consumer-group list -o json ### Options ``` - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "table", "yaml", "yml" (default "table") --page int32 View the specified page number in the list of consumer groups (default 1) --search string Text search to filter consumer groups by ID --size int32 Maximum number of consumer groups to be returned per page (default 10) diff --git a/docs/commands/rhoas_kafka_create.md b/docs/commands/rhoas_kafka_create.md index 332bd30fa..1445e51b7 100644 --- a/docs/commands/rhoas_kafka_create.md +++ b/docs/commands/rhoas_kafka_create.md @@ -31,7 +31,7 @@ $ rhoas kafka create -o yaml ``` --name string Unique name of the Kafka instance - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") --provider string Cloud Provider ID --region string Cloud Provider Region ID --use Set the new Kafka instance to the current instance (default true) diff --git a/docs/commands/rhoas_kafka_describe.md b/docs/commands/rhoas_kafka_describe.md index 727c7bbd2..a56d0c1a1 100644 --- a/docs/commands/rhoas_kafka_describe.md +++ b/docs/commands/rhoas_kafka_describe.md @@ -42,7 +42,7 @@ $ rhoas kafka describe -o yaml --bootstrap-server If specified, only the bootstrap server host of the Kafka instance will be displayed --id string Unique ID of the Kafka instance you want to view --name string Name of the Kafka instance you want to view - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_list.md b/docs/commands/rhoas_kafka_list.md index b119d8649..8a789963c 100644 --- a/docs/commands/rhoas_kafka_list.md +++ b/docs/commands/rhoas_kafka_list.md @@ -30,7 +30,7 @@ $ rhoas kafka list -o json ``` --limit int The maximum number of Kafka instances to be returned (default 100) - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "table", "yaml", "yml" (default "table") --page int Display the Kafka instances from the specified page number (default 1) --search string Text search to filter the Kafka instances by name, owner, cloud_provider, region and status ``` diff --git a/docs/commands/rhoas_kafka_topic_create.md b/docs/commands/rhoas_kafka_topic_create.md index bf95f8235..6f828744a 100644 --- a/docs/commands/rhoas_kafka_topic_create.md +++ b/docs/commands/rhoas_kafka_topic_create.md @@ -26,7 +26,7 @@ $ rhoas kafka topic create --name topic-1 ``` --cleanup-policy string Determines whether log messages are deleted, compacted, or both (default "delete") --name string Topic name - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") --partitions int32 The number of partitions in the topic (default 1) --retention-bytes int The maximum total size of a partition log segments before old log segments are deleted to free up space. Value of -1 is set by default indicating no retention size limits. (default -1) diff --git a/docs/commands/rhoas_kafka_topic_describe.md b/docs/commands/rhoas_kafka_topic_describe.md index fc9e7cca2..d37ec12da 100644 --- a/docs/commands/rhoas_kafka_topic_describe.md +++ b/docs/commands/rhoas_kafka_topic_describe.md @@ -23,7 +23,7 @@ $ rhoas kafka topic describe --name topic-1 ``` --name string Format in which to display the Kafka topic (choose from: "json", "yml", "yaml") - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_kafka_topic_list.md b/docs/commands/rhoas_kafka_topic_list.md index 533ad29da..cf86d1c20 100644 --- a/docs/commands/rhoas_kafka_topic_list.md +++ b/docs/commands/rhoas_kafka_topic_list.md @@ -25,7 +25,7 @@ $ rhoas kafka topic list -o json ### Options ``` - -o, --output string Specify the output format. Choose from: "json", "yaml", "yml" or "none" + -o, --output string Specify the output format. Choose from: "json", "none", "table", "yaml", "yml" (default "table") --page int32 Current page number for list of topics (default 1) --search string Text search to filter the Kafka topics by name --size int32 Maximum number of items to be returned per page (default 10) diff --git a/docs/commands/rhoas_service-account_describe.md b/docs/commands/rhoas_service-account_describe.md index d0aff7189..e9aa33dd2 100644 --- a/docs/commands/rhoas_service-account_describe.md +++ b/docs/commands/rhoas_service-account_describe.md @@ -27,7 +27,7 @@ $ rhoas service-account describe --id=8a06e685-f827-44bc-b0a7-250bc8abe52e --out ``` --id string The unique ID of the service account to view - -o, --output string Format in which to display the service account (choose from: "json", "yml", "yaml" or "none") (default "json") + -o, --output string Format in which to display the service account (choose from: "json", "yml", "yaml") (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-account_list.md b/docs/commands/rhoas_service-account_list.md index 0be9ce052..4c5219bc0 100644 --- a/docs/commands/rhoas_service-account_list.md +++ b/docs/commands/rhoas_service-account_list.md @@ -29,7 +29,7 @@ $ rhoas service-account list -o json ### Options ``` - -o, --output string Format in which to display the service accounts (choose from: "json", "yml", "yaml" or "none") + -o, --output string Format in which to display the service accounts (choose from: "json", "yml", "yaml") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_create.md b/docs/commands/rhoas_service-registry_artifact_create.md index 66fb5d823..12bccbabc 100644 --- a/docs/commands/rhoas_service-registry_artifact_create.md +++ b/docs/commands/rhoas_service-registry_artifact_create.md @@ -54,7 +54,7 @@ rhoas service-registry artifact create --type=JSON my-artifact.json -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) --name string Custom name of the artifact - -o, --output string Output format ("json", "yaml", "yml", "none") (default "json") + -o, --output string Output format (json, yaml, yml) (default "json") -t, --type string Type of artifact. Choose from: AVRO, PROTOBUF, JSON, OPENAPI, ASYNCAPI, GRAPHQL, KCONNECT, WSDL, XSD, XML --version string Custom version of the artifact (for example 1.0.0) ``` diff --git a/docs/commands/rhoas_service-registry_artifact_list.md b/docs/commands/rhoas_service-registry_artifact_list.md index 01211e9f7..ec43cbb9c 100644 --- a/docs/commands/rhoas_service-registry_artifact_list.md +++ b/docs/commands/rhoas_service-registry_artifact_list.md @@ -42,7 +42,7 @@ rhoas service-registry artifact list --description sample --label stringArray Text search to filter artifacts by labels --limit int32 Page limit (default 100) --name string Text search to filter artifacts by name - -o, --output string Output format ("json", "yaml", "yml", "none") + -o, --output string Output format (json, yaml, yml) --page int32 Page number (default 1) --property stringArray Text search to filter artifacts by properties (separate each name/value pair using a colon) ``` diff --git a/docs/commands/rhoas_service-registry_artifact_metadata-get.md b/docs/commands/rhoas_service-registry_artifact_metadata-get.md index c2967577f..d513a1f7f 100644 --- a/docs/commands/rhoas_service-registry_artifact_metadata-get.md +++ b/docs/commands/rhoas_service-registry_artifact_metadata-get.md @@ -30,7 +30,7 @@ rhoas service-registry artifact metadata-get --artifact-id=my-artifact --group m --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format ("json", "yaml", "yml", "none") + -o, --output string Output format (json, yaml, yml) ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_metadata-set.md b/docs/commands/rhoas_service-registry_artifact_metadata-set.md index b6afca2f2..c3c6e7a1b 100644 --- a/docs/commands/rhoas_service-registry_artifact_metadata-set.md +++ b/docs/commands/rhoas_service-registry_artifact_metadata-set.md @@ -35,7 +35,7 @@ EDITOR="code -w" rhoas service-registry artifact metadata-set --artifact-id=my-a -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) --name string Custom name of the artifact - -o, --output string Output format ("json", "yaml", "yml", "none") + -o, --output string Output format (json, yaml, yml) ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_artifact_versions.md b/docs/commands/rhoas_service-registry_artifact_versions.md index 2ddad7e11..3c06c7320 100644 --- a/docs/commands/rhoas_service-registry_artifact_versions.md +++ b/docs/commands/rhoas_service-registry_artifact_versions.md @@ -27,7 +27,7 @@ rhoas service-registry artifact versions --artifact-id=my-artifact --group mygro --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format ("json", "yaml", "yml", "none") + -o, --output string Output format (json, yaml, yml) ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_create.md b/docs/commands/rhoas_service-registry_create.md index 54aaabdd4..d676df2b5 100644 --- a/docs/commands/rhoas_service-registry_create.md +++ b/docs/commands/rhoas_service-registry_create.md @@ -27,7 +27,7 @@ rhoas service-registry create --name myregistry --description "description of in ``` --description string User-provided description of the new Service Registry instance --name string Unique name of the Service Registry instance - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") (default "json") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json") --use Set the new Service Registry instance to the current instance (default true) ``` diff --git a/docs/commands/rhoas_service-registry_describe.md b/docs/commands/rhoas_service-registry_describe.md index c39ba7898..ccd03887d 100644 --- a/docs/commands/rhoas_service-registry_describe.md +++ b/docs/commands/rhoas_service-registry_describe.md @@ -28,7 +28,7 @@ rhoas service-registry describe --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg ``` --id string Unique ID of the Service Registry instance (if not provided, the current Service Registry instance will be used) --name string Name of the Service Registry instance to view - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") (default "json") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json") ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_list.md b/docs/commands/rhoas_service-registry_list.md index bd55279ba..87b2f00c8 100644 --- a/docs/commands/rhoas_service-registry_list.md +++ b/docs/commands/rhoas_service-registry_list.md @@ -22,7 +22,7 @@ rhoas service-registry list ``` --limit int32 The maximum number of Service Registry instances to be returned (default 100) - -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml" or "none") + -o, --output string Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") --page int32 Display the Service Registry instances from the specified page number (default 1) ``` diff --git a/docs/commands/rhoas_service-registry_role_list.md b/docs/commands/rhoas_service-registry_role_list.md index ea40eb15c..e9bc007fd 100644 --- a/docs/commands/rhoas_service-registry_role_list.md +++ b/docs/commands/rhoas_service-registry_role_list.md @@ -22,7 +22,7 @@ rhoas service-registry role list ``` --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Output format ("json", "yaml", "yml", "none") + -o, --output string Output format (json, yaml, yml) ``` ### Options inherited from parent commands diff --git a/docs/commands/rhoas_service-registry_rule_describe.md b/docs/commands/rhoas_service-registry_rule_describe.md index c6e19150a..843ff63de 100644 --- a/docs/commands/rhoas_service-registry_rule_describe.md +++ b/docs/commands/rhoas_service-registry_rule_describe.md @@ -27,7 +27,7 @@ $ rhoas service-registry rule describe --rule-type=compatibility --artifact-id=m --artifact-id string ID of the artifact -g, --group string Artifact group (default "default") --instance-id string ID of the Service Registry instance to be used (by default, uses the currently selected instance) - -o, --output string Specify the output format. (choose from: "json", "yaml", "yml" or "none") + -o, --output string Specify the output format. Choose from: "json", "none", "yaml", "yml" (default "json") --rule-type string Rule type determines how the content of an artifact can evolve over time ``` diff --git a/docs/commands/rhoas_status.md b/docs/commands/rhoas_status.md index 4c2e391ca..cf4b13baa 100644 --- a/docs/commands/rhoas_status.md +++ b/docs/commands/rhoas_status.md @@ -32,7 +32,7 @@ $ rhoas status -o json ### Options ``` - -o, --output string Format in which to display the status of your services (choose from: "json", "yml", "yaml" or "none") + -o, --output string Format in which to display the status of your services (choose from: "json", "yml", "yaml") ``` ### Options inherited from parent commands diff --git a/pkg/core/cmdutil/flagutil/flagset.go b/pkg/core/cmdutil/flagutil/flagset.go index a7df5f788..cfd5a8162 100644 --- a/pkg/core/cmdutil/flagutil/flagset.go +++ b/pkg/core/cmdutil/flagutil/flagset.go @@ -11,7 +11,7 @@ import ( ) var ( - ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat, dump.EmptyFormat, dump.TableFormat} + ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat, dump.EmptyFormat} ValidListOutputFormats = append(ValidOutputFormats, dump.TableFormat) ) From d17c7db58b053823f366a7828a4707baa5264c7d Mon Sep 17 00:00:00 2001 From: Kannan Date: Thu, 21 Apr 2022 13:24:37 +0100 Subject: [PATCH 18/20] chore: small fix for table option in output view --- pkg/cmd/kafka/consumergroup/list/list.go | 4 ++-- pkg/cmd/kafka/list/list.go | 4 ++-- pkg/cmd/kafka/topic/list/list.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/kafka/consumergroup/list/list.go b/pkg/cmd/kafka/consumergroup/list/list.go index 9f861f9b9..23866f430 100644 --- a/pkg/cmd/kafka/consumergroup/list/list.go +++ b/pkg/cmd/kafka/consumergroup/list/list.go @@ -63,8 +63,8 @@ func NewListConsumerGroupCommand(f *factory.Factory) *cobra.Command { Example: opts.localizer.MustLocalize("kafka.consumerGroup.list.cmd.example"), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { - if opts.output != "" && !flagutil.IsValidInput(opts.output, flagutil.ValidOutputFormats...) { - return flagutil.InvalidValueError("output", opts.output, flagutil.ValidOutputFormats...) + if opts.output != "" && !flagutil.IsValidInput(opts.output, flagutil.ValidListOutputFormats...) { + return flagutil.InvalidValueError("output", opts.output, flagutil.ValidListOutputFormats...) } if opts.page < 1 { diff --git a/pkg/cmd/kafka/list/list.go b/pkg/cmd/kafka/list/list.go index 7b4d4ff5b..c3471a750 100644 --- a/pkg/cmd/kafka/list/list.go +++ b/pkg/cmd/kafka/list/list.go @@ -71,8 +71,8 @@ func NewListCommand(f *factory.Factory) *cobra.Command { Example: opts.localizer.MustLocalize("kafka.list.cmd.example"), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - if opts.outputFormat != "" && !flagutil.IsValidInput(opts.outputFormat, flagutil.ValidOutputFormats...) { - return flagutil.InvalidValueError("output", opts.outputFormat, flagutil.ValidOutputFormats...) + if opts.outputFormat != "" && !flagutil.IsValidInput(opts.outputFormat, flagutil.ValidListOutputFormats...) { + return flagutil.InvalidValueError("output", opts.outputFormat, flagutil.ValidListOutputFormats...) } validator := &kafkacmdutil.Validator{ diff --git a/pkg/cmd/kafka/topic/list/list.go b/pkg/cmd/kafka/topic/list/list.go index 70b3fc9ce..289d958be 100644 --- a/pkg/cmd/kafka/topic/list/list.go +++ b/pkg/cmd/kafka/topic/list/list.go @@ -62,7 +62,7 @@ func NewListTopicCommand(f *factory.Factory) *cobra.Command { Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { if opts.output != "" { - if err := flagutil.ValidateOutput(opts.output); err != nil { + if err := flagutil.ValidateOutputForTable(opts.output); err != nil { return err } } From 5e61fbc272c2e1f55159d6df9a3e11edf7184d35 Mon Sep 17 00:00:00 2001 From: Kannan Date: Mon, 25 Apr 2022 11:49:41 +0100 Subject: [PATCH 19/20] chore: update and fix issues --- go.mod | 5 +++++ go.sum | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 60e6a7f5e..b8779f7f4 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,12 @@ require ( github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/pkg/errors v0.9.1 github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0 +<<<<<<< HEAD github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.5.0 +======= + github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0 + github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0 +>>>>>>> 0f2f8e14 (chore: update and fix issues) github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.9.0 github.com/redhat-developer/app-services-sdk-go/registryinstance v0.3.1 github.com/redhat-developer/app-services-sdk-go/registrymgmt v0.6.1 diff --git a/go.sum b/go.sum index 126d6c181..8bfa1d28b 100644 --- a/go.sum +++ b/go.sum @@ -629,8 +629,10 @@ github.com/redhat-developer/app-services-sdk-go v0.10.0 h1:zI0X5FR0NOj6IwBWk3y1T github.com/redhat-developer/app-services-sdk-go v0.10.0/go.mod h1:enn8Zz6IT0HZYzS6LSttiME2apwnvfVWZnGRS81A4rk= github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0 h1:MOljVN8AKTM72Yed8ioAwhdW0KdWEhBZjjam3lY2lyY= github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0/go.mod h1:0LX7ZCEmMKAbncO05/zRYsV0K5wsds7AGPpOFC7KWGo= -github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.5.0 h1:1FMsZfo2xCtYimrBcR+s0O0b0MzxdxiStY8A78oTGBA= -github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.5.0/go.mod h1:UYJgMZWmd238bk6l464U1g8I3YWcEE9PGnjvNRi5Lqw= +github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0 h1:cf+K96kW8o6v6JSzaGpQI5amEzSJuGrd5on3V+SmKhg= +github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0/go.mod h1:JAedrXf/qLHd7lpOS+bOFh8nrOpp2j0sg4/VG/1um6c= +github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0 h1:ExEHQaihnPNxN2nKXB0q5nrmSv4p8b3Idzt7TChxv+Q= +github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0/go.mod h1:hMpejngP3BFnifCDH1gKRG9cU9Q4lr0WiQaW7A1LYo4= github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.9.0 h1:wb335WbgyhFZRIHOwqHJm+D877l50MPMacrONCmknnw= github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.9.0/go.mod h1:Bs/YQI9ZuZLzBoeBAWV6KmkO8Jwm8NcrUn3VFp8eleo= github.com/redhat-developer/app-services-sdk-go/registryinstance v0.3.1 h1:xRq5XJzRDs/Z7e/9SDt6zbNRIyesC4LTqN9ajHKwjHo= @@ -911,7 +913,6 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 3afbfc4e4b64100e4d23ac44752af279f5542811 Mon Sep 17 00:00:00 2001 From: Kannan Date: Wed, 27 Apr 2022 11:12:01 +0100 Subject: [PATCH 20/20] catch: catch error after rebase --- Makefile | 6 +- go.mod | 22 ++++++-- go.sum | 82 ++++++++++++++++++++++++---- pkg/cmd/kafka/topic/create/create.go | 6 +- 4 files changed, 93 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 240ea2c11..5c6e6f3b6 100644 --- a/Makefile +++ b/Makefile @@ -87,11 +87,7 @@ generate-downstream-docs: ## Generate command-line reference documentation in ad I18N_LINTER_DEF := $(shell command -v app-services-go-linter 2> /dev/null) # lint-lang: ## Lint i18n files -# ifndef I18N_LINTER_DEF # check if the linter is installed, install it if not -# go install github.com/redhat-developer/app-services-go-linter/cmd/app-services-go-linter@latest -# endif -# app-services-go-linter -path ./pkg/core/localize/locales ./... -# .PHONY: lint-lang + # Check http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: diff --git a/go.mod b/go.mod index b8779f7f4..dad23e62a 100644 --- a/go.mod +++ b/go.mod @@ -8,37 +8,49 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 github.com/Nerzal/gocloak/v7 v7.11.0 github.com/aerogear/charmil v0.8.3 + github.com/andygrunwald/go-jira v1.15.1 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/briandowns/spinner v1.18.1 github.com/coreos/go-oidc/v3 v3.1.0 + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/fatih/color v1.13.0 + github.com/git-chglog/git-chglog v0.15.1 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.1 + github.com/google/go-cmp v0.5.7 // indirect github.com/google/go-github/v39 v39.2.0 + github.com/google/uuid v1.3.0 // indirect + github.com/huandu/xstrings v1.3.2 // indirect github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 // indirect + github.com/kyokomi/emoji/v2 v2.2.9 // indirect github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7 + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/nicksnyder/go-i18n/v2 v2.2.0 github.com/openconfig/goyang v0.4.0 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/pkg/errors v0.9.1 github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0 -<<<<<<< HEAD - github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.5.0 -======= - github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0 github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0 ->>>>>>> 0f2f8e14 (chore: update and fix issues) github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.9.0 github.com/redhat-developer/app-services-sdk-go/registryinstance v0.3.1 github.com/redhat-developer/app-services-sdk-go/registrymgmt v0.6.1 github.com/redhat-developer/service-binding-operator v0.9.0 github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect + github.com/shopspring/decimal v1.3.1 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 + github.com/urfave/cli/v2 v2.5.0 // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a + golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect + golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect golang.org/x/text v0.3.7 golang.org/x/tools v0.1.7 // indirect gopkg.in/segmentio/analytics-go.v3 v3.1.0 diff --git a/go.sum b/go.sum index 8bfa1d28b..3629980ac 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,7 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/go/generated v0.0.0-20170818220700-b1254a446363/go.mod h1:WG7q7swWsS2f9PYpt5DoEP/EBYWx8We5UoRltn9vJl8= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AlecAivazis/survey/v2 v2.3.2/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg= github.com/AlecAivazis/survey/v2 v2.3.4 h1:pchTU9rsLUSvWEl2Aq9Pv3k0IE2fkqtGxazskAMd9Ng= github.com/AlecAivazis/survey/v2 v2.3.4/go.mod h1:hrV6Y/kQCLhIZXGcriDCUBtB3wnN7156gMXJ3+b23xM= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -77,12 +78,19 @@ github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= +github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Nerzal/gocloak/v7 v7.11.0 h1:ab2E55lIMCaUfn47uEHiFhvvMHw+yDHL6Pb+GrM+x04= github.com/Nerzal/gocloak/v7 v7.11.0/go.mod h1:8fu/dbbIRa1FmLEAOVReZ8PKfbnsl2DwEk6U0giK3KI= +github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -102,6 +110,9 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andygrunwald/go-jira v1.14.0/go.mod h1:KMo2f4DgMZA1C9FdImuLc04x4WQhn5derQpnsuBFgqE= +github.com/andygrunwald/go-jira v1.15.1 h1:6J9aYKb9sW8bxv3pBLYBrs0wdsFrmGI5IeTgWSKWKc8= +github.com/andygrunwald/go-jira v1.15.1/go.mod h1:GIYN1sHOIsENWUZ7B4pDeT/nxEtrZpE8l0987O67ZR8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -154,6 +165,7 @@ github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHo github.com/coreos/go-oidc/v3 v3.1.0 h1:6avEvcdvTa1qYsOZ6I5PRkSYHzpTNWgKYmaJfaYbrRw= github.com/coreos/go-oidc/v3 v3.1.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -163,9 +175,11 @@ github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -208,6 +222,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -219,6 +235,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/git-chglog/git-chglog v0.15.1 h1:s4FqW1jQ8ZVb3M6p9uMZDvspm4zkatVJcyG0p/Q4h7U= +github.com/git-chglog/git-chglog v0.15.1/go.mod h1:ODSB06FDj/KND1ul+aBOqETRy5tvs+Kk4YdDmD7soeU= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -303,6 +321,10 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -354,10 +376,12 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ= github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= +github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -381,8 +405,9 @@ github.com/google/protobuf v3.11.4+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bj github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -427,9 +452,13 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -437,6 +466,7 @@ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= @@ -479,11 +509,15 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= +github.com/kyokomi/emoji/v2 v2.2.9 h1:UWYkjplPZ4rMPvLxc+/e12/xTqoRcn55oUySkpZ554g= +github.com/kyokomi/emoji/v2 v2.2.9/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7 h1:J6LE/95ZXKZLdAG5xF+FF+h+CEKF78+UN5ZV8VJSCCk= github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= @@ -502,8 +536,10 @@ github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlW github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -517,12 +553,16 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mikefarah/yaml/v2 v2.4.0/go.mod h1:ahVqZF4n1W4NqwvVnZzC4es67xsW9uR/RRf2RRxieJU= github.com/mikefarah/yq/v2 v2.4.1/go.mod h1:i8SYf1XdgUvY2OFwSqGAtWOOgimD2McJ6iutoxRm4k0= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -531,6 +571,9 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= @@ -629,8 +672,6 @@ github.com/redhat-developer/app-services-sdk-go v0.10.0 h1:zI0X5FR0NOj6IwBWk3y1T github.com/redhat-developer/app-services-sdk-go v0.10.0/go.mod h1:enn8Zz6IT0HZYzS6LSttiME2apwnvfVWZnGRS81A4rk= github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0 h1:MOljVN8AKTM72Yed8ioAwhdW0KdWEhBZjjam3lY2lyY= github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.1.0/go.mod h1:0LX7ZCEmMKAbncO05/zRYsV0K5wsds7AGPpOFC7KWGo= -github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0 h1:cf+K96kW8o6v6JSzaGpQI5amEzSJuGrd5on3V+SmKhg= -github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.5.0/go.mod h1:JAedrXf/qLHd7lpOS+bOFh8nrOpp2j0sg4/VG/1um6c= github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0 h1:ExEHQaihnPNxN2nKXB0q5nrmSv4p8b3Idzt7TChxv+Q= github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.6.0/go.mod h1:hMpejngP3BFnifCDH1gKRG9cU9Q4lr0WiQaW7A1LYo4= github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.9.0 h1:wb335WbgyhFZRIHOwqHJm+D877l50MPMacrONCmknnw= @@ -659,6 +700,9 @@ github.com/segmentio/ksuid v1.0.3 h1:FoResxvleQwYiPAVKe1tMUlEirodZqlqglIuFsdDntY github.com/segmentio/ksuid v1.0.3/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -676,6 +720,8 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= @@ -699,6 +745,7 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -715,9 +762,17 @@ github.com/tidwall/sjson v1.1.7/go.mod h1:w/yG+ezBeTdUxiKs5NcPicO9diP38nk96QBAbI github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM= +github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc= +github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df h1:Y2l28Jr3vOEeYtxfVbMtVfOdAwuUqWaP9fvNKiBVeXY= +github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df/go.mod h1:pnyouUty/nBr/zm3GYwTIt+qFTLWbdjeLjZmJdzJOu8= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/cli/v2 v2.5.0 h1:2sqblaW62ebcTIEvwb8eRvDfNHeBAeKxfhdynaanhug= +github.com/urfave/cli/v2 v2.5.0/go.mod h1:oDzoM7pVwz6wHn5ogWgFUU1s4VJayeQS+aEZDqXIEJs= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -789,6 +844,7 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -797,14 +853,16 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -897,6 +955,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1005,14 +1064,17 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/pkg/cmd/kafka/topic/create/create.go b/pkg/cmd/kafka/topic/create/create.go index 65b90aee6..1bf9de913 100644 --- a/pkg/cmd/kafka/topic/create/create.go +++ b/pkg/cmd/kafka/topic/create/create.go @@ -57,9 +57,9 @@ func NewCreateTopicCommand(f *factory.Factory) *cobra.Command { } cmd := &cobra.Command{ - Use: "create", - Short: opts.localizer.MustLocalize("kafka.topic.create.cmd.shortDescription"), - Long: opts.localizer.MustLocalize("kafka. topic.create.cmd.longDescription"), + Use: "create", + Short: opts.localizer.MustLocalize("kafka.topic.create.cmd.shortDescription"), + Long: opts.localizer.MustLocalize("kafka.topic.create.cmd.longDescription"), Example: opts.localizer.MustLocalize("kafka.topic.create.cmd.example"), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) (err error) {