spatial/{kdtree,vptree}: fix lint warnings

Identified by staticcheck.
This commit is contained in:
Dan Kortschak
2019-10-12 22:57:48 +10:30
parent 9601737d99
commit 7a99c7bee7
2 changed files with 4 additions and 4 deletions

View File

@@ -660,9 +660,9 @@ func dotFile(t *Tree, label, dotString string) (err error) {
} }
defer f.Close() defer f.Close()
if dotString == "" { if dotString == "" {
fmt.Fprintf(f, dot(t, label)) fmt.Fprint(f, dot(t, label))
} else { } else {
fmt.Fprintf(f, dotString) fmt.Fprint(f, dotString)
} }
return return
} }

View File

@@ -549,9 +549,9 @@ func dotFile(t *Tree, label, dotString string) (err error) {
} }
defer f.Close() defer f.Close()
if dotString == "" { if dotString == "" {
fmt.Fprintf(f, dot(t, label)) fmt.Fprint(f, dot(t, label))
} else { } else {
fmt.Fprintf(f, dotString) fmt.Fprint(f, dotString)
} }
return return
} }