-
Notifications
You must be signed in to change notification settings - Fork 453
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
Use protobuf/jsonpb
instead of golang json
in some cases
#178
Conversation
@@ -0,0 +1,829 @@ | |||
// Go support for Protocol Buffers - Google's data interchange format |
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 vendor update, does vendor.conf need update?
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.
Only update jsonpb here, I think we dont need update vendor.conf unless other model depend on the new version of protobuf. :)
@miaoyq How do we handle extra information then? |
@Random-Liu We could handle extra info via "outputStatusInfo" |
@Random-Liu "protobufObjectToJSON(status)" handles resp.Status, and "json.Marshal" handles resp.Info |
LGTM. @Random-Liu do you have any other concerns? |
@Random-Liu @feiskyer Updated, also related to #166. |
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.
LGTM with one nit.
cmd/crictl/util.go
Outdated
if err != nil { | ||
return "", err | ||
} | ||
|
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: unnecessary empty line.
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.
Done.
@miaoyq For some other commands, we also support yaml/json output. We should also use jsonpb for those cases. I'm fine with doing that in another PR, but please make sure the issue is open. |
Will do. |
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
/lgtm |
For #154
/cc @Random-Liu
Signed-off-by: Yanqiang Miao miao.yanqiang@zte.com.cn