summaryrefslogtreecommitdiff
path: root/stdin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 12:26:05 -0600
committerJeff Carr <[email protected]>2024-02-05 12:26:05 -0600
commit3f54db0421ccb712cd8ce63ee94ad4898f0b8995 (patch)
treee218bcc7d40d537398019b322363491c617c7ea9 /stdin.go
parent2b3296fd5663398d425b1ba7059aa112c28c0bc8 (diff)
refactor to new tree functionsv0.20.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'stdin.go')
-rw-r--r--stdin.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/stdin.go b/stdin.go
index fa20dc0..dde5564 100644
--- a/stdin.go
+++ b/stdin.go
@@ -42,6 +42,9 @@ func simpleStdin() {
}()
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
+ if me.exit {
+ return
+ }
s := scanner.Text()
s = strings.TrimSuffix(s, "\n")
switch s {