Skip to content

Fix faulty json.Marshal behavior for embeds types.NetConf#1097

Merged
squeed merged 2 commits intocontainernetworking:mainfrom
s1061123:fix/1096
Jun 10, 2024
Merged

Fix faulty json.Marshal behavior for embeds types.NetConf#1097
squeed merged 2 commits intocontainernetworking:mainfrom
s1061123:fix/1096

Conversation

@s1061123
Copy link
Copy Markdown
Contributor

@s1061123 s1061123 commented Jun 3, 2024

Fix #1096

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 3, 2024

Coverage Status

coverage: 63.69%. remained the same
when pulling 499596a on s1061123:fix/1096
into 73debca on containernetworking:main.

Copy link
Copy Markdown
Member

@LionelJouin LionelJouin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way the users would need to change types.NetConf with types.NetConfType: https://go.dev/play/p/j2wjAgA_s-K
The current way would still not work: https://go.dev/play/p/fHVOmTrH8p_K

@s1061123 s1061123 changed the title Fix faulty json.Marshal behavior for embeds types.NetConf [WIP]Fix faulty json.Marshal behavior for embeds types.NetConf Jun 3, 2024
@s1061123 s1061123 changed the title [WIP]Fix faulty json.Marshal behavior for embeds types.NetConf Fix faulty json.Marshal behavior for embeds types.NetConf Jun 3, 2024
@s1061123
Copy link
Copy Markdown
Contributor Author

s1061123 commented Jun 3, 2024

@LionelJouin Updated to avoid to change user side code.

Copy link
Copy Markdown
Member

@LionelJouin LionelJouin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
@s1061123
Copy link
Copy Markdown
Contributor Author

s1061123 commented Jun 4, 2024

@squeed PTAL?

@squeed squeed merged commit 6e57c2e into containernetworking:main Jun 10, 2024
@s1061123 s1061123 deleted the fix/1096 branch June 10, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Faulty json.Marshal behavior for structs that embeds types.NetConf since v1.2.0

4 participants