-
Notifications
You must be signed in to change notification settings - Fork 553
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
unified stringPointer for *string #548
unified stringPointer for *string #548
Conversation
@@ -204,7 +204,7 @@ | |||
"type": "object", | |||
"properties": { | |||
"pageSize": { | |||
"type": "string" | |||
"$ref": "defs.json#/definitions/stringPointer" |
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.
This is a bit sticky, since the Markdown has pageSize
as required but the Go has it as a pointer. I don't see the point of declaring hugepageLimits
without setting both (in which case I don't think they should be pointers in either Go or JSON Schema), but I haven't read enough of the history to say for sure.
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.
@wking
Well, I'm a little confused about types in specs-go.
As you mentioned, pagesize is required
, but it is declared as a pointer in GO.
As Namespace's property Path is optional
, but it is declared as string type in GO.
So, is there is unified standard to indicate optional or required in GO?
@Mashimiao do you have a case where the JSON value for the cgrouppath is |
On Tue, Aug 30, 2016 at 10:33:23AM -0700, Vincent Batts wrote:
cgroupsPath is optional 1, and for most (all?) of our optional |
On Thu, Sep 29, 2016 at 01:43:56AM -0700, Ma Shimiao wrote:
If it's required, I think it should not be a pointer in Go, and that
This is less cut and dried. The current policy is in 1, and for |
2a98953
to
358a56d
Compare
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@wking @opencontainers/runtime-spec-maintainers PTAL |
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com