Uh oh!
There was an error while loading. Please reload this page.
Remove pointers for slices preferring omitempty tag instead - #316
Conversation
mrunalp
commented
Jan 26, 2016
@crosbymichael@vishh PTAL |
mrunalp
commented
Jan 26, 2016
We can wait for #284 to merge before this. |
There was a problem hiding this comment.
Why? If we add an omitempty tag, even an empty list signifies non-existence of this field.
There was a problem hiding this comment.
@vishh I am fine one way or the other. But we have them as pointers in more places compared to where we don't.
There was a problem hiding this comment.
In general, we don't need pointers for slices and maps. I can go cleanup
the Spec again once I get some spare cycles.
On Mon, Jan 25, 2016 at 4:46 PM, Mrunal Patel notifications@github.com
wrote:
In runtime_config_linux.go
#316 (comment):@@ -195,7 +195,7 @@ type Network struct {
// Set class identifier for container's network packets
ClassID *uint32json:"classID"
// Set priority of network traffic for container
- Priorities []InterfacePriority
json:"priorities"- Priorities []*InterfacePriority
json:"priorities"@vishhhttps://github.com/vishh I am fine one way or the other. But we
have them as pointers in more places compared to where we don't.—
Reply to this email directly or view it on GitHub
https://github.com/opencontainers/specs/pull/316/files#r50781540.
There was a problem hiding this comment.
@vishh No issues going one way or the other. I can change the PR.
There was a problem hiding this comment.
Thanks :)
On Mon, Jan 25, 2016 at 5:03 PM, Mrunal Patel notifications@github.com
wrote:
In runtime_config_linux.go
#316 (comment):@@ -195,7 +195,7 @@ type Network struct {
// Set class identifier for container's network packets
ClassID *uint32json:"classID"
// Set priority of network traffic for container
- Priorities []InterfacePriority
json:"priorities"- Priorities []*InterfacePriority
json:"priorities"@vishhhttps://github.com/vishh No issues going one way or the other. I
can change the PR.—
Reply to this email directly or view it on GitHub
https://github.com/opencontainers/specs/pull/316/files#r50783105.
There was a problem hiding this comment.
For this PR just adding omitempty here should do. Kindly revert the pointer changes.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
mrunalp
commented
Jan 26, 2016
@vishh Updated to remove pointers from slices. |
vishh
commented
Jan 26, 2016
LGTM. Thanks for the cleanup @mrunalp 👍 |
hqhq
commented
Jan 26, 2016
LGTM |
Remove pointers for slices preferring omitempty tag instead
Converting to pointers to be consistent with other cgroups settings.
Signed-off-by: Mrunal Patel mrunalp@gmail.com