Skip to content

Commit

Permalink
fix staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed May 13, 2021
1 parent d2e0942 commit acaa692
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ func (t *Batch) asyncCommit() {
t.activeCommits++
t.nodes = make([]Node, 0, numBlocks)
t.size = 0

return
}

// Add adds a node to the batch and commits the batch if necessary.
Expand Down
4 changes: 2 additions & 2 deletions daghelpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ func InitNode(d []byte) *TestNode {
}

func (n *TestNode) Resolve([]string) (interface{}, []string, error) {
return nil, nil, EmptyNodeError
return nil, nil, ErrEmptyNode
}

func (n *TestNode) Tree(string, int) []string {
return nil
}

func (n *TestNode) ResolveLink([]string) (*Link, []string, error) {
return nil, nil, EmptyNodeError
return nil, nil, ErrEmptyNode
}

func (n *TestNode) Copy() Node {
Expand Down
6 changes: 3 additions & 3 deletions format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (

type EmptyNode struct{}

var EmptyNodeError error = errors.New("dummy node")
var ErrEmptyNode error = errors.New("dummy node")

func (n *EmptyNode) Resolve([]string) (interface{}, []string, error) {
return nil, nil, EmptyNodeError
return nil, nil, ErrEmptyNode
}

func (n *EmptyNode) Tree(string, int) []string {
return nil
}

func (n *EmptyNode) ResolveLink([]string) (*Link, []string, error) {
return nil, nil, EmptyNodeError
return nil, nil, ErrEmptyNode
}

func (n *EmptyNode) Copy() Node {
Expand Down

0 comments on commit acaa692

Please sign in to comment.