feat: truncate secret value if terminal is too small

This commit is contained in:
jon4hz
2023-03-10 21:19:56 +01:00
parent 14206de926
commit c900022697
5 changed files with 77 additions and 10 deletions

View File

@@ -263,10 +263,10 @@ var secretsSetCmd = &cobra.Command{
}
// Print secret operations
headers := []string{"SECRET NAME", "SECRET VALUE", "STATUS"}
rows := [][]string{}
headers := [...]string{"SECRET NAME", "SECRET VALUE", "STATUS"}
rows := [][3]string{}
for _, secretOperation := range secretOperations {
rows = append(rows, []string{secretOperation.SecretKey, secretOperation.SecretValue, secretOperation.SecretOperation})
rows = append(rows, [...]string{secretOperation.SecretKey, secretOperation.SecretValue, secretOperation.SecretOperation})
}
visualize.Table(headers, rows)