From 19cc79cac89304bef3dfece1fdf7c564c0ce453a Mon Sep 17 00:00:00 2001 From: Dasio Date: Wed, 26 Feb 2020 15:44:52 +0100 Subject: [PATCH] Removed explicit capacity in slice initialization --- command/pr_checkout.go | 2 +- command/root.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/pr_checkout.go b/command/pr_checkout.go index b1f21e361..08a37033d 100644 --- a/command/pr_checkout.go +++ b/command/pr_checkout.go @@ -38,7 +38,7 @@ func prCheckout(cmd *cobra.Command, args []string) error { headRemote, _ = remotes.FindByRepo(pr.HeadRepositoryOwner.Login, pr.HeadRepository.Name) } - cmdQueue := make([][]string, 0, 4) + var cmdQueue [][]string newBranchName := pr.HeadRefName if headRemote != nil { // there is an existing git remote for PR head diff --git a/command/root.go b/command/root.go index 529b3165b..d61799ddc 100644 --- a/command/root.go +++ b/command/root.go @@ -97,7 +97,7 @@ var initContext = func() context.Context { // BasicClient returns an API client that borrows from but does not depend on // user configuration func BasicClient() (*api.Client, error) { - opts := make([]api.ClientOption, 0, 1) + var opts []api.ClientOption if verbose := os.Getenv("DEBUG"); verbose != "" { opts = append(opts, apiVerboseLog()) } @@ -122,7 +122,7 @@ var apiClientForContext = func(ctx context.Context) (*api.Client, error) { if err != nil { return nil, err } - opts := make([]api.ClientOption, 0, 4) + var opts []api.ClientOption if verbose := os.Getenv("DEBUG"); verbose != "" { opts = append(opts, apiVerboseLog()) }