mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: truncate secret value if terminal is too small
This commit is contained in:
@@ -3,12 +3,12 @@ package visualize
|
||||
import "github.com/Infisical/infisical-merge/packages/models"
|
||||
|
||||
func PrintAllSecretDetails(secrets []models.SingleEnvironmentVariable) {
|
||||
rows := [][]string{}
|
||||
rows := [][3]string{}
|
||||
for _, secret := range secrets {
|
||||
rows = append(rows, []string{secret.Key, secret.Value, secret.Type})
|
||||
rows = append(rows, [...]string{secret.Key, secret.Value, secret.Type})
|
||||
}
|
||||
|
||||
headers := []string{"SECRET NAME", "SECRET VALUE", "SECRET TYPE"}
|
||||
headers := [...]string{"SECRET NAME", "SECRET VALUE", "SECRET TYPE"}
|
||||
|
||||
Table(headers, rows)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user