-
Notifications
You must be signed in to change notification settings - Fork 460
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
cmd: add go-template option for inspect commands #575
cmd: add go-template option for inspect commands #575
Conversation
/assign @feiskyer |
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.
Hey, I just have some nits, generally LGTM
cmd/crictl/templates.go
Outdated
@@ -0,0 +1,71 @@ | |||
/* | |||
Copyright 2017 The Kubernetes Authors. |
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.
Copyright 2017 The Kubernetes Authors. | |
Copyright 2020 The Kubernetes Authors. |
cmd/crictl/templates.go
Outdated
"strings" | ||
"text/template" | ||
|
||
pkgerrors "github.com/pkg/errors" |
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.
pkgerrors "github.com/pkg/errors" | |
"github.com/pkg/errors" |
cmd/crictl/templates_test.go
Outdated
@@ -0,0 +1,66 @@ | |||
/* | |||
Copyright 2017 The Kubernetes Authors. |
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.
Copyright 2017 The Kubernetes Authors. | |
Copyright 2020 The Kubernetes Authors. |
go.mod
Outdated
@@ -14,6 +14,7 @@ require ( | |||
github.com/opencontainers/go-digest v1.0.0-rc1 | |||
github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52 | |||
github.com/pborman/uuid v1.2.0 | |||
github.com/pkg/errors v0.8.1 |
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.
github.com/pkg/errors v0.8.1 | |
github.com/pkg/errors v0.9.1 |
33d382d
to
143cad8
Compare
@saschagrunert thank you for review! Updated. PTAL |
5850928
to
3b82868
Compare
1. Add github.com/pkg/errors package in go.mod; 2. Add go-template value and template option to inspect{,p,i}/info/imagesfsinfo subcommands; 3. Add "table" as default value in ps/pods subcommands. Signed-off-by: Wei Fu <fuweid89@gmail.com>
3b82868
to
e602578
Compare
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 👍
Is there anything wrong about |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, fuweid The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
inspect{,p,i}/info/imagesfsinfo subcommands;
Signed-off-by: Wei Fu fuweid89@gmail.com