Skip to content

Commit f78f5f9

Browse files
fmeumlinzhp
andcommitted
Apply suggestions from code review
Co-authored-by: Zhongpeng Lin <zplin@uber.com>
1 parent d6daa76 commit f78f5f9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

go/tools/bazel_testing/bazel_testing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
)
4444

4545
// Set via x_defs.
46-
var goRootFile = ""
46+
var goRootFile string
4747

4848
const (
4949
// Standard Bazel exit codes.
@@ -321,7 +321,7 @@ func setupWorkspace(args Args, files []string) (dir string, cleanup func() error
321321

322322
// Copy or link the files for the tested repository.
323323
testedRepoDir := filepath.Join(execDir, "tested_repo")
324-
singleRepoPrefix := ""
324+
var singleRepoPrefix string
325325
for _, f := range files {
326326
if singleRepoPrefix == "" {
327327
singleRepoPrefix = f[:strings.Index(f, "/")+1]
@@ -338,7 +338,7 @@ func setupWorkspace(args Args, files []string) (dir string, cleanup func() error
338338
}
339339
}
340340
testedRepoModulePath := filepath.Join(testedRepoDir, "MODULE.bazel")
341-
testedModuleName := ""
341+
var testedModuleName string
342342
if _, err := os.Stat(testedRepoModulePath); err == nil {
343343
testedModuleName, err = loadName(testedRepoModulePath)
344344
if err != nil {

tests/core/cross/sdk_version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ go_cross_binary(
9393
}{
9494
TestCases: testCases,
9595
}
96-
mainFilesBuilder := &strings.Builder{}
96+
mainFilesBuilder := new(strings.Builder)
9797
if err := mainFilesTmpl.Execute(mainFilesBuilder, tmplValues); err != nil {
9898
panic(err)
9999
}

0 commit comments

Comments
 (0)