refactor: clean code

This commit is contained in:
Fu Diwei
2025-03-23 10:19:24 +08:00
parent 445541c38f
commit 12102ef641
28 changed files with 166 additions and 245 deletions

View File

@@ -5,10 +5,7 @@ import (
)
func (c *Client) CreateCertificate(req *CreateCertificateRequest) (*CreateCertificateResponse, error) {
resp := CreateCertificateResponse{}
err := c.sendRequestWithResult(http.MethodPost, "/certificates", req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
resp := &CreateCertificateResponse{}
err := c.sendRequestWithResult(http.MethodPost, "/certificates", req, resp)
return resp, err
}