mirror of
https://github.com/vocdoni/arbo.git
synced 2026-01-09 13:57:54 -05:00
trying to fix some linter errors
This commit is contained in:
4
dbg.go
4
dbg.go
@@ -28,7 +28,7 @@ func (d *dbgStats) incHash() {
|
||||
d.hash++
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//nolint:all
|
||||
func (d *dbgStats) incDbGet() {
|
||||
if d == nil {
|
||||
return
|
||||
@@ -36,7 +36,7 @@ func (d *dbgStats) incDbGet() {
|
||||
d.dbGet++
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//nolint:all
|
||||
func (d *dbgStats) incDbPut() {
|
||||
if d == nil {
|
||||
return
|
||||
|
||||
2
tree.go
2
tree.go
@@ -303,7 +303,7 @@ func (t *Tree) addBatchInDisk(wTx db.WriteTx, keys, values [][]byte) ([]Invalid,
|
||||
}
|
||||
|
||||
if len(subRoots) != nCPU {
|
||||
return nil, fmt.Errorf("This error should not be reached."+
|
||||
return nil, fmt.Errorf("this error should not be reached."+
|
||||
" len(subRoots) != nCPU, len(subRoots)=%d, nCPU=%d."+
|
||||
" Please report it in a new issue:"+
|
||||
" https://github.com/vocdoni/arbo/issues/new", len(subRoots), nCPU)
|
||||
|
||||
10
vt.go
10
vt.go
@@ -171,7 +171,7 @@ func (t *vt) addBatch(ks, vs [][]byte) ([]Invalid, error) {
|
||||
}
|
||||
}
|
||||
if len(nodesAtL) != nCPU {
|
||||
return nil, fmt.Errorf("This error should not be reached."+
|
||||
return nil, fmt.Errorf("this error should not be reached."+
|
||||
" len(nodesAtL) != nCPU, len(nodesAtL)=%d, nCPU=%d."+
|
||||
" Please report it in a new issue:"+
|
||||
" https://github.com/vocdoni/arbo/issues/new", len(nodesAtL), nCPU)
|
||||
@@ -239,7 +239,7 @@ func (n *node) getNodesAtLevel(currLvl, l int) ([]*node, error) {
|
||||
return []*node{n}, nil
|
||||
}
|
||||
if currLvl >= l {
|
||||
return nil, fmt.Errorf("This error should not be reached."+
|
||||
return nil, fmt.Errorf("this error should not be reached."+
|
||||
" currLvl >= l, currLvl=%d, l=%d."+
|
||||
" Please report it in a new issue:"+
|
||||
" https://github.com/vocdoni/arbo/issues/new", currLvl, l)
|
||||
@@ -625,7 +625,7 @@ func (n *node) computeHashes(currLvl, maxLvl int, p *params, pairs [][2][]byte)
|
||||
return pairs, nil
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//nolint:all
|
||||
func (t *vt) graphviz(w io.Writer) error {
|
||||
fmt.Fprintf(w, `digraph hierarchy {
|
||||
node [fontname=Monospace,fontsize=10,shape=box]
|
||||
@@ -637,7 +637,7 @@ node [fontname=Monospace,fontsize=10,shape=box]
|
||||
return nil
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//nolint:all
|
||||
func (n *node) graphviz(w io.Writer, p *params, nEmpties int) (int, error) {
|
||||
if n == nil {
|
||||
return nEmpties, nil
|
||||
@@ -704,7 +704,7 @@ func (n *node) graphviz(w io.Writer, p *params, nEmpties int) (int, error) {
|
||||
return nEmpties, nil
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//nolint:all
|
||||
func (t *vt) printGraphviz() error {
|
||||
w := bytes.NewBufferString("")
|
||||
fmt.Fprintf(w,
|
||||
|
||||
Reference in New Issue
Block a user