Fix some lint errors.

This commit is contained in:
Brendan Burns 2016-11-12 21:25:09 -08:00
parent 454f60c758
commit 860748c08f
2 changed files with 3 additions and 3 deletions

View File

@ -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)
} }

View File

@ -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))
} }