From 20195ece478a28b2bc7abc78cd220f900958eb35 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Wed, 23 Oct 2024 12:34:16 +0900 Subject: system: return sys in queueing methods This enables building an instance in a single statement. Signed-off-by: Ophestra Umiker --- internal/system/xhost.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/system/xhost.go') diff --git a/internal/system/xhost.go b/internal/system/xhost.go index 51c8d24f..30463940 100644 --- a/internal/system/xhost.go +++ b/internal/system/xhost.go @@ -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 -- cgit v1.3.1