Fix goreportcard issues (#271)

* Fixed misspell

* Fixed ineffassign

`user` and `password` always got overwritten
`orderedVals` was initialized with an empty array but always got overwritten by either `sortByLines()` or `sortAlphabetical`
`err` was assigned a `nil` value that was either overwritten or unused anyways

* Fix comment for DeletePath

The comment assumed the method was named Delete, i guess a rename happened at some point

* Update doc_test.go
This commit is contained in:
Ceriath
2019-04-11 13:11:29 +02:00
committed by Thomas Pelletier
parent d95bfe020e
commit 51edd0ca49
5 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ func (t *Tree) writeTo(w io.Writer, indent, keyspace string, bytesCount int64, a
}
func (t *Tree) writeToOrdered(w io.Writer, indent, keyspace string, bytesCount int64, arraysOneElementPerLine bool, ord marshalOrder) (int64, error) {
orderedVals := make([]sortNode, 0)
var orderedVals []sortNode
switch ord {
case OrderPreserve: