-
Notifications
You must be signed in to change notification settings - Fork 164
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
use a single validator library in rekor-cli #1818
Conversation
Signed-off-by: Bob Callaway <bcallaway@google.com>
@@ -60,13 +63,14 @@ func validateSHA256Value(v string) error { | |||
hash = split[1] | |||
} | |||
|
|||
s := struct { | |||
Prefix string `validate:"omitempty,oneof=sha256"` | |||
Hash string `validate:"required,len=64,hexadecimal"` |
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.
qq, i noticed on the other PR, we dropped required
from required,email
- is this behavior equivalent with this new library?
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.
yes, the check fails if the criteria isn't met
Codecov Report
@@ Coverage Diff @@
## main #1818 +/- ##
===========================================
+ Coverage 47.54% 66.40% +18.85%
===========================================
Files 78 90 +12
Lines 8260 9057 +797
===========================================
+ Hits 3927 6014 +2087
+ Misses 3940 2309 -1631
- Partials 393 734 +341
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Bob Callaway <bcallaway@google.com>
@steiza fyi |
Summary
Release Note
Documentation