Skip to content
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

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

fuweid
Copy link
Contributor

@fuweid fuweid commented Feb 19, 2020

  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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 19, 2020
@fuweid
Copy link
Contributor Author

fuweid commented Feb 19, 2020

/assign @feiskyer

Copy link
Member

@saschagrunert saschagrunert left a 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

@@ -0,0 +1,71 @@
/*
Copyright 2017 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copyright 2017 The Kubernetes Authors.
Copyright 2020 The Kubernetes Authors.

"strings"
"text/template"

pkgerrors "github.com/pkg/errors"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pkgerrors "github.com/pkg/errors"
"github.com/pkg/errors"

@@ -0,0 +1,66 @@
/*
Copyright 2017 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1

@fuweid fuweid force-pushed the me-add-template-output branch from 33d382d to 143cad8 Compare February 19, 2020 15:00
@fuweid
Copy link
Contributor Author

fuweid commented Feb 19, 2020

@saschagrunert thank you for review! Updated. PTAL

@fuweid fuweid force-pushed the me-add-template-output branch 2 times, most recently from 5850928 to 3b82868 Compare February 19, 2020 15:14
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>
@fuweid fuweid force-pushed the me-add-template-output branch from 3b82868 to e602578 Compare February 19, 2020 15:21
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@fuweid
Copy link
Contributor Author

fuweid commented Feb 20, 2020

Is there anything wrong about cla/linuxfoundation check?

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2020
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2020
@k8s-ci-robot k8s-ci-robot merged commit 86dfb0f into kubernetes-sigs:master Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants