-
Notifications
You must be signed in to change notification settings - Fork 144
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
validate: add namespace if is duplicated check #295
validate: add namespace if is duplicated check #295
Conversation
} | ||
|
||
nsType := v.spec.Linux.Namespaces[index].Type | ||
nsPath := v.spec.Linux.Namespaces[index].Path |
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.
nit: I'd rather have ns := v.spec.Linux.Namespaces[index]
. Only one variable (vs. the two here), and you only need an extra character when you use it (e.g. ns.Type
vs your nsType
).
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.
fixed.
de21837 looks good to me, although I'd slightly prefer a single convenience variable. Do we want to link here from the error message? Or are we punting on that until we're ready for some future push on #16? |
Signed-off-by: Ma Shimiao <[email protected]>
de21837
to
eea002f
Compare
@wking I think we'd better don't link from error message in this PR. If we want to add links, we should find out all error message related with spec. part of messages have link, part of not, that does not look unified. And maybe adding links will cause maintaining problem, that needs more discussion |
@hqhq @mrunalp @liangchenye PTAL |
ping @opencontainers/runtime-tools-maintainers |
Signed-off-by: Ma Shimiao [email protected]