refactor: clean code

This commit is contained in:
Fu Diwei
2024-11-19 22:43:15 +08:00
parent a6c93ef9b8
commit 82807fcc1b
10 changed files with 127 additions and 111 deletions

View File

@@ -58,7 +58,7 @@ type webhookData struct {
func (d *WebhookDeployer) Deploy(ctx context.Context, certPem string, privkeyPem string) (*deployer.DeployResult, error) {
certX509, err := x509.ParseCertificateFromPEM(certPem)
if err != nil {
return nil, err
return nil, xerrors.Wrap(err, "failed to parse x509")
}
data := &webhookData{