屏蔽go内部库报错日志

This commit is contained in:
shadow1ng
2023-12-25 17:57:28 +08:00
parent 276b446e0c
commit 19d969acd2
2 changed files with 6 additions and 5 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ import (
"encoding/json"
"fmt"
"github.com/fatih/color"
"io"
"log"
"os"
"strings"
"sync"
@@ -13,7 +15,6 @@ import (
var Num int64
var End int64
var Results = make(chan *string)
var Start = true
var LogSucTime int64
var LogErrTime int64
var WaitTime int64
@@ -28,6 +29,7 @@ type JsonText struct {
}
func init() {
log.SetOutput(io.Discard)
LogSucTime = time.Now().Unix()
go SaveLog()
}