-
Notifications
You must be signed in to change notification settings - Fork 543
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
add omitempty to 'Devices #340
Conversation
LGTM |
@@ -130,7 +130,7 @@ type Linux struct { | |||
// Namespaces contains the namespaces that are created and/or joined by the container | |||
Namespaces []Namespace `json:"namespaces"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't namespaces optional as well?
Why do we have to remove fields from the EXAMPLES? They are examples, if you don't have fields in examples where are people going to learn about them? |
On Thu, Mar 10, 2016 at 10:25:56AM -0800, Michael Crosby wrote:
I think we should either remove optional fields or fill them in with |
Same with Wking, I think we can just keep the meaningful value. |
@@ -99,7 +99,7 @@ The runtime may supply them however it likes (with [mknod][mknod.2], by bind mou | |||
|
|||
The following parameters can be specified: | |||
|
|||
* **`type`** *(string, required)* - type of device: `c`, `b`, `u` or `p`. | |||
* **`type`** *(string, required)* - type of device: "c", "b", "u" or "p". | |||
More info in [mknod(1)][mknod.1]. | |||
* **`path`** *(string, required)* - full path to device inside container. | |||
* **`major, minor`** *(int64, required unless **`type`** is `p`)* - [major, minor numbers][devices] for the device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to change p
here and below in Device whitelist
section as well. Anyway I don't see this necessary, because I don't think there is inkling for a specific type with backticks since it's just consistent usage for markdown. See discussion in #323 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Thu, Mar 10, 2016 at 06:36:58PM -0800, Qiang Huang wrote:
@@ -99,7 +99,7 @@ The runtime may supply them however it likes (with [mknod][mknod.2], by bind mou
The following parameters can be specified:
-*
type
(string, required) - type of device:c
,b
,u
orp
.
+*type
(string, required) - type of device: "c", "b", "u" or "p".
More info in [mknod(1)][mknod.1].
path
(string, required) - full path to device inside container.major, minor
(int64, required unless *type
** isp
)* - [major, minor numbers][devices] for the device.You might want to change
p
here and below inDevice whitelist
section as well. Anyway I don't see this necessary, because I don't
think there is inkling for a specific type with backticks since it's
just consistent usage for markdown. See discussion in
#323 (comment)
I think the style we choose is less important thant that we pick
something and document it in 1 for consistency. Having to think
about this whenever someone inserts a string literal in new docs is
wasted time ;).
Signed-off-by: liangchenye <liangchenye@huawei.com>
LGTM and while this removes the empty values, i'll fix via #344 |
To match the omitempty which the Go property has had since 28cc423 (add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340). Signed-off-by: W. Trevor King <wking@tremily.us>
To match the omitempty which the Go property has had since 28cc423 (add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340). Signed-off-by: W. Trevor King <wking@tremily.us>
To match the omitempty which the Go property has had since 28cc423 (add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340). Signed-off-by: W. Trevor King <wking@tremily.us>
c
to "c" since it became a string.Signed-off-by: liangchenye liangchenye@huawei.com