MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / formatUser

Function formatUser

internal/ui/components/tasks_list_formatting.go:161–169  ·  view source on GitHub ↗

formatUser cleans up the user string for display.

(user string)

Source from the content-addressed store, hash-verified

159
160// formatUser cleans up the user string for display.
161func formatUser(user string) string {
162 if len(user) > 4 {
163 if user[len(user)-4:] == "@pam" || user[len(user)-4:] == "@pve" {
164 return user[:len(user)-4]
165 }
166 }
167
168 return user
169}
170
171// formatDuration returns a friendly duration string.
172func formatDuration(d time.Duration) string {

Callers 1

updateHistoryTableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected