-
Notifications
You must be signed in to change notification settings - Fork 107
refactor(cloud/certificate): Migrate final errors to typed vars #2783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
ae4982e
4842419
1610ca6
485063d
cb8c3b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // Copyright (c) 2024, Unikraft GmbH and The KraftKit Authors. | ||
| // Licensed under the BSD-3-Clause License (the "License"). | ||
| // You may not use this file except in compliance with the License. | ||
|
|
||
| package certerr | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not look well, you would have a different named sub-package in every package: Try something generic like |
||
|
|
||
| import "errors" | ||
|
|
||
| var ( | ||
| ErrInvalidOutputFormat = errors.New("invalid output format") | ||
| ErrCertificateIdentifierRequired = errors.New("either specify a certificate name or UUID, or use the --all flag") | ||
| ErrCouldNotParsePEM = errors.New("could not parse PEM") | ||
| ErrInvalidPrivateKeyFormat = errors.New("could not parse private key in PKCS1 or PKCS8 format") | ||
| ErrCommonNameRequired = errors.New("common name (CN) is required") | ||
| ErrPrivateKeyRequired = errors.New("private key is required") | ||
| ErrChainRequired = errors.New("chain is required") | ||
|
Comment on lines
+11
to
+17
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you start the names with |
||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.