Skip to content

Commit 4357d45

Browse files
author
tomwang
committed
flush stdout
1 parent ade1cfa commit 4357d45

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module tiny-requestbin
1+
module github.com/knktc/tiny-requestbin
22

33
go 1.23.2

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"io"
1111
"log"
1212
"net/http"
13+
"os"
1314
"strconv"
1415
"strings"
1516
"sync"
@@ -279,4 +280,7 @@ func printRequestToCLI(reqInfo RequestInfo) {
279280
}
280281

281282
fmt.Printf("%s\n", strings.Repeat("=", 80))
283+
284+
// Force flush stdout to ensure immediate output
285+
os.Stdout.Sync()
282286
}

0 commit comments

Comments
 (0)