diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-23 12:34:16 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-23 12:34:16 +0900 |
| commit | 20195ece478a28b2bc7abc78cd220f900958eb35 (patch) | |
| tree | 8e996029a43c58ddfd15b6be9b5e285effeddbea /internal/system/xhost.go | |
| parent | cafed5f23468daf2765655325ebe7d879acdde24 (diff) | |
system: return sys in queueing methods
This enables building an instance in a single statement.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/system/xhost.go')
| -rw-r--r-- | internal/system/xhost.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
