mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add support for setup-info command (#108)
* feat: Add support for setup-info command * fix: Code review fixes * fix: Add event log info
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// PrintInfoSection prints a formatted block of key-value information.
|
||||
func PrintInfoSection(title string, entries map[string]string) {
|
||||
fmt.Println()
|
||||
fmt.Println(Colors.Cyan(title))
|
||||
fmt.Println(Colors.Normal("--------------------"))
|
||||
|
||||
// Sort keys for consistent output
|
||||
keys := make([]string, 0, len(entries))
|
||||
for k := range entries {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, k := range keys {
|
||||
fmt.Printf("%-25s: %s\n", Colors.Bold(k), entries[k])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user