Skip to content

Commit

Permalink
add omitempty to 'Device' and 'Namespace'
Browse files Browse the repository at this point in the history
Signed-off-by: liangchenye <liangchenye@huawei.com>
  • Loading branch information
liangchenye committed Mar 11, 2016
1 parent dfd71f7 commit 28cc423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,7 @@ Here is a full example `config.json` for reference.
{
"type": "mount"
}
],
"devices": null,
"seccomp": {
"defaultAction": "",
"architectures": null
}
]
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ type Linux struct {
// If resources are specified, the cgroups at CgroupsPath will be updated based on resources.
CgroupsPath *string `json:"cgroupsPath,omitempty"`
// Namespaces contains the namespaces that are created and/or joined by the container
Namespaces []Namespace `json:"namespaces"`
Namespaces []Namespace `json:"namespaces,omitempty"`
// Devices are a list of device nodes that are created for the container
Devices []Device `json:"devices"`
Devices []Device `json:"devices,omitempty"`
// Seccomp specifies the seccomp security settings for the container.
Seccomp *Seccomp `json:"seccomp,omitempty"`
// RootfsPropagation is the rootfs mount propagation mode for the container.
Expand Down

0 comments on commit 28cc423

Please sign in to comment.