[SSL证书]实现基本的自动申请证书流程

This commit is contained in:
刘祥超
2020-11-26 16:39:06 +08:00
parent 4142fae762
commit 3eea083a5a
18 changed files with 594 additions and 27 deletions

View File

@@ -2,6 +2,7 @@ package errors
import (
"errors"
"github.com/iwind/TeaGo/Tea"
"path/filepath"
"runtime"
"strconv"
@@ -15,6 +16,11 @@ type errorObj struct {
}
func (this *errorObj) Error() string {
// 在非测试环境下,我们不提示详细的行数等信息
if !Tea.IsTesting() {
return this.err.Error()
}
s := this.err.Error() + "\n " + this.file
if len(this.funcName) > 0 {
s += ":" + this.funcName + "()"