Fix go vet error

stderr is a bytes.Buffer, but the String() method has a pointer
receiver, so stderr does not satisify the Stringer interface
and can't be used for a %s argument.  Make stderr a *bytes.Buffer
instead.

Test: go vet ./android
Change-Id: I994402cb954946279375c9d447ad3854380381cc
This commit is contained in:
Colin Cross 2020-10-09 19:24:15 -07:00
parent 6682ef42a4
commit ff0278b32a
1 changed files with 2 additions and 2 deletions

View File

@ -188,8 +188,8 @@ func (context *bazelContext) issueBazelCommand(command string, labels []string,
bazelCmd.Dir = context.workspaceDir
bazelCmd.Env = append(os.Environ(), "HOME="+context.homeDir, pwdPrefix())
var stderr bytes.Buffer
bazelCmd.Stderr = &stderr
stderr := &bytes.Buffer{}
bazelCmd.Stderr = stderr
if output, err := bazelCmd.Output(); err != nil {
return "", fmt.Errorf("bazel command failed. command: [%s], error [%s]", bazelCmd, stderr)