Skip to content

Commit

Permalink
trying to fix some linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Nov 14, 2024
1 parent d55ce63 commit e0f0cf7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dbg.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ func (d *dbgStats) incHash() {
d.hash++
}

//nolint:unused
//nolint:all
func (d *dbgStats) incDbGet() {
if d == nil {
return
}
d.dbGet++
}

//nolint:unused
//nolint:all
func (d *dbgStats) incDbPut() {
if d == nil {
return
Expand Down
2 changes: 1 addition & 1 deletion tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions vt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e0f0cf7

Please sign in to comment.