|
|
@ -49,6 +49,13 @@ func main() {
|
|
|
|
|
|
|
|
|
|
|
|
flag.Parse()
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if there is input from stdin
|
|
|
|
|
|
|
|
info, _ := os.Stdin.Stat()
|
|
|
|
|
|
|
|
if (info.Mode() & os.ModeCharDevice) != 0 {
|
|
|
|
|
|
|
|
flag.Usage()
|
|
|
|
|
|
|
|
os.Exit(1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Read all input from stdin
|
|
|
|
// Read all input from stdin
|
|
|
|
reader := bufio.NewReader(os.Stdin)
|
|
|
|
reader := bufio.NewReader(os.Stdin)
|
|
|
|
inputBytes, _ := io.ReadAll(reader)
|
|
|
|
inputBytes, _ := io.ReadAll(reader)
|
|
|
|