This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
config: Support converting string configs to []byte #85
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #85 +/- ##
==========================================
- Coverage 72.61% 65.53% -7.08%
==========================================
Files 57 59 +2
Lines 2030 2272 +242
==========================================
+ Hits 1474 1489 +15
- Misses 413 640 +227
Partials 143 143
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
katrogan
previously approved these changes
May 19, 2021
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
katrogan
reviewed
May 19, 2021
input := 5 | ||
res, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf([]byte{}), input) | ||
assert.NoError(t, err) | ||
assert.NotEqual(t, []byte("hello"), res) |
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.
what's the purpose of the not equal test here?
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.
I guess I can make it equal 5, res...
katrogan
approved these changes
May 19, 2021
eapolinario
pushed a commit
that referenced
this pull request
Sep 6, 2023
* config: Support converting string configs to []byte Signed-off-by: Haytham Abuelfutuh <[email protected]> * Use base64 encoding to match yaml.unmarshal behavior Signed-off-by: Haytham Abuelfutuh <[email protected]> * support string array since it seems mapstructure does that Signed-off-by: Haytham Abuelfutuh <[email protected]> * Fix unit test value Signed-off-by: Haytham Abuelfutuh <[email protected]> * Increase patch coverage Signed-off-by: Haytham Abuelfutuh <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Haytham Abuelfutuh [email protected]
TL;DR
Support converting string config values to []byte config fields.
Type
Are all requirements met?