print list commands as tables

This commit is contained in:
2025-05-25 15:07:13 +01:00
parent 7a2765f72c
commit 12dfab5642
12 changed files with 180 additions and 22 deletions

22
util.go Normal file
View File

@@ -0,0 +1,22 @@
// Package util provides utility functions for the application.
package main
import "strings"
func snakeCaseToTitleCase(snake string) string {
words := strings.Split(snake, "_")
for i, word := range words {
if len(word) > 0 {
words[i] = strings.ToUpper(word[:1]) + word[1:]
}
}
return strings.Join(words, " ")
}
func getEnabledMark(enabled bool) string {
if enabled {
return "\u2713" // green check mark
}
return "\u274c" // red cross mark
}