From a44fae09a0d64e5b51f46a2076ba8f5026a6bafb Mon Sep 17 00:00:00 2001 From: Benoit Gagnon Date: Thu, 24 Oct 2019 10:46:51 -0400 Subject: [PATCH] declare Buffer instead of using NewBuffer Co-Authored-By: David Genest --- pkg/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git.go b/pkg/git.go index e08bb85..375a5b8 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -144,7 +144,7 @@ func gzipUntar(dst string, r io.Reader, subDir string) error { } func remoteResolveRef(ctx context.Context, remote string, ref string) (string, error) { - b := bytes.NewBuffer(nil) + b := &bytes.Buffer{} cmd := exec.CommandContext(ctx, "git", "ls-remote", "--heads", "--tags", "--refs", "--quiet", remote, ref) cmd.Stdin = os.Stdin cmd.Stdout = b