Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix staticcheck #60

Merged
merged 1 commit into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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