Keep unitKey's comment on unitKey

This commit is contained in:
jochen
2026-10-05 22:27:32 +02:00
parent c9001abdb4
commit f0f5873202
+3 -3
View File
@@ -2852,9 +2852,6 @@ func userUnitFiles(account, unit string) []string {
return paths
}
// unitKey names a unit by the manager it is in and its name (novox/hq ADR 0177): the machine's
// manager, or one account's. A system unit is the same key whether its record says "system" or
// nothing, as every record before the scope existed does.
// unitsHeld is every unit a declared service gives a state, by unitKey, naming the service.
func unitsHeld(resources []declaration.Resource) map[string]string {
held := map[string]string{}
@@ -2866,6 +2863,9 @@ func unitsHeld(resources []declaration.Resource) map[string]string {
return held
}
// unitKey names a unit by the manager it is in and its name (novox/hq ADR 0177): the machine's
// manager, or one account's. A system unit is the same key whether its record says "system" or
// nothing, as every record before the scope existed does.
func unitKey(scope, user, unit string) string {
if scope == declaration.ScopeUser {
return "user:" + user + "/" + unit