Skip to content

Commit b85282a

Browse files
Minor fixes for go1.10 vet
go vet is a little stricter in go1.10. This fixes two new classes of issues that it picks up: - "Println arg list ends with redundant newline" (dicussed in golang/go#18085) - "Errorf format %d arg res.RowsAffected is a func value, not called"
1 parent d7a9ad5 commit b85282a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/go/src/rubrik/sqlapp/filesystem_simulator/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (r *replayedLog) printRecursive(uuid string) {
213213
sort.Strings(childNames)
214214
// TODO change in case of tree structure directory will need path
215215
fmt.Println(uuid)
216-
fmt.Println(childNames, "\n")
216+
fmt.Print(childNames, "\n\n")
217217
for _, childUUID := range childUUIDs {
218218
if fileTypeDirectory == (r.uuidToFile[childUUID]).typ {
219219
r.printRecursive(childUUID)

src/go/src/rubrik/sqlapp/filesystem_simulator/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func execOneRow(
194194
if n, err = res.RowsAffected(); err != nil {
195195
return err
196196
} else if n != 1 {
197-
return fmt.Errorf("%s affected %d rows, expected 1", msgPrefix, res.RowsAffected)
197+
return fmt.Errorf("%s affected %d rows, expected 1", msgPrefix, n)
198198
}
199199
return nil
200200
}
@@ -457,7 +457,7 @@ func printDirectoriesRecursive(
457457
}
458458
sort.Strings(childNames)
459459
fmt.Println(path)
460-
fmt.Println(childNames, "\n")
460+
fmt.Print(childNames, "\n\n")
461461

462462
for _, childName := range childNames {
463463
childUUID := childMap[childName]

0 commit comments

Comments
 (0)