-
Notifications
You must be signed in to change notification settings - Fork 500
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
refactor(utils): add hasher pkg and add more uts for toml #5992
refactor(utils): add hasher pkg and add more uts for toml #5992
Conversation
Signed-off-by: liubo02 <[email protected]>
@fgksgf: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/v2 #5992 +/- ##
==============================================
+ Coverage 20.04% 20.36% +0.31%
==============================================
Files 151 152 +1
Lines 10365 10371 +6
==============================================
+ Hits 2078 2112 +34
+ Misses 8079 8052 -27
+ Partials 208 207 -1
|
Signed-off-by: liubo02 <[email protected]>
// and generates a hash of the resulting configuration. The hash is then | ||
// encoded into a safe string format and returned. | ||
// If the order of keys in the TOML string is different, the hash will be the same. | ||
func GenerateHash(tomlStr v1alpha1.ConfigFile) (string, error) { |
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.
As this function only works for TOML, should we include toml
in the name?
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.
LGTM, but may add it when a new similar function is added?
Signed-off-by: liubo02 <[email protected]>
@csuzhangxc: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: csuzhangxc, fgksgf The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
GenerateHash
to hasher pkg