system: return sys in queueing methods
All checks were successful
test / test (push) Successful in 54s

This enables building an instance in a single statement.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-10-23 12:34:16 +09:00
parent cafed5f234
commit 20195ece47
4 changed files with 30 additions and 14 deletions

View File

@@ -8,11 +8,13 @@ import (
)
// ChangeHosts appends an X11 ChangeHosts command Op.
func (sys *I) ChangeHosts(username string) {
func (sys *I) ChangeHosts(username string) *I {
sys.lock.Lock()
defer sys.lock.Unlock()
sys.ops = append(sys.ops, XHost(username))
return sys
}
type XHost string