feat(root): threat-safe terminal writer

This commit is contained in:
verse91
2026-04-09 14:36:43 +07:00
parent 273f703f5b
commit 551a096d2d
+14
View File
@@ -0,0 +1,14 @@
package root
import (
"os"
"sync"
)
var termMutex sync.Mutex
func TermWrite(data []byte) {
termMutex.Lock()
defer termMutex.Unlock()
os.Stdout.Write(data)
}