diff --git a/cmd/list.go b/cmd/list.go index 4d674a3..f007fd8 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -15,6 +15,7 @@ import ( ) var filter string +var notrunc bool // listCmd represents the list command var listCmd = &cobra.Command{ @@ -43,7 +44,11 @@ var listCmd = &cobra.Command{ t.SetOutputMirror(os.Stdout) t.AppendHeader(table.Row{"Property Name", "Value", "Last Modified By", "Last Modified Date"}) for _, p := range collection.Member { - t.AppendRow([]interface{}{p.Name, truncateText(p.Value, 80), p.LastModifiedBy, p.LastModifiedDate}) + text := p.Value + if !notrunc { + text = truncateText(text, 80) + } + t.AppendRow([]interface{}{p.Name, text, p.LastModifiedBy, p.LastModifiedDate}) } t.Render() @@ -68,4 +73,5 @@ func init() { // Cobra supports local flags which will only run when this command // is called directly, e.g.: listCmd.Flags().StringVarP(&filter, "filter", "f", "", "Filter properties using a query. For example --filter \"redaction\"") + listCmd.Flags().BoolVarP(¬runc, "notrunc", "", false, "Prevent truncation of values") } diff --git a/internal/client/client.go b/internal/client/client.go index 56e078a..2085f92 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -35,7 +35,7 @@ func GetAccessToken(c *Config) (string, error) { log.WithFields(log.Fields{"conf": fmt.Sprintf("%+v", conf)}).Debug() token, err := conf.PasswordCredentialsToken(context.TODO(), c.Username, c.Password) if err != nil { - log.Error("Error retrieving AccessToken. Chech configuration, username and password") + log.Error("Error retrieving AccessToken. Check configuration, username and password") return "", err } log.WithFields(log.Fields{"token": fmt.Sprintf("%+v", token.AccessToken)}).Debug()