mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Added .NET to available frameworks
This commit is contained in:
committed by
Maidul Islam
parent
b062c44742
commit
618dc10e45
14
cli/packages/visualize/secrets.go
Normal file
14
cli/packages/visualize/secrets.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package visualize
|
||||
|
||||
import "github.com/Infisical/infisical-merge/packages/models"
|
||||
|
||||
func PrintAllSecretDetails(secrets []models.SingleEnvironmentVariable) {
|
||||
rows := [][]string{}
|
||||
for _, secret := range secrets {
|
||||
rows = append(rows, []string{secret.Key, secret.Value, secret.Type})
|
||||
}
|
||||
|
||||
headers := []string{"Secret name", "Secret vaule", "Secret type"}
|
||||
|
||||
Table(headers, rows)
|
||||
}
|
||||
@@ -6,13 +6,23 @@ import (
|
||||
"github.com/jedib0t/go-pretty/table"
|
||||
)
|
||||
|
||||
type TableOptions struct {
|
||||
Title string
|
||||
}
|
||||
|
||||
// func GetDefaultTableOptions() TableOptions{
|
||||
// return TableOptions{
|
||||
// Title: "",
|
||||
// }
|
||||
// }
|
||||
|
||||
// Given headers and rows, this function will print out a table
|
||||
func Table(headers []string, rows [][]string) {
|
||||
t := table.NewWriter()
|
||||
t.SetOutputMirror(os.Stdout)
|
||||
t.SetStyle(table.StyleLight)
|
||||
|
||||
// t.SetTitle("Title")
|
||||
// t.SetTitle(tableOptions.Title)
|
||||
t.Style().Options.DrawBorder = true
|
||||
t.Style().Options.SeparateHeader = true
|
||||
t.Style().Options.SeparateColumns = true
|
||||
|
||||
Reference in New Issue
Block a user