Skip to content

Commit 67c1a33

Browse files
authored
test: tweak CI configure (#1)
1 parent 63d47d7 commit 67c1a33

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
run:
2+
skip-files:
3+
- ".*_test.go$"

.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
language: go
22

3+
go:
4+
- 1.12
5+
36
script:
4-
- go test -covermode count -coverprofile coverage.txt -args -alhoc
5-
after_success:
6-
# See https://github.com/codecov/example-go
7-
- bash <(curl -s https://codecov.io/bash)
7+
- set -e
8+
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.17.1
9+
- ./bin/golangci-lint run ./...
10+
- go test -v -coverprofile cover.out -args -alhoc
811

9-
go:
10-
- 1.6
11-
- 1.7
12-
- tip
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash) -f cover.out

suffix.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ func (node *_Node) longestSuffix(key []byte) (matchedKey []byte, value interface
277277
if found {
278278
return matchedKey, value, found
279279
}
280-
break
281280
}
282281
}
283282
} else if keyLen == edgeLabelLen {
@@ -290,7 +289,6 @@ func (node *_Node) longestSuffix(key []byte) (matchedKey []byte, value interface
290289
if found {
291290
return matchedKey, value, found
292291
}
293-
break
294292
}
295293
}
296294
} else {
@@ -514,7 +512,7 @@ func (tree *Tree) Walk(f func(key []byte, value interface{}) bool) {
514512
func (tree *Tree) WalkSuffix(suffix []byte, f func(key []byte, value interface{}) bool) {
515513
if len(tree.root.edges) != 0 {
516514
stop := false
517-
if suffix == nil || len(suffix) == 0 {
515+
if len(suffix) == 0 {
518516
tree.root.walk([]byte{}, f, &stop)
519517
} else {
520518
startingPoint, extraLabel, found := tree.root.getPointHasSuffix(suffix)

0 commit comments

Comments
 (0)