Merge pull request #101119 from BinacsLee/binacs-cmd-reuse-function
code cleanup: Abstract repetitive codes in `cmd` as a function Kubernetes-commit: ed4fa17d01545b33562aea91b7f3487a872bf8fb
This commit is contained in:
parent
9e0dad9438
commit
e25550bce3
|
|
@ -18,6 +18,10 @@
|
|||
"ImportPath": "cloud.google.com/go/datastore",
|
||||
"Rev": "v1.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "cloud.google.com/go/firestore",
|
||||
"Rev": "v1.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "cloud.google.com/go/pubsub",
|
||||
"Rev": "v1.2.0"
|
||||
|
|
@ -74,6 +78,10 @@
|
|||
"ImportPath": "github.com/NYTimes/gziphandler",
|
||||
"Rev": "v1.1.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/OneOfOne/xxhash",
|
||||
"Rev": "v1.2.2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/PuerkitoBio/purell",
|
||||
"Rev": "v1.1.1"
|
||||
|
|
@ -90,6 +98,18 @@
|
|||
"ImportPath": "github.com/alecthomas/units",
|
||||
"Rev": "c3de453c63f4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/armon/circbuf",
|
||||
"Rev": "bbbad097214e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/armon/go-metrics",
|
||||
"Rev": "f0300d1749da"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/armon/go-radix",
|
||||
"Rev": "7fddfc383310"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/asaskevich/govalidator",
|
||||
"Rev": "f61b66f89f4a"
|
||||
|
|
@ -102,6 +122,10 @@
|
|||
"ImportPath": "github.com/bgentry/speakeasy",
|
||||
"Rev": "v0.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/bketelsen/crypt",
|
||||
"Rev": "5cbc8cc4026c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/blang/semver",
|
||||
"Rev": "v3.5.1"
|
||||
|
|
@ -110,6 +134,10 @@
|
|||
"ImportPath": "github.com/census-instrumentation/opencensus-proto",
|
||||
"Rev": "v0.2.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/cespare/xxhash",
|
||||
"Rev": "v1.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/cespare/xxhash/v2",
|
||||
"Rev": "v2.1.1"
|
||||
|
|
@ -134,6 +162,14 @@
|
|||
"ImportPath": "github.com/cockroachdb/datadriven",
|
||||
"Rev": "80d97fb3cbaa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/coreos/bbolt",
|
||||
"Rev": "v1.3.2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/coreos/etcd",
|
||||
"Rev": "v3.3.13"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/coreos/go-oidc",
|
||||
"Rev": "v2.1.0"
|
||||
|
|
@ -150,6 +186,10 @@
|
|||
"ImportPath": "github.com/coreos/pkg",
|
||||
"Rev": "399ea9e2e55f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/cpuguy83/go-md2man/v2",
|
||||
"Rev": "v2.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/creack/pty",
|
||||
"Rev": "v1.1.11"
|
||||
|
|
@ -162,6 +202,10 @@
|
|||
"ImportPath": "github.com/dgrijalva/jwt-go",
|
||||
"Rev": "v3.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/dgryski/go-sip13",
|
||||
"Rev": "e10d5fee7954"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/docopt/docopt-go",
|
||||
"Rev": "ee0de3bc6815"
|
||||
|
|
@ -298,6 +342,10 @@
|
|||
"ImportPath": "github.com/googleapis/gnostic",
|
||||
"Rev": "v0.5.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gopherjs/gopherjs",
|
||||
"Rev": "0766667cb4d1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gorilla/websocket",
|
||||
"Rev": "v1.4.2"
|
||||
|
|
@ -318,10 +366,78 @@
|
|||
"ImportPath": "github.com/grpc-ecosystem/grpc-gateway",
|
||||
"Rev": "v1.9.5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/consul/api",
|
||||
"Rev": "v1.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/consul/sdk",
|
||||
"Rev": "v0.1.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/errwrap",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-cleanhttp",
|
||||
"Rev": "v0.5.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-immutable-radix",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-msgpack",
|
||||
"Rev": "v0.5.3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-multierror",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-rootcerts",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-sockaddr",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-syslog",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-uuid",
|
||||
"Rev": "v1.0.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go.net",
|
||||
"Rev": "v0.0.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/golang-lru",
|
||||
"Rev": "v0.5.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/hcl",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/logutils",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/mdns",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/memberlist",
|
||||
"Rev": "v0.1.3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/serf",
|
||||
"Rev": "v0.8.2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hpcloud/tail",
|
||||
"Rev": "v1.0.0"
|
||||
|
|
@ -350,6 +466,10 @@
|
|||
"ImportPath": "github.com/jstemmer/go-junit-report",
|
||||
"Rev": "v0.9.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jtolds/gls",
|
||||
"Rev": "v4.20.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/julienschmidt/httprouter",
|
||||
"Rev": "v1.2.0"
|
||||
|
|
@ -382,6 +502,10 @@
|
|||
"ImportPath": "github.com/kr/text",
|
||||
"Rev": "v0.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/magiconair/properties",
|
||||
"Rev": "v1.8.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson",
|
||||
"Rev": "v0.7.0"
|
||||
|
|
@ -402,6 +526,30 @@
|
|||
"ImportPath": "github.com/matttproud/golang_protobuf_extensions",
|
||||
"Rev": "c182affec369"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/miekg/dns",
|
||||
"Rev": "v1.0.14"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/cli",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/go-homedir",
|
||||
"Rev": "v1.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/go-testing-interface",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/gox",
|
||||
"Rev": "v0.4.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/iochan",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mitchellh/mapstructure",
|
||||
"Rev": "v1.1.2"
|
||||
|
|
@ -438,6 +586,10 @@
|
|||
"ImportPath": "github.com/niemeyer/pretty",
|
||||
"Rev": "a10e7caefd8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/oklog/ulid",
|
||||
"Rev": "v1.3.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/olekukonko/tablewriter",
|
||||
"Rev": "a0225b3f23b5"
|
||||
|
|
@ -450,6 +602,14 @@
|
|||
"ImportPath": "github.com/onsi/gomega",
|
||||
"Rev": "v1.7.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/pascaldekloe/goe",
|
||||
"Rev": "57f6aae5913c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/pelletier/go-toml",
|
||||
"Rev": "v1.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/peterbourgon/diskv",
|
||||
"Rev": "v2.0.1"
|
||||
|
|
@ -462,6 +622,10 @@
|
|||
"ImportPath": "github.com/pmezard/go-difflib",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/posener/complete",
|
||||
"Rev": "v1.1.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/pquerna/cachecontrol",
|
||||
"Rev": "0dec1b30a021"
|
||||
|
|
@ -482,6 +646,10 @@
|
|||
"ImportPath": "github.com/prometheus/procfs",
|
||||
"Rev": "v0.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/prometheus/tsdb",
|
||||
"Rev": "v0.7.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rogpeppe/fastuuid",
|
||||
"Rev": "6724a57986af"
|
||||
|
|
@ -490,26 +658,66 @@
|
|||
"ImportPath": "github.com/rogpeppe/go-internal",
|
||||
"Rev": "v1.3.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/russross/blackfriday/v2",
|
||||
"Rev": "v2.0.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ryanuber/columnize",
|
||||
"Rev": "9b3edd62028f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/sean-/seed",
|
||||
"Rev": "e2103e2c3529"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/shurcooL/sanitized_anchor_name",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/sirupsen/logrus",
|
||||
"Rev": "v1.7.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/assertions",
|
||||
"Rev": "b2de0cb4f26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey",
|
||||
"Rev": "v1.6.4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/soheilhy/cmux",
|
||||
"Rev": "v0.1.4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spaolacci/murmur3",
|
||||
"Rev": "f09979ecbc72"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/afero",
|
||||
"Rev": "v1.2.2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/cast",
|
||||
"Rev": "v1.3.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/cobra",
|
||||
"Rev": "v0.0.3"
|
||||
"Rev": "v1.1.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/jwalterweatherman",
|
||||
"Rev": "v1.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/pflag",
|
||||
"Rev": "v1.0.5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/viper",
|
||||
"Rev": "v1.7.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/stoewer/go-strcase",
|
||||
"Rev": "v1.2.0"
|
||||
|
|
@ -522,6 +730,10 @@
|
|||
"ImportPath": "github.com/stretchr/testify",
|
||||
"Rev": "v1.6.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/subosito/gotenv",
|
||||
"Rev": "v1.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/tmc/grpc-websocket-proxy",
|
||||
"Rev": "0ad062ec5ee5"
|
||||
|
|
@ -670,6 +882,10 @@
|
|||
"ImportPath": "gopkg.in/inf.v0",
|
||||
"Rev": "v0.9.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/ini.v1",
|
||||
"Rev": "v1.51.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/natefinch/lumberjack.v2",
|
||||
"Rev": "v2.0.0"
|
||||
|
|
@ -704,7 +920,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "b64c6b5ea77c"
|
||||
"Rev": "95cee4894d89"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
|
|
@ -712,11 +928,11 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go",
|
||||
"Rev": "d696ff0aadf6"
|
||||
"Rev": "071918f6b2dc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/component-base",
|
||||
"Rev": "873d5fac2edc"
|
||||
"Rev": "22edd95d0cdf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo",
|
||||
|
|
|
|||
17
go.mod
17
go.mod
|
|
@ -38,10 +38,10 @@ require (
|
|||
google.golang.org/grpc v1.27.1
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/square/go-jose.v2 v2.2.2
|
||||
k8s.io/api v0.0.0
|
||||
k8s.io/apimachinery v0.0.0
|
||||
k8s.io/client-go v0.0.0
|
||||
k8s.io/component-base v0.0.0
|
||||
k8s.io/api v0.0.0-20210518101556-95cee4894d89
|
||||
k8s.io/apimachinery v0.0.0-20210518100450-ba18a62c2bc2
|
||||
k8s.io/client-go v0.0.0-20210518102859-071918f6b2dc
|
||||
k8s.io/component-base v0.0.0-20210518111229-22edd95d0cdf
|
||||
k8s.io/klog/v2 v2.8.0
|
||||
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
|
||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||
|
|
@ -51,9 +51,8 @@ require (
|
|||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => ../api
|
||||
k8s.io/apimachinery => ../apimachinery
|
||||
k8s.io/apiserver => ../apiserver
|
||||
k8s.io/client-go => ../client-go
|
||||
k8s.io/component-base => ../component-base
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210518101556-95cee4894d89
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210518100450-ba18a62c2bc2
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20210518102859-071918f6b2dc
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20210518111229-22edd95d0cdf
|
||||
)
|
||||
|
|
|
|||
8
go.sum
8
go.sum
|
|
@ -673,6 +673,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.0.0-20210518101556-95cee4894d89 h1:uQC3v+9tBtiF1mXGGdM3vN7gDW7StAJCFO4sO0USjhE=
|
||||
k8s.io/api v0.0.0-20210518101556-95cee4894d89/go.mod h1:ZFbvp5WWMe1V9auNefRgVPZzDDSzTMLlulKIDnadhQU=
|
||||
k8s.io/apimachinery v0.0.0-20210518100450-ba18a62c2bc2 h1:KvBnUwNEF2aGJHZbEJW5ck1Tq1R04dSsMPHOSQc2gYo=
|
||||
k8s.io/apimachinery v0.0.0-20210518100450-ba18a62c2bc2/go.mod h1:fBRSkoylGO2QUTae8Wb2wac6pZ83/r+tL6HFSXGbzfs=
|
||||
k8s.io/client-go v0.0.0-20210518102859-071918f6b2dc h1:Q3Dlu4T3gZJKvSWtkqguBxyHojTzqtfp6UbycFShbmc=
|
||||
k8s.io/client-go v0.0.0-20210518102859-071918f6b2dc/go.mod h1:YynJhqjXSnTaGvKwByJj9Btu0hoqz5jA4+J6w2ZKCcU=
|
||||
k8s.io/component-base v0.0.0-20210518111229-22edd95d0cdf h1:3bEunHBgsWM1N16gXiP8btB7W5Vg6Aoy2Llxa50BvLs=
|
||||
k8s.io/component-base v0.0.0-20210518111229-22edd95d0cdf/go.mod h1:c7pSsx/xCTvG9FxooKMmSQZ7Fliz5FD7MWXeCiDuZiY=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
|
||||
|
|
|
|||
Loading…
Reference in New Issue