refactor: clean code

This commit is contained in:
Fu Diwei
2024-10-31 11:37:16 +08:00
parent 3c3d4e9109
commit 83264a6946
21 changed files with 31 additions and 51 deletions

View File

@@ -37,13 +37,6 @@ func NewTencentCloudSSLUploader(config *TencentCloudSSLUploaderConfig) (Uploader
}
func (u *TencentCloudSSLUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error) {
defer func() {
if r := recover(); r != nil {
fmt.Printf("Recovered from panic: %+v", r)
fmt.Println()
}
}()
// 生成新证书名(需符合腾讯云命名规则)
var certId, certName string
certName = fmt.Sprintf("certimate-%d", time.Now().UnixMilli())