more concise to merge the array

Kubernetes-commit: 31aad75316b6e63840ec05b8bc9205fbb6d897aa
This commit is contained in:
Wang Guoliang 2018-02-11 21:27:11 +08:00 committed by Kubernetes Publisher
parent 627fa76a8b
commit c26e7f2e3a
1 changed files with 2 additions and 3 deletions

View File

@ -112,9 +112,8 @@ func TestNamedCertKeyArrayFlag(t *testing.T) {
for i, test := range tests {
fs := pflag.NewFlagSet("testNamedCertKeyArray", pflag.ContinueOnError)
var nkcs []NamedCertKey
for _, d := range test.def {
nkcs = append(nkcs, d)
}
nkcs = append(nkcs, test.def...)
fs.Var(NewNamedCertKeyArray(&nkcs), "tls-sni-cert-key", "usage")
args := []string{}