Fix up comments and improve readability

This commit is contained in:
Theodor S. Midtlien
2026-07-25 20:51:29 +02:00
parent 11642aeb44
commit bbf326e22c
6 changed files with 105 additions and 35 deletions

View File

@@ -174,12 +174,9 @@ func getStatus(ctx context.Context, fullPeerStatus bool, shouldRunProbes bool) (
return resp, nil
}
// getActiveProfileName asks the daemon for the active profile's display name.
// The daemon runs as root and can read the per-user profile files to resolve the
// ID to its human-readable name. When the active profile belongs to another local
// user, the name is annotated with that owner so the caller understands why the
// daemon is not under their control. Returns an empty string on any error so
// status output degrades gracefully.
// getActiveProfileName asks the daemon for the active profile's display name,
// annotated with the owning user when the active profile belongs to someone else.
// Returns an empty string on any error so status output degrades gracefully.
func getActiveProfileName(ctx context.Context) string {
conn, err := DialClientGRPCServer(ctx, daemonAddr)
if err != nil {