-
Notifications
You must be signed in to change notification settings - Fork 593
Fix type of devices type #323
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
Conversation
|
I found the example of |
|
I think we should change it from rune to string so that you can actually write "b", "c" in the json spec and you can easily know what type of device it is. What do you think? |
|
+1 for switching to |
|
On Mon, Feb 22, 2016 at 11:32:06AM -0800, Vish Kannan wrote:
ditto |
e614748 to
96c5ff0
Compare
|
Updated, thanks. |
Fixes: opencontainers/runc#566 For type rune, we can assign char as 'c' in struct, but after marshal, it'll be presented as int32. So in json config it needs to be presented as a number which is not friendly to be identified. Change it to string so that you can actually write "b", "c" in json spec and you can easily know what type of device it is. Signed-off-by: Qiang Huang <[email protected]>
In json, os.FileMode would be presented as a uint32, which is decimal. Otherwise we'll get error: `invalid character '6' after object key:value pair` when unmarshal the json file. Signed-off-by: Qiang Huang <[email protected]>
96c5ff0 to
ccf3a24
Compare
|
@wking Using quotes so people know that's a |
|
LGTM |
1 similar comment
|
LGTM |
Fixes: opencontainers/runc#566
For type rune, we can assign char as 'c' in struct, but after
marshal, it'll be presented as int32. So it should be a
number in our example of json file. Otherwise we'll got error:
json: cannot unmarshal string into Go value of type int32If we trying to unmarshal the json file.
Signed-off-by: Qiang Huang [email protected]