diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-11-04 22:55:46 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-11-04 22:55:46 +0900 |
| commit | 69cc64ef56c4b46954514d7ef1b93b3861443255 (patch) | |
| tree | e7a334465e270450b39191697d4561bb21076559 /internal/linux/std.go | |
| parent | fc25ac2523c512c67d73db5bbbd47224dc0b2001 (diff) | |
linux: provide access to stdout
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/linux/std.go')
| -rw-r--r-- | internal/linux/std.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/linux/std.go b/internal/linux/std.go index 704ba162..e0a0994c 100644 --- a/internal/linux/std.go +++ b/internal/linux/std.go @@ -2,6 +2,7 @@ package linux import ( "errors" + "io" "io/fs" "os" "os/exec" @@ -34,6 +35,7 @@ func (s *Std) ReadDir(name string) ([]os.DirEntry, error) { return os.ReadDir(na func (s *Std) Stat(name string) (fs.FileInfo, error) { return os.Stat(name) } func (s *Std) Open(name string) (fs.File, error) { return os.Open(name) } func (s *Std) Exit(code int) { fmsg.Exit(code) } +func (s *Std) Stdout() io.Writer { return os.Stdout } const xdgRuntimeDir = "XDG_RUNTIME_DIR" |
