gin.DefaultWriter = io.Discard

This commit is contained in:
suguo 2026-01-05 11:21:48 +08:00
parent e7ae12b939
commit 65d34e17f2
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package gin
import ( import (
"fmt" "fmt"
"io"
"log" "log"
"net/http" "net/http"
"os" "os"
@ -37,6 +38,7 @@ func Service() {
sslKey = os.Getenv("GIN_SSL_KEY") sslKey = os.Getenv("GIN_SSL_KEY")
go func() { go func() {
gin.DefaultWriter = io.Discard
router := gin.New() router := gin.New()
routerSetup(router) routerSetup(router)