Skip to content

Commit

Permalink
Merge pull request #8 from symbiosis-cloud/feature/small-fix-errors
Browse files Browse the repository at this point in the history
fixed node pool delete error message
  • Loading branch information
thecodeassassin authored Jan 4, 2023
2 parents bf46996 + c5b5adf commit eb5f804
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions commands/apikeys/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (c *CreateApiKeyCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) < 1 {
return fmt.Errorf("Please provide at least an API key name. Description is optional. (sym api-key create <role> [description]")
return fmt.Errorf("Please provide at least an API key name. Description is optional. (sym api-key create <role> [description])")
}

role := args[0]
Expand Down Expand Up @@ -57,7 +57,7 @@ func (c *CreateApiKeyCommand) Command() *cobra.Command {
}
defer text.EnableColors()

c.CommandOpts.Logger.Info().Msgf("%s** NOTE ** This token will not be shown again.%s", text.FgRed.EscapeSeq(), text.FgWhite.EscapeSeq())
c.CommandOpts.Logger.Info().Msgf("%s** NOTE ** This token will not be shown again.%s", text.FgYellow.EscapeSeq(), text.FgWhite.EscapeSeq())

err = output.NewOutput(output.TableOutput{
Headers: []string{"ID", "Description", "Token", "Role"},
Expand Down
2 changes: 1 addition & 1 deletion commands/apikeys/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *DeleteApiKeyCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide an api-key ID (sym api-key delete <id>")
return fmt.Errorf("Please provide an api-key ID (sym api-key delete <id>)")
}

return output.Confirmation(fmt.Sprintf("Are you sure you want want to delete api-key %s", args[0]))
Expand Down
2 changes: 1 addition & 1 deletion commands/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type ApplyCommand struct {
func (c *ApplyCommand) Execute(command *cobra.Command, args []string) error {

if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym apply <cluster>")
return fmt.Errorf("Please provide a cluster name (sym apply <cluster>)")
}

clusterName := args[0]
Expand Down
2 changes: 1 addition & 1 deletion commands/cluster/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *DeleteClusterCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym cluster delete <cluster>")
return fmt.Errorf("Please provide a cluster name (sym cluster delete <cluster>)")
}

return output.Confirmation(fmt.Sprintf("Are you sure you want want to delete %s", args[0]))
Expand Down
2 changes: 1 addition & 1 deletion commands/cluster/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *DescribeClusterCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym cluster describe <cluster>")
return fmt.Errorf("Please provide a cluster name (sym cluster describe <cluster>)")
}
return nil
},
Expand Down
2 changes: 1 addition & 1 deletion commands/cluster/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *ClusterIdentityCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym identity <cluster>")
return fmt.Errorf("Please provide a cluster name (sym identity <cluster>)")
}

if merge {
Expand Down
2 changes: 1 addition & 1 deletion commands/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Init = &cobra.Command{
Long: ``,
RunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("please provide an API Key to sym config init")
return fmt.Errorf("Please provide an API Key to sym config init")
}

apiKey := args[0]
Expand Down
2 changes: 1 addition & 1 deletion commands/nodepool/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *CreateNodePoolCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) < 2 {
return fmt.Errorf("Please provide a node-pool name and cluster name (sym node-pool create <name> <cluster name>")
return fmt.Errorf("Please provide a node-pool name and cluster name (sym node-pool create <name> <cluster name>)")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion commands/nodepool/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *DeleteNodePoolCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym node-pool delete <nodePoolId>")
return fmt.Errorf("Please provide a node pool ID (sym node-pool delete <nodePoolId>)")
}

return output.Confirmation(fmt.Sprintf("Are you sure you want want to delete node-pool with ID %s", args[0]))
Expand Down
2 changes: 1 addition & 1 deletion commands/nodepool/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c *DescribeNodePoolCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym node-pool describe <id>")
return fmt.Errorf("Please provide a cluster name (sym node-pool describe <id>)")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion commands/nodepool/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *ListNodePoolCommand) Command() *cobra.Command {
Long: ``,
PreRunE: func(command *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("Please provide a cluster name (sym node-pool list <cluster>")
return fmt.Errorf("Please provide a cluster name (sym node-pool list <cluster>)")
}

return nil
Expand Down

0 comments on commit eb5f804

Please sign in to comment.