-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Should configopaque.String
implement encoding.BinaryMarshaler
?
#9272
Comments
I don't have a reason to not to, but I do not have a reason on why to. So my rule of thumb when in doubt leave it out :) |
If this statement is true, then I do think we'd want to prevent this situation. If the goal of |
If we chose to do this: #9279 |
Two arguments in favor:
|
#9279) **Description:** <Describe what has changed.> Implements the `encoding.BinaryMarshaler` interface for `String`. This prevents the situation `configopaque` -> `[]byte` -> `string` from leaking the `String` value. **Link to tracking Issue:** <Issue number if applicable> Closes #9272 **Testing:** Added unit test --------- Co-authored-by: Antoine Toulme <[email protected]>
open-telemetry#9279) **Description:** <Describe what has changed.> Implements the `encoding.BinaryMarshaler` interface for `String`. This prevents the situation `configopaque` -> `[]byte` -> `string` from leaking the `String` value. **Link to tracking Issue:** <Issue number if applicable> Closes open-telemetry#9272 **Testing:** Added unit test --------- Co-authored-by: Antoine Toulme <[email protected]>
It would be easy to do (e.g. here is the implementation for
net.URL
, ours would just be returning[]bytes(maskedString), nil
).Any reason not to do it?
The text was updated successfully, but these errors were encountered: