Skip to content

Commit

Permalink
[coconut] Improve coconut conf output
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Dec 10, 2020
1 parent 4ac7285 commit 0510fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coconut/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func History(cfg *configuration.ConsulSource, _ *cobra.Command, args []string, o
p := &componentcfg.Path{}

if len(args) < 1 || len(args) > 2 {
return errors.New(fmt.Sprintf("accepts between 0 and 3 arg(s), but received %d", len(args))), EC_INVALID_ARGS
return errors.New(fmt.Sprintf("accepts 1 or 2 arg(s), but received %d", len(args))), EC_INVALID_ARGS
}
switch len(args) {
case 1:
Expand Down
2 changes: 2 additions & 0 deletions coconut/configuration/configurationutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/fatih/color"
"github.com/olekukonko/tablewriter"
"github.com/spf13/cobra"
"bytes"
"errors"
"regexp"
"time"
Expand Down Expand Up @@ -137,6 +138,7 @@ func formatListOutput( cmd *cobra.Command, output []string)(parsedOutput []byte,
if err != nil {
return
}
parsedOutput = bytes.TrimSuffix(parsedOutput, []byte("\n"))
return parsedOutput, nil
}

Expand Down

0 comments on commit 0510fd7

Please sign in to comment.