Skip to content
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
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
run:
skip-files:
- ".*_test.go$"
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: go

go:
- 1.12

script:
- go test -covermode count -coverprofile coverage.txt -args -alhoc
after_success:
# See https://github.com/codecov/example-go
- bash <(curl -s https://codecov.io/bash)
- set -e
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.17.1
- ./bin/golangci-lint run ./...
- go test -v -coverprofile cover.out -args -alhoc

go:
- 1.6
- 1.7
- tip
after_success:
- bash <(curl -s https://codecov.io/bash) -f cover.out
4 changes: 1 addition & 3 deletions suffix.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ func (node *_Node) longestSuffix(key []byte) (matchedKey []byte, value interface
if found {
return matchedKey, value, found
}
break
}
}
} else if keyLen == edgeLabelLen {
Expand All @@ -290,7 +289,6 @@ func (node *_Node) longestSuffix(key []byte) (matchedKey []byte, value interface
if found {
return matchedKey, value, found
}
break
}
}
} else {
Expand Down Expand Up @@ -514,7 +512,7 @@ func (tree *Tree) Walk(f func(key []byte, value interface{}) bool) {
func (tree *Tree) WalkSuffix(suffix []byte, f func(key []byte, value interface{}) bool) {
if len(tree.root.edges) != 0 {
stop := false
if suffix == nil || len(suffix) == 0 {
if len(suffix) == 0 {
tree.root.walk([]byte{}, f, &stop)
} else {
startingPoint, extraLabel, found := tree.root.getPointHasSuffix(suffix)
Expand Down