mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
* feat: Add support for setup-info command * fix: Code review fixes * fix: Add event log info
26 lines
516 B
Go
26 lines
516 B
Go
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])
|
|
}
|
|
}
|