From eceaa0bfbc9b1e59b0ea10fe4af45155af864822 Mon Sep 17 00:00:00 2001 From: HAYAMA_Kaoru Date: Sat, 30 Nov 2024 10:45:11 +0900 Subject: [PATCH] watcher.go: trivial modify --- watcher.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/watcher.go b/watcher.go index 702af95..6ee94b5 100644 --- a/watcher.go +++ b/watcher.go @@ -26,8 +26,9 @@ func NewWatcher(pty io.ReadWriter) *Watcher { // If the code below spends a lot of time, // It hangs up to io.Copy(pty, os.Stdin) // The reason is unknown. - os.Stdout.Write(buffer[:n]) - pipeline <- string(buffer[:n]) + b := buffer[:n] + os.Stdout.Write(b) + pipeline <- string(b) } }()