mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 21:44:54 +00:00
refactor: remove pkg/errors
This commit is contained in:
@@ -146,7 +146,7 @@ func registerAcmeUser(client *lego.Client, user *acmeUser, userRegisterOptions m
|
||||
}
|
||||
|
||||
default:
|
||||
err = fmt.Errorf("unsupported ca provider: %s", user.CA)
|
||||
err = fmt.Errorf("unsupported ca provider '%s'", user.CA)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -56,7 +56,7 @@ type applicantOptions struct {
|
||||
|
||||
func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) {
|
||||
if node.Type != domain.WorkflowNodeTypeApply {
|
||||
return nil, fmt.Errorf("node type is not apply")
|
||||
return nil, fmt.Errorf("node type is not '%s'", string(domain.WorkflowNodeTypeApply))
|
||||
}
|
||||
|
||||
nodeConfig := node.GetConfigForApply()
|
||||
@@ -181,7 +181,7 @@ func apply(challengeProvider challenge.Provider, options *applicantOptions) (*Ap
|
||||
if !user.hasRegistration() {
|
||||
reg, err := registerAcmeUserWithSingleFlight(client, user, options.CAProviderAccessConfig)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to register: %w", err)
|
||||
return nil, fmt.Errorf("failed to register acme user: %w", err)
|
||||
}
|
||||
user.Registration = reg
|
||||
}
|
||||
|
@@ -509,5 +509,5 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("unsupported applicant provider: %s", string(options.Provider))
|
||||
return nil, fmt.Errorf("unsupported applicant provider '%s'", string(options.Provider))
|
||||
}
|
||||
|
Reference in New Issue
Block a user