Removed explicit capacity in slice initialization

This commit is contained in:
Dasio 2020-02-26 15:44:52 +01:00
parent 9289ab99f2
commit 19cc79cac8
2 changed files with 3 additions and 3 deletions

View file

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

View file

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