Compare commits

...

2 Commits
v0.4.3 ... main

Author SHA1 Message Date
Tony Worm
51618adc78
Merge pull request #6 from zackzhangkai/main
fix var init
2023-05-11 00:55:37 -04:00
zackzhangkai
39b5f92779 fix var init
Signed-off-by: zackzhangkai <zhangkaiamm@gmail.com>
2023-05-11 11:46:57 +08:00

View File

@ -169,7 +169,7 @@ func main() {
// no args, or interactive... read from stdin // no args, or interactive... read from stdin
// this is mainly for replacing text in vim // this is mainly for replacing text in vim
fi, _ := os.Stdin.Stat() fi, _ := os.Stdin.Stat()
inputIsFromPipe = (fi.Mode() & os.ModeCharDevice) == 0 inputIsFromPipe := (fi.Mode() & os.ModeCharDevice) == 0
if len(args) == 0 && !PromptMode && inputIsFromPipe { if len(args) == 0 && !PromptMode && inputIsFromPipe {
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)
var buf bytes.Buffer var buf bytes.Buffer