Fix marshalling of TLSVersion#429
Conversation
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
|
This change updates the MarshalYAML and MarshalJSON functions for the TLSVersion type to remove the pointer notation *tv. This means that the functions will now take a value of type TLSVersion instead of a pointer to a TLSVersion as an argument. The reason for this change is because the functions previously did not implement the json.Marshaler or yaml.Marshaler interfaces, which expect a value to be passed as the argument rather than a pointer. By removing the pointer notation, the functions should now work correctly when passed a value of type TLSVersion. It's worth noting that the UnmarshalYAML and UnmarshalJSON functions for TLSVersion are not changed, and continue to accept a pointer as the argument. This is because these functions implement the yaml.Unmarshaler and json.Unmarshaler interfaces, respectively, which expect a pointer to be passed as the argument. Note: generated with the help of chatgpt |
|
Looks good, but do you mind adding a test to be safe? |
🤣 |
|
I will add tests later. |
Signed-off-by: Julien Pivotto roidelapluie@o11y.eu