Skip to content

Commit 06af3df

Browse files
authored
Use wrap errors (#63)
Signed-off-by: Tamal Saha <[email protected]>
1 parent 2ac2315 commit 06af3df

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"go.bytebuilders.dev/license-verifier/apis/licenses/v1alpha1"
2525
"go.bytebuilders.dev/license-verifier/info"
2626

27-
"github.com/pkg/errors"
2827
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2928
"k8s.io/apimachinery/pkg/util/sets"
3029
)
@@ -158,7 +157,7 @@ func ParseLicense(opts ParserOptions) (v1alpha1.License, error) {
158157

159158
// ref: https://github.com/appscode/gitea/blob/master/models/stripe_license.go#L117-L126
160159
if _, err := cert.Verify(crtopts); err != nil {
161-
e2 := errors.Wrap(err, "failed to verify certificate")
160+
e2 := fmt.Errorf("failed to verify certificate due to %w", err)
162161
license.Status = v1alpha1.LicenseInvalid
163162
license.Reason = e2.Error()
164163
return license, e2

0 commit comments

Comments
 (0)