mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Fix some lint errors.
This commit is contained in:
parent
454f60c758
commit
860748c08f
@ -83,7 +83,7 @@ func forceMultiLine(s string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func genFlagResult(flags *pflag.FlagSet) []cmdOption {
|
func genFlagResult(flags *pflag.FlagSet) []cmdOption {
|
||||||
result := make([]cmdOption, 0)
|
result := []cmdOption{}
|
||||||
|
|
||||||
flags.VisitAll(func(flag *pflag.Flag) {
|
flags.VisitAll(func(flag *pflag.Flag) {
|
||||||
// Todo, when we mark a shorthand is deprecated, but specify an empty message.
|
// Todo, when we mark a shorthand is deprecated, but specify an empty message.
|
||||||
@ -131,7 +131,7 @@ func genYaml(command *cobra.Command, parent, docsDir string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(command.Commands()) > 0 || len(parent) > 0 {
|
if len(command.Commands()) > 0 || len(parent) > 0 {
|
||||||
result := make([]string, 0)
|
result := []string{}
|
||||||
if len(parent) > 0 {
|
if len(parent) > 0 {
|
||||||
result = append(result, parent)
|
result = append(result, parent)
|
||||||
}
|
}
|
||||||
|
@ -925,7 +925,7 @@ func getCert(t *testing.T, pemData string) *x509.Certificate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getCerts(t *testing.T, pemData ...string) []*x509.Certificate {
|
func getCerts(t *testing.T, pemData ...string) []*x509.Certificate {
|
||||||
certs := make([]*x509.Certificate, 0)
|
certs := []*x509.Certificate{}
|
||||||
for _, pemData := range pemData {
|
for _, pemData := range pemData {
|
||||||
certs = append(certs, getCert(t, pemData))
|
certs = append(certs, getCert(t, pemData))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user