mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-03 22:06:36 +08:00
优化代码
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/go-acme/lego/v4/lego"
|
||||
acmelog "github.com/go-acme/lego/v4/log"
|
||||
"github.com/go-acme/lego/v4/registration"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ func (this *Request) Run() (certData []byte, keyData []byte, err error) {
|
||||
|
||||
func (this *Request) runDNS() (certData []byte, keyData []byte, err error) {
|
||||
if !this.debug {
|
||||
acmelog.Logger = log.New(ioutil.Discard, "", log.LstdFlags)
|
||||
acmelog.Logger = log.New(io.Discard, "", log.LstdFlags)
|
||||
}
|
||||
|
||||
if this.task.User == nil {
|
||||
@@ -138,7 +138,7 @@ func (this *Request) runDNS() (certData []byte, keyData []byte, err error) {
|
||||
|
||||
func (this *Request) runHTTP() (certData []byte, keyData []byte, err error) {
|
||||
if !this.debug {
|
||||
acmelog.Logger = log.New(ioutil.Discard, "", log.LstdFlags)
|
||||
acmelog.Logger = log.New(io.Discard, "", log.LstdFlags)
|
||||
}
|
||||
|
||||
if this.task.User == nil {
|
||||
|
||||
Reference in New Issue
Block a user