refactor: remove pkg/errors

This commit is contained in:
Fu Diwei
2025-04-22 22:12:58 +08:00
parent f5807d215f
commit 6dac89e9a1
103 changed files with 500 additions and 575 deletions

View File

@@ -3,10 +3,9 @@ package bunnycdn
import (
"context"
"encoding/base64"
"fmt"
"log/slog"
xerrors "github.com/pkg/errors"
"github.com/usual2970/certimate/internal/pkg/core/deployer"
bunnysdk "github.com/usual2970/certimate/internal/pkg/sdk3rd/bunny"
)
@@ -60,7 +59,7 @@ func (d *DeployerProvider) Deploy(ctx context.Context, certPEM string, privkeyPE
createCertificateResp, err := d.sdkClient.AddCustomCertificate(createCertificateReq)
d.logger.Debug("sdk request 'bunny.AddCustomCertificate'", slog.Any("request", createCertificateReq), slog.Any("response", createCertificateResp))
if err != nil {
return nil, xerrors.Wrap(err, "failed to execute sdk request 'bunny.AddCustomCertificate'")
return nil, fmt.Errorf("failed to execute sdk request 'bunny.AddCustomCertificate': %w", err)
}
return &deployer.DeployResult{}, nil