Added .NET to available frameworks

This commit is contained in:
Vladyslav Matsiiako
2022-12-28 12:02:42 -05:00
committed by Maidul Islam
parent b062c44742
commit 618dc10e45
11 changed files with 348 additions and 15 deletions

View 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)
}

View File

@@ -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